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 |
|---|---|---|---|---|---|---|
Convenience wrapper for the getRule method, which returns the TypeCheckerProofRule that was applied to this node or null if no rule was applied to this node so far. | public TypeCheckerProofRule getRule ( ) ; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Rule getRule();",
"public IRule getRule()\n\t{\n\t\treturn this.rule;\n\t}",
"public RuleType getRuleType() {\n return ruleType;\n }",
"public R getRule() {\n return this.rule;\n }",
"public ParserRule getRule() { return rule; }",
"public ParserRule getRule() { return rule; }"... | [
"0.6287278",
"0.6127419",
"0.60412854",
"0.5954236",
"0.591974",
"0.591974",
"0.591974",
"0.591974",
"0.591974",
"0.591974",
"0.591974",
"0.591974",
"0.591974",
"0.591974",
"0.591974",
"0.591974",
"0.591974",
"0.591974",
"0.591974",
"0.591974",
"0.591974",
"0.591974",
"0.... | 0.77220607 | 0 |
get the proof steps of this node | public ProofStep [ ] getSteps ( ) ; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public com.sforce.soap.enterprise.QueryResult getProcessSteps() {\r\n return processSteps;\r\n }",
"int getStep();",
"int getStep();",
"int getStep();",
"@gw.internal.gosu.parser.ExtendedProperty\n public entity.LoadStep[] getSteps();",
"public int getSteps() {\n\t\treturn steps;\n\t}",
"pub... | [
"0.60240936",
"0.58176965",
"0.58176965",
"0.58176965",
"0.5751992",
"0.57120997",
"0.5675213",
"0.5659709",
"0.565692",
"0.56496",
"0.5647782",
"0.56448734",
"0.56364125",
"0.5618739",
"0.5616895",
"0.54724854",
"0.5420877",
"0.5410082",
"0.5402165",
"0.5358455",
"0.533924",... | 0.72526467 | 0 |
get the type substitution list of this node | public ArrayList < TypeSubstitution > getSubstitution ( ) ; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Ref<? extends Type>> typeVariables();",
"public List<__Type> getTypes() {\n return (List<__Type>) get(\"types\");\n }",
"public ArrayList<String> getTypes(){\n return this.types;\n }",
"public java.util.List<Type> getType() { \n\t\tif (myType == null) {\n\t\t\tmyType = new ja... | [
"0.6601568",
"0.6225831",
"0.620853",
"0.59872067",
"0.5985915",
"0.5939677",
"0.58884585",
"0.5845534",
"0.5826696",
"0.580452",
"0.577078",
"0.5759764",
"0.57448274",
"0.5736042",
"0.57099295",
"0.56559247",
"0.5652607",
"0.5647658",
"0.5630774",
"0.5622944",
"0.56168604",
... | 0.7849795 | 0 |
get the first type formula of this type formula list | public TypeFormula getFirstFormula ( ) ; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Type getTypeFirstRep() {\n\t\tif (getType().isEmpty()) {\n\t\t\treturn addType();\n\t\t}\n\t\treturn getType().get(0); \n\t}",
"public T1 getFirst() {\n\t\treturn first;\n\t}",
"public E getFirst(){\n return head.getNext().getElement();\n }",
"public T getFirst() {\n\treturn _front.getCargo();\n ... | [
"0.6473894",
"0.5911456",
"0.5894033",
"0.58857936",
"0.58407974",
"0.58157074",
"0.5807742",
"0.58013994",
"0.58013994",
"0.57853323",
"0.5758404",
"0.5699984",
"0.567182",
"0.5669505",
"0.5666765",
"0.56543565",
"0.56421626",
"0.5638144",
"0.5637712",
"0.5630622",
"0.561986... | 0.87515056 | 0 |
get the type formula list of this node | public ArrayList < TypeFormula > getAllFormulas ( ) ; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Type> getTypeList() {\n\t\treturn sm.selectList(\"com.lanzhou.entity.Longpay.getTypeList\");\n\t}",
"public java.util.List<Type> getType() { \n\t\tif (myType == null) {\n\t\t\tmyType = new java.util.ArrayList<Type>();\n\t\t}\n\t\treturn myType;\n\t}",
"public List<IComplexFormula> getFormulas(){\r... | [
"0.63176835",
"0.624851",
"0.6224403",
"0.61819863",
"0.6176098",
"0.6099664",
"0.609728",
"0.60336286",
"0.6032311",
"0.59398246",
"0.5902428",
"0.58926386",
"0.5891913",
"0.5849495",
"0.5840539",
"0.58365214",
"0.57832",
"0.57623523",
"0.5749939",
"0.5748756",
"0.5724968",
... | 0.690857 | 0 |
Makes one category a child of another. | public void addCategoryToCategory(PortletCategory child,
PortletCategory parent); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addChild( ChildType child );",
"protected void makeChild(FHeapNode y, FHeapNode x)\r\n { \r\n y.left.right = y.right;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// remove y from root list of heap\r\n y.right.left = y.left;\r\n \r\n y.parent = x;\t\t\t\t\t\t\t\t\t\t\t\t\t... | [
"0.60898876",
"0.5740334",
"0.5704597",
"0.5632156",
"0.54739887",
"0.54653347",
"0.5461471",
"0.5417804",
"0.5391284",
"0.5386259",
"0.5376002",
"0.5362738",
"0.535854",
"0.534971",
"0.5332417",
"0.5309706",
"0.53065133",
"0.52989125",
"0.5261257",
"0.5231849",
"0.51976615",... | 0.637241 | 0 |
Deletes a portlet category. | public void deletePortletCategory(PortletCategory category); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void deleteCategory(Category category);",
"void deleteCategoryById(int categoryId);",
"void deleteCategoryByName(String categoryName);",
"void removeCategory(Category category);",
"void delete(Category category);",
"void deleteCategory(Integer id);",
"Boolean deleteCategory(Integer category_Id) throws ... | [
"0.7011269",
"0.6993326",
"0.6978157",
"0.68746585",
"0.6650255",
"0.6644336",
"0.66398335",
"0.66260064",
"0.63304496",
"0.6318512",
"0.6262099",
"0.62509215",
"0.6179459",
"0.61643124",
"0.6114522",
"0.60923094",
"0.60770035",
"0.5923658",
"0.59202576",
"0.5917897",
"0.5889... | 0.87440646 | 0 |
Gets all child portlet categories for a parent category. | public Set<PortletCategory> getAllChildCategories(
PortletCategory parent); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Set<PortletCategory> getChildCategories(PortletCategory parent);",
"public Set<IPortletDefinition> getAllChildPortlets(\n\t\t\tPortletCategory parent);",
"public Set<IPortletDefinition> getChildPortlets(PortletCategory parent);",
"public Set<PortletCategory> getParentCategories(PortletCategory child);... | [
"0.8239836",
"0.7496462",
"0.7372504",
"0.72275746",
"0.7030985",
"0.6775635",
"0.6433321",
"0.6298346",
"0.62273633",
"0.61195225",
"0.60356116",
"0.600371",
"0.5992976",
"0.5892385",
"0.586236",
"0.5854967",
"0.5837388",
"0.5834386",
"0.5832246",
"0.5796224",
"0.57689786",
... | 0.8569704 | 0 |
Gets all child portlet definitions for a parent category. | public Set<IPortletDefinition> getAllChildPortlets(
PortletCategory parent); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Set<IPortletDefinition> getChildPortlets(PortletCategory parent);",
"public Set<PortletCategory> getChildCategories(PortletCategory parent);",
"public Set<PortletCategory> getAllChildCategories(\n\t\t\tPortletCategory parent);",
"public Set<PortletCategory> getParentCategories(IPortletDefinition child... | [
"0.8258245",
"0.71515",
"0.675854",
"0.6562784",
"0.6224519",
"0.5448048",
"0.5354912",
"0.533316",
"0.52043897",
"0.51586115",
"0.51195645",
"0.50590545",
"0.50392115",
"0.5001616",
"0.49979603",
"0.49840444",
"0.4949882",
"0.49458832",
"0.4925929",
"0.4917159",
"0.48281425"... | 0.8361719 | 0 |
Gets an existing portlet category. | public PortletCategory getPortletCategory(String portletCategoryId); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public PortletCategory getTopLevelPortletCategory();",
"public String getCategory()\n {\n return (String) getProperty(PropertyIDMap.PID_CATEGORY);\n }",
"String getCategory();",
"String getCategory();",
"Category getCategoryByName(String categoryName);",
"public BwCategory getCategory() {\n ... | [
"0.75165206",
"0.6843761",
"0.6816227",
"0.6816227",
"0.67397165",
"0.67066926",
"0.6661968",
"0.6659834",
"0.6656388",
"0.66502714",
"0.66038704",
"0.6580498",
"0.6520352",
"0.6512915",
"0.6503046",
"0.6500193",
"0.6498663",
"0.6458533",
"0.6452995",
"0.64525115",
"0.645075"... | 0.84610206 | 0 |
Gets all child portlet categories for a parent category. | public Set<PortletCategory> getChildCategories(PortletCategory parent); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Set<PortletCategory> getAllChildCategories(\n\t\t\tPortletCategory parent);",
"public Set<IPortletDefinition> getAllChildPortlets(\n\t\t\tPortletCategory parent);",
"public Set<IPortletDefinition> getChildPortlets(PortletCategory parent);",
"public Set<PortletCategory> getParentCategories(PortletCateg... | [
"0.8569704",
"0.7496462",
"0.7372504",
"0.72275746",
"0.7030985",
"0.6775635",
"0.6433321",
"0.6298346",
"0.62273633",
"0.61195225",
"0.60356116",
"0.600371",
"0.5992976",
"0.5892385",
"0.586236",
"0.5854967",
"0.5837388",
"0.5834386",
"0.5832246",
"0.5796224",
"0.57689786",
... | 0.8239836 | 1 |
Gets all child portlet definitions for a parent category. | public Set<IPortletDefinition> getChildPortlets(PortletCategory parent); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Set<IPortletDefinition> getAllChildPortlets(\n\t\t\tPortletCategory parent);",
"public Set<PortletCategory> getChildCategories(PortletCategory parent);",
"public Set<PortletCategory> getAllChildCategories(\n\t\t\tPortletCategory parent);",
"public Set<PortletCategory> getParentCategories(IPortletDefin... | [
"0.8361719",
"0.71515",
"0.675854",
"0.6562784",
"0.6224519",
"0.5448048",
"0.5354912",
"0.533316",
"0.52043897",
"0.51586115",
"0.51195645",
"0.50590545",
"0.50392115",
"0.5001616",
"0.49979603",
"0.49840444",
"0.4949882",
"0.49458832",
"0.4925929",
"0.4917159",
"0.48281425"... | 0.8258245 | 1 |
Gets the immediate parent categories of this category. | public Set<PortletCategory> getParentCategories(PortletCategory child); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Category> getParents() {\n\t\treturn parents;\n\t}",
"public Set<Long> getParents() {\n String key = parentName + parentGenus;\n if (!parentNameToParentBlocks.containsKey(key)) {\n return null;\n }\n return parentNameToParentBlocks.get(key);\n }",
"public Category getParent(){\r\n... | [
"0.7952452",
"0.6686907",
"0.65941435",
"0.63249254",
"0.62259996",
"0.6145548",
"0.60127974",
"0.6004377",
"0.59924805",
"0.59922165",
"0.5942073",
"0.5925503",
"0.592118",
"0.5917472",
"0.5912155",
"0.5900162",
"0.5893036",
"0.5892725",
"0.58805126",
"0.5858886",
"0.5856581... | 0.6268573 | 4 |
Gets the immediate parent categories of this portlet definition. | public Set<PortletCategory> getParentCategories(IPortletDefinition child); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Category> getParents() {\n\t\treturn parents;\n\t}",
"public Set<PortletCategory> getChildCategories(PortletCategory parent);",
"public Set<PortletCategory> getParentCategories(PortletCategory child);",
"public Set<IPortletDefinition> getChildPortlets(PortletCategory parent);",
"public PortletC... | [
"0.7555404",
"0.7498644",
"0.70678765",
"0.6741955",
"0.66768295",
"0.65390855",
"0.62650317",
"0.6218602",
"0.6189256",
"0.61800396",
"0.6171197",
"0.61705244",
"0.6017194",
"0.59159553",
"0.5902665",
"0.58992094",
"0.58954984",
"0.5880042",
"0.58682966",
"0.58480126",
"0.58... | 0.6801502 | 3 |
Gets top level portlet category | public PortletCategory getTopLevelPortletCategory(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public PortletCategory getPortletCategory(String portletCategoryId);",
"String getCategory();",
"String getCategory();",
"public String getCategory()\n {\n return (String) getProperty(PropertyIDMap.PID_CATEGORY);\n }",
"public String getCategory();",
"String category();",
"public String ge... | [
"0.77734053",
"0.7197",
"0.7197",
"0.70619804",
"0.70481706",
"0.69685245",
"0.6933245",
"0.6899699",
"0.68694246",
"0.6863381",
"0.6863381",
"0.6817365",
"0.67926365",
"0.6745516",
"0.6714928",
"0.66974723",
"0.66911745",
"0.66911745",
"0.668281",
"0.6680215",
"0.6671655",
... | 0.87191606 | 0 |
Creates a new portlet category with the specified values. | public PortletCategory createPortletCategory(String name,
String description, String creatorId); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public PortletCategory getPortletCategory(String portletCategoryId);",
"public void updatePortletCategory(PortletCategory category);",
"CategoryType createCategoryType();",
"public @NotNull Category newCategory();",
"CategoriesType createCategoriesType();",
"CategoriesType createCategoriesType();",
"Ca... | [
"0.6078425",
"0.5803964",
"0.5675272",
"0.56605667",
"0.56277305",
"0.56277305",
"0.5598128",
"0.5585914",
"0.5552873",
"0.5547599",
"0.55404276",
"0.5512596",
"0.5502149",
"0.53904605",
"0.53618914",
"0.53594404",
"0.5331868",
"0.53311116",
"0.52820027",
"0.52811563",
"0.526... | 0.7368441 | 0 |
Makes one category a child of another. | public void removeCategoryFromCategory(PortletCategory child,
PortletCategory parent) throws GroupsException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addCategoryToCategory(PortletCategory child,\n\t\t\tPortletCategory parent);",
"public void addChild( ChildType child );",
"protected void makeChild(FHeapNode y, FHeapNode x)\r\n { \r\n y.left.right = y.right;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// remove y from root list of heap\r\... | [
"0.637241",
"0.60898876",
"0.5740334",
"0.5704597",
"0.5632156",
"0.54739887",
"0.54653347",
"0.5461471",
"0.5417804",
"0.5391284",
"0.5386259",
"0.5376002",
"0.5362738",
"0.535854",
"0.534971",
"0.5332417",
"0.5309706",
"0.53065133",
"0.52989125",
"0.5261257",
"0.5231849",
... | 0.51900035 | 22 |
Persists a portlet category. | public void updatePortletCategory(PortletCategory category); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void addCategory() {\n\t\tCategory cat=new Category();\r\n\t\tcat.setNameCategory(\"Computing Tools\");\r\n\t\tem.persist(cat);\r\n\t\t\r\n\t}",
"Category saveCategory(Category category);",
"public void deletePortletCategory(PortletCategory category);",
"void addCategory(Category catego... | [
"0.6399234",
"0.63839966",
"0.62225956",
"0.61766785",
"0.61412823",
"0.6137839",
"0.61210465",
"0.58476466",
"0.5779627",
"0.5771415",
"0.5732933",
"0.56743765",
"0.56550896",
"0.56141865",
"0.55759716",
"0.5563241",
"0.5535481",
"0.5527425",
"0.5527425",
"0.5504071",
"0.548... | 0.6782235 | 0 |
Creates new form question | public question() {
initComponents();
this.setLocationRelativeTo(null);
Fillcombo();
FillTableAdd("select * from question");
FillTableDel("select * from question");
FillTableUpd("select * from question");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void creatingNewQuestion() {\r\n AbstractStatement<?> s;\r\n ListQuestions lq = new ListQuestions(ThemesController.getThemeSelected());\r\n switch ((String) typeQuestion.getValue()) {\r\n case \"TrueFalse\":\r\n // just to be sure the answer corresponds to the... | [
"0.76295424",
"0.70312285",
"0.6748939",
"0.66972727",
"0.66947335",
"0.66745406",
"0.6642459",
"0.66029257",
"0.6532475",
"0.65143603",
"0.6403873",
"0.63900703",
"0.6332224",
"0.6321554",
"0.63113177",
"0.6287711",
"0.6278462",
"0.6261359",
"0.62440413",
"0.624342",
"0.6224... | 0.0 | -1 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jTabbedPane1 = new javax.swing.JTabbedPane();
jPanel1 = new javax.swing.JPanel();
addoption1 = new javax.swing.JTextField();
add_new = new javax.swing.JButton();
jScrollPane4 = new javax.swing.JScrollPane();
addTable = new javax.swing.JTable();
AddQuestion = new javax.swing.JLabel();
jScrollPane1 = new javax.swing.JScrollPane();
addquestion_name = new javax.swing.JTextArea();
AddOption_1 = new javax.swing.JLabel();
AddOption_2 = new javax.swing.JLabel();
addoption2 = new javax.swing.JTextField();
addoption3 = new javax.swing.JTextField();
AddOption_3 = new javax.swing.JLabel();
AddOption_4 = new javax.swing.JLabel();
addoption4 = new javax.swing.JTextField();
addselect_subject = new javax.swing.JComboBox();
AddAnswer = new javax.swing.JLabel();
addanswer = new javax.swing.JTextField();
AddSelect_Subject = new javax.swing.JLabel();
jLabel1 = new javax.swing.JLabel();
lbl_logout = new javax.swing.JLabel();
image_label = new javax.swing.JLabel();
jPanel2 = new javax.swing.JPanel();
updoption1 = new javax.swing.JTextField();
update = new javax.swing.JButton();
jScrollPane5 = new javax.swing.JScrollPane();
updTable = new javax.swing.JTable();
updOption_1 = new javax.swing.JLabel();
UpdOption_2 = new javax.swing.JLabel();
updoption2 = new javax.swing.JTextField();
updoption3 = new javax.swing.JTextField();
UpdOption_3 = new javax.swing.JLabel();
UpdOption_4 = new javax.swing.JLabel();
updoption4 = new javax.swing.JTextField();
updselect_subject = new javax.swing.JComboBox();
Answer1 = new javax.swing.JLabel();
updanswer = new javax.swing.JTextField();
UpdSelect_Subject = new javax.swing.JLabel();
UpdQuestion = new javax.swing.JLabel();
jScrollPane2 = new javax.swing.JScrollPane();
updquestion_name = new javax.swing.JTextArea();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
image_label1 = new javax.swing.JLabel();
jPanel3 = new javax.swing.JPanel();
delete = new javax.swing.JButton();
jScrollPane6 = new javax.swing.JScrollPane();
delTable = new javax.swing.JTable();
DelQuestion = new javax.swing.JLabel();
jScrollPane3 = new javax.swing.JScrollPane();
delquestion_name = new javax.swing.JTextArea();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
image_label2 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setResizable(false);
jTabbedPane1.setForeground(new java.awt.Color(102, 51, 0));
jTabbedPane1.setPreferredSize(new java.awt.Dimension(457, 381));
jPanel1.setLayout(null);
addoption1.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
addoption1.setForeground(new java.awt.Color(102, 51, 0));
addoption1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
addoption1ActionPerformed(evt);
}
});
jPanel1.add(addoption1);
addoption1.setBounds(140, 340, 100, 30);
add_new.setBackground(new java.awt.Color(204, 204, 204));
add_new.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
add_new.setForeground(new java.awt.Color(255, 102, 0));
add_new.setText("Insert");
add_new.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
add_new.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
add_newActionPerformed(evt);
}
});
jPanel1.add(add_new);
add_new.setBounds(140, 510, 100, 30);
addTable.setBackground(new java.awt.Color(102, 102, 102));
addTable.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
addTable.setForeground(new java.awt.Color(255, 255, 255));
addTable.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
},
new String [] {
"Question_id", "Question_name", "Option_1", "Option_2", "Option_3", "Option_4", "Answer", "Subject_name"
}
));
addTable.setSelectionBackground(new java.awt.Color(255, 255, 255));
addTable.setSelectionForeground(new java.awt.Color(102, 51, 0));
jScrollPane4.setViewportView(addTable);
jPanel1.add(jScrollPane4);
jScrollPane4.setBounds(30, 90, 480, 90);
AddQuestion.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
AddQuestion.setForeground(new java.awt.Color(255, 255, 255));
AddQuestion.setText("Question");
jPanel1.add(AddQuestion);
AddQuestion.setBounds(20, 230, 71, 23);
addquestion_name.setColumns(20);
addquestion_name.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
addquestion_name.setForeground(new java.awt.Color(102, 51, 0));
addquestion_name.setRows(5);
jScrollPane1.setViewportView(addquestion_name);
jPanel1.add(jScrollPane1);
jScrollPane1.setBounds(120, 220, 310, 100);
AddOption_1.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
AddOption_1.setForeground(new java.awt.Color(255, 255, 255));
AddOption_1.setText(" { A }");
jPanel1.add(AddOption_1);
AddOption_1.setBounds(60, 340, 50, 20);
AddOption_2.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
AddOption_2.setForeground(new java.awt.Color(255, 255, 255));
AddOption_2.setText(" { B }");
jPanel1.add(AddOption_2);
AddOption_2.setBounds(310, 340, 50, 20);
addoption2.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
addoption2.setForeground(new java.awt.Color(102, 51, 0));
addoption2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
addoption2ActionPerformed(evt);
}
});
jPanel1.add(addoption2);
addoption2.setBounds(390, 340, 100, 30);
addoption3.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
addoption3.setForeground(new java.awt.Color(102, 51, 0));
addoption3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
addoption3ActionPerformed(evt);
}
});
jPanel1.add(addoption3);
addoption3.setBounds(140, 400, 100, 30);
AddOption_3.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
AddOption_3.setForeground(new java.awt.Color(255, 255, 255));
AddOption_3.setText(" { C }");
jPanel1.add(AddOption_3);
AddOption_3.setBounds(60, 400, 60, 20);
AddOption_4.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
AddOption_4.setForeground(new java.awt.Color(255, 255, 255));
AddOption_4.setText(" { D }");
jPanel1.add(AddOption_4);
AddOption_4.setBounds(310, 400, 50, 20);
addoption4.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
addoption4.setForeground(new java.awt.Color(102, 51, 0));
jPanel1.add(addoption4);
addoption4.setBounds(390, 400, 100, 30);
addselect_subject.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
addselect_subject.setForeground(new java.awt.Color(102, 51, 0));
addselect_subject.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
addselect_subjectActionPerformed(evt);
}
});
jPanel1.add(addselect_subject);
addselect_subject.setBounds(390, 460, 100, 30);
AddAnswer.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
AddAnswer.setForeground(new java.awt.Color(255, 255, 255));
AddAnswer.setText("Answer");
jPanel1.add(AddAnswer);
AddAnswer.setBounds(20, 460, 80, 20);
addanswer.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
addanswer.setForeground(new java.awt.Color(102, 51, 0));
jPanel1.add(addanswer);
addanswer.setBounds(140, 460, 100, 30);
AddSelect_Subject.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
AddSelect_Subject.setForeground(new java.awt.Color(255, 255, 255));
AddSelect_Subject.setText("Subject");
jPanel1.add(AddSelect_Subject);
AddSelect_Subject.setBounds(300, 460, 50, 20);
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/aptitude_test_sys/images/Bk.png"))); // NOI18N
jLabel1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
jLabel1.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jLabel1MouseClicked(evt);
}
});
jPanel1.add(jLabel1);
jLabel1.setBounds(320, 510, 40, 35);
lbl_logout.setIcon(new javax.swing.ImageIcon(getClass().getResource("/aptitude_test_sys/images/Logout.png"))); // NOI18N
lbl_logout.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
lbl_logout.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
lbl_logoutMouseClicked(evt);
}
});
jPanel1.add(lbl_logout);
lbl_logout.setBounds(430, 0, 100, 40);
image_label.setIcon(new javax.swing.ImageIcon(getClass().getResource("/aptitude_test_sys/images/add QA.jpg"))); // NOI18N
image_label.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
jPanel1.add(image_label);
image_label.setBounds(0, 0, 540, 560);
jTabbedPane1.addTab("INSERT", new javax.swing.ImageIcon(getClass().getResource("/aptitude_test_sys/images/Add.png")), jPanel1); // NOI18N
jPanel2.setLayout(null);
updoption1.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
updoption1.setForeground(new java.awt.Color(102, 51, 0));
updoption1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
updoption1ActionPerformed(evt);
}
});
jPanel2.add(updoption1);
updoption1.setBounds(140, 340, 100, 30);
update.setBackground(new java.awt.Color(204, 204, 204));
update.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
update.setForeground(new java.awt.Color(255, 102, 0));
update.setText("Update");
update.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
update.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
updateActionPerformed(evt);
}
});
jPanel2.add(update);
update.setBounds(140, 510, 90, 30);
updTable.setBackground(new java.awt.Color(102, 102, 102));
updTable.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
updTable.setForeground(new java.awt.Color(255, 255, 255));
updTable.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
},
new String [] {
"Question_id", "Question_name", "Option_1", "Option_2", "Option_3", "Option_4", "Answer", "Subject_name"
}
));
updTable.setSelectionBackground(new java.awt.Color(255, 255, 255));
updTable.setSelectionForeground(new java.awt.Color(102, 51, 0));
updTable.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
updTableMouseClicked(evt);
}
});
jScrollPane5.setViewportView(updTable);
jPanel2.add(jScrollPane5);
jScrollPane5.setBounds(30, 90, 480, 90);
updOption_1.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
updOption_1.setForeground(new java.awt.Color(255, 255, 255));
updOption_1.setText(" { A }");
jPanel2.add(updOption_1);
updOption_1.setBounds(60, 340, 40, 20);
UpdOption_2.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
UpdOption_2.setForeground(new java.awt.Color(255, 255, 255));
UpdOption_2.setText(" { B }");
jPanel2.add(UpdOption_2);
UpdOption_2.setBounds(310, 340, 50, 20);
updoption2.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
updoption2.setForeground(new java.awt.Color(102, 51, 0));
updoption2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
updoption2ActionPerformed(evt);
}
});
jPanel2.add(updoption2);
updoption2.setBounds(390, 340, 100, 30);
updoption3.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
updoption3.setForeground(new java.awt.Color(102, 51, 0));
updoption3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
updoption3ActionPerformed(evt);
}
});
jPanel2.add(updoption3);
updoption3.setBounds(140, 400, 100, 30);
UpdOption_3.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
UpdOption_3.setForeground(new java.awt.Color(255, 255, 255));
UpdOption_3.setText(" { C }");
jPanel2.add(UpdOption_3);
UpdOption_3.setBounds(60, 400, 40, 20);
UpdOption_4.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
UpdOption_4.setForeground(new java.awt.Color(255, 255, 255));
UpdOption_4.setText(" { D }");
jPanel2.add(UpdOption_4);
UpdOption_4.setBounds(310, 400, 50, 20);
updoption4.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
updoption4.setForeground(new java.awt.Color(102, 51, 0));
jPanel2.add(updoption4);
updoption4.setBounds(390, 400, 100, 30);
updselect_subject.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
updselect_subject.setForeground(new java.awt.Color(102, 51, 0));
updselect_subject.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
updselect_subjectActionPerformed(evt);
}
});
jPanel2.add(updselect_subject);
updselect_subject.setBounds(390, 460, 100, 30);
Answer1.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
Answer1.setForeground(new java.awt.Color(255, 255, 255));
Answer1.setText("Answer");
jPanel2.add(Answer1);
Answer1.setBounds(20, 460, 80, 20);
updanswer.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
updanswer.setForeground(new java.awt.Color(102, 51, 0));
jPanel2.add(updanswer);
updanswer.setBounds(140, 460, 100, 30);
UpdSelect_Subject.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
UpdSelect_Subject.setForeground(new java.awt.Color(255, 255, 255));
UpdSelect_Subject.setText("Subject");
jPanel2.add(UpdSelect_Subject);
UpdSelect_Subject.setBounds(300, 460, 60, 20);
UpdQuestion.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
UpdQuestion.setForeground(new java.awt.Color(255, 255, 255));
UpdQuestion.setText("Question");
jPanel2.add(UpdQuestion);
UpdQuestion.setBounds(20, 230, 71, 23);
updquestion_name.setColumns(20);
updquestion_name.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
updquestion_name.setForeground(new java.awt.Color(102, 51, 0));
updquestion_name.setRows(5);
jScrollPane2.setViewportView(updquestion_name);
jPanel2.add(jScrollPane2);
jScrollPane2.setBounds(120, 220, 310, 100);
jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/aptitude_test_sys/images/Bk.png"))); // NOI18N
jLabel3.setText("jLabel3");
jLabel3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
jPanel2.add(jLabel3);
jLabel3.setBounds(320, 510, 40, 35);
jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/aptitude_test_sys/images/Logout.png"))); // NOI18N
jLabel4.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
jPanel2.add(jLabel4);
jLabel4.setBounds(430, 0, 100, 40);
image_label1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/aptitude_test_sys/images/update QA.jpg"))); // NOI18N
jPanel2.add(image_label1);
image_label1.setBounds(0, 0, 540, 560);
jTabbedPane1.addTab("UPDATE", new javax.swing.ImageIcon(getClass().getResource("/aptitude_test_sys/images/upbutton.png")), jPanel2); // NOI18N
jPanel3.setLayout(null);
delete.setBackground(new java.awt.Color(204, 204, 204));
delete.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
delete.setForeground(new java.awt.Color(255, 102, 0));
delete.setText("Delete");
delete.setBorder(null);
delete.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
delete.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
deleteActionPerformed(evt);
}
});
jPanel3.add(delete);
delete.setBounds(150, 460, 90, 30);
delTable.setBackground(new java.awt.Color(102, 102, 102));
delTable.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
delTable.setForeground(new java.awt.Color(255, 255, 255));
delTable.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
},
new String [] {
"Question_id", "Question_name", "Option_1", "Option_2", "Option_3", "Option_4", "Answer", "Subject_name"
}
));
delTable.setSelectionBackground(new java.awt.Color(255, 255, 255));
delTable.setSelectionForeground(new java.awt.Color(102, 51, 0));
delTable.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
delTableMouseClicked(evt);
}
});
jScrollPane6.setViewportView(delTable);
jPanel3.add(jScrollPane6);
jScrollPane6.setBounds(30, 110, 480, 120);
DelQuestion.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
DelQuestion.setForeground(new java.awt.Color(255, 255, 255));
DelQuestion.setText("Question");
jPanel3.add(DelQuestion);
DelQuestion.setBounds(30, 310, 57, 17);
delquestion_name.setColumns(20);
delquestion_name.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
delquestion_name.setForeground(new java.awt.Color(102, 51, 0));
delquestion_name.setRows(5);
jScrollPane3.setViewportView(delquestion_name);
jPanel3.add(jScrollPane3);
jScrollPane3.setBounds(140, 290, 310, 100);
jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/aptitude_test_sys/images/Bk.png"))); // NOI18N
jLabel5.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
jLabel5.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jLabel5MouseClicked(evt);
}
});
jPanel3.add(jLabel5);
jLabel5.setBounds(330, 460, 40, 40);
jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/aptitude_test_sys/images/Logout.png"))); // NOI18N
jLabel6.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
jLabel6.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jLabel6MouseClicked(evt);
}
});
jPanel3.add(jLabel6);
jLabel6.setBounds(430, 0, 100, 40);
image_label2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/aptitude_test_sys/images/delete QA.jpg"))); // NOI18N
jPanel3.add(image_label2);
image_label2.setBounds(0, 0, 540, 560);
jTabbedPane1.addTab("DELETE", new javax.swing.ImageIcon(getClass().getResource("/aptitude_test_sys/images/delbutton.png")), jPanel3); // NOI18N
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 545, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 584, Short.MAX_VALUE)
);
pack();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n ... | [
"0.7320782",
"0.72918797",
"0.72918797",
"0.72918797",
"0.728645",
"0.72498447",
"0.7214492",
"0.720934",
"0.7197145",
"0.71912014",
"0.71852076",
"0.7160113",
"0.71487373",
"0.70943654",
"0.70820624",
"0.7058153",
"0.69883204",
"0.6978216",
"0.69558746",
"0.6955715",
"0.6945... | 0.0 | -1 |
Configuration for report generation start reporters | @BeforeSuite
public void setUp() {
htmlReporter = new ExtentHtmlReporter("Reports.html");
// create ExtentReports and attach reporter(s)
extent = new ExtentReports();
extent.attachReporter(htmlReporter);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void startReport() {\r\n // initialize the HtmlReporter\r\n htmlReporter = new ExtentHtmlReporter(System.getProperty(\"user.dir\")\r\n + jsonConfig.get(\"extentReportPath\") + \"testReport.html\");\r\n\r\n //initialize ExtentReports and attach the HtmlReporter\r\n ... | [
"0.7186401",
"0.69359356",
"0.68373525",
"0.66064763",
"0.6586962",
"0.64333487",
"0.6395094",
"0.6327789",
"0.6282762",
"0.6253807",
"0.6252468",
"0.6238909",
"0.61985284",
"0.61728567",
"0.6093605",
"0.605206",
"0.6041725",
"0.6004479",
"0.5989152",
"0.5981791",
"0.5980571"... | 0.5401312 | 57 |
creates a toggle for the given test, adds all log events under it | @Test(priority = 0)
public void salesforceLogin() {
SalesforceLoginPage salesforceLoginObj = new SalesforceLoginPage(driver);
driver.get("https://login.salesforce.com");
salesforceLoginObj.setUsername("*********");//Enter valid username
salesforceLoginObj.setPassword("********");//Enter valid password
salesforceLoginObj.logInButtonClick();
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testToggle() {\n // Toggle on test.\n boolean before = plug.getCondition();\n clickOn(\"ON\");\n assertNotEquals(before, plug.getCondition());\n\n // Toggle off test which also implies that the ON/OFF status is displayed.\n before = plug.getCondition();\n clickOn(\"OFF\");... | [
"0.5801968",
"0.5505443",
"0.5153362",
"0.5134159",
"0.5104724",
"0.5085348",
"0.49884215",
"0.49783355",
"0.4967758",
"0.49238324",
"0.4818323",
"0.4795601",
"0.4767955",
"0.4674251",
"0.46739864",
"0.46699953",
"0.46430704",
"0.4638075",
"0.46287543",
"0.46171764",
"0.45869... | 0.0 | -1 |
no indices to set for this reader | @Override
public void setHeaderIndices() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setNoIndex() {\n noIndex= true;\n }",
"void indexReset();",
"public boolean getNoIndex() {\n return noIndex;\n }",
"public void clear()\n\t\t{\n\t\t\tindices.clear();\n\t\t}",
"public void setEmpty(int index);",
"public void reset() {\n index = 0;\n }",
"public voi... | [
"0.71331835",
"0.64150494",
"0.6349487",
"0.61575776",
"0.6077593",
"0.60213023",
"0.5945758",
"0.593269",
"0.59278905",
"0.58747673",
"0.58515924",
"0.5782559",
"0.5782559",
"0.5782559",
"0.5782559",
"0.57818484",
"0.57735866",
"0.5753705",
"0.57471895",
"0.57470363",
"0.574... | 0.5630643 | 25 |
Parses the provided dataList into a ParkingViolation. | public ParkingViolation createParkingViolation(List<String> dataList) {
Date date = Utils.getDateTime(dataList.get(0));
double fine = Utils.extractDoubleValueFromList(dataList, 1);
String violation = Utils.extractStringValueFromList(dataList, 2);
String plateId = Utils.extractStringValueFromList(dataList, 3);
String state = Utils.extractStringValueFromList(dataList, 4);
String ticketNumber = Utils.extractStringValueFromList(dataList, 5);
String zipcode = Utils.extractZipcodeValueFromList(dataList, 6);
return new ParkingViolation(date, fine, violation, plateId, state, ticketNumber, zipcode);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void onParsableDataResult(List<T> parsableData);",
"private ArrayList<Violation> processViolations(String violationsRaw) {\n ArrayList<Violation> violationsInOneInspection = new ArrayList<>();\n if (violationsRaw.equals(\"\")) {\n return violationsInOneInspection;\n }\n Str... | [
"0.57555276",
"0.53197914",
"0.5152361",
"0.5140022",
"0.51317024",
"0.5048316",
"0.50365794",
"0.50244296",
"0.50011134",
"0.4998808",
"0.49665436",
"0.49115884",
"0.47874516",
"0.47725153",
"0.47657448",
"0.475993",
"0.47392783",
"0.46483833",
"0.4586412",
"0.45815352",
"0.... | 0.8094138 | 0 |
true if the pattern is passable Constructor | public WpWallSurface(int x, int y,Position position,SurfaceType type,boolean passing) {
super(x, y,position);
this.type = type;
this.passing = passing;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isConstructor();",
"public boolean isConstructor() {\n return isConstructor;\n }",
"@Override\n protected boolean checkConstructorInvocation(AnnotatedDeclaredType dt,\n AnnotatedExecutableType constructor, NewClassTree src) {\n return true;\n }",
"public abstract bo... | [
"0.77533466",
"0.68087447",
"0.6589201",
"0.6516968",
"0.6485342",
"0.62110955",
"0.62110955",
"0.6187793",
"0.5971995",
"0.5955142",
"0.5948184",
"0.59319764",
"0.59319764",
"0.5928757",
"0.58457094",
"0.5770135",
"0.57372457",
"0.5711989",
"0.57060176",
"0.5696176",
"0.5695... | 0.0 | -1 |
write your code here | public static void main(String[] args) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void logic(){\r\n\r\n\t}",
"public static void generateCode()\n {\n \n }",
"@Override\n\tprotected void logic() {\n\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"void pramitiTechTutorials() {\n\t\n}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\r\n\tpub... | [
"0.61019534",
"0.6054925",
"0.58806974",
"0.58270746",
"0.5796887",
"0.56999695",
"0.5690986",
"0.56556827",
"0.5648637",
"0.5640487",
"0.56354505",
"0.56032085",
"0.56016207",
"0.56006724",
"0.5589654",
"0.5583692",
"0.55785793",
"0.55733466",
"0.5560209",
"0.55325305",
"0.5... | 0.0 | -1 |
Tears down test environment. | protected void tearDown() throws Exception {
action = null;
manager = null;
activityGraph = null;
state = null;
TestHelper.clearProjectConfiguration();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void tearDown() {\n testEnv.close();\n }",
"@AfterClass\r\n\tpublic static void testCleanup() {\r\n\t\tConfig.teardown();\r\n\t}",
"public void teardown() {\n LOGGER.info(\"Shutting down driver\");\n driver.quit();\n }",
"@AfterSuite\n\tpublic void teardown() {\n\t\t\n\t\... | [
"0.800837",
"0.76213956",
"0.7501416",
"0.74659353",
"0.74478614",
"0.73999876",
"0.73679805",
"0.73664963",
"0.7296697",
"0.7230914",
"0.72147137",
"0.7208223",
"0.71691406",
"0.71253234",
"0.712046",
"0.70704573",
"0.7064009",
"0.7056549",
"0.7055528",
"0.7054756",
"0.70547... | 0.67058575 | 60 |
Tests ctor AddActionStateActionAddActionStateAction(ActionState,ActivityGraph,UMLModelManager) for accuracy. Verify : the newly created AddActionStateAction instance should not be null. | public void testCtor() {
assertNotNull("Failed to create a new AddActionStateAction instance.", action);
assertTrue("The state should be formatted.", state.isSpecification());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ActionState createActionState();",
"public void testCtor_NullState() {\n try {\n new AddActionStateAction(null, activityGraph, manager);\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }",
... | [
"0.7104612",
"0.70392454",
"0.67591614",
"0.6667416",
"0.6436674",
"0.62503535",
"0.60784614",
"0.6066888",
"0.5986002",
"0.5976362",
"0.5876731",
"0.5869731",
"0.5869731",
"0.5869731",
"0.5845162",
"0.58412385",
"0.580707",
"0.576318",
"0.57531714",
"0.5747959",
"0.57363296"... | 0.75310695 | 0 |
Tests ctor AddActionStateActionAddActionStateAction(ActionState,ActivityGraph,UMLModelManager) for failure. It tests the case that when state is null and expects IllegalArgumentException. | public void testCtor_NullState() {
try {
new AddActionStateAction(null, activityGraph, manager);
fail("IllegalArgumentException expected.");
} catch (IllegalArgumentException iae) {
//good
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testCtor_NullManager() {\n try {\n new AddActionStateAction(state, activityGraph, null);\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }",
"public void testCtor_NullActivityGraph() {\n... | [
"0.76611656",
"0.75886005",
"0.7467785",
"0.65323",
"0.6407021",
"0.5955689",
"0.57526124",
"0.57474864",
"0.559199",
"0.54683846",
"0.5467423",
"0.54615635",
"0.54226136",
"0.5413385",
"0.5410597",
"0.5391787",
"0.53540456",
"0.53503335",
"0.53444",
"0.53375834",
"0.5304161"... | 0.8190281 | 0 |
Tests ctor AddActionStateActionAddActionStateAction(ActionState,ActivityGraph,UMLModelManager) for failure. It tests the case that when activityGraph is null and expects IllegalArgumentException. | public void testCtor_NullActivityGraph() {
try {
new AddActionStateAction(state, null, manager);
fail("IllegalArgumentException expected.");
} catch (IllegalArgumentException iae) {
//good
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testCtor_NullState() {\n try {\n new AddActionStateAction(null, activityGraph, manager);\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }",
"public void testCtor_NullManager() {\n ... | [
"0.80838865",
"0.77986914",
"0.67693686",
"0.59028184",
"0.57124895",
"0.56291807",
"0.545155",
"0.54165375",
"0.54112357",
"0.53425443",
"0.5283171",
"0.5277301",
"0.52621615",
"0.5251058",
"0.5222524",
"0.5156379",
"0.51434064",
"0.51434064",
"0.5134935",
"0.51332015",
"0.5... | 0.8195053 | 0 |
Tests ctor AddActionStateActionAddActionStateAction(ActionState,ActivityGraph,UMLModelManager) for failure. It tests the case that when ProjectConfigurationException occurs and expects IllegalArgumentException. | public void testCtor_ProjectConfigurationException() {
System.setProperty("exception", "ProjectConfigurationException");
try {
new AddActionStateAction(state, activityGraph, manager);
fail("IllegalArgumentException expected.");
} catch (IllegalArgumentException iae) {
//good
} finally {
System.clearProperty("exception");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testCtor_NullState() {\n try {\n new AddActionStateAction(null, activityGraph, manager);\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }",
"public void testCtor_NullManager() {\n ... | [
"0.7611383",
"0.7304824",
"0.725204",
"0.7175809",
"0.61344165",
"0.6054054",
"0.5931356",
"0.56101334",
"0.5495258",
"0.54624605",
"0.54253775",
"0.540143",
"0.53998965",
"0.5372446",
"0.53627294",
"0.53473604",
"0.52991974",
"0.5288673",
"0.52710795",
"0.5265535",
"0.526192... | 0.7316242 | 1 |
Tests ctor AddActionStateActionAddActionStateAction(ActionState,ActivityGraph,UMLModelManager) for failure. It tests the case that when manager is null and expects IllegalArgumentException. | public void testCtor_NullManager() {
try {
new AddActionStateAction(state, activityGraph, null);
fail("IllegalArgumentException expected.");
} catch (IllegalArgumentException iae) {
//good
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testCtor_NullState() {\n try {\n new AddActionStateAction(null, activityGraph, manager);\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }",
"public void testCtor_NullActivityGraph() {\n... | [
"0.77364516",
"0.74697906",
"0.6907989",
"0.6043181",
"0.5883538",
"0.58302206",
"0.57532334",
"0.57084",
"0.5655855",
"0.56061476",
"0.54198694",
"0.5401283",
"0.5349427",
"0.533555",
"0.5335277",
"0.53266245",
"0.52792543",
"0.5264282",
"0.5237069",
"0.52366805",
"0.5194059... | 0.8071488 | 0 |
list file in the directory | public void addFolder(String path) {
File f = new File(path);
if (!f.exists())
System.out.println("File khong ton tai");
String[] flist = f.list();
String fname;
BufferedReader bf;
String sentence;
String w[];
String D = "_S2_"; // dump
String prev2, prev1;
prev2 = D;
prev1 = D;
for (int i = 0; i < flist.length; i++) {
fname = flist[i];
// System.out.println("process file " + flist[i]);
// TimePerf.tic();
try {
// open file for reading
bf = new BufferedReader(new InputStreamReader(
new FileInputStream(path + "/" + fname)));
while ((sentence = bf.readLine()) != null) {
// tokenize to words
String[] wlist = sentence.split("\\s+");
prev2 = D;
prev1 = D;
for (int j = 0; j < wlist.length; j++) {
w = wlist[j].split("/");
if (w.length != 2)
continue;
w[1] = w[1].toUpperCase();
if (size == ModelSize.SMALL) {
if (w[1].matches("[A-Z]+"))
w[1] = "" + w[1].charAt(0);
}
// add tag count
uModel.inc(w[1]);
// add new tags
tags.add(w[1]);
// add new tag to word
addTagToWord(w[0], w[1]);
// increase count of word tag
wtProb.inc(w[1], w[0]);
// increase count of bigram
// if (j > 0) {
biModel.inc(prev1, w[1]);
// }
// increase count of trigram
// if (j > 1) {
triModel.inc(prev1 + " " + prev2, w[1]);
// }
prev2 = prev1;
prev1 = w[1];
}
}
bf.close();
} catch (IOException e) {
e.printStackTrace();
}
// System.out.println("Process time " + TimePerf.toc() + "ms");
}
// handle unknown word (word which has word count < 5)
HashSet<String> tmp = new HashSet<String>();
for (String wd : wordTags.keySet()) {
for (String t : wordTags.get(wd)) {
if (t.matches("\\w+") && wtProb.getCombinationCount(t, wd) < 5) {
wtProb.inc(t, "<UNK>", wtProb.getCombinationCount(t, wd));
tmp.add(t);
System.out.println("<" + wd + "," + t + ">"
+ wtProb.freq("UNK", t));
}
// addTagToWord("<UNK>", t);
}
}
wordTags.put("<UNK>", tmp);
System.out.println("Total of tags : " + tags.size());
StringBuffer t = new StringBuffer();
for (String s : tags)
if (s.matches("\\w+"))
t.append(" " + s);
System.out.println(t.toString());
this.computeLambda();
System.out.println("Unkown word type: ");
for (String t2 : getPosibleTags("<UNK>"))
System.out.println("Tag " + t + ", p= " + getProbWordGivenTag("<UNK>", t2));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List listFiles(String path);",
"List<File> list(String directory) throws FindException;",
"static void viewFiles()\r\n\t {\n\t\t File directoryPath = new File(\"D:\\\\java_project\");\r\n\t File filesList[] = directoryPath.listFiles();\r\n ... | [
"0.81898016",
"0.79469323",
"0.72168195",
"0.7202663",
"0.70963496",
"0.7093784",
"0.7072627",
"0.706912",
"0.69814765",
"0.69189185",
"0.69149315",
"0.6902289",
"0.68540347",
"0.68458265",
"0.6820818",
"0.6819122",
"0.68092656",
"0.68030226",
"0.6801299",
"0.67539036",
"0.67... | 0.0 | -1 |
return triModel.freq(t2 + " / " + t3, t1); | public Double getProbTagGiven2Tag(String t1, String t2, String t3) {
return l1 * uModel.freq(t1) + l2 * biModel.freq(t2, t1) + l3
* triModel.freq(t2 + " " + t3, t1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"float getFrequency();",
"int getFreq();",
"java.lang.String getFrequency();",
"public int getFreq(){ return frequency;}",
"public abstract double samplingFrequency();",
"public int getFrequency(){\n return this.frequency;\n }",
"abstract public int docFreq(Term t) throws IOException;",
"pub... | [
"0.6703802",
"0.6700561",
"0.6590346",
"0.6327315",
"0.6081646",
"0.6035058",
"0.58911127",
"0.5834532",
"0.58185357",
"0.5803371",
"0.5757463",
"0.5725761",
"0.56376463",
"0.56347746",
"0.5588097",
"0.55863434",
"0.55737036",
"0.5550886",
"0.5533349",
"0.552347",
"0.5522289"... | 0.6257486 | 4 |
In Oracle, CREATE PROCEDURE, FUNCTION, etc. returns warning instead of throwing exception if there is compilation error. | private void checkWarnings(Statement statement) throws SQLException {
SQLWarning warning = statement.getWarnings();
if (warning != null) {
throw warning;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void performValidation() {\n/* 623 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Test(timeout = 4000)\n public void test039() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.isProcedureCall((String) null);\n fail(\"Expecting exception: NullPoi... | [
"0.5891468",
"0.5855007",
"0.58431876",
"0.57997507",
"0.57909906",
"0.5787715",
"0.5701813",
"0.5695304",
"0.56716424",
"0.56658304",
"0.5647612",
"0.5630429",
"0.56101495",
"0.55707675",
"0.55675113",
"0.5538554",
"0.55264765",
"0.5515906",
"0.55130696",
"0.5507436",
"0.550... | 0.5245452 | 70 |
A custom DAO for the Room with additional functions | public interface RoomDaoCustom {
/**
* @return the list of rooms whose light is on
*/
List<Room> listWithLightOn();
/**
* @return the list of rooms whose light is off
*/
List<Room> listWithLightOff();
/**
* @return the list of rooms whose ringer is on
*/
List<Room> listWithRingerOn();
/**
* @return the list of rooms whose ringer is off
*/
List<Room> listWithRingerOff();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Dao\npublic interface ReservationDao {\n\n @Query(\"SELECT * FROM reservation\")\n Single<List<Reservation>> getAllReservations();\n\n @Query(\"SELECT * FROM reservation where customer_id = :id LIMIT 1\")\n Single<Reservation> findByCustomerId(long id);\n\n @Query(\"SELECT * FROM reservation where ... | [
"0.7520402",
"0.7375382",
"0.73308",
"0.73297125",
"0.73044044",
"0.72707736",
"0.72489",
"0.7206746",
"0.71724886",
"0.7162192",
"0.7151515",
"0.71500206",
"0.7124758",
"0.7122946",
"0.71157503",
"0.70984197",
"0.7096175",
"0.7050862",
"0.70356935",
"0.70344543",
"0.7032587"... | 0.6929359 | 42 |
Intent intent = new Intent(); intent.putExtra("text_saisie",editTextName.getText().toString()); setResult(RESULT_OK, intent); | public void saveData(){
String name = editTextName.getText().toString();
if(!name.isEmpty()){
DataManager.getInstance().addName(name);
}
finish();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent intent) {\n // TODO Auto-generated method stub\n if ((requestCode == request_code) && (resultCode == RESULT_OK)) {\n\n // Toast.makeText(this, intent.getStringExtra(\"resultado\"), Toast.LENGTH_LONG).show... | [
"0.7933977",
"0.7911309",
"0.7857209",
"0.7592615",
"0.75369817",
"0.7477011",
"0.7467743",
"0.7400649",
"0.72073466",
"0.7020327",
"0.69669574",
"0.6960876",
"0.6959746",
"0.69070375",
"0.6874477",
"0.68242127",
"0.6806675",
"0.6793588",
"0.6788587",
"0.6776169",
"0.6767931"... | 0.0 | -1 |
URL has to be retrived from config file | @Override
public String getMessage() {
message = "http://localhost:8080/ImageComparison?actual=" + actualImageURL + "&expected=" + expectedImageURL;
return message;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getURL(){\r\n\t\t \r\n\t\t\r\n\t\treturn rb.getProperty(\"url\");\r\n\t}",
"private String getURL() {\n\t\t// TODO : Generate URL\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getUrl()\n\t{\n\t\treturn url;\n\t}",
"public String getCurrentUrlConfig() {\n String primary = AbstractC... | [
"0.6763941",
"0.6636695",
"0.65866584",
"0.6530946",
"0.6492246",
"0.64910936",
"0.6481053",
"0.6419782",
"0.6393977",
"0.6374012",
"0.63652426",
"0.6351725",
"0.63423306",
"0.6334351",
"0.6315432",
"0.6311447",
"0.62911534",
"0.62673193",
"0.6220505",
"0.61968744",
"0.618982... | 0.0 | -1 |
/Constructor which accepts its center coordinates and its containing grid, intialises all values of the gate | public Gate(int centerX, int centerY, Grid grid){
this.angle = Math.random()*6.28; //create a random initial angle
this.rotationSpeed = 0.05;
this.length = 150;
this.centerX = centerX;
this.centerY = centerY;
this.xSpeed = 1;
this.ySpeed = 1;
this.grid = grid;
/*Determine the x and y of each end point based on the length and angle (using cosine and sine to calculate its
* position relative to the center*/
int x1 = centerX + (int)((length / 2)*(Math.cos(angle)));
int y1 = centerY + (int)((length / 2)*(Math.sin(angle)));
int x2 = centerX - (int)((length / 2)*(Math.cos(angle)));
int y2 = centerY - (int)((length / 2)*(Math.sin(angle)));
//Give the end points those x and y coordinates
this.p1 = new Point(x1, y1);
this.p2 = new Point(x2, y2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Gridder()\n\t{\n grid = new Cell[MapConstant.MAP_X][MapConstant.MAP_Y];\n for (int row = 0; row < grid.length; row++) {\n for (int col = 0; col < grid[0].length; col++) {\n grid[row][col] = new Cell(row, col);\n\n // Set the virtual walls of the arena\n... | [
"0.62966865",
"0.61894417",
"0.6174727",
"0.6143277",
"0.6131205",
"0.61188",
"0.59661007",
"0.5939353",
"0.59228474",
"0.58906215",
"0.5800779",
"0.579701",
"0.57673186",
"0.5767295",
"0.57516587",
"0.5721471",
"0.56896883",
"0.56522125",
"0.55976033",
"0.55852854",
"0.55759... | 0.787454 | 0 |
/Routine to draw the gate, accepting the graphics from the panel it is on | public void draw(Graphics2D g){
g.setColor(Color.WHITE);
g.setStroke(new BasicStroke(1));
g.draw(new Line2D.Float(p1, p2));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void draw() {\n gsm.draw(g);\n }",
"public void draw(){\n\t\tcomponent.draw();\r\n\t}",
"public void draw() {\n \n // TODO\n }",
"public void draw() {\n\t\tsuper.repaint();\n\t}",
"public abstract void draw( Graphics2D gtx );",
"@Override\n\tpublic void draw(Graphics g,... | [
"0.7086019",
"0.70725995",
"0.6795387",
"0.6773299",
"0.6761571",
"0.6755488",
"0.67087346",
"0.66899496",
"0.66551733",
"0.6608535",
"0.65984994",
"0.6585906",
"0.65821695",
"0.65811306",
"0.6571024",
"0.65694326",
"0.65568167",
"0.65568167",
"0.6552492",
"0.6543752",
"0.653... | 0.0 | -1 |
/Routine to update the position and rotation of the gate | public void update(){
//Move and rotate the gate at the specified speeds
this.angle += this.rotationSpeed;
this.centerX += this.xSpeed;
this.centerY += this.ySpeed;
//Calculate the new endpoints based on the updated values
p1.x = centerX + (int)((length / 2)*(Math.cos(angle)));
p1.y = centerY + (int)((length / 2)*(Math.sin(angle)));
p2.x = centerX - (int)((length / 2)*(Math.cos(angle)));
p2.y = centerY - (int)((length / 2)*(Math.sin(angle)));
//Check if either end is out of bounds
checkOutOfBounds(p1);
checkOutOfBounds(p2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updateRotations() {\n try {\n switch (this.mode) {\n case Packet:\n mc.player.renderYawOffset = this.yaw;\n mc.player.rotationYawHead = this.yaw;\n break;\n case Legit:\n mc.playe... | [
"0.6724198",
"0.66969246",
"0.6629175",
"0.65444314",
"0.6479153",
"0.6437024",
"0.6418015",
"0.63098854",
"0.6281848",
"0.62753934",
"0.6178828",
"0.61679155",
"0.61625934",
"0.61612225",
"0.61287916",
"0.6118597",
"0.6110878",
"0.6091814",
"0.6058448",
"0.6033438",
"0.60104... | 0.68837637 | 0 |
/Routine to check if either end point is out of the bounds of the grid, accepts a point | public void checkOutOfBounds(Point p){
/*If the point is out of bounds, the rotation will be reversed (*(-1)) and the speed in the axis in which
* it is out of bounds is also reversed (*(-1))*/
//If out of bounds on the left
if(p.x <= 0){
p.x = 0;
this.rotationSpeed = this.rotationSpeed * (-1);
this.xSpeed = this.xSpeed * (-1);
}
//If out of bounds on the right
else if(p.x >= this.grid.gridWidth){
p.x = this.grid.gridWidth;
this.rotationSpeed = this.rotationSpeed * (-1);
this.xSpeed = this.xSpeed * (-1);
}
//If out of bounds on the top
if(p.y <= 0){
p.y = 0;
this.rotationSpeed = this.rotationSpeed * (-1);
this.ySpeed = this.ySpeed * (-1);
}
//If out of bounds on the bottom
else if(p.y >= grid.gridHeight){
p.y = grid.gridHeight;
this.rotationSpeed = this.rotationSpeed * (-1);
this.ySpeed = this.ySpeed * (-1);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract boolean isOutOfBounds(int x, int y);",
"private boolean withinGridDimensions(int startX, int startY, int endX, int endY) {\n boolean within = true;\n int largerX = Math.max(startX, endX);\n int smallerX = Math.min(startX, endX);\n int largerY = Math.max(startY, endY);\n int smaller... | [
"0.75075096",
"0.7196843",
"0.69049174",
"0.6863959",
"0.68571085",
"0.67806625",
"0.6742295",
"0.6681922",
"0.66549104",
"0.6565117",
"0.65509564",
"0.65250987",
"0.6522486",
"0.6513025",
"0.64748436",
"0.6468266",
"0.6465922",
"0.64650506",
"0.64287627",
"0.64156",
"0.63927... | 0.6783841 | 5 |
/Routine to check if the player has triggered the gate, accepts the player x,y,width,height | public boolean playerThrough(int px, int py, int pw, int ph){
Line2D.Double line = new Line2D.Double(p1,p2); //the gate line
//check if line intersects the player's rectangle of space
if(line.intersects(px, py, pw, ph)){
return true; //gate triggered
}
return false; //gate not triggered
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean canMine(EntityPlayer player, int X, int Y, int Z);",
"protected boolean checkForWin() {\r\n \t\r\n if (squaresRevealed == this.width * this.height - this.mines) {\r\n finishFlags();\r\n finish(GameStateModel.WON);\r\n return true;\r\n } \t\r\n ... | [
"0.612754",
"0.60905224",
"0.6038679",
"0.6020765",
"0.59644705",
"0.5945348",
"0.59389484",
"0.58958983",
"0.5895789",
"0.58927673",
"0.58878285",
"0.5849855",
"0.5849574",
"0.5836342",
"0.58294266",
"0.58253086",
"0.58224803",
"0.5800983",
"0.57819355",
"0.57732314",
"0.575... | 0.6419349 | 0 |
This is a programme of input any alphabet from a to f and print their name accordingly | public static void main(String[] args)
{ char z ='c'; // defining variance
if(z=='a') // applying condition
{
System.out.println("City name starts with " + z + " is Ahmedabad");
}
else if (z=='b')
{
System.out.println("City name starts with " + z + " is Baroda");
}
else if (z=='c')
{
System.out.println("City name starts with " + z + " is Charotar");
}
else if (z=='d')
{
System.out.println("City name starts with " + z + " is Daman");
}
else if (z=='e')
{
System.out.println("City name starts with " + z + " is Egola");
}
else if (z=='f')
{
System.out.println("City name starts with " + z + " is Fatehpura");
}
else
{
System.out.println("Invalid Entry");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void composeAlphabet() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter a name for this alphabet: \");\n\t\tString alphabetName = scanner.nextLine();\n\t\tSystem.out.println(\"Please enter the location of the window dumps \" + \"(relative to the current folder): \");\n... | [
"0.70199466",
"0.69601023",
"0.6899262",
"0.6875412",
"0.6746456",
"0.6638496",
"0.6613986",
"0.6560886",
"0.6549734",
"0.65158796",
"0.6494375",
"0.64805764",
"0.646464",
"0.6436217",
"0.6414399",
"0.6408365",
"0.6408203",
"0.6400911",
"0.6389617",
"0.6338153",
"0.6322658",
... | 0.58204055 | 70 |
TODO Autogenerated method stub | @Override
public void onClick(View v) {
Intent i = new Intent(getApplicationContext(), Login_IntroSlider.class);
startActivity(i);
} | {
"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 onClick(View v) {
Intent i = new Intent(getApplicationContext(), Signup.class);
startActivity(i);
} | {
"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 onClick(View v) {
Intent i = new Intent(getApplicationContext(), Host_Login.class);
startActivity(i);
} | {
"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 |
Model for the template. | public interface FacilitiesViewModel extends TemplateModel {
/**
* Gets user input from corresponding template page.
*
* @return user input string
*/
String getUserInput();
/**
* Sets greeting that is displayed in corresponding template page.
*
* @param greeting
* greeting string
*/
void setGreeting(String greeting);
@Include({ "name", "description" })
void setFacilitiesList(List<Facility> facilitiesList);
List<Facility> getFacilitiesList();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface VistaDetallemensajeModel extends TemplateModel {\n // Add setters and getters for template properties here.\n }",
"public BaseSlingModel getGenericModel() {\n return model;\n }",
"public interface VistaListadeproductosModel extends TemplateModel {\n // Add setters and gett... | [
"0.6473563",
"0.6295451",
"0.6282718",
"0.6271632",
"0.61892873",
"0.6187511",
"0.6183757",
"0.6156414",
"0.6086135",
"0.60477376",
"0.6044232",
"0.6004842",
"0.59862584",
"0.5976869",
"0.59742296",
"0.595383",
"0.59483165",
"0.59483165",
"0.59483165",
"0.5947615",
"0.5945225... | 0.0 | -1 |
Gets user input from corresponding template page. | String getUserInput(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static String getUserPage() \n\t{\n\t\tString userInput = \"\";\n\t\ttry \n\t\t{\n\t\t\tSystem.out.println(\"What page?\");\n\t\t\tSystem.out.print(\"-> \");\n\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\tuserInput = scanner.nextLine();\n\t\t\t\n\t\t\t// Check to see if their input is greater than... | [
"0.6089526",
"0.5963251",
"0.5631998",
"0.5576356",
"0.5467704",
"0.5423556",
"0.54213494",
"0.54191715",
"0.537695",
"0.53556967",
"0.5293821",
"0.5289905",
"0.5228329",
"0.52091646",
"0.5203066",
"0.5191158",
"0.5182547",
"0.51696163",
"0.5133347",
"0.5128429",
"0.50985605"... | 0.5791753 | 2 |
Sets greeting that is displayed in corresponding template page. | void setGreeting(String greeting); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setGreeting(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n greeting_ = value;\n }",
"public Builder setGreeting(\n java.lang.String value) {\n copyOnWrite();\n instance.setGreeting(value);\n return this;\n }"... | [
"0.70021963",
"0.6711547",
"0.6588217",
"0.6510519",
"0.63487923",
"0.61455166",
"0.61344737",
"0.6006926",
"0.5906262",
"0.58661836",
"0.585089",
"0.5841848",
"0.5814955",
"0.57402307",
"0.570223",
"0.5688029",
"0.56736076",
"0.5661955",
"0.5621174",
"0.5620854",
"0.56197226... | 0.6933128 | 1 |
Creates a test playback without depending from a midlet. This constructor must be only used for testing purposes! | protected J2meTestRunner(J2meTestCase test) {
super(test, null);
midlet = null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public TestWav()\r\n {\r\n super(\"AudioPlayer\");\r\n player = new Playback();\r\n String[] audioFileNames = findFiles(AUDIO_DIR, null);\r\n makeFrame(audioFileNames);\r\n }",
"public TestPlayer()\n {\n }",
"public Play() {\n }",
"public Playlist()\n\t{\n\t\tthis(\"U... | [
"0.70325285",
"0.659552",
"0.60187095",
"0.5902685",
"0.58581877",
"0.5857204",
"0.58316725",
"0.582857",
"0.58195853",
"0.57767737",
"0.5743946",
"0.57209843",
"0.5702182",
"0.56296647",
"0.56005263",
"0.5592709",
"0.5572457",
"0.5571806",
"0.5555271",
"0.55238634",
"0.55165... | 0.58760166 | 4 |
Creates a test playback which will execute a specific test base on a specific MIDlet | public J2meTestRunner(MIDlet midlet, J2meTestCase test) {
this(midlet, test, new ReportList(midlet));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testMultimedia() {\n AudioPlayer newAudioProduct = new AudioPlayer(\"DP-X1A\", \"Onkyo\",\n \"DSD/FLAC/ALAC/WAV/AIFF/MQA/Ogg-Vorbis/MP3/AAC\", \"M3U/PLS/WPL\");\n Screen newScreen = new Screen(\"720x480\", 40, 22);\n MoviePlayer newMovieProduct = new MoviePlayer(\"DBPOWER MK101\", \"Ora... | [
"0.6105824",
"0.60644025",
"0.60182273",
"0.59492993",
"0.59301996",
"0.5811095",
"0.5720076",
"0.57187927",
"0.5715887",
"0.5693752",
"0.5667542",
"0.5632202",
"0.55972534",
"0.5571618",
"0.5552969",
"0.54824764",
"0.54761416",
"0.5457276",
"0.5446403",
"0.5443455",
"0.54318... | 0.5655995 | 11 |
Set a reference to the current MIDlet to all the tests. | protected void doRun(Test test) {
setMidletToNestedTests(test);
super.doRun(test);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public J2meTestRunner(MIDlet midlet, J2meTestCase test) {\n this(midlet, test, new ReportList(midlet));\n }",
"@Before\n public void setNames() {\n super.setTestRobot(\"tkt.RedShift\");\n super.setEnemyRobot(\"sample.Tracker\");\n }",
"@Before\n\tpublic void setUp()\n\t{\n\t\tOptionsManager.getSing... | [
"0.569932",
"0.56659365",
"0.5608001",
"0.56021446",
"0.5594062",
"0.5567786",
"0.55374944",
"0.5485938",
"0.548308",
"0.5447805",
"0.54117954",
"0.53550774",
"0.5339582",
"0.52991784",
"0.52892375",
"0.52885926",
"0.52825105",
"0.5275496",
"0.52407056",
"0.52404636",
"0.5238... | 0.5069334 | 47 |
Force the MIDlet to exit after the execution of all the tests. | public void run() {
super.run();
if (needToExit((TestSuite)this.suite)) {
Log.log(J2meTestRunner.class, "Exit requested");
if (midlet instanceof CoverageReporter) {
CoverageManager.writeReport("file://localhost/");
}
midlet.notifyDestroyed();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void stop() {\n\t\texitTesting = true;\n\t}",
"@AfterTest\n\tpublic void afterTest() {\n\t\tiDriver.quit();\n\t\tSystem.out.println(\"=====================VEGASF_419_END=====================\");\n\t}",
"@AfterTest\npublic void end()\n{\n\tlogin.s.quit();\n}",
"public void _test_exit() throws Exception {\r\n ... | [
"0.7540567",
"0.74780387",
"0.7449331",
"0.73894286",
"0.7322245",
"0.7322245",
"0.7322245",
"0.72910345",
"0.7245807",
"0.7192455",
"0.7115817",
"0.70620817",
"0.7042684",
"0.7020215",
"0.6972213",
"0.6947764",
"0.6946845",
"0.6946845",
"0.69347864",
"0.68922246",
"0.6889929... | 0.70806956 | 11 |
Tells if at least one test in the given suite is requiring to terminate the application. | private boolean needToExit(TestSuite suite){
for (int i = 0; i < suite.testCount(); i++) {
Test test = suite.testAt(i);
if (test instanceof J2meTestCase) {
if (((J2meTestCase)test).isExitAfterExecution()) {
return true;
}
} else if (test instanceof TestSuite) {
if (needToExit((TestSuite)test)) {
return true;
}
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean isAllTestsRun() {\n Collection<TestPackage> pkgs = getTestPackages();\n for (TestPackage pkg : pkgs) {\n if (!pkg.isAllTestsRun()) {\n return false;\n }\n }\n return true;\n }",
"private bo... | [
"0.5950588",
"0.5913647",
"0.57382905",
"0.5648883",
"0.5529846",
"0.55214787",
"0.54139286",
"0.54095405",
"0.53269416",
"0.5312464",
"0.53092337",
"0.53021884",
"0.5298091",
"0.52842045",
"0.52808",
"0.5273221",
"0.5267256",
"0.52644324",
"0.52559954",
"0.5253014",
"0.52257... | 0.7791494 | 0 |
TC02: Wrong vertices order | @Test
public void testConstructor() {
try {
new Polygon(new Point3D(0, 0, 1), new Point3D(0, 1, 0),
new Point3D(1, 0, 0), new Point3D(-1, 1, 1));
fail("Constructed a polygon with wrong order of vertices");
} catch (IllegalArgumentException e) {
}
// TC03: Not in the same plane
try {
new Polygon(new Point3D(0, 0, 1), new Point3D(1, 0, 0),
new Point3D(0, 1, 0), new Point3D(0, 2, 2));
fail("Constructed a polygon with vertices that are not in the same plane");
} catch (IllegalArgumentException e) {
}
// TC04: Concave quadrangular
try {
new Polygon(new Point3D(0, 0, 1), new Point3D(1, 0, 0),
new Point3D(0, 1, 0), new Point3D(0.5, 0.25, 0.5));
fail("Constructed a concave polygon");
} catch (IllegalArgumentException e) {
}
// =============== Boundary Values Tests ==================
// TC10: Vertex on a side of a quadrangular
try {
new Polygon(new Point3D(0, 0, 1), new Point3D(1, 0, 0),
new Point3D(0, 1, 0), new Point3D(0, 0.5, 0.5));
fail("Constructed a polygon with vertix on a side");
} catch (IllegalArgumentException e) {
}
// TC11: Last point = first point
try {
new Polygon(new Point3D(0, 0, 1), new Point3D(1, 0, 0),
new Point3D(0, 1, 0), new Point3D(0, 0, 1));
fail("Constructed a polygon with vertice on a side");
} catch (IllegalArgumentException e) {
}
// TC12: Colocated points
try {
new Polygon(new Point3D(0, 0, 1), new Point3D(1, 0, 0),
new Point3D(0, 1, 0), new Point3D(0, 1, 0));
fail("Constructed a polygon with vertice on a side");
} catch (IllegalArgumentException e) {
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic int getOrder() {\r\n\t\treturn vertices.size();\r\n\t}",
"@Override\n\tpublic int graphOrder() {\n\t\treturn vertices.size();\n\t}",
"@Test\n\tpublic void verticesTest() {\n\t\tgraph.addVertex(A);\n\t\tgraph.addVertex(B);\n\t\tgraph.addVertex(C);\n\t\tgraph.addVertex(D);\n\t\tassertEquals... | [
"0.7074389",
"0.68007416",
"0.67727715",
"0.6650589",
"0.6575984",
"0.6460376",
"0.6421718",
"0.6415767",
"0.6390175",
"0.63197565",
"0.63189304",
"0.6293483",
"0.6270658",
"0.62349117",
"0.6212681",
"0.61538166",
"0.6153702",
"0.6132291",
"0.6131581",
"0.61201566",
"0.611408... | 0.0 | -1 |
Creates a new date picker dialog for the current date using the parent context's default date picker dialog theme. | public DatePickerDialog(@NonNull Context context) {
this(context, 0, null, Calendar.getInstance(), -1, -1, -1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\treturn new DatePickerDialog(getActivity(), this, year, month, day);\n\t}",
"@RequiresApi(api = Build.VERSION_CODES.N)\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n // Use the current d... | [
"0.7459971",
"0.74163276",
"0.74045634",
"0.73428553",
"0.7257119",
"0.7254406",
"0.7249152",
"0.7225433",
"0.7225433",
"0.7222591",
"0.72147435",
"0.72147435",
"0.72099805",
"0.71787614",
"0.7174299",
"0.7174299",
"0.7174299",
"0.7174299",
"0.7174299",
"0.7174299",
"0.717429... | 0.72346646 | 7 |
Creates a new date picker dialog for the current date. | public DatePickerDialog(@NonNull Context context, @StyleRes int themeResId) {
this(context, themeResId, null, Calendar.getInstance(), -1, -1, -1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void chooseDateDialog() {\n Calendar c = Calendar.getInstance();\n int year = c.get(Calendar.YEAR);\n int month = c.get(Calendar.MONTH);\n int day = c.get(Calendar.DATE);\n\n DatePickerDialog datePickerDialog =\n new DatePickerDialog(Objects.requireNonNull(... | [
"0.8111186",
"0.7648777",
"0.7559702",
"0.74963176",
"0.7446321",
"0.7438222",
"0.7416481",
"0.7387694",
"0.7387694",
"0.7384987",
"0.737705",
"0.737705",
"0.73603976",
"0.7351741",
"0.73502547",
"0.7340683",
"0.73385525",
"0.732899",
"0.7316802",
"0.73150444",
"0.73150444",
... | 0.0 | -1 |
Sets the listener to call when the user sets the date. | public DatePickerDialog setOnDateSetListener(@Nullable OnDateSetListener listener) {
mDateSetListener = listener;
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setOnDateSetListener(DatePickerDialog.OnDateSetListener onDateSetListener){\n this.dateSetListener = onDateSetListener;\n }",
"private DatePickerDialog.OnDateSetListener dateSetListener() {\n return new DatePickerDialog.OnDateSetListener() {\n\n @Override\n publ... | [
"0.7687816",
"0.71903116",
"0.70692647",
"0.69976294",
"0.6984115",
"0.6896684",
"0.6832287",
"0.67914873",
"0.67401266",
"0.67328024",
"0.6727232",
"0.6723893",
"0.6671733",
"0.6663913",
"0.66277933",
"0.6616578",
"0.6592067",
"0.6576145",
"0.65713173",
"0.6567833",
"0.65295... | 0.6912094 | 5 |
The listener used to indicate the user has finished selecting a date. | public interface OnDateSetListener {
/**
* @param view the picker associated with the dialog
* @param year the selected year
* @param month the selected month (0-11 for compatibility with
* {@link Calendar#MONTH})
* @param dayOfMonth the selected day of the month (1-31, depending on
* month)
*/
void onDateSet(DatePicker view, int year, int month, int dayOfMonth);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onReceiveDateFromDialog(Date date) {\n // Attempt to mark currently opened event as done\n databaseHandler.markEventDone(selectedEvent, date);\n prepareData();\n }",
"protected void dateSelected(boolean canceled) {\n \t\tif (!canceled) {\n \t\t\tupdateDateText()... | [
"0.67642665",
"0.6724",
"0.6525727",
"0.64097524",
"0.6400113",
"0.63632715",
"0.63602465",
"0.6251003",
"0.61600643",
"0.6084451",
"0.6072919",
"0.60659736",
"0.5947432",
"0.5943806",
"0.59321684",
"0.5924497",
"0.59186226",
"0.591389",
"0.5872266",
"0.58243054",
"0.5808007"... | 0.61847174 | 8 |
TODO Autogenerated method stub | public String getCorllated(String selctedCol) {
String cor = model.getCor(selctedCol);
if (cor != null) {
return cor;
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
Interface for items that can be stored in the inventory | public interface IItem {
// Which hotbar slot the item is stored in
int getItemID();
// Path to the item image
String getItemImage();
// Activates the item
void activate();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"InventoryItem getInventoryItem();",
"public interface Item {\n \n /**\n * Returns the name of the item\n * @return \n */\n public String getName();\n \n /**\n * Returns the price of the item\n * @return \n */\n public double getPrice();\n \n /**\n * Returns the... | [
"0.73685783",
"0.73063767",
"0.7243486",
"0.7206623",
"0.72054476",
"0.71362585",
"0.7070074",
"0.7064788",
"0.6970635",
"0.69407356",
"0.6922964",
"0.6838861",
"0.682903",
"0.6815686",
"0.67853564",
"0.67420304",
"0.67253953",
"0.6721034",
"0.67151505",
"0.6710071",
"0.67088... | 0.7389236 | 0 |
Which hotbar slot the item is stored in | int getItemID(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface IItem {\n // Which hotbar slot the item is stored in\n int getItemID();\n\n // Path to the item image\n String getItemImage();\n\n // Activates the item\n void activate();\n}",
"public int getSlot() {\r\n\t\treturn slot;\r\n\t}",
"public int getSlot() {\n return slot;\... | [
"0.68653256",
"0.6227228",
"0.62027246",
"0.62027246",
"0.6175134",
"0.61592203",
"0.61106825",
"0.59717304",
"0.59067845",
"0.5888976",
"0.57894385",
"0.5734882",
"0.57124925",
"0.57049215",
"0.5695461",
"0.564466",
"0.5635896",
"0.5619796",
"0.55866873",
"0.55796444",
"0.55... | 0.0 | -1 |
Path to the item image | String getItemImage(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public String getImagePath() {\n return IMAGE_PATH;\n }",
"java.lang.String getImagePath();",
"String getImagePath();",
"String getImagePath();",
"public String getImagePath() {\n\t\treturn mPath;\n\t}",
"public String getImagePath() {\n\t\treturn imagePath;\n\t}",
"public Stri... | [
"0.75057775",
"0.7367338",
"0.71496016",
"0.71496016",
"0.7031469",
"0.70197433",
"0.6916878",
"0.6851378",
"0.6834751",
"0.6738802",
"0.671197",
"0.6702107",
"0.6694544",
"0.6599232",
"0.6575095",
"0.65546566",
"0.6438212",
"0.6428118",
"0.63911206",
"0.6390888",
"0.63803643... | 0.7521586 | 0 |
Item item1=new Item(); Item item1=new Item(2.5) | public static void main(String[] args) {
Item item1=new Item("cucumber",2,5);
Item item2=new Item("appl",3,6);
Item item3=new Item("orange",3,5);
Item item4=new Item("bananas",2,6);
ArrayList<Item>shoppingList=new ArrayList<>();
shoppingList.addAll(Arrays.asList(item1,item2,item3,item4));
double totalCost=0;
for (Item each:shoppingList){
totalCost +=each.calCost();
}
for(int i=0;i<shoppingList.size();i++){
totalCost+=shoppingList.get(i).calCost();
}
System.out.println("total:"+totalCost);
//System.out.println(item1.calCost());
// System.out.println(item1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Objects(String item, double baseprice){\r\n this.item = item;\r\n this.baseprice = baseprice;\r\n }",
"Item(){\r\n\t\tthis(0, new Weight(5), new DukatAmount(0));\r\n\t}",
"Items(double cost){\n\tthis.cost=cost;\n\titemId++;\n\tcurrentID=itemId;\n}",
"public Item() {\r\n this.na... | [
"0.703147",
"0.6805789",
"0.67465144",
"0.6736213",
"0.67344254",
"0.67225444",
"0.6601688",
"0.65970176",
"0.65278655",
"0.6486118",
"0.6479139",
"0.64718413",
"0.6471797",
"0.64674395",
"0.6400061",
"0.6373664",
"0.63550526",
"0.6321367",
"0.62584823",
"0.6228352",
"0.62235... | 0.0 | -1 |
Construct a street and register it with a map | public Street (SimpleMap roadMap) {
if (roadMap != null) roadMap.addToMap(this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setStreet(String street);",
"public @NotNull Address newAddress(@NotNull @Size(min = 1, max = 255) final String street,\r\n\t\t\t@NotNull @Size(min = 1, max = 255) final String city, @NotNull final State state, @NotNull Integer zipcode);",
"public PersonAddressBuilderDFB at(String streetAddress){\n ... | [
"0.6587639",
"0.6523733",
"0.64019215",
"0.63401544",
"0.63344246",
"0.632397",
"0.6261624",
"0.624392",
"0.62156147",
"0.62143445",
"0.6210311",
"0.6210311",
"0.6208749",
"0.6205047",
"0.61312425",
"0.6094469",
"0.603318",
"0.60267574",
"0.6004169",
"0.5993128",
"0.59629285"... | 0.7133752 | 0 |
Test if we know how to connect to the specified object. For a street, the only possibility is an intersection. A null newObj will return false. | private boolean isConnectable (RoadInterface newObj) {
boolean result = false;
if (newObj instanceof Intersection) {
result = true;
}
return (result);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean connectTo (RoadInterface newObj, Direction attachAt)\n throws ClassCastException {\n boolean result = false;\n // Check for compatible type; null newObj will also throw an exception.\n if (!isConnectable(newObj)) {\n ClassCastException oops = new ClassCastException();\n throw o... | [
"0.68227863",
"0.64965045",
"0.6169313",
"0.5938864",
"0.5874834",
"0.5853966",
"0.5825399",
"0.5775853",
"0.57661575",
"0.57237226",
"0.569252",
"0.5689575",
"0.56669796",
"0.56522155",
"0.5556207",
"0.55549073",
"0.5543416",
"0.5542058",
"0.55245245",
"0.5505836",
"0.550583... | 0.75226253 | 0 |
Check if this street is already attached to the specified intersection in the correct direction. | private boolean isAttached (RoadInterface newObj, Direction attachAt) {
boolean result = false;
if ((interOne == newObj && dirOne == attachAt) ||
(interTwo == newObj && dirTwo == attachAt)) {
result = true;
}
return (result);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean attachMe (RoadInterface me, Direction attachAt) {\n\n // Can't do anything if the intersection or direction is null.\n if (me == null || attachAt == null) return (false);\n\n // If the intersection is already attached, that's fine.\n if (interOne == me && dirOne == attachAt) return (tru... | [
"0.61654115",
"0.6016824",
"0.5778336",
"0.575263",
"0.56283486",
"0.55419505",
"0.54852164",
"0.5481756",
"0.54481775",
"0.5431859",
"0.534016",
"0.5325071",
"0.5316633",
"0.5276506",
"0.5243868",
"0.5216292",
"0.51875937",
"0.51782984",
"0.5157862",
"0.51431334",
"0.5141208... | 0.51868045 | 17 |
Check if there's an open end of the street to attach to. | private boolean isOpen () {
boolean result = false;
if (interOne == null || interTwo == null) result = true;
return (result);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasEndPosition();",
"boolean hasEndPosition();",
"public boolean isFull() {\n\t\treturn end != null;\n\t}",
"private boolean buildStreetIsAllowed() {\r\n\t\tif (clickedRoad.getEnd() == lastSettlementNode\r\n\t\t\t\t|| clickedRoad.getStart() == lastSettlementNode) {\r\n\t\t\treturn true;\r\n\t\t} else... | [
"0.59789896",
"0.59789896",
"0.5960264",
"0.5919187",
"0.5769912",
"0.5760231",
"0.5745052",
"0.5715643",
"0.56438303",
"0.5607646",
"0.5562419",
"0.555977",
"0.5551231",
"0.5504958",
"0.54922545",
"0.5491822",
"0.549055",
"0.54288244",
"0.54062843",
"0.54043615",
"0.539826",... | 0.0 | -1 |
Add the necessary information to attach an intersection. The intersection passed in the first call to this method will be the start intersection, the second the end intersection. Any additional calls are quietly ignored as long as the intersection is already attached. | private boolean attachMe (RoadInterface me, Direction attachAt) {
// Can't do anything if the intersection or direction is null.
if (me == null || attachAt == null) return (false);
// If the intersection is already attached, that's fine.
if (interOne == me && dirOne == attachAt) return (true);
if (interTwo == me && dirTwo == attachAt) return (true);
/*
* We need to attempt to attach this intersection. You can't
* attach the same intersection to both ends of a road.
*/
boolean retval = true;
if (interOne == null) {
interOne = me;
dirOne = attachAt;
xOne = ((Intersection) me).getXPos();
yOne = ((Intersection) me).getYPos();
} else if (interTwo == null && interOne != me) {
interTwo = me;
dirTwo = attachAt;
xTwo = ((Intersection) me).getXPos();
yTwo = ((Intersection) me).getYPos();
} else {
retval = false;
}
return (retval);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public org.landxml.schema.landXML11.IntersectionDocument.Intersection addNewIntersection()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.IntersectionDocument.Intersection target = null;\r\n target = (org.landxml.sch... | [
"0.58286357",
"0.5729422",
"0.56976473",
"0.5519607",
"0.52296686",
"0.5074163",
"0.5058813",
"0.5047686",
"0.5044969",
"0.5041318",
"0.502851",
"0.5024101",
"0.4978188",
"0.4959198",
"0.48287332",
"0.4730091",
"0.4708179",
"0.46189076",
"0.4616341",
"0.45999625",
"0.45908806... | 0.53834695 | 4 |
Return the intersection connected in the specified direction | public RoadInterface getConnectedRoad (Direction dir) {
if (dirOne == dir) {
return (interOne);
} else if (dirTwo == dir) {
return (interTwo);
} else {
return (null);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private ArrayList<ColorMixerModel.ColorItem> pathIntersection(){\n ArrayList<ColorMixerModel.ColorItem> toDel = new ArrayList<>();\n for(ColorMixerModel.ColorItem c: cmModel.colorSet){\n Ellipse2D.Float cobj = new Ellipse2D.Float(c.getPos().x,c.getPos().y, c.getR(),c.getR());\n ... | [
"0.575398",
"0.55618304",
"0.5416558",
"0.5408139",
"0.5224549",
"0.5147551",
"0.5142293",
"0.5128929",
"0.5095413",
"0.50901294",
"0.5078294",
"0.5030571",
"0.49841198",
"0.49830985",
"0.49743703",
"0.4938791",
"0.49072325",
"0.49070397",
"0.49027646",
"0.48781192",
"0.48598... | 0.5961636 | 0 |
Connect a street to an object satisfying RoadInterface. Just a shell to check the type and call the specific method appropriate for the object. | public boolean connectTo (RoadInterface newObj, Direction attachAt)
throws ClassCastException {
boolean result = false;
// Check for compatible type; null newObj will also throw an exception.
if (!isConnectable(newObj)) {
ClassCastException oops = new ClassCastException();
throw oops;
}
/*
* Are we already connected to this object? If so, we're done. If
* not, and the street still has an open end, make the connection.
*/
if (isAttached(newObj,attachAt)) {
result = true;
} else if (isOpen()) {
result = connectTo((Intersection) newObj,attachAt);
}
return (result);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Street (SimpleMap roadMap) {\n if (roadMap != null) roadMap.addToMap(this);\n }",
"@Override\r\n\tpublic void placeRoad(EdgeLocation edgeLoc) {\n\t\t\r\n\t}",
"public Road(String name, Junction from, Junction to) {\n this.name = name;\n this.from = from;\n this.to = to;\n }",... | [
"0.5939852",
"0.5882074",
"0.57528144",
"0.57175654",
"0.56922376",
"0.56857276",
"0.5658686",
"0.5563157",
"0.55629605",
"0.55481565",
"0.5543182",
"0.554017",
"0.5539257",
"0.5539257",
"0.5528695",
"0.55171216",
"0.5494962",
"0.543112",
"0.54253846",
"0.539555",
"0.53736717... | 0.55358344 | 14 |
Connect a street to an intersection. Note that this method is only called from within the class. It's assumed that the necessary correctness tests (connectable, not attached, and an open attachment point) have been made. | private boolean connectTo (Intersection newInter, Direction attachAt) {
boolean result = false;
/*
* Install a reference to the intersection, and install a back
* reference to the street in the intersection. This can fail if
* the street is already connected to two intersections, or if the
* intersection already has a connected street in the specified
* direction.
*/
if (attachMe(newInter,attachAt) &&
newInter.connectTo(this,attachAt.opposite())) result = true;
/*
* If this is the final connection, calculate the coordinates of
* the turn, if any.
*/
if (result == true && !isOpen()) calculateTurn();
return (result);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract Collection<Street> findConnectedStreets(\r\n StreetNode streetNode);",
"public Street (SimpleMap roadMap) {\n if (roadMap != null) roadMap.addToMap(this);\n }",
"public boolean connectTo (RoadInterface newObj, Direction attachAt)\n throws ClassCastException {\n boolean result = ... | [
"0.5640334",
"0.54419774",
"0.54189503",
"0.53892833",
"0.506112",
"0.49178454",
"0.4849878",
"0.48366764",
"0.4822327",
"0.47777855",
"0.47501615",
"0.47348514",
"0.47147697",
"0.4712506",
"0.46935925",
"0.46663368",
"0.46642593",
"0.46566606",
"0.46422604",
"0.4638979",
"0.... | 0.6604745 | 0 |
A method to calculate the coordinates of the turn (if any) in this street. We need these coordinates every time we print, might as well figure them out ahead of time. | private void calculateTurn () {
// Do we need a turn? If not, we're done.
if (dirOne.opposite() == dirTwo) return;
/*
* We need a turn. The coordinates of the turn point will be the x
* coordinate of the north/south leg and the y coordinate of the
* east/west leg.
*/
if (dirOne == Direction.north || dirOne == Direction.south) {
xTurn = xOne;
yTurn = yTwo;
} else {
xTurn = xTwo;
yTurn = yOne;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"long getCoordinates();",
"long getCoordinates();",
"public static int getCoords()\n\t{\n\t\treturn moveCoords;\n\t}",
"public int getPoint(int turn)\n\t{\n\t\treturn point[turn];\n\t}",
"@Override\n\tpublic void getCoordinates() {\n\t\tSystem.out.println(\"Your Coordinates: 18.1124° N, 79.0193° E \");\n\t}... | [
"0.6267006",
"0.6267006",
"0.62221897",
"0.6092058",
"0.56938475",
"0.56787646",
"0.56459814",
"0.5634891",
"0.5573544",
"0.5562022",
"0.5544096",
"0.54990315",
"0.54504603",
"0.5423964",
"0.53969544",
"0.5388945",
"0.5353666",
"0.5351058",
"0.532299",
"0.531913",
"0.5313235"... | 0.67095697 | 0 |
Paint the road onto the grid. It will be the case that the x coordinate of the turn point matches one end, and the y coordinate matches the other. It's a matter of filling in the correct lines. If there's no turn, the turn coordinates will both be 1. The details are are a pain. | public void drawOnMap (char[][] roadMap) {
int deltaX = 0;
int deltaY = 0;
int startX = 0;
int startY = 0;
/*
* If there's no turn, pick an end and calculate the delta. To
* avoid overwriting the intersections, reduce the delta by 1 and,
* at the equality end (the initial i value in the loop) shift the
* start by one for the same reason.
*/
if (xTurn == -1) {
startX = xOne;
startY = yOne;
deltaX = xTwo - xOne;
deltaY = yTwo - yOne;
if (deltaY == 0) {
if (deltaX < 0) {
deltaX += 1;
} else {
startX++;
deltaX -= 1;
}
} else {
if (deltaY < 0) {
deltaY += 1;
} else {
startY++;
deltaY -= 1;
}
}
}
/*
* There's a turn. Our starting point will be the turn
* coordinates. Calculate deltaX and deltaY. Here, we want to
* overwrite the turn (offset of zero in the loops) and reduce
* delta to avoid overwriting the intersections at each end.
*/
else {
startX = xTurn;
startY = yTurn;
if (startX == xOne) {
deltaX = xTwo - startX;
deltaY = yOne - startY;
} else {
deltaX = xOne - startX;
deltaY = yTwo - startY;
}
if (deltaX < 0) {
deltaX++;
}
if (deltaY < 0) {
deltaY++;
}
}
/*
* Now we can run two loops to fill in the necessary chars.
*/
if (deltaX != 0) {
for (int i = Math.min(deltaX,0) ; i < Math.max(deltaX,0) ; i++) {
roadMap[startY][startX + i] = '*';
}
}
if (deltaY != 0) {
for (int i = Math.min(deltaY,0) ; i < Math.max(deltaY,0) ; i++) {
roadMap[startY + i][startX] = '*';
}
}
/*
* Blind spot: in the case where both deltaX and deltaY are
* counting back toward the turn, an offset of zero, and not quite
* getting there.
*/
if (deltaX < 0 && deltaY < 0) roadMap[startY][startX] = '*';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void drawRoutes () {\n // Lay ngay cua tour\n Date tourDate = OnlineManager.getInstance().mTourList.get(tourOrder).getmDate();\n // Kiem tra xem ngay dien ra tour la truoc hay sau hom nay. 0: hom nay, 1: sau, -1: truoc\n int dateEqual = Tour.afterToday(tourDate);\n // Kie... | [
"0.6798742",
"0.64372945",
"0.63519585",
"0.6350434",
"0.63250464",
"0.6306102",
"0.6251469",
"0.62026703",
"0.6165295",
"0.6153134",
"0.6108604",
"0.60922784",
"0.6079773",
"0.6079522",
"0.6068167",
"0.6002754",
"0.59213907",
"0.5919243",
"0.5913438",
"0.5908911",
"0.5887649... | 0.7487377 | 0 |
Assigns a name to the street. | public void setName (String name) {
streetName = name ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setStreet(String street);",
"public void setStreetName(String streetName) \n \t{\n \t\tthis.streetName = streetName;\n \t}",
"public void setStreetName(String streetName) {\r\n this.streetName = streetName;\r\n }",
"public void setStreetName(String streetName) {\n this.streetName = stre... | [
"0.76226354",
"0.737589",
"0.7340176",
"0.7269272",
"0.7015431",
"0.7015431",
"0.69026315",
"0.6815611",
"0.68109405",
"0.6723596",
"0.66279936",
"0.6605072",
"0.6428744",
"0.62570816",
"0.6248306",
"0.6235828",
"0.621684",
"0.6195781",
"0.61935395",
"0.61918753",
"0.6178643"... | 0.86566764 | 0 |
Retrieves the name of the street. | public String getName () {
return (streetName) ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getStreetName()\n \t{\n \t\treturn this.streetName;\n \t}",
"public String getStreetName() {\r\n return streetName;\r\n }",
"public String getStreetName() {\r\n return streetName;\r\n }",
"public String getStreetName() {\n return streetName;\n }",
"public String ... | [
"0.80868155",
"0.7980819",
"0.7980819",
"0.79367524",
"0.7382906",
"0.730069",
"0.730069",
"0.7169916",
"0.71306586",
"0.71306586",
"0.7122677",
"0.7122677",
"0.708028",
"0.69312435",
"0.6880948",
"0.67034537",
"0.6653172",
"0.66141075",
"0.6592898",
"0.65000534",
"0.64785355... | 0.83769435 | 0 |
Instantiates a new employee. | public Employee() {
super();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Employee() {\n\t}",
"public Employee() {\n this.isActivated = false;\n this.salt = CryptographicHelper.getInstance().generateRandomString(32);\n\n this.address = new Address();\n this.reports = new ArrayList<>();\n }",
"public Employee() {}",
"public Employee() {\n\t\tSystem.ou... | [
"0.7751614",
"0.7638267",
"0.75565356",
"0.7553261",
"0.7533421",
"0.753201",
"0.752126",
"0.75020045",
"0.7465059",
"0.7465059",
"0.7465059",
"0.7433827",
"0.7433827",
"0.7356224",
"0.7185942",
"0.71220505",
"0.7091062",
"0.7081629",
"0.70784587",
"0.70518863",
"0.7050077",
... | 0.75162697 | 7 |
Instantiates a new employee. | public Employee(int id, String firstName, String lastName, int age, double salary, String address) {
super();
this.id = id;
this.firstName = firstName;
this.lastName = lastName;
this.age = age;
this.salary = salary;
this.address = address;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Employee() {\n\t}",
"public Employee() {\n this.isActivated = false;\n this.salt = CryptographicHelper.getInstance().generateRandomString(32);\n\n this.address = new Address();\n this.reports = new ArrayList<>();\n }",
"public Employee() {}",
"public Employee() {\n\t\tSystem.ou... | [
"0.7751614",
"0.7638267",
"0.75565356",
"0.7553261",
"0.7533421",
"0.753201",
"0.752126",
"0.75162697",
"0.75020045",
"0.7465059",
"0.7465059",
"0.7465059",
"0.7433827",
"0.7433827",
"0.7356224",
"0.7185942",
"0.71220505",
"0.7091062",
"0.7081629",
"0.70784587",
"0.70518863",... | 0.65863985 | 55 |
Gets the first name. | public String getFirstName() {
return firstName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getNameFirst() {\n\t\t\treturn nameFirst;\n\t\t}",
"public java.lang.String getFirst_name() {\n return first_name;\n }",
"public String getFirstname() {\n return (String) get(\"firstname\");\n }",
"public String getFirstname() {\r\n\t\treturn firstname;\r\n\t}",
"public St... | [
"0.8738096",
"0.86660486",
"0.8656761",
"0.8647086",
"0.85867167",
"0.84922266",
"0.8482891",
"0.8464327",
"0.84549195",
"0.8441651",
"0.8416578",
"0.83963585",
"0.83963585",
"0.8394841",
"0.8295318",
"0.8292146",
"0.82880825",
"0.82880825",
"0.8285703",
"0.8285703",
"0.82844... | 0.8196219 | 42 |
Sets the first name. | public void setFirstName(String firstName) {
this.firstName = firstName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void setFirstName(String first)\n {\n firstName = first;\n }",
"public void setFirstName( String first )\r\n {\r\n firstName = first;\r\n }",
"public void setFirstName(String value) {\n setAttributeInternal(FIRSTNAME, value);\n }",
"public void setFirstName(String in... | [
"0.8715914",
"0.855118",
"0.845424",
"0.8328045",
"0.8310955",
"0.82983536",
"0.8265542",
"0.8246519",
"0.8242409",
"0.8233269",
"0.82327884",
"0.82325023",
"0.8140211",
"0.8140211",
"0.81132597",
"0.8111072",
"0.8109402",
"0.8097965",
"0.8078896",
"0.80774075",
"0.80437624",... | 0.79339665 | 44 |
Gets the last name. | public String getLastName() {
return lastName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.lang.String getLastName();",
"java.lang.String getLastName();",
"java.lang.String getLastName();",
"public java.lang.CharSequence getLastName() {\n return last_name;\n }",
"public java.lang.CharSequence getLastName() {\n return last_name;\n }",
"public java.lang.String getLast_nam... | [
"0.87995845",
"0.8708823",
"0.8708823",
"0.86818093",
"0.8678093",
"0.8641832",
"0.8641832",
"0.848766",
"0.8481458",
"0.8478807",
"0.8460067",
"0.8458546",
"0.8448537",
"0.84328026",
"0.84328026",
"0.8432295",
"0.8424441",
"0.84228116",
"0.8416736",
"0.8407276",
"0.8397206",... | 0.8188047 | 82 |
Sets the last name. | public void setLastName(String lastName) {
this.lastName = lastName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void setLastName(String last)\n {\n lastName = last;\n }",
"public void setLastName( String last )\r\n {\r\n lastName = last;\r\n }",
"public void setLastname(String lastname);",
"public void setLastName(String inLast)\n\t{\n\t\t//local constants\n\n\t\t//local variables\n\n\t... | [
"0.855186",
"0.8450088",
"0.83630943",
"0.81932086",
"0.81870115",
"0.8180245",
"0.8124058",
"0.8101262",
"0.8074834",
"0.80666625",
"0.8037414",
"0.8035209",
"0.80246454",
"0.80171144",
"0.80171144",
"0.7954328",
"0.7949659",
"0.793664",
"0.79236466",
"0.79209083",
"0.791723... | 0.7384549 | 77 |
Get a BufferedImage object from a byte array | public BufferedImage cropImageSquare( byte[] image ) throws IOException {
InputStream in = new ByteArrayInputStream( image );
BufferedImage originalImage = ImageIO.read( in );
// Get image dimensions
int height = originalImage.getHeight();
int width = originalImage.getWidth();
// The image is already a square
if ( height == width ) {
return originalImage;
}
// Compute the size of the square
int squareSize = ( height > width ? width : height );
// Coordinates of the image's middle
int xc = width / 2;
int yc = height / 2;
// Crop
BufferedImage croppedImage = originalImage.getSubimage(
xc - ( squareSize / 2 ), // x coordinate of the upper-left
// corner
yc - ( squareSize / 2 ), // y coordinate of the upper-left
// corner
squareSize, // widht
squareSize // height
);
return croppedImage;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BufferedImage byteArrayToBufferedImage(byte[] byteImage) {\n BufferedImage image = null;\n InputStream in = new ByteArrayInputStream(byteImage);\n try {\n image = ImageIO.read(in);\n\n } catch (IOException ex) {\n Logger.getLogger(ProcessImage.class.getName(... | [
"0.7351635",
"0.7232805",
"0.70122975",
"0.6910626",
"0.6826195",
"0.6572252",
"0.64279044",
"0.6306114",
"0.6306114",
"0.6306114",
"0.6291565",
"0.6270877",
"0.62228864",
"0.62228864",
"0.62228864",
"0.62149805",
"0.6132758",
"0.60447276",
"0.6030541",
"0.6020756",
"0.597828... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public int deleteCar(int serial) throws DataAccessException {
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void updateCar(HashMap carMap) throws DataAccessException {
} | {
"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 |
Returns data for the entity that's being animated. | EntityData<?> getEntityData(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public EntityData getEntityData() {\n return this.entityData;\n }",
"public final List<Entity> getData() {\n return this.data;\n }",
"@Override\n\tpublic Entity getEntity() {\n\t\treturn entity;\n\t}",
"public Entity getEntity() {\n\t\treturn DodgeBlawk.getDataManager().getEntity(... | [
"0.67396414",
"0.59751624",
"0.5937629",
"0.5857937",
"0.58128417",
"0.57698536",
"0.5761434",
"0.5726909",
"0.5726909",
"0.5713315",
"0.57044536",
"0.5700284",
"0.5693073",
"0.5689226",
"0.56770724",
"0.5671711",
"0.5649195",
"0.56469166",
"0.5641584",
"0.5637661",
"0.563101... | 0.6527622 | 1 |
Returns the layer this condition has to be met on. | ILayerState getLayerState(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Layer getLayer() {\n\t\treturn layer;\n\t}",
"public int getLayer()\n\t{\n\t\treturn layer;\n\t}",
"public int getLayer() {\r\n\t\treturn layer;\r\n\t}",
"public Layer getLayer() {\n return layer;\n }",
"public Layer getLayer() {\n return _layer;\n }",
"int getLayer();",
"public Layer.La... | [
"0.72815293",
"0.71674925",
"0.71600026",
"0.7151892",
"0.69941956",
"0.6895813",
"0.6815703",
"0.66701907",
"0.65160197",
"0.6406233",
"0.6356758",
"0.63525087",
"0.6338632",
"0.6297892",
"0.62800306",
"0.623727",
"0.6108308",
"0.6092185",
"0.6028025",
"0.6010701",
"0.599549... | 0.56048524 | 40 |
Returns the current node. | INodeState getCurrentNode(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Node getCurrent() {\n return current;\n }",
"public int getCurrentNode() {\n\t\treturn currentNode;\n\t}",
"Node currentNode();",
"public final int getContextNode(){\n return this.getCurrentNode();\n }",
"public final IRNode getNode() {\r\n return f_node;\r\n }",
"public St... | [
"0.8573996",
"0.8432877",
"0.7831331",
"0.7536998",
"0.7259301",
"0.7255685",
"0.71813774",
"0.71766984",
"0.7175069",
"0.7167955",
"0.7167955",
"0.7146643",
"0.7129785",
"0.71215737",
"0.71042717",
"0.7095684",
"0.6982651",
"0.69397616",
"0.6939704",
"0.6909662",
"0.69068885... | 0.79554516 | 2 |
Get list of logged in users for linux. | private int getLinuxLoggedInUsers() throws IOException {
String command = "/usr/bin/users";
List<String> users = new ArrayList<String>();
ProcessBuilder builder = new ProcessBuilder();
Process proc = null;
proc = builder.command(command).start();
StreamManager sm = new StreamManager();
try {
InputStream stdin = sm.handle(proc.getInputStream());
Reader isr = sm.handle(new InputStreamReader(stdin, "UTF-8"));
BufferedReader br = (BufferedReader) sm.handle(new BufferedReader(isr));
String line = null;
while ((line = br.readLine()) != null) {
users.add(line);
}
return users.size();
} finally {
// Close all the streams/readers
sm.closeAll();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<String> listUsers() \n\t{\n\t\treturn this.userList.keys();\n\t\t\n\t}",
"public String[] listUsers();",
"java.util.List<com.rpg.framework.database.Protocol.User> \n getUsersList();",
"java.util.List<com.rpg.framework.database.Protocol.User> \n getUsersList();",
"public String[] g... | [
"0.730773",
"0.7186586",
"0.6958188",
"0.69575095",
"0.6947984",
"0.6875943",
"0.6761713",
"0.6726766",
"0.67220974",
"0.6708281",
"0.66809964",
"0.66554797",
"0.66502655",
"0.6648338",
"0.6638769",
"0.6636358",
"0.6587419",
"0.6546242",
"0.6542388",
"0.6538704",
"0.6527418",... | 0.7887745 | 0 |
Get list of logged in users for windows by counting the number of explorer.exe processes. | private int getWindowsLoggedInUsers() throws IOException {
String command = System.getenv("windir") + "\\system32\\" + "tasklist.exe";
int userCount = 0;
ProcessBuilder builder = new ProcessBuilder();
Process proc = null;
proc = builder.command(command).start();
StreamManager sm = new StreamManager();
try {
InputStream stdin = sm.handle(proc.getInputStream());
Reader isr = sm.handle(new InputStreamReader(stdin));
BufferedReader br = (BufferedReader) sm.handle(new BufferedReader(isr));
String line = null;
while ((line = br.readLine()) != null) {
if (line.contains("explorer.exe")) {
userCount++;
}
}
return userCount;
} finally {
sm.closeAll();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int getLinuxLoggedInUsers() throws IOException {\n String command = \"/usr/bin/users\";\n List<String> users = new ArrayList<String>();\n ProcessBuilder builder = new ProcessBuilder();\n Process proc = null;\n proc = builder.command(command).start();\n \n St... | [
"0.68166715",
"0.6507354",
"0.624941",
"0.60779953",
"0.6024284",
"0.5971878",
"0.5937105",
"0.59352195",
"0.5883147",
"0.58808494",
"0.5870748",
"0.58230525",
"0.5809731",
"0.57739216",
"0.5773683",
"0.5773683",
"0.5773683",
"0.57330245",
"0.57326776",
"0.5694502",
"0.566757... | 0.85806954 | 0 |
Show the about dialog, when requested by user's menu command. | public void open(){
dialog.setLocation
(parent.getLocation().x + 10, parent.getLocation().y + 10);
dialog.setSize(PREF_SIZE);
dialog.setResizable(false);
dialog.setVisible(true);
dialog.setResizable(true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void popupMenuAbout() {\n\t\t//\n\t\t// Display the dialog\n\t\t//\n\t\tAboutDialog aboutDialog = new AboutDialog(parent.getShell(), SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM);\n\t\taboutDialog.open();\n\t}",
"void aboutMenuItem_actionPerformed(ActionEvent e) {\n AboutDialog dlg = new AboutDialog(this, ... | [
"0.83752936",
"0.8131828",
"0.8115429",
"0.8022665",
"0.7987162",
"0.7966948",
"0.7832761",
"0.7815815",
"0.7688384",
"0.7676515",
"0.76159847",
"0.76023996",
"0.75988716",
"0.7507564",
"0.7504947",
"0.7494174",
"0.7465184",
"0.7421093",
"0.7419785",
"0.7377356",
"0.7368441",... | 0.0 | -1 |
Paint the component within the container, showing the info. Fetch data from the global string table. | public void paint(Graphics g){
Dimension size = this.getSize();
((Graphics2D)g).setRenderingHint
(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g.setColor(BACKGROUND);
g.fillRect(0, 0, size.width, size.height);
g.setColor(FOREGROUND);
g.fillPolygon(
new int[]{15, size.width - 20, size.width - 10, 5},
new int[]{10, 20, size.height - 20, size.height - 10},
4);
g.setFont(new Font("Sans Serif", Font.BOLD, 16));
g.setColor(TEXT);
g.drawString(CStrings.PROG, 30, 30);
g.drawString("Author: ", 30, 60);
g.drawString(CStrings.AUTHOR, 40, 80);
g.drawString("Version: " + CStrings.VERSION, 30, 110);
g.drawString("License: " + CStrings.LICENSE, 30, 140);
g.setFont(new Font("Sans Serif", Font.BOLD, 10));
g.drawString("Home: " + CStrings.HOME, 20, 170);
g.drawString
("Work: " + "Home" + CStrings.SEP + CStrings.APPDIR, 20, 190);
g.drawString
("Hint: Find a tutorial within the help subdir of the workdir."
, 20, 210);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void RenderString(GameContainer gameContainer, Graphics graphics)\r\n\t{\n\t\t\r\n\t}",
"private static void drawTableCompenents() {\n\t\ttopColumn = new JLabel(\"location\");\r\n\t\ttopColumn.setLocation(200, 0);\r\n\t\tExtension.instance.add(topColumn);\r\n\t}",
"@Override\n protected void drawGuiContain... | [
"0.6217332",
"0.6118739",
"0.5955289",
"0.595459",
"0.5911884",
"0.5894581",
"0.5771239",
"0.5765355",
"0.5724215",
"0.5702121",
"0.5689047",
"0.56862646",
"0.5686219",
"0.5682114",
"0.56781167",
"0.56716293",
"0.5630303",
"0.56103367",
"0.557095",
"0.55484223",
"0.5531815",
... | 0.0 | -1 |
Satisfy the java API. | public void update(Graphics g){
paint(g);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public API() {}",
"@Override\n public void checkVersion() {\n }",
"public api() {}",
"@Override\n\tpublic void check() throws ApiRuleException {\n\t\t\n\t}",
"Compatibility compatibility();",
"public interface APIService {\n}",
"public interface ApiMethod\n{\n\tpublic void func(ApiContext ac) thr... | [
"0.55922073",
"0.5511468",
"0.5507728",
"0.53249997",
"0.5260516",
"0.5254923",
"0.52398777",
"0.52196294",
"0.51174873",
"0.5108443",
"0.5056661",
"0.5029182",
"0.5026218",
"0.50153524",
"0.5014861",
"0.4998619",
"0.49951476",
"0.4994227",
"0.4986373",
"0.49585396",
"0.49477... | 0.0 | -1 |
Inits the i ds. | private native static void initIDs(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DataSet() {\n labels = new HashMap<>();\n locations = new HashMap<>();\n counter= new AtomicInteger(0);\n }",
"public DataSet(){\r\n\t\tdocs = Lists.newArrayList();\r\n//\t\t_docs = Lists.newArrayList();\r\n\t\t\r\n\t\tnewId2trnId = HashBiMap.create();\r\n\t\t\r\n\t\tM = 0;\r\n\t\t... | [
"0.6945908",
"0.68191636",
"0.6811076",
"0.6697991",
"0.66268355",
"0.65728265",
"0.64893144",
"0.64893144",
"0.64233756",
"0.63897246",
"0.6356796",
"0.6356796",
"0.6356796",
"0.6356796",
"0.6356796",
"0.6356796",
"0.6327127",
"0.6325276",
"0.632183",
"0.632183",
"0.632183",... | 0.0 | -1 |
Instantiates a new pcap pkt hdr. | public PcapPktHdr() {
this.seconds = System.currentTimeMillis() / 1000; // In seconds
this.useconds = (int) (System.nanoTime() / 1000); // Microseconds
this.caplen = 0;
this.len = 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Packet createPacket() {\n\t\treturn new Packet((ByteBuffer) buffer.flip());\n\t}",
"public PcapPktHdr(int caplen, int len) {\n\t\tthis.caplen = caplen;\n\t\tthis.len = len;\n\n\t\tthis.seconds = System.currentTimeMillis() / 1000; // In seconds\n\t\tthis.useconds = (int) (System.nanoTime() / 1000); // Micr... | [
"0.6193578",
"0.6064204",
"0.60549587",
"0.59677607",
"0.5659878",
"0.56340563",
"0.5625794",
"0.55623966",
"0.55623853",
"0.5558088",
"0.54516155",
"0.5445797",
"0.5377474",
"0.53756803",
"0.5374609",
"0.53560096",
"0.5344193",
"0.5310215",
"0.5307909",
"0.5278206",
"0.52534... | 0.7047957 | 0 |
Instantiates a new pcap pkt hdr. | public PcapPktHdr(int caplen, int len) {
this.caplen = caplen;
this.len = len;
this.seconds = System.currentTimeMillis() / 1000; // In seconds
this.useconds = (int) (System.nanoTime() / 1000); // Microseconds
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public PcapPktHdr() {\n\t\tthis.seconds = System.currentTimeMillis() / 1000; // In seconds\n\t\tthis.useconds = (int) (System.nanoTime() / 1000); // Microseconds\n\n\t\tthis.caplen = 0;\n\t\tthis.len = 0;\n\t}",
"public Packet createPacket() {\n\t\treturn new Packet((ByteBuffer) buffer.flip());\n\t}",
"public ... | [
"0.7047957",
"0.6193578",
"0.60549587",
"0.59677607",
"0.5659878",
"0.56340563",
"0.5625794",
"0.55623966",
"0.55623853",
"0.5558088",
"0.54516155",
"0.5445797",
"0.5377474",
"0.53756803",
"0.5374609",
"0.53560096",
"0.5344193",
"0.5310215",
"0.5307909",
"0.5278206",
"0.52534... | 0.6064204 | 2 |
Instantiates a new pcap pkt hdr. | public PcapPktHdr(long seconds, int useconds, int caplen, int len) {
this.seconds = seconds;
this.useconds = useconds;
this.caplen = caplen;
this.len = len;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public PcapPktHdr() {\n\t\tthis.seconds = System.currentTimeMillis() / 1000; // In seconds\n\t\tthis.useconds = (int) (System.nanoTime() / 1000); // Microseconds\n\n\t\tthis.caplen = 0;\n\t\tthis.len = 0;\n\t}",
"public Packet createPacket() {\n\t\treturn new Packet((ByteBuffer) buffer.flip());\n\t}",
"public ... | [
"0.7047957",
"0.6193578",
"0.6064204",
"0.60549587",
"0.59677607",
"0.5659878",
"0.5625794",
"0.55623966",
"0.55623853",
"0.5558088",
"0.54516155",
"0.5445797",
"0.5377474",
"0.53756803",
"0.5374609",
"0.53560096",
"0.5344193",
"0.5310215",
"0.5307909",
"0.5278206",
"0.525341... | 0.56340563 | 6 |
devuelve el saludo en castellano | public String saludoCastellano () {
return "hola";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void sacarPaseo(){\r\n\t\t\tSystem.out.println(\"Por las tardes me saca de paseo mi dueño\");\r\n\t\t\t\r\n\t\t}",
"public static void saludo(){\n System.out.println(\"Bienvenido al Sistema\");\n }",
"public GeneradorSaludos()\n {\n mensaje = \"\\nSaludo en modo texto \\n\\nBienvenid... | [
"0.690506",
"0.68296283",
"0.66859716",
"0.6652979",
"0.6649506",
"0.6616874",
"0.6610071",
"0.64615613",
"0.63969487",
"0.63926405",
"0.63904506",
"0.638855",
"0.6369334",
"0.63589823",
"0.62933075",
"0.62788725",
"0.62658685",
"0.6215908",
"0.6162936",
"0.6158285",
"0.61346... | 0.7222684 | 0 |
Handles the input message and invokes the multicast server. | public boolean handleMessage(SOAPMessageContext context) {
SOAPMessage soapMsg = context.getMessage();
String address = null;
SOAPEnvelope soapEnv;
try {
SOAPBody body = soapMsg.getSOAPPart().getEnvelope().getBody();
String methodName = body.getFirstChild().getNodeName();
if (methodName.equalsIgnoreCase(Constants.METHOD_NAME_RECEIVE)) {
String latitude = body.getFirstChild().getAttributes()
.getNamedItem(Constants.LATITUDE).getTextContent();
String longitude = body.getFirstChild().getAttributes()
.getNamedItem(Constants.LONGITUDE).getTextContent();
String mac = body.getFirstChild().getAttributes()
.getNamedItem(Constants.MACADDRESS).getTextContent();
GoogleResponse res1;
try {
res1 = new AddressConverter().convertFromLatLong(latitude
+ "," + longitude);
if (res1.getStatus().equals(Constants.OK)) {
for (Result result : res1.getResults()) {
address = result.getFormatted_address();
MobileSensingSystem.UpdateDB(latitude, longitude,
address, mac);
boolean alert = MobileSensingSystem
.checkDB(address);
String message = "Medium traffic alert in "
+ address;
if (alert) {
MulticastServer multicast = new MulticastServer(
message, latitude, longitude);
new Thread(multicast).start();
}
break;
}
}
} catch (IOException e) {
e.printStackTrace();
}
}
} catch (SOAPException e) {
e.printStackTrace();
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void sendMulticast(String message);",
"public void handleMessageEvent(StunMessageEvent e) {\n delegate.processRequest(e);\n }",
"private void run() throws IOException {\n\n Socket socket = new Socket(\"localhost\", 8678);\n in = new BufferedReader(new InputStreamReader(\n ... | [
"0.62985396",
"0.6130568",
"0.61043555",
"0.60914016",
"0.6081321",
"0.60704464",
"0.60311544",
"0.60000163",
"0.5971787",
"0.5955112",
"0.59149176",
"0.59017485",
"0.58916664",
"0.58785635",
"0.58721703",
"0.5868281",
"0.5860708",
"0.5848611",
"0.5833251",
"0.58118093",
"0.5... | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.