query stringlengths 7 33.1k | document stringlengths 7 335k | metadata dict | negatives listlengths 3 101 | negative_scores listlengths 3 101 | document_score stringlengths 3 10 | document_rank stringclasses 102
values |
|---|---|---|---|---|---|---|
This method was generated by MyBatis Generator. This method returns the value of the database column plugin.plugin_class | public String getPluginClass() {
return pluginClass;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getPluginClass() {\n return pluginClass;\n }",
"public String getPluginClassAttr() {\n return pluginClassAttr;\n }",
"public Type getPluginType()\r\n\t{\r\n\t\treturn _pluginType; \r\n\t}",
"public BatchClassPluginDTO getSelectedPlugin() {\n\t\treturn selectedPlugin;\n\t}",
"p... | [
"0.77800316",
"0.6623292",
"0.6533536",
"0.6363748",
"0.5885499",
"0.57156295",
"0.5705642",
"0.56783295",
"0.56732225",
"0.5640782",
"0.5601761",
"0.5502015",
"0.5479039",
"0.5428915",
"0.5425938",
"0.54132605",
"0.53975695",
"0.538852",
"0.53756404",
"0.5360709",
"0.5359699... | 0.774663 | 1 |
This method was generated by MyBatis Generator. This method sets the value of the database column plugin.plugin_class | public void setPluginClass(String pluginClass) {
this.pluginClass = pluginClass == null ? null : pluginClass.trim();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getPluginClass() {\n return pluginClass;\n }",
"public String getPluginClass() {\n return pluginClass;\n }",
"public void setPlugin(Plugin plugin)\r\n\t{\r\n\t\tthis.plugin = plugin;\r\n\t}",
"public void setSelectedPlugin(BatchClassPluginDTO selectedPlugin) {\n\t\tthis.selectedPl... | [
"0.6558124",
"0.6446492",
"0.63676",
"0.59974647",
"0.5893295",
"0.5825373",
"0.5811886",
"0.5538125",
"0.5511451",
"0.54363114",
"0.5366634",
"0.5355376",
"0.5276677",
"0.5259401",
"0.5250489",
"0.52369606",
"0.5225608",
"0.5178468",
"0.5014809",
"0.5012143",
"0.49669528",
... | 0.7260851 | 0 |
This method was generated by MyBatis Generator. This method returns the value of the database column plugin.configuration | public String getConfiguration() {
return configuration;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getConfigurationField() {\n return configField;\n }",
"@RolesAllowed(RolesConstants.ADMIN_MANAGE_SETTINGS)\n @Override\n public Configuration getDbConfiguration() {\n return getRepository().getDbConnectionManager().getSqlSessionFactory().getConfiguration();\n }",
"@Overr... | [
"0.6447359",
"0.63227236",
"0.61978656",
"0.6011088",
"0.59847933",
"0.5954222",
"0.58707434",
"0.5818843",
"0.58089554",
"0.57616806",
"0.5754512",
"0.5746098",
"0.57335484",
"0.5694626",
"0.5680679",
"0.56580764",
"0.56247544",
"0.55926937",
"0.5567701",
"0.55535245",
"0.55... | 0.57678 | 9 |
This method was generated by MyBatis Generator. This method sets the value of the database column plugin.configuration | public void setConfiguration(String configuration) {
this.configuration = configuration == null ? null : configuration.trim();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }",
"Column(String column... | [
"0.57078034",
"0.57078034",
"0.57078034",
"0.57078034",
"0.57078034",
"0.57078034",
"0.57078034",
"0.57078034",
"0.57078034",
"0.57078034",
"0.57078034",
"0.54173446",
"0.5310383",
"0.5255199",
"0.5078611",
"0.49999663",
"0.49752203",
"0.49271446",
"0.49222934",
"0.49142337",
... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method returns the value of the database column plugin.name | public String getName() {
return name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getName() {\n return columnName;\n }",
"public String getName(){\n\t\t\treturn columnName;\n\t\t}",
"@Override\n public String getName() {\n return columnInfo.getName();\n }",
"public String getPropertyName(){\n return SimpleTableField.mapPropName(this.columnName);... | [
"0.6963588",
"0.6949371",
"0.6924037",
"0.6605974",
"0.6416941",
"0.63612556",
"0.6335212",
"0.6276687",
"0.6260334",
"0.620806",
"0.6193867",
"0.61604476",
"0.61468244",
"0.6102824",
"0.6102824",
"0.60872966",
"0.6061757",
"0.60234976",
"0.600996",
"0.5989886",
"0.5989886",
... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method sets the value of the database column plugin.name | public void setName(String name) {
this.name = name == null ? null : name.trim();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setPluginName(String pluginName);",
"@Override\n\tpublic void setName(java.lang.String name) {\n\t\t_expandoColumn.setName(name);\n\t}",
"public void setColumnName (String ColumnName);",
"public String getPluginName(){\n\t\treturn pluginName;\n\t}",
"public String getName(){\n\t\t\treturn colum... | [
"0.64005846",
"0.61483747",
"0.59146726",
"0.5908369",
"0.5899583",
"0.58210784",
"0.5786313",
"0.5781127",
"0.5781127",
"0.56731415",
"0.56198996",
"0.56020176",
"0.5581192",
"0.55801094",
"0.5570108",
"0.55492425",
"0.55346894",
"0.5524782",
"0.5502314",
"0.5495044",
"0.547... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method returns the value of the database column plugin.public_access | public Boolean getPublicAccess() {
return publicAccess;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean publicAdmin() {\n try {\n return getConfig().getPublicAdmin();\n } catch (Throwable t) {\n t.printStackTrace();\n return false;\n }\n }",
"public boolean isAccessLevelPublic() {\r\n String level = getOption(OPTION_ACCESS_LEVEL, ACCESS_LEVEL_PUBLIC);\r\n return ACCESS... | [
"0.63928646",
"0.6326209",
"0.6262391",
"0.62285703",
"0.62097955",
"0.6208694",
"0.6199258",
"0.61856717",
"0.59568864",
"0.59568864",
"0.5838984",
"0.5805426",
"0.58009094",
"0.5796195",
"0.57789594",
"0.57688755",
"0.57658887",
"0.5746489",
"0.56760395",
"0.56760395",
"0.5... | 0.68118125 | 0 |
This method was generated by MyBatis Generator. This method sets the value of the database column plugin.public_access | public void setPublicAccess(Boolean publicAccess) {
this.publicAccess = publicAccess;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setIsPublic(boolean isPublic)\n {\n this.isPublic = isPublic;\n }",
"public void setPublic()\n {\n ensureLoaded();\n m_flags.setPublic();\n setModified(true);\n }",
"public void setIsPublic( boolean isPublic )\n\t{\n\t\tthis.isPublic\t= isPublic;\n\t}... | [
"0.62099016",
"0.6056219",
"0.603778",
"0.5994516",
"0.5984774",
"0.58639646",
"0.5799785",
"0.5681528",
"0.56808513",
"0.56646734",
"0.5560123",
"0.54962516",
"0.5407054",
"0.5383347",
"0.53353745",
"0.5215951",
"0.52058727",
"0.5153284",
"0.5122434",
"0.5114714",
"0.5089583... | 0.68046063 | 0 |
This method was generated by MyBatis Generator. This method returns the value of the database column plugin.search_text | public String getSearchText() {
return searchText;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String getSearchText() {\n\t\treturn this.clientUI.getSearchField();\n\t}",
"public String getSearchResultsText() {\n System.out.println(\"[step] getSearchResultsText\");\n return page.findElement(signSearch).getText();\n }",
"java.lang.String getSearchValue();",
"public String getSe... | [
"0.65078616",
"0.618585",
"0.6180441",
"0.61541057",
"0.5916915",
"0.5783565",
"0.5770705",
"0.5766602",
"0.57401603",
"0.57113874",
"0.55733323",
"0.55525404",
"0.55495507",
"0.55381924",
"0.55270255",
"0.5497954",
"0.5494651",
"0.54017824",
"0.5376922",
"0.5308748",
"0.5195... | 0.6440687 | 1 |
This method was generated by MyBatis Generator. This method sets the value of the database column plugin.search_text | public void setSearchText(String searchText) {
this.searchText = searchText == null ? null : searchText.trim();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setSearchText(String s) {\n\t\t\tthis.searchString = \".*\" + s + \".*\";\n\t\t}",
"public void setSearchNameTextFieldText(String text) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_searchNameTextField_propertyText\");\n/*Generated! Do not modify!*/ ... | [
"0.6488572",
"0.6237819",
"0.58584625",
"0.57637495",
"0.5701768",
"0.5496234",
"0.54719394",
"0.5434772",
"0.5413678",
"0.5397612",
"0.53958523",
"0.53924775",
"0.5373386",
"0.53540444",
"0.53515476",
"0.5336572",
"0.5306432",
"0.52981937",
"0.5272218",
"0.5269671",
"0.52029... | 0.60118854 | 2 |
This method was generated by MyBatis Generator. This method returns the value of the database column plugin.state | public String getState() {
return state;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getSqlState();",
"public java.lang.String getSqlState() {\n java.lang.Object ref = sqlState_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref... | [
"0.6925484",
"0.6519753",
"0.6484949",
"0.64803725",
"0.62881464",
"0.62154526",
"0.6184747",
"0.6151222",
"0.6121577",
"0.61159307",
"0.61159307",
"0.6111319",
"0.6111319",
"0.6111319",
"0.6111319",
"0.6111319",
"0.6111319",
"0.6105935",
"0.6096712",
"0.6096712",
"0.6091125"... | 0.5918544 | 65 |
This method was generated by MyBatis Generator. This method sets the value of the database column plugin.state | public void setState(String state) {
this.state = state == null ? null : state.trim();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setPluginstate(java.lang.String pluginstate);",
"void xsetPluginstate(org.apache.xmlbeans.XmlString pluginstate);",
"public Builder setSqlState(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n sqlState_ = value;\n onChanged... | [
"0.66404843",
"0.599892",
"0.5689553",
"0.55825716",
"0.55825716",
"0.55772966",
"0.5575299",
"0.5570881",
"0.5553832",
"0.5553832",
"0.5546395",
"0.5546395",
"0.5546395",
"0.5546395",
"0.5546395",
"0.5546395",
"0.5544496",
"0.55282444",
"0.5489546",
"0.5436083",
"0.54325306"... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method returns the value of the database column plugin.tenant_id | public String getTenantId() {
return tenantId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"long getTenantID();",
"public String getTENANT_ID() {\n return TENANT_ID;\n }",
"@XmlElement(required = true, name = \"tenant_id\")\n public String getTenantId() {\n return tenantId;\n }",
"public java.lang.String getTenantProjectId() {\n java.lang.Object ref = tenantProjectId_;\n... | [
"0.7382479",
"0.6962073",
"0.69089645",
"0.68998337",
"0.68673056",
"0.68477297",
"0.6832075",
"0.6778572",
"0.6693389",
"0.6597976",
"0.6593766",
"0.6593766",
"0.6593766",
"0.6588893",
"0.6571101",
"0.6551993",
"0.6468534",
"0.6424861",
"0.63236374",
"0.61525613",
"0.6089955... | 0.6582288 | 16 |
This method was generated by MyBatis Generator. This method sets the value of the database column plugin.tenant_id | public void setTenantId(String tenantId) {
this.tenantId = tenantId == null ? null : tenantId.trim();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setTenant(String tenant)\n {\n this.tenant = tenant;\n }",
"long getTenantID();",
"@XmlElement(required = true, name = \"tenant_id\")\n public String getTenantId() {\n return tenantId;\n }",
"public Builder setTenantProjectId(java.lang.String value) {\n if (value ==... | [
"0.6651736",
"0.65401",
"0.6356399",
"0.6231653",
"0.60910255",
"0.60699177",
"0.6055597",
"0.5935001",
"0.59329504",
"0.5926566",
"0.5917997",
"0.59175676",
"0.59064656",
"0.59055597",
"0.5862113",
"0.5862113",
"0.5862113",
"0.5862113",
"0.5755795",
"0.5752555",
"0.57515156"... | 0.5851023 | 21 |
This method was generated by MyBatis Generator. This method corresponds to the database table plugin | @Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
Plugin other = (Plugin) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getAdditionalInfo() == null ? other.getAdditionalInfo() == null : this.getAdditionalInfo().equals(other.getAdditionalInfo()))
&& (this.getApiToken() == null ? other.getApiToken() == null : this.getApiToken().equals(other.getApiToken()))
&& (this.getPluginClass() == null ? other.getPluginClass() == null : this.getPluginClass().equals(other.getPluginClass()))
&& (this.getConfiguration() == null ? other.getConfiguration() == null : this.getConfiguration().equals(other.getConfiguration()))
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getPublicAccess() == null ? other.getPublicAccess() == null : this.getPublicAccess().equals(other.getPublicAccess()))
&& (this.getSearchText() == null ? other.getSearchText() == null : this.getSearchText().equals(other.getSearchText()))
&& (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
&& (this.getTenantId() == null ? other.getTenantId() == null : this.getTenantId().equals(other.getTenantId()));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected String getTableName() {\n\t\treturn super.getTableName();\n\t}",
"String getTableName();",
"public interface TableDefinition extends BaseColumns {\n\n String tableName();\n\n String createStatement();\n\n String dropStatement();\n \n}",
"@Override\r\n\tprotected String getT... | [
"0.6307416",
"0.6226568",
"0.6191265",
"0.6157438",
"0.60787785",
"0.60787785",
"0.606224",
"0.60420555",
"0.60058314",
"0.60039157",
"0.60039157",
"0.59952784",
"0.59947",
"0.59859324",
"0.598107",
"0.5979657",
"0.59638876",
"0.59370697",
"0.5902837",
"0.5894836",
"0.5890436... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table plugin | @Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getAdditionalInfo() == null) ? 0 : getAdditionalInfo().hashCode());
result = prime * result + ((getApiToken() == null) ? 0 : getApiToken().hashCode());
result = prime * result + ((getPluginClass() == null) ? 0 : getPluginClass().hashCode());
result = prime * result + ((getConfiguration() == null) ? 0 : getConfiguration().hashCode());
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
result = prime * result + ((getPublicAccess() == null) ? 0 : getPublicAccess().hashCode());
result = prime * result + ((getSearchText() == null) ? 0 : getSearchText().hashCode());
result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
result = prime * result + ((getTenantId() == null) ? 0 : getTenantId().hashCode());
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected String getTableName() {\n\t\treturn super.getTableName();\n\t}",
"String getTableName();",
"public interface TableDefinition extends BaseColumns {\n\n String tableName();\n\n String createStatement();\n\n String dropStatement();\n \n}",
"@Override\r\n\tprotected String getT... | [
"0.6307706",
"0.62269706",
"0.61911863",
"0.61580133",
"0.6078977",
"0.6078977",
"0.60625964",
"0.6042092",
"0.6006362",
"0.6004162",
"0.6004162",
"0.59960365",
"0.5995611",
"0.59858954",
"0.5981514",
"0.5980046",
"0.59638745",
"0.5937246",
"0.5903804",
"0.58951885",
"0.58913... | 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() {
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
cbx_articuloFaltante = new com.jidesoft.swing.AutoCompletionComboBox();
jComboBox1 = new javax.swing.JComboBox();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
txt_valor = new javax.swing.JTextField();
btn_Aceptar = new javax.swing.JButton();
btn_Cancelar = new javax.swing.JButton();
buttonCircle2 = new org.edisoncor.gui.button.ButtonCircle();
setLayout(new javax.swing.BoxLayout(this, javax.swing.BoxLayout.LINE_AXIS));
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Detalles del Faltante"));
jLabel1.setFont(new java.awt.Font("Bell MT", 0, 14)); // NOI18N
jLabel1.setText("Articulo Relacionado:");
cbx_articuloFaltante.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent evt) {
cbx_articuloFaltanteItemStateChanged(evt);
}
});
jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Deterioro", "Hurto", "Extravío", "Desconocido" }));
jLabel2.setFont(new java.awt.Font("Bell MT", 0, 14)); // NOI18N
jLabel2.setText("Cauda o Motivo:");
jLabel3.setFont(new java.awt.Font("Bell MT", 0, 14)); // NOI18N
jLabel3.setText("Valor estimado:");
txt_valor.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent evt) {
txt_valorKeyTyped(evt);
}
});
btn_Aceptar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Guardar_2.png"))); // NOI18N
btn_Aceptar.setText("Aceptar");
btn_Aceptar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_AceptarActionPerformed(evt);
}
});
btn_Cancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Close.png"))); // NOI18N
btn_Cancelar.setText("Cancelar");
btn_Cancelar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_CancelarActionPerformed(evt);
}
});
buttonCircle2.setText("buttonCircle1");
buttonCircle2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonCircle2ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(cbx_articuloFaltante, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(buttonCircle2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jLabel3)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txt_valor, javax.swing.GroupLayout.DEFAULT_SIZE, 42, Short.MAX_VALUE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addComponent(btn_Aceptar)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btn_Cancelar)))
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(buttonCircle2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel1)
.addComponent(cbx_articuloFaltante, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel2)
.addComponent(jLabel3)
.addComponent(txt_valor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18, Short.MAX_VALUE)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(btn_Aceptar)
.addComponent(btn_Cancelar)))
);
add(jPanel1);
} | {
"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.73191476",
"0.72906625",
"0.72906625",
"0.72906625",
"0.72860986",
"0.7248112",
"0.7213479",
"0.72078276",
"0.7195841",
"0.71899796",
"0.71840525",
"0.7158498",
"0.71477973",
"0.7092748",
"0.70800966",
"0.70558053",
"0.69871384",
"0.69773406",
"0.69548076",
"0.69533914",
"... | 0.0 | -1 |
controls animation and decides which player sprite to use | public void render(Renderer screen) {
sprite = chosenSprite.getSprite();
screen.renderEntity(x-16, y-16, this); //-16 centres player as it is a 32x32 sprite
font.render(this.getUsername(), this.getX() - (this.getUsername().length()*8/2), this.getY() - 25, true, 0xffffffff, screen, false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void chooseSprite() {\n switch(direction){\n case 0:\n sprite=Sprite.python_down;\n if(moving)\n sprite=Sprite.movingSprite(Sprite.python_down,Sprite.python_down_1,Sprite.python_down_2,Sprite.python_down_3,animate,40);\n ... | [
"0.70878583",
"0.69015896",
"0.67097086",
"0.6704027",
"0.6672027",
"0.660056",
"0.6465981",
"0.64309597",
"0.63455164",
"0.6295347",
"0.62840104",
"0.62446034",
"0.62004274",
"0.6062895",
"0.5998375",
"0.59937114",
"0.59782857",
"0.59712934",
"0.59588695",
"0.5909672",
"0.59... | 0.0 | -1 |
called through update method to bypass the 'hidden' variable that stops a player from being rendered | public void spawnTimeRender(Renderer screen) {
if (respawns == 0) font.render("YOU LOSE", this.getX()-((8*8)/2), this.getY(), true, 0xffffffff, screen, true);
else font.render("Respawn: "+respawnRender+"...", this.getX()-((13*8)/2), this.getY(), true, 0xffffffff, screen, true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void makeHidden(Player viewer) {\n \n }",
"public void killPlayer(){\n setInPlay(false);\n setDx(0.0f);\n setDy(0.04f);\n }",
"@Override\r\n public void onGameStart(){\r\n this.setVisible(false);\r\n }",
"@Override\n public void hide() {... | [
"0.7231107",
"0.706599",
"0.68959653",
"0.6844065",
"0.66111934",
"0.64305514",
"0.63423324",
"0.6302746",
"0.62571436",
"0.6213328",
"0.619466",
"0.6173173",
"0.6170801",
"0.6161039",
"0.61233234",
"0.6119352",
"0.61131436",
"0.6109622",
"0.6086163",
"0.6083133",
"0.6081249"... | 0.0 | -1 |
TODO: Warning this method won't work in the case the id fields are not set | @Override
public boolean equals(Object object) {
if (!(object instanceof Configuracion)) {
return false;
}
Configuracion other = (Configuracion) object;
if ((this.idconfiguracion == null && other.idconfiguracion != null) || (this.idconfiguracion != null && !this.idconfiguracion.equals(other.idconfiguracion))) {
return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setId(Integer id) { this.id = id; }",
"private Integer getId() { return this.id; }",
"public void setId(int id){ this.id = id; }",
"public void setId(Long id) {this.id = id;}",
"public void setId(Long id) {this.id = id;}",
"public void setID(String idIn) {this.id = idIn;}",
"public void se... | [
"0.6896886",
"0.6838461",
"0.67056817",
"0.66419715",
"0.66419715",
"0.6592331",
"0.6579151",
"0.6579151",
"0.6574321",
"0.6574321",
"0.6574321",
"0.6574321",
"0.6574321",
"0.6574321",
"0.65624106",
"0.65624106",
"0.65441847",
"0.65243006",
"0.65154546",
"0.6487427",
"0.64778... | 0.0 | -1 |
/ renamed from: a | public final void mo4887a(Object obj) {
this.f15618a.mo18101q2((ErrorBundle) obj);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }",
"public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }",
"interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}",
"interface C33292a {\n /* renamed fr... | [
"0.62497115",
"0.6242887",
"0.61394435",
"0.61176854",
"0.6114027",
"0.60893",
"0.6046901",
"0.6024682",
"0.60201293",
"0.5975212",
"0.59482527",
"0.59121317",
"0.5883635",
"0.587841",
"0.58703005",
"0.5868436",
"0.5864884",
"0.5857492",
"0.58306104",
"0.5827752",
"0.58272064... | 0.0 | -1 |
config embedded Jetty server | public static void main(String[] args) {
EmbeddedServers.add(EmbeddedServers.Identifiers.JETTY, (Routes routeMatcher, StaticFilesConfiguration staticFilesConfiguration, boolean hasMultipleHandler) -> {
JettyHandler handler = setupHandler(routeMatcher, staticFilesConfiguration, hasMultipleHandler);
customJettyServerFactory serv = new customJettyServerFactory();
return new EmbeddedJettyServer(serv, handler);
});
port(80);
Options op = new Options();
op.setOptions(args);
//LabelCreator labels = new LabelCreator(op);
staticFiles.location("/public"); // Static (web accessible) files (e.g. CSS files etc.) can be placed in src/main/resources/public
staticFiles.header("Access-Control-Allow-Origin", "*"); // static files can be accessed from anywhere
staticFiles.header("Access-Control-Allow-Headers", "*"); // static files can be accessed from anywhere
// any empty action will be redirected to the API documentation
redirect.any("/", "/labels/"+API_VERSION+"/");
redirect.any("/labels", "/labels/"+API_VERSION+"/");
redirect.any("/labels/", "/labels/"+API_VERSION+"/");
redirect.any("/labels/"+API_VERSION, "/labels/"+API_VERSION+"/");
options("/*", (req, res) -> {
String accessControlRequestHeaders = req.headers("Access-Control-Request-Headers");
if (accessControlRequestHeaders != null) {
res.header("Access-Control-Allow-Headers", accessControlRequestHeaders);
}
String accessControlRequestMethod = req.headers("Access-Control-Request-Method");
if (accessControlRequestMethod != null) {
res.header("Access-Control-Allow-Methods", accessControlRequestMethod);
}
return "OK";
});
try {
// Build swagger json description
final String swaggerJson = SwaggerParser.getSwaggerJson(APP_PACKAGE);
get("/labels/"+API_VERSION+"/", (req, res) -> { // TODO: redirect the Swagger JSON to a Swagger UI instance instead of returning it e.g. redirect.any("/test", "http://petstore.swagger.io");
res.header("Content-Type", "application/json");
return swaggerJson;//.replace(oldChar, newChar);
});
} catch (Exception e) {
System.err.println(e);
e.printStackTrace();
}
// Routes other than default Swagger documentation
path("/labels", () -> {
path("/"+API_VERSION, () -> {
get("/static/*", (req, res) -> {
AccessStatic c = new AccessStatic(op, req, res);
return c.result();
});
post("/", (req, res) -> {
if(req.queryParams("template")==null || req.queryParams("template").isEmpty())
{
//res.redirect("/labels/"+API_VERSION+"/template/choose", 303);
TemplateCreator tmpl = new TemplateCreator(op);
//tmpl.baseURL = "http://"+req.host();
tmpl.target = tmpl.baseURL+ req.pathInfo();
tmpl.origReq = req;
return tmpl.chooseTemplateForm();
}
else {
String format = req.queryParams("format");
String data = req.queryParams("data");
//op.baseURL = "http://"+req.host() + req.pathInfo();
//op.baseURL = op.baseURL + req.pathInfo();
if(format==null || format.isEmpty())
format="html";
if(format.equalsIgnoreCase("html"))
try {
CreateHTML c = new CreateHTML(op, req, res);
String re = c.result();
return re;
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if(format.equalsIgnoreCase("pdf"))
try {
CreatePDF c = new CreatePDF(op, req, res);
return c.result();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
return "3rror";
});
get("/tmp", (req, res) -> {
AccessTmp c = new AccessTmp(op, req, res);
return c.result();
});
try {
CreatePDFRoute.route(op);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
CreateHTMLRoute.route(op);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
AccessTmpRoute.route(op);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// TODO: Metadata about existing templates
// @route /templates/ => get a list of all existing templates
// @route /template/{id} => get a specific template with unique list of included placeholders and path to html file
path("/template", () -> {
get("/show", (req, res) -> {
res.header("Content-Type", "text/html");
if(req.queryParams("template")!=null)
op.templateFile = op.templateDir+"/"+req.queryParams("template");
String html = "";
File file = new File(op.templateFile);
FileInputStream fis;
if(file.exists()) {
fis = new FileInputStream(file);
byte[] data = new byte[(int) file.length()];
fis.read(data);
fis.close();
html = new String(data, "UTF-8");
};
res.body(html);
return res.body();
});
get("/show/all", (req, res) -> {
res.header("Content-Type", "application/json");
res.body(new TemplateCreator(op).getTemplates().toString());
return res.body();
});
});
get("/check", (req, res)-> {
byte[] bytes = Files.readAllBytes(Paths.get("templates/submit.html"));
HttpServletResponse raw = res.raw();
raw.getOutputStream().write(bytes);
raw.getOutputStream().flush();
raw.getOutputStream().close();
return res.raw();
});
// TODO: set option for configuring Allow-Origin through config.ini
before((req, res) -> {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "Content-Type,Authorization,X-Requested-With,Content-Length,Accept,Origin,");
});
// TODO: make template editable (e.g. with (static) implementation of WYSIWYG Aloha Editor (http://alohoeditor.org))
// get("/template/edit", (req, res) -> {
// @param Sting template: name of the template
// }
// TODO: save template (e.g. by sending the (full) DOM of the template edited by Aloha Editor (http://alohoeditor.org))
// get("/template/save", (req, res) -> {
// @param String template: name of the (new) template
// @param Boolean overwrite: what to do if template name already exists
// }
/* get("/json", (req, res) -> {
byte[] bytes = Files.readAllBytes(Paths.get("templates/data.json"));
HttpServletResponse raw = res.raw();
raw.addHeader("Content-Type", "application/json");
raw.getOutputStream().write(bytes);
raw.getOutputStream().flush();
raw.getOutputStream().close();
return res.raw();
});
*/
});
});
if(op.debug)
enableDebugScreen();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initialize() throws IOException, ServletException, URISyntaxException {\n\n LOG.info(\"Initializing the internal Server\");\n Log.setLog(new Slf4jLog(Server.class.getName()));\n\n /*\n * Create and configure the server\n */\n this.server = new Server();\n ... | [
"0.6789622",
"0.6547609",
"0.64915574",
"0.64619523",
"0.63971645",
"0.63183665",
"0.6309079",
"0.6256339",
"0.6236684",
"0.6232781",
"0.6143034",
"0.61164004",
"0.608301",
"0.6077467",
"0.60725653",
"0.606573",
"0.6063585",
"0.6032832",
"0.6007324",
"0.59867233",
"0.59284395... | 0.5926793 | 21 |
Creating push listener service. | public AmazonPushListenerService() {
super(AmazonPushListenerService.class.getName());
// Measure singleton
if(MEASURE_ACTIVE) {
getMeasureProcessing();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createAndListen() {\n\n\t\t\n\t}",
"public interface IPushListener {\n /**\n * 获取push返回的数据\n * @param data\n * @param pushType 代表推送消息的类型,\n * PushType:1. 为CMD时,消息为透传消息,消息并未展示在通知栏\n * 2. 为NOTIFIY时,消息已经显示在通知栏了,业务端不用在通知栏展示消息了\n */\... | [
"0.6787826",
"0.6293792",
"0.5935405",
"0.5908355",
"0.5878875",
"0.5795773",
"0.57620096",
"0.57600206",
"0.5675735",
"0.5652258",
"0.56475514",
"0.5631478",
"0.5607686",
"0.5594354",
"0.55360585",
"0.5534375",
"0.5532405",
"0.5527964",
"0.5525782",
"0.55140036",
"0.550724",... | 0.63334054 | 1 |
Registration process is started by calling startRegister() at AmazonSNSRegHandler. When the registration ID is ready, ADM calls onRegistred(). ID is transmitted to webserver, so webserver knows app instance. If device is rotated or changed for any reason, app passes new registration ID to webserver, | @Override
protected void onRegistered(final String newRegistrationId) {
try {
snsToken = newRegistrationId;
sendRegistrationToServer(snsToken, true);
} catch (Exception e) {
//Log info
Log.e("SNSRegistration", "Amazon Token not retrieved");
sendRegistrationToServer("", false);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void register() {\n Intent registrationIntent = new Intent(REQUEST_REGISTRATION_INTENT);\n registrationIntent.setPackage(GSF_PACKAGE);\n registrationIntent.putExtra(\n EXTRA_APPLICATION_PENDING_INTENT, PendingIntent.getBroadcast(context, 0, new Intent(), 0));\n registrationIntent.putExtr... | [
"0.72207224",
"0.7138111",
"0.70029813",
"0.6916967",
"0.6881825",
"0.68296117",
"0.6824806",
"0.6724149",
"0.67143965",
"0.66744876",
"0.6568648",
"0.6481147",
"0.6467505",
"0.6372622",
"0.6336434",
"0.63152564",
"0.63086456",
"0.63054675",
"0.6297932",
"0.6297064",
"0.62920... | 0.757581 | 0 |
Sends broadcast to Main for persisting token to webserver. | private void sendRegistrationToServer(String token, boolean status) {
Intent intent = new Intent();
intent.setAction(ADM_TOKEN_MESSAGE);
intent.putExtra(ADM_TOKEN_MESSAGE_SUCCESS, status);
intent.putExtra(ADM_TOKEN_FILTER_EXTRA, token);
LocalBroadcastManager.getInstance(this).sendBroadcast(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void sendTokenToRemote() { }",
"private TokenBroadcastReceiver() { }",
"private void sendRegistrationToServer(String token) {\n }",
"private void sendRegistrationToServer(String token) {\n }",
"private void sendRegistrationToServer(String token) {\n }",
"private void sendRegistrationToSer... | [
"0.64070684",
"0.62990063",
"0.60492074",
"0.60492074",
"0.60492074",
"0.60492074",
"0.603866",
"0.603866",
"0.6017404",
"0.58555216",
"0.58416617",
"0.5826512",
"0.5800618",
"0.56324357",
"0.56184185",
"0.5567789",
"0.5548829",
"0.5444275",
"0.53946733",
"0.53829116",
"0.525... | 0.5966939 | 9 |
Creating measure processing (used in case of measure). | private static MeasureProcessing getMeasureProcessing() {
if(measure == null) {
measure = new MeasureProcessing();
}
return measure;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract double getMeasure();",
"int measure();",
"public interface CurveMeasure extends Measure{\n\t\n\t/**\n\t * Returns a MeasureSet object that contains the measure result to all topic and atValues specified on the run selected. \n\t * @param run - name of run\n\t * @param xValues - atValues array. ... | [
"0.6304782",
"0.6135739",
"0.601369",
"0.58959556",
"0.57784444",
"0.57491076",
"0.57462436",
"0.5675715",
"0.56692266",
"0.5622429",
"0.5593425",
"0.5566577",
"0.55506873",
"0.55344665",
"0.55031997",
"0.55031997",
"0.5502923",
"0.54861575",
"0.54668856",
"0.5465207",
"0.543... | 0.73853177 | 0 |
Send measure data to webserver. | private void sendMeasureToServer(Intent intent) {
measure.processMeasureData(intent.getExtras());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void sendMeasures() throws IOException {\n\t\tJSONObject obj = new JSONObject();\n\t\t\n\t\tobj.put(\"type\", this.type.toString());\n\t\tobj.put(\"rate\", this.rate);\n\t\tobj.put(\"error\", this.error);\n\t\tobj.put(\"localisation\", this.localisation);\n\t\tobj.put(\"range\", this.range);\n\t\tobj.put(\"... | [
"0.6872505",
"0.60332084",
"0.5957095",
"0.5716558",
"0.5632867",
"0.55237496",
"0.54645866",
"0.5452735",
"0.5396394",
"0.538785",
"0.52794456",
"0.5272104",
"0.52719",
"0.5172806",
"0.5160918",
"0.51503193",
"0.5137168",
"0.5134961",
"0.51318735",
"0.5099871",
"0.50985867",... | 0.6975091 | 0 |
Create and show a simple notification containing the received ADM message. | private void showNotification(Integer pushId, String notificationTitle, String pushTitle, Float longitude,
Float latitude, int radius, int[] kitchenTypeIds) {
// Create pending intent (which is used, when user opens push-notification), that calls MainActivity.
Intent intent = new Intent(this, MainActivity.class);
intent.putExtra("intent_source", 1);
intent.putExtra("title", pushTitle);
intent.putExtra("longitude", longitude);
intent.putExtra("latitude", latitude);
intent.putExtra("radius", radius);
intent.putExtra("kitchenTypeIds", kitchenTypeIds);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
PendingIntent pendingIntent = PendingIntent.getActivity(this, pushId, intent,
PendingIntent.FLAG_ONE_SHOT);
// Display Push-Notification in Android Status-Bar.
Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_find_lunch_white)
.setContentTitle(notificationTitle)
.setContentText(pushTitle)
.setAutoCancel(true)
.setSound(defaultSoundUri)
.setContentIntent(pendingIntent);
NotificationManager notificationManager =
(NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.notify(pushId, notificationBuilder.build());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void AlarmByNotification(String message) {\n\t\tToast.makeText(this, message, Toast.LENGTH_LONG).show();\r\n\t}",
"public void showNotification(String msg) {\n Notification.show(msg);\n }",
"private void showNotification() {\n }",
"int displayNotification(Message message);",
"private v... | [
"0.629572",
"0.62902164",
"0.6229281",
"0.6182909",
"0.61779606",
"0.6174995",
"0.615427",
"0.6092267",
"0.608093",
"0.6067156",
"0.599175",
"0.59693485",
"0.59550846",
"0.592803",
"0.5838563",
"0.5829237",
"0.57993716",
"0.5798371",
"0.5783181",
"0.578298",
"0.57818604",
"... | 0.0 | -1 |
TODO Autogenerated method stub | public void Del(String id) {
sql = "delete from throw_history where throw_history_id='"+id+"'";
dao.executeUpdate(sql);
System.out.println("=del==="+sql);
} | {
"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 |
Busca todos os campos com com a InjectView em automatiza findViewById | private void injectViews() {
Field[] declaredFields = getClass().getDeclaredFields();
for (Field declaredField : declaredFields) {
if(declaredField.isAnnotationPresent(InjectView.class)) {
declaredField.setAccessible(true);
try {
declaredField.set(this, findViewById(declaredField.getAnnotation(InjectView.class).value()));
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void findViews() {\n\n altura_et = findViewById(R.id.et_altura);\n altura_et.setText(String.valueOf(user.getAltura()));\n\n peso_et = findViewById(R.id.et_peso);\n peso_et.setText(String.valueOf(user.getPeso()));\n\n nombreUO_et = findViewById(R.id.et_uo);\n nombre... | [
"0.61843616",
"0.61522424",
"0.61440897",
"0.57998836",
"0.57796323",
"0.5769037",
"0.57541233",
"0.5739019",
"0.571818",
"0.5617624",
"0.55996555",
"0.5583889",
"0.5570163",
"0.5533782",
"0.55310446",
"0.55175084",
"0.5517488",
"0.5508689",
"0.5463459",
"0.54594266",
"0.5453... | 0.7114154 | 0 |
TODO Autogenerated method stub | @Override
public void initialize(URL location, ResourceBundle resources) {
question.setItems(questionlist);
} | {
"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 |
Function to find the length of longest common subsequence in two strings. | static int lcs(int x, int y, String s1, String s2)
{
// your code here
int len1 = x;
int len2 = y;
int dp[][] = new int[len1+1][len2+1];
for(int i=0;i<=len1;i++){
dp[i][0] = 0;
}
for(int i=0;i<=len2;i++){
dp[0][i] = 0;
}
for(int i=1;i<=len1;i++){
for(int j=1;j<=len2;j++){
if(s1.charAt(i-1)==s2.charAt(j-1)){
dp[i][j]=1+dp[i-1][j-1];
}
else {
dp[i][j] = Math.max(dp[i-1][j],dp[i][j-1]);
}
}
}
return dp[len1][len2];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int longestCommonSubsequenceLength(String s1, String s2)\n {\n return longestCommonSubsequenceLength(s1.toCharArray(), s2.toCharArray(), s1.length(), s2.length());\n }",
"public static int longestCommonSubsequence2(String text1, String text2) {\n int[] length = new int[text2.length() + ... | [
"0.86148113",
"0.795225",
"0.78853446",
"0.7881204",
"0.78683233",
"0.78248984",
"0.77020377",
"0.7664992",
"0.76136607",
"0.75833577",
"0.753819",
"0.7504491",
"0.75011706",
"0.74532455",
"0.74258614",
"0.7408715",
"0.73796004",
"0.7378406",
"0.7326796",
"0.71837795",
"0.717... | 0.6452462 | 59 |
Creates a new player who accepts input through the console to make moves | public ConsoleHumanPlayer(PlayerIdentity identity, Deck deck) {
super(identity, deck);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void createPlayer(Player player);",
"Player createPlayer();",
"void createNewGame(Player player);",
"public void start(){\n int numberOfPlayers = Integer.parseInt(JOptionPane.showInputDialog(\"How many players\"));\n player1 = new Player(JOptionPane.showInputDialog(\"What is your name?\"));... | [
"0.7237903",
"0.7149936",
"0.68145657",
"0.67104656",
"0.66723555",
"0.6611811",
"0.65918744",
"0.65757114",
"0.64601946",
"0.6420388",
"0.6415467",
"0.6391069",
"0.6370683",
"0.6357976",
"0.63536257",
"0.63392395",
"0.63242143",
"0.630301",
"0.62989855",
"0.6279268",
"0.6256... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public int next() {
return current++;
} | {
"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 |
Memory instantiation. The instantiation only takes place if the memory size is meaningful (greater than zero). No error is reported. | protected MemObject (int nElem)
{
if (nElem > 0) mem = new Object [nElem];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Memory() {}",
"public Memory() {\n this(false);\n }",
"private MemoryTest() {\r\n }",
"public MemoryImpl(int size) {\n\t\tif (size < 0) {\n\t\t\tthrow new IllegalArgumentException(\"The size of the memory should be greater than 0!\");\n\t\t}\n\t\tmemory = new Object[size];\n\t}",
"public MemoryImpl(... | [
"0.79512703",
"0.73473865",
"0.71775776",
"0.71243954",
"0.706125",
"0.69973147",
"0.69113684",
"0.6806487",
"0.6630542",
"0.6594453",
"0.6575889",
"0.6543084",
"0.65334743",
"0.64737487",
"0.6369759",
"0.6366027",
"0.6296663",
"0.6292311",
"0.62461025",
"0.62116563",
"0.6097... | 0.6526394 | 13 |
Memory write. A generic object is written into it. Virtual method, it has to be overridden in a derived data type. | protected abstract void write (Object val); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void writeObject ();",
"public abstract <T> SerializationStream writeObject(T t);",
"public void writeObject(Object obj) throws IOException;",
"void writeCustom(Object custom);",
"@Override\n\tprotected void write(ObjectOutput out) throws IOException {\n\t\t\n\t}",
"public abstract void write(O va... | [
"0.7281699",
"0.709895",
"0.69559455",
"0.68739974",
"0.68554294",
"0.6656797",
"0.66101253",
"0.65803945",
"0.65760463",
"0.64417934",
"0.641931",
"0.6405803",
"0.63958776",
"0.63514215",
"0.6303935",
"0.6296406",
"0.62739974",
"0.62016016",
"0.6138427",
"0.6135932",
"0.6131... | 0.7033695 | 2 |
Memory read. A generic object is read from it. Virtual method, it has to be overridden in a derived data type. | protected abstract Object read (); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract <T> T readObject();",
"public Object read();",
"private void readObject() {}",
"private void readObject() {}",
"private void readObject() {}",
"public abstract org.omg.CORBA.Object read_Object();",
"private void readObject() {\n }",
"public Object read() throws IOException, RecordIOE... | [
"0.79835683",
"0.7630269",
"0.7521096",
"0.7521096",
"0.7521096",
"0.7292754",
"0.7246645",
"0.7146056",
"0.700188",
"0.69019234",
"0.6874481",
"0.6850664",
"0.6779453",
"0.67355204",
"0.6688819",
"0.6688819",
"0.6688819",
"0.6688819",
"0.6688819",
"0.6688819",
"0.6688819",
... | 0.79919165 | 0 |
Loads the corpus files and parses them into a Document+Sentence structure. There should be one HTML file in the DOE corpus format per doc unter the source directory. | public DOECorpus loadFromHTML() {
File[] files = getFileList();
System.out.println("Found " + files.length + " documents in " + this.sourceDir);
System.out.println("Parsing their contents...");
int totalLineCount = 0;
DOECorpus corpus = new DOECorpus();
for(File file : files) {
try {
Document htmlDoc = Jsoup.parse(file, null);
String originalLocation = htmlDoc.location();
String shortTitle = htmlDoc.title();
String shortShortTitle = "";
String cameronNumber = "";
DOECorpusDocument corpusDoc = new DOECorpusDocument(shortTitle, shortShortTitle, cameronNumber, originalLocation);
Elements paragraphElements = htmlDoc.select("p");
DOECorpusLine lineBefore = null;
for(Element p : paragraphElements) {
String text = p.text();
if(ignoreLine(text))
continue;
else if(text.startsWith(SHORT_SHORT_TITLE))
shortShortTitle = text.replace(SHORT_SHORT_TITLE, "");
else if(text.startsWith(CAMERON_NUMBER))
cameronNumber = text.replace(CAMERON_NUMBER, "");
else if(text.startsWith("[")) {
String lineID = "";
String line = "";
Pattern linePattern = Pattern.compile("\\[([0-9]+\\s\\([0-9a-zA-Z\\.,\\s\\(\\)]+\\))\\]\\s(.*)");
Matcher m = linePattern.matcher(text);
if (m.matches()) {
lineID = m.group(1).trim();
line = m.group(2).trim();
DOECorpusLine newLine = new DOECorpusLine(lineID, line, shortTitle);
newLine.setLineBefore(lineBefore);
if(lineBefore != null)
lineBefore.setLineAfter(newLine);
corpusDoc.addLine(newLine);
lineBefore = newLine;
}
}
else if(!text.isEmpty()) // This should be the full title
corpusDoc.setFullTitle(text);
}
totalLineCount += corpusDoc.getLineCount();
corpus.addDocument(corpusDoc);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
System.out.println("Parsing their contents...DONE");
System.out.println("Total number of lines: " + totalLineCount);
System.out.println("Splitting lines into sentences...");
corpus.splitIntoSentences();
System.out.println("Splitting lines into sentences...DONE");
System.out.println("Tokenizing sentences...");
corpus.tokenize();
System.out.println("Tokenizing sentences...DONE");
System.out.println("Total number of tokens: " + corpus.getTokenCount());
System.out.println("Total number of types: " + corpus.getTypeCount());
System.out.println("Total number of sentences: " + corpus.getSentenceCount());
System.out.println("Average sentence length: " + corpus.getAvgSenLength());
System.out.println("Minimum sentence length: " + corpus.getMinSenLength());
System.out.println("Maximum sentence length: " + corpus.getMaxSenLength());
return corpus;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createDocs() {\n\t\t\n\t\tArrayList<Document> docs=new ArrayList<>();\n\t\tString foldername=\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\input\";\n\t\tFile folder=new File(foldername);\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\tfor (File file : listOfFiles) {\n\t\t\ttry {\n\t\t\t\tFileInpu... | [
"0.66651565",
"0.6008005",
"0.5980577",
"0.5942687",
"0.59201217",
"0.58728766",
"0.5756821",
"0.5638012",
"0.55922246",
"0.55742437",
"0.5562036",
"0.5531538",
"0.5516045",
"0.5485518",
"0.5483437",
"0.5466085",
"0.54088485",
"0.5402842",
"0.5402152",
"0.53901523",
"0.535160... | 0.77441645 | 0 |
add items to cart | public ArrayList addToCart(Book book, int quantity){
if(cart == null){
cart = new ArrayList();
Item item = new Item(book, quantity);
cart.add(item);
}
else{
Object items[] = cart.toArray();
boolean find = false; //to check it item already exits
for(int i=0;i<items.length;i++){
Item temp = (Item)items[i];
if(temp.getBook().getBook_id()==book.getBook_id()){
temp.setQuant(temp.getQuant()+quantity);
find = true;
break;
}
}
if(!find){
Item item = new Item(book, quantity);
total+=item.getBook().getPrice()*quantity;
cart.add(item);
}
}
return cart;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void add() {\n\t\tcart.add(item.createCopy());\n\t}",
"@Override\n\tpublic void addProductToCart(ShoppingCartItem cart_items) {\n\t\tthis.shoppingCartList.add(cart_items);\n\t}",
"public void AddtoCart(int id){\n \n itemdb= getBooksById(id);\n int ids = id;\n \n for(Bo... | [
"0.8433316",
"0.7698793",
"0.75051606",
"0.74309486",
"0.74244606",
"0.7408009",
"0.7386124",
"0.73443645",
"0.72208035",
"0.71719116",
"0.7076262",
"0.7064646",
"0.70563483",
"0.70442736",
"0.7008556",
"0.70022166",
"0.69827795",
"0.6953336",
"0.69278497",
"0.69267315",
"0.6... | 0.63496953 | 72 |
We create model class for Comparator because it has INVOKEDYNAMIC | public interface Comparator {
default int compare(Object a, Object b) {
FeatureExpr ctx = Contexts.model_java_util_Comparator_compare;
V<?> compareResult = compare__Ljava_lang_Object_Ljava_lang_Object__I(V.one(ctx, a), V.one(ctx, b), ctx);
V<?> selected = compareResult.select(ctx);
assert selected.getOne() instanceof java.lang.Integer : "compare returns non-Integer";
return ((java.lang.Integer) selected.getOne());
}
V<?> compare__Ljava_lang_Object_Ljava_lang_Object__I(V a, V b, FeatureExpr fe);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected BaseComparator() {}",
"private SimplexComparator() {}",
"public abstract BoundCodeDt<?> getComparatorElement();",
"Comparison createComparison();",
"Comparison createComparison();",
"protected Comparator getNameComparator()\n {\n if(nameComparator == null)\n {\n name... | [
"0.6779385",
"0.6763399",
"0.6643154",
"0.66354704",
"0.66354704",
"0.6574286",
"0.64690244",
"0.6401612",
"0.6389891",
"0.63292265",
"0.6307254",
"0.6285872",
"0.62194854",
"0.61464876",
"0.61403227",
"0.61324316",
"0.6119642",
"0.6080777",
"0.6051062",
"0.6048439",
"0.60474... | 0.69273335 | 0 |
We start with the first character of the string, check if the character itself is a word in the dictionary? If yes, then our problem reduces to the smaller problem, that is to check if substring from index 1 to s.length is breakable or not. If not, then we check two characters and then three characters and so on till we can check the whole string. As with every character inclusion, the problem reduces in size but remains the same, so ideal case for recursive implementation. Change wordDict from ArrayList into HashSet as the average time complexity for a search is O(1) as opposed to O(n) for ArrayList Time Complexity : O(2 to the power of n) for the number of recursive calls in conjunction with the number of characters in the string s. In addition there is O(n) for the substrings of the given string. The dominant term is O(2 to the power of n) Space Complexity: O(w) where w is the number of words in the HashSet and further O(r) where r is the number of recursive calls | public boolean wordBreak(String s, List<String> wordDict) {
if (s == null || s.length() == 0) {
return false;
}
Set<String> set = new HashSet<>(wordDict);
return wordBreakUtil(s,set);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean wordBreak(String s, List<String> wordDict) {\n boolean[] dp = new boolean[s.length() + 1];\n\n dp[0] = true;\n\n // Maintaining dp array for all lengths from 1 to n\n for(int i = 1; i <= s.length(); i++) {\n // Checking for all characters till i if earlier sub ... | [
"0.690339",
"0.6848644",
"0.67800707",
"0.67665184",
"0.66863674",
"0.6638138",
"0.66202307",
"0.6460546",
"0.64152944",
"0.6410003",
"0.6409276",
"0.63205546",
"0.6292283",
"0.6263545",
"0.61869",
"0.6161204",
"0.61508507",
"0.6146735",
"0.61394024",
"0.61355567",
"0.6123462... | 0.60232866 | 25 |
Return true if the end of the string is reached, | public boolean wordBreakUtil(String s,Set<String> set){
if (s.length() == 0){
return true;
}
for (int i=1; i <= s.length(); i++){
// consider all prefixes of the current string
String prefix = s.substring(0,i);
// return true if the prefix is present in the dictionary and the
// remaining string also forms a space-separated sequence of one or
// more dictionary words
if (set.contains(prefix) && wordBreakUtil(s.substring(i),set)){
return true;
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static boolean isEnd () {\n if (index >= inputCharArray.length) return true;\n else return false;\n }",
"private boolean isEnd(String nextVal) throws java.io.IOException {\n\t\tif (Character.toString((char)PREPROCESSING).equals(nextVal)) {\n\t\t\tint pos = (int) reader.getFilePointer();\n... | [
"0.75958896",
"0.7505018",
"0.7495231",
"0.7368158",
"0.73249245",
"0.7160882",
"0.710744",
"0.7079636",
"0.7051253",
"0.69663805",
"0.6957349",
"0.69520056",
"0.69469935",
"0.6922902",
"0.6849994",
"0.68448585",
"0.68134797",
"0.67133325",
"0.6698559",
"0.6623976",
"0.65414"... | 0.0 | -1 |
The problem can be broken down into smaller sub problem, which can further be broken down into yet smaller sub problem, and so on. The wordbreak problem also exhibits. overlapping sub problems, so we will end up solving the same sub problem over and over again. If we draw the recursion tree, we can see that the same sub problems are getting computed repeatedly. The problems having optimal substructure and overlapping sub problem can be solved by dynamic programming, in which sub problem solutions are memoized rather than computed repeatedly Time Complexity: O(n to the power of 2) Space Complexity: requires O(n+1) extra space, where n is the length of the input string for the int array, another O(w) for the HashSet where w is the number of words. Also O(r) for the number of recursive calls | public boolean wordBreakTopDown(String s, List<String> wordDict) {
if (s == null || s.length() == 0) {
return false;
}
Set<String> set = new HashSet<>(wordDict);
// lookup array to store solutions to sub problems
// `lookup[i]` stores if substring `str[n-i…n)` can be segmented or not
int[] lookup = new int[s.length() + 1];
Arrays.fill(lookup,-1);
return wordBreakUtilTopDown(s,set,lookup);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int minWordBreak(String s, Set<String> dict) {\n Map<String, List<String>> map = new HashMap<String, List<String>>();\n List<String> possibles = wordBreakHelper(s,dict,map);\n int minCut = s.length();\n for (String possible: possibles) {\n int cut = possible.split(\" \").length;\n if (... | [
"0.58199346",
"0.5747102",
"0.5722055",
"0.5721193",
"0.5716227",
"0.56228864",
"0.5581384",
"0.5577942",
"0.5562232",
"0.5550715",
"0.54764515",
"0.54612744",
"0.5447499",
"0.5426472",
"0.53864205",
"0.5372491",
"0.5370449",
"0.53676397",
"0.5355587",
"0.5350168",
"0.5339002... | 0.5180479 | 36 |
`n` stores length of the current substring | public boolean wordBreakUtilTopDown(String s, Set<String> dict,int[] lookup)
{
int n = s.length();
// return true if the end of the string is reached
if (n == 0) {
return true;
}
// if the sub problem is seen for the first time
if (lookup[n] == -1)
{
// mark subproblem as seen (0 initially assuming string
// can't be segmented)
lookup[n] = 0;
for (int i = 1; i <= n; i++)
{
// consider all prefixes of the current string
String prefix = s.substring(0, i);
// if the prefix is found in the dictionary, then recur for the suffix
if (dict.contains(prefix) && wordBreakUtilTopDown(s.substring(i),dict, lookup))
{
// return true if the string can be segmented
lookup[n] = 1;
return true;
}
}
}
// return solution to the current sub problem
return lookup[n] == 1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void SubString(String str, int n)\r\n {\r\n\t\tint count = 0;\r\n\t\tStringBuilder sb = new StringBuilder();\r\n for (int i = 0; i < n; i++) { \r\n for (int j = i+1; j <= n; j++) {\r\n \t String subs = str.substring(i, j);\r\n \t \r\n \t if((Integer.valu... | [
"0.6875961",
"0.68417114",
"0.6810027",
"0.67235607",
"0.6634423",
"0.65867627",
"0.6537062",
"0.6515448",
"0.6505105",
"0.64935154",
"0.64703953",
"0.6424151",
"0.63958645",
"0.63928723",
"0.6313594",
"0.6301233",
"0.62984943",
"0.6286847",
"0.6280782",
"0.6274796",
"0.62221... | 0.0 | -1 |
How can we do it bottom up? The string before index 0 is alway breakable as empty string. So table[0] can be always true. To check if string till index i is breakable or not, we check from index 0 to index i1 if there is any index j till which string is breakable. If yes, then we just check if substring from index j to i, that will make table[i] as true. Time Complexity: O(n to the power of 2) Space Complexity: requires O(n) extra space, where n is the length of the input string for the boolean array | public boolean wordBreakBottomUp(String s, List<String> wordDict) {
if (s == null || s.length() == 0) {
return false;
}
Set<String> set = new HashSet<>(wordDict);
return wordBreakUtilBottomUp(s,set);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean canBreak(String input, String[] dict) {\n Set<String> dicSet = toSet(dict);\n // NOTICE: sometimes it will be handy to have such index matching, canBreak[i] represents index(i-1) in input,\n // also can represent the substring(0,i).\n // M[i] 代表前i个字母是否能被分解为一个或多个单词在dict里面。... | [
"0.6112754",
"0.5759252",
"0.5692811",
"0.56150573",
"0.5589129",
"0.5477475",
"0.5409434",
"0.5347068",
"0.5287028",
"0.5267638",
"0.52669317",
"0.5249985",
"0.52441806",
"0.52392125",
"0.52387834",
"0.5150582",
"0.50936997",
"0.50730586",
"0.50627524",
"0.5056718",
"0.50525... | 0.0 | -1 |
Used currently of ACK messages | public static org.springframework.messaging.Message<Message> encode(String registrationID, String messageId, String messageType) {
GcmEntity gcmPayload = new GcmEntity(messageId, registrationID, messageType);
return constructGcmMessage(gcmPayload);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void ack() {\n }",
"boolean getAck();",
"boolean needsAck() { return true; }",
"messages.Ackinterface.AckInterface getAck();",
"public ReportAckMsg() {\n super(DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }",
"private void m10420a(AppEntitySignal appEntitySignal) {\n i... | [
"0.6648938",
"0.65812457",
"0.65395796",
"0.6427859",
"0.6418449",
"0.63957745",
"0.6314399",
"0.6273459",
"0.62547094",
"0.62293124",
"0.60938966",
"0.60210514",
"0.6000788",
"0.5987714",
"0.59577024",
"0.59272",
"0.59255296",
"0.59061116",
"0.58940035",
"0.58719534",
"0.587... | 0.0 | -1 |
System.out.print("patintInfo="+ patintInfo+"\t\t\t"); System.out.print("doctorInfo="+ doctorInfo+"\t\t\t"); | @Override
public String toString() {
System.out.print("the Reserve id:"+getId()+"\t\t\t");
System.out.print("the Reserve Date :"+getReservrDate()+"\t\t");
System.out.print("the Reserve Price:"+getPrice()+"\t\t\n\n");
System.out.println("*******************************NEW RESERVATION*********************************\n");
return null;
// return "" + patintInfo + ", doctorInfo=" + doctorInfo + ", id=" + id + ", reserveDate=" + reserveDate + ", price=" + price + '}';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void display() {\n\tSystem.out.println(\"student id is \"+studentid+\"\\t\"+\"student name is \"+studentName+\"\\t\"+\"marks is \"+marks);\r\n}",
"public void printInfo() {\r\n System.out.printf(\"%-25s\", \"Nomor Rekam Medis Pasien\");\r\n System.out.println(\": \" + getNomorRekamMedis());\... | [
"0.6632014",
"0.6552749",
"0.653255",
"0.6344568",
"0.62354416",
"0.6232106",
"0.62111384",
"0.6152384",
"0.6147346",
"0.61343396",
"0.6131125",
"0.60178137",
"0.60037017",
"0.59758866",
"0.597454",
"0.5955032",
"0.5953625",
"0.59526855",
"0.59480613",
"0.59440607",
"0.593949... | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
try {
TransactionType command;
if (args.length > 0) {
command = TransactionType.valueOf(args[0]);
} else {
command = TransactionType.User;
}
UserService us = new UserServiceImpl();
switch (command) {
case Withdrawal:
if (us.Withdrawal(us.getUser(Long.valueOf(args[1])), BigDecimal.valueOf(Long.valueOf(args[2])))) {
System.out.println("Withdrawal \n" + us.getUser(Long.valueOf(args[1])) + "\n Completed");
} else {
System.out.println("Withdrawal \n" + us.getUser(Long.valueOf(args[1])) + "\n Faild");
}
break;
case Deposit:
if (us.deposit(us.getUser(Long.valueOf(args[1])), BigDecimal.valueOf(Long.valueOf(args[2])))) {
System.out.println("Deposit \n" + us.getUser(Long.valueOf(args[1])) + "\n Completed");
} else {
System.out.println("Deposit \n" + us.getUser(Long.valueOf(args[1])) + "\n Faild");
}
break;
case Transfer:
if (us.transfer(us.getUser(Long.valueOf(args[1])), us.getUser(Long.valueOf(args[2])),
BigDecimal.valueOf(Long.valueOf(args[3])))) {
System.out.println("Transfer \n" + "From user" + us.getUser(Long.valueOf(args[1])) + "To user"
+ us.getUser(Long.valueOf(args[2])) + "\n Completed");
} else {
System.out.println("Transfer \n" + "From user" + us.getUser(Long.valueOf(args[1])) + "To user"
+ us.getUser(Long.valueOf(args[2])) + "\n Faild");
}
break;
case History:
UserTransactionService ut = new UserTransactionServiceImpl();
System.out.println(ut.getHistory(Long.valueOf(args[1])).stream().map(item->item.toString()).collect(Collectors.joining("\n")));
break;
default:
User u = new User();
u.setName("Test Egy");
u.setDebit(BigDecimal.valueOf(0L));
System.out.println(us.saveUser(u));
u = new User();
u.setName("Test Ketto");
u.setDebit(BigDecimal.valueOf(0L));
System.out.println(us.saveUser(u));
u = new User();
u.setName("Test Harom");
u.setDebit(BigDecimal.valueOf(0L));
System.out.println(us.saveUser(u));
break;
}
} finally {
MyEntityManager.closeEntyyManaggerFactroy();
}
} | {
"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 |
Sends tasks until there is no tasks or threads left | private void delegateTasks() {
logger.debug("task delegation started");
untilTasksAndThreadsAreAvailable:
while (true) {
Optional<Node> selectedNode;
Optional<WorkerPoolTask> task = workerPool.pollTask();
if (!task.isPresent()) {
while (true) {
State prevState = state.get();
State nextState;
if (prevState == DURING_DELEGATION) {
// No more tasks and free threads appeared
nextState = NO_DELEGATION;
} else {
//prevState == DURING_DELEGATION_WITH_SCHEDULED_RE_EXECUTION
nextState = DURING_DELEGATION;
}
if (state.compareAndSet(prevState, nextState)) {
logger.debug("changed from " + prevState + " to " + nextState);
if (prevState == DURING_DELEGATION) {
return;
} else {
//prevState == DURING_DELEGATION_WITH_SCHEDULED_RE_EXECUTION
continue untilTasksAndThreadsAreAvailable;
}
}
logger.debug("state change missed in delegateTasks when task wasn't present");
}
}
synchronized (nodes) { // Synchronization with HeartBeat nodes.updateAfterHeartBeat method.
selectedNode = nodes.drainThreadFromNodeHavingHighestPriority();
if (!selectedNode.isPresent()) {
workerPool.submitTask(task.get(), true);
State nextState = AWAITING_FREE_THREADS;
State prevState = state.getAndSet(nextState);
logger.debug("changed from " + prevState + " to " + nextState);
return;
}
}
if (!delegateTask(selectedNode.get(), task.get())) {
//If delegation failed we release the thread to keep proper number of free threads up-to-date
//If HeartBeat happened between draining a thread and returning it, this operation will take no effect
//as we are working on invalidated version of node.
nodes.returnThread(selectedNode.get());
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void submitAndWaitForAll(Iterable<Runnable> tasks);",
"@Override\n\tpublic synchronized void waitAllTasks() throws ExecutionException, InterruptedException {\n\t\twaitTasks(key -> true);\n\t}",
"public final void execute() {\n thread = Thread.currentThread();\n while (!queue.isEmpty()) {\n ... | [
"0.65899867",
"0.6522766",
"0.64141774",
"0.63729525",
"0.63349056",
"0.6295911",
"0.6273991",
"0.6208091",
"0.6192115",
"0.6094065",
"0.6044483",
"0.5988089",
"0.59783995",
"0.59725857",
"0.5965837",
"0.5965009",
"0.59272456",
"0.59148437",
"0.5890386",
"0.5865494",
"0.58545... | 0.6410014 | 3 |
Delegate single task to other node. | private boolean delegateTask(Node destinationNode, WorkerPoolTask task) {
String destinationNodeId = destinationNode.getNodeId();
String taskId = task.getTaskId();
if (task.isExternal()) {
ExternalTask externalTask = (ExternalTask) task;
if (!externalTaskRegistry.remove(externalTask)) {
logger.info("There is no entry for given " + externalTask);
logger.info("Not sending any Sry or Redirect message for " + externalTask);
return false;
}
if (externalTask.isOriginatedAt(destinationNode)) {
taskService.sry(destinationNodeId, taskId);
} else {
taskService.redirectTask(externalTask, destinationNodeId);
}
} else {
taskService.delegateTask(task, destinationNodeId);
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void delegateTask(Long taskId, String sourceUserId, String targetUserId);",
"public abstract void task();",
"public Task task()\n {\n return _link.first;\n }",
"@Override\r\n\tvoid execute(Runnable task);",
"@Override\r\n\tpublic void doTask() {\n\t}",
"@Override\n\t\t\tpublic void subTask(String na... | [
"0.6964148",
"0.581851",
"0.56871754",
"0.56404626",
"0.55850744",
"0.54939556",
"0.54892457",
"0.5486838",
"0.5474199",
"0.5456094",
"0.54399204",
"0.54395044",
"0.5427222",
"0.54270816",
"0.5417444",
"0.5387991",
"0.5365731",
"0.535712",
"0.53564984",
"0.53497964",
"0.53473... | 0.67139137 | 1 |
defines the interface of a Warzone player strategy | public interface IPlayerStrategy {
IOrder createOrder() throws Exception;
IPlayerStrategy cloneStrategy(IPlayerModel p_player) throws Exception;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface Player {\n\n\n /**\n * Represents the attack result of random strategy.\n *\n * @return an attack result\n */\n AttackResult randomAttack();\n\n /**\n * Represents the attack result of user strategy.\n *\n * @return an attack result\n */\n AttackResult userAttack();\n\n /**\n ... | [
"0.7320039",
"0.71384865",
"0.70425594",
"0.66076404",
"0.6585281",
"0.65475494",
"0.6512806",
"0.64991385",
"0.6474224",
"0.64235806",
"0.6420641",
"0.6416862",
"0.6404971",
"0.63933116",
"0.6292553",
"0.62920856",
"0.6264102",
"0.6262135",
"0.6213605",
"0.62027806",
"0.6185... | 0.7118413 | 2 |
Repeat a String repeat times to form a new String. StringUtils.repeat(null, 2) = null StringUtils.repeat("", 0) = "" StringUtils.repeat("", 2) = "" StringUtils.repeat("a", 3) = "aaa" StringUtils.repeat("ab", 2) = "abab" StringUtils.repeat("a", 2) = "" | public static String repeat(String str, int repeat) {
// Performance tuned for 2.0 (JDK1.4)
if (str == null) {
return null;
}
if (repeat <= 0) {
return EMPTY;
}
int inputLength = str.length();
if (repeat == 1 || inputLength == 0) {
return str;
}
if (inputLength == 1 && repeat <= PAD_LIMIT) {
return padding(repeat, str.charAt(0));
}
int outputLength = inputLength * repeat;
switch (inputLength) {
case 1 :
char ch = str.charAt(0);
char[] output1 = new char[outputLength];
for (int i = repeat - 1; i >= 0; i--) {
output1[i] = ch;
}
return new String(output1);
case 2 :
char ch0 = str.charAt(0);
char ch1 = str.charAt(1);
char[] output2 = new char[outputLength];
for (int i = repeat * 2 - 2; i >= 0; i--, i--) {
output2[i] = ch0;
output2[i + 1] = ch1;
}
return new String(output2);
default :
StringBuilder buf = new StringBuilder(outputLength);
for (int i = 0; i < repeat; i++) {
buf.append(str);
}
return buf.toString();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static String repeatString(String string, int repeats)\n {\n StringBuilder stringBuilder = new StringBuilder();\n for (int i = 0; i < repeats; i++) {\n stringBuilder.append(string);\n }\n return stringBuilder.toString();\n }",
"static String repeat(String s, i... | [
"0.735822",
"0.7318258",
"0.7216907",
"0.69211984",
"0.67610914",
"0.6755033",
"0.66883445",
"0.668296",
"0.66726726",
"0.6631913",
"0.66300076",
"0.6621891",
"0.6347565",
"0.62698954",
"0.62338066",
"0.62048995",
"0.618322",
"0.6041881",
"0.6036378",
"0.59948105",
"0.5970982... | 0.7741939 | 0 |
Create instances of all configuration model elements. | public interface ConfigModelFactory
{
/**
* Create an instance of the <code>ConfigModel</code>
*
* @return an instance of the configuration model
*/
ConfigModel createInstanceOfConfigModel();
/**
* Create an instance of the <code>InstanceModel</code>
*
* @return an instance of the instance model
*/
InstanceModel createInstanceOfInstanceModel();
/**
* Create an instance of the <code>CsticModel</code>
*
* @return an instance of the characteristic model
*/
CsticModel createInstanceOfCsticModel();
/**
* Create an instance of the <code>CsticValueModel</code>
*
* @param valueType
* The containing Cstic value type
* @return an instance of the characteristic value model
*/
CsticValueModel createInstanceOfCsticValueModel(int valueType);
/**
* Create an instance of the <code>CsticGroupModel</code>
*
* @return an instance of the characteristic group model
*/
CsticGroupModel createInstanceOfCsticGroupModel();
/**
* Create an instance of the <code>PriceModel</code>
*
* @return an instance of the price model
*/
PriceModel createInstanceOfPriceModel();
/**
* Create an instance of the <code>SolvableConflictModel</code>
*
* @return an instance of the Solvable Conflict Model
*/
SolvableConflictModel createInstanceOfSolvableConflictModel();
/**
* Create an instance of the <code>ConflictingAssumptionModel</code>
*
* @return an instance of the Conflicting Assumption Model
*/
ConflictingAssumptionModel createInstanceOfConflictingAssumptionModel();
/**
* Create an instance of the <code>PriceModel</code>
*
* @return an instance of the price model
*/
PriceModel getZeroPriceModel();
/**
* Create an instance of the <code>PriceSummaryModel</code>
*
* @return an instance of the price summary model
*/
PriceSummaryModel createInstanceOfPriceSummaryModel();
/**
* @return a builder to construct {@link ProductConfigMessage} objects
*/
default ProductConfigMessageBuilder createProductConfigMessageBuilder()
{
return new ProductConfigMessageBuilder();
}
/**
* Create an instance of the <code>ProductConfigMessage</code><br>
* uses the <code>DEFAULT</code> ProductConfigMessageSourceSubType
*
* @param message
* localized message
* @param key
* message key, should be unique together with message source
* @param severity
* message severity
* @param source
* message source, should be unique together with message key
* @return a message instance
* @deprecated since 18.08.0 - use {@link ProductConfigMessageBuilder} instead
*/
@Deprecated(since = "1808", forRemoval=true)
default ProductConfigMessage createInstanceOfProductConfigMessage(final String message, final String key,
final ProductConfigMessageSeverity severity, final ProductConfigMessageSource source)
{
return createInstanceOfProductConfigMessage(message, key, severity, source, ProductConfigMessageSourceSubType.DEFAULT);
}
/**
* Create an instance of the <code>ProductConfigMessage</code><br>
*
* @param message
* localized message
* @param key
* message key, should be unique together with message source
* @param severity
* message severity
* @param source
* message source, should be unique together with message key
* @param subType
* optional sub type of the message source
* @return a message instance
* @deprecated since 18.08.0 - use {@link ProductConfigMessageBuilder} instead
*/
@Deprecated(since = "1808", forRemoval=true)
ProductConfigMessage createInstanceOfProductConfigMessage(String message, String key, ProductConfigMessageSeverity severity,
ProductConfigMessageSource source, ProductConfigMessageSourceSubType subType);
/**
* Create an instance of the <code>VariantConditionModel</code>
*
* @return an instance of the variant condition model
*/
VariantConditionModel createInstanceOfVariantConditionModel();
/**
* @return class name of the {@link PriceSummaryModel} implementation
*/
String getTargetClassNamePriceSummaryModel();
/**
* @return class name of the {@link PriceModel} implementation
*/
String getTargetClassNamePriceModel();
/**
* @return class name of the {@link CsticGroupModel} implementation
*/
String getTargetClassNameCsticGroupModel();
/**
* @return class name of the {@link CsticValueModel} implementation
*/
String getTargetClassNameCsticValueModel();
/**
* @return class name of the {@link CsticModel} implementation
*/
String getTargetClassNameCsticModel();
/**
* @return class name of the {@link InstanceModel} implementation
*/
String getTargetClassNameInstanceModel();
/**
* @return class name of the {@link ConfigModel} implementation
*/
String getTargetClassNameConfigModel();
/**
* @return class name of the {@link SolvableConflictModel} implementation
*/
String getTargetClassNameSolvableConflictModel();
/**
* @return class name of the {@link ConflictingAssumptionModel} implementation
*/
String getTargetClassNameConflictingAssumptionModel();
/**
* @return class name of the {@link VariantConditionModel} implementation
*/
String getTargetClassNameVariantConditionModel();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private ConfigurationModel() {\r\n\tloadConfiguration();\r\n }",
"ConfigModel createInstanceOfConfigModel();",
"public void init() {\n entityPropertyBuilders.add(new DefaultEntityComponentBuilder(environment));\n entityPropertyBuilders.add(new FilterTransientFieldComponentBuilder(environment));\n e... | [
"0.6130365",
"0.592811",
"0.5848438",
"0.5750414",
"0.5714975",
"0.5569811",
"0.55297905",
"0.55286896",
"0.5496889",
"0.54852456",
"0.54849386",
"0.5484186",
"0.5413867",
"0.54130816",
"0.53773797",
"0.536477",
"0.53260976",
"0.5317418",
"0.5311075",
"0.53010446",
"0.5279718... | 0.544567 | 12 |
Create an instance of the ConfigModel | ConfigModel createInstanceOfConfigModel(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private ConfigurationModel() {\r\n\tloadConfiguration();\r\n }",
"public interface ConfigModelFactory\n{\n\t/**\n\t * Create an instance of the <code>ConfigModel</code>\n\t *\n\t * @return an instance of the configuration model\n\t */\n\tConfigModel createInstanceOfConfigModel();\n\n\t/**\n\t * Create an inst... | [
"0.68790805",
"0.6873237",
"0.65752834",
"0.63041687",
"0.6247902",
"0.6226948",
"0.62068045",
"0.6162284",
"0.6162284",
"0.6162284",
"0.6162284",
"0.6162284",
"0.6162284",
"0.6162284",
"0.61381423",
"0.61332935",
"0.6091215",
"0.6059605",
"0.6038187",
"0.60307914",
"0.599369... | 0.8473132 | 0 |
Create an instance of the InstanceModel | InstanceModel createInstanceOfInstanceModel(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Instance createInstance();",
"public static void createInstance(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {\r\n\t\tBase.createInstance(model, RDFS_CLASS, instanceResource);\r\n\t}",
"public static void createInstance(Model model, Resource instanceResource) {\r\n\t\tBase.createInsta... | [
"0.69354236",
"0.6852859",
"0.6842841",
"0.6806089",
"0.6806089",
"0.6806089",
"0.6806089",
"0.6806089",
"0.6806089",
"0.6806089",
"0.6684592",
"0.6591086",
"0.6477545",
"0.6389888",
"0.6218472",
"0.6190598",
"0.6103778",
"0.60689646",
"0.60352916",
"0.5974136",
"0.5972932",
... | 0.8278118 | 0 |
Create an instance of the CsticModel | CsticModel createInstanceOfCsticModel(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"CsticGroupModel createInstanceOfCsticGroupModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"Model createModel();",
"public Model() {\n\t}",
"public Model() {\n\t}",
"EisModel createEisModel... | [
"0.7512577",
"0.704001",
"0.704001",
"0.704001",
"0.704001",
"0.704001",
"0.704001",
"0.704001",
"0.6822378",
"0.6822378",
"0.6732564",
"0.6713492",
"0.6699078",
"0.6699078",
"0.6699078",
"0.66849524",
"0.6593318",
"0.6506617",
"0.65018773",
"0.64474887",
"0.64299893",
"0.6... | 0.8513221 | 0 |
Create an instance of the CsticValueModel | CsticValueModel createInstanceOfCsticValueModel(int valueType); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"CsticModel createInstanceOfCsticModel();",
"public Value() {\n }",
"public Value(){}",
"CsticGroupModel createInstanceOfCsticGroupModel();",
"public Value() {}",
"public void createValue() {\r\n value = new com.timeinc.tcs.epay2.EPay2DTO();\r\n }",
"PriceModel createInstanceOfPriceModel();... | [
"0.69850993",
"0.6376699",
"0.6373766",
"0.6318889",
"0.6210637",
"0.6173505",
"0.6126496",
"0.60858524",
"0.60684294",
"0.5950768",
"0.5855114",
"0.5841221",
"0.5806323",
"0.57644963",
"0.5750209",
"0.57481927",
"0.57380587",
"0.5735687",
"0.57351375",
"0.57179743",
"0.56892... | 0.78739107 | 0 |
Create an instance of the CsticGroupModel | CsticGroupModel createInstanceOfCsticGroupModel(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public com.ext.portlet.model.ModelInputGroup create(long modelInputGroupPK);",
"public Group() {\n\n }",
"public Group() {\r\n\t}",
"public Group(){\n\n }",
"public CreateGroup() {\n initComponents();\n start();\n }",
"public static Group initGroupObject(){\n Group test_grou... | [
"0.6834892",
"0.67623335",
"0.6707187",
"0.66135144",
"0.65963364",
"0.65330136",
"0.6353332",
"0.6279134",
"0.61827123",
"0.61827123",
"0.60902286",
"0.60846907",
"0.5996427",
"0.5911234",
"0.59105814",
"0.5892235",
"0.579223",
"0.5762978",
"0.57587916",
"0.57515216",
"0.572... | 0.8736136 | 0 |
Create an instance of the PriceModel | PriceModel createInstanceOfPriceModel(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"PriceSummaryModel createInstanceOfPriceSummaryModel();",
"protected PricingModel() {\n }",
"@Valid\n\tvoid create(Price Price);",
"public ItemPrice() {\n }",
"PriceModel getZeroPriceModel();",
"public VKApiPrice() {\n\n }",
"public PriceBreakdown() {\n }",
"Model createModel();",
"M... | [
"0.78785515",
"0.7312293",
"0.71757805",
"0.6896648",
"0.6786506",
"0.651517",
"0.6389959",
"0.63255906",
"0.63255906",
"0.63255906",
"0.63255906",
"0.63255906",
"0.63255906",
"0.63255906",
"0.6291634",
"0.6276572",
"0.62289035",
"0.6222028",
"0.61676025",
"0.6148518",
"0.611... | 0.85631895 | 0 |
Create an instance of the SolvableConflictModel | SolvableConflictModel createInstanceOfSolvableConflictModel(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ConflictingAssumptionModel createInstanceOfConflictingAssumptionModel();",
"public ConflictDetector() {\n\t\tthis(getStrategy());\n\t}",
"GoalModel createGoalModel();",
"InstanceModel createInstanceOfInstanceModel();",
"public ModelBolting(){}",
"public Model doCreateModel() {\n Model m = m_baseMo... | [
"0.7275953",
"0.6050192",
"0.54182374",
"0.53022903",
"0.51863414",
"0.5144709",
"0.50851536",
"0.5057132",
"0.5057132",
"0.5057132",
"0.5057132",
"0.5057132",
"0.5057132",
"0.5057132",
"0.5024381",
"0.5019217",
"0.5019217",
"0.50167",
"0.5015178",
"0.49658954",
"0.4952766",
... | 0.88941646 | 0 |
Create an instance of the ConflictingAssumptionModel | ConflictingAssumptionModel createInstanceOfConflictingAssumptionModel(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"SolvableConflictModel createInstanceOfSolvableConflictModel();",
"GoalModel createGoalModel();",
"public Ambulance() {\n\t}",
"public ModelBolting(){}",
"AchievementModel createAchievementModel(AchievementModel achievementModel);",
"InstanceModel createInstanceOfInstanceModel();",
"@Test\r\n public ... | [
"0.6796718",
"0.54348385",
"0.529072",
"0.52351034",
"0.5178598",
"0.50555855",
"0.50438315",
"0.5006445",
"0.49960417",
"0.49540675",
"0.49507508",
"0.4936338",
"0.49192274",
"0.4893745",
"0.487424",
"0.48712873",
"0.4864446",
"0.47914708",
"0.47861695",
"0.47849068",
"0.477... | 0.87994486 | 0 |
Create an instance of the PriceModel | PriceModel getZeroPriceModel(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"PriceModel createInstanceOfPriceModel();",
"PriceSummaryModel createInstanceOfPriceSummaryModel();",
"protected PricingModel() {\n }",
"@Valid\n\tvoid create(Price Price);",
"public ItemPrice() {\n }",
"public VKApiPrice() {\n\n }",
"public PriceBreakdown() {\n }",
"Model createModel(... | [
"0.85631895",
"0.78785515",
"0.7312293",
"0.71757805",
"0.6896648",
"0.651517",
"0.6389959",
"0.63255906",
"0.63255906",
"0.63255906",
"0.63255906",
"0.63255906",
"0.63255906",
"0.63255906",
"0.6291634",
"0.6276572",
"0.62289035",
"0.6222028",
"0.61676025",
"0.6148518",
"0.61... | 0.6786506 | 5 |
Create an instance of the PriceSummaryModel | PriceSummaryModel createInstanceOfPriceSummaryModel(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"PriceModel createInstanceOfPriceModel();",
"protected PricingModel() {\n }",
"PriceModel getZeroPriceModel();",
"public ItemPrice() {\n }",
"public PriceBreakdown() {\n }",
"public ItemSummary() {\n }",
"@Valid\n\tvoid create(Price Price);",
"MetricModel createMetricModel();",
"public Pri... | [
"0.7284837",
"0.65168685",
"0.6135063",
"0.6060886",
"0.60581094",
"0.59478754",
"0.5799281",
"0.5778334",
"0.57105404",
"0.5649648",
"0.55782896",
"0.55423707",
"0.5521151",
"0.5482774",
"0.5482774",
"0.5482774",
"0.5482774",
"0.5482774",
"0.5482774",
"0.5482774",
"0.5453390... | 0.87182736 | 0 |
Create an instance of the VariantConditionModel | VariantConditionModel createInstanceOfVariantConditionModel(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Condition createCondition();",
"LogicCondition createLogicCondition();",
"BaseCondition createBaseCondition();",
"public SimpleCondition() {\n\n\t}",
"public Condition(ConditionManager condition)\r\n\t{\r\n\t\tthis.condition = condition;\r\n\t\tinit();\r\n\t}",
"public BTGConditionDTO()\n\t{\n\t\tsuper()... | [
"0.64135975",
"0.6255076",
"0.59978634",
"0.59540504",
"0.5931892",
"0.5816871",
"0.5779516",
"0.56628215",
"0.56506777",
"0.56427026",
"0.555005",
"0.5524201",
"0.5506605",
"0.5465134",
"0.5392762",
"0.5371446",
"0.536557",
"0.5326111",
"0.5280561",
"0.523718",
"0.5228593",
... | 0.8548586 | 0 |
TODO Autogenerated method stub | @Override
public List<Player> getPlayersByAge(int age) throws BusinessException {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<Player> getPlayersByCity(String city) throws BusinessException {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<Player> getPlayersByGender(String gender) throws BusinessException {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO: Warning this method won't work in the case the id fields are not set | @Override
public boolean equals(Object object) {
if (!(object instanceof Command)) {
return false;
}
Command other = (Command) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setId(Integer id) { this.id = id; }",
"private Integer getId() { return this.id; }",
"public void setId(int id){ this.id = id; }",
"public void setId(Long id) {this.id = id;}",
"public void setId(Long id) {this.id = id;}",
"public void setID(String idIn) {this.id = idIn;}",
"public void se... | [
"0.6896886",
"0.6838461",
"0.67056817",
"0.66419715",
"0.66419715",
"0.6592331",
"0.6579151",
"0.6579151",
"0.6574321",
"0.6574321",
"0.6574321",
"0.6574321",
"0.6574321",
"0.6574321",
"0.65624106",
"0.65624106",
"0.65441847",
"0.65243006",
"0.65154546",
"0.6487427",
"0.64778... | 0.0 | -1 |
Returns the expected keyword. | public org.eclipselabs.simpleocl.resource.simpleocl.grammar.SimpleoclSyntaxElement getSymtaxElement() {
return keyword;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getKeyword();",
"String getKeyword();",
"public java.lang.String getKeyword()\n {\n return keyword;\n }",
"public String getKeyword() {\r\n return keyword;\r\n }",
"public String getKeyword() {\n return keyword;\n }",
"public String getExpected() {\n retur... | [
"0.68852097",
"0.66106194",
"0.6406561",
"0.6363998",
"0.63047886",
"0.62977576",
"0.62812084",
"0.62223464",
"0.62188095",
"0.62144077",
"0.6180616",
"0.6056496",
"0.60166353",
"0.59923553",
"0.59642255",
"0.58799344",
"0.58696693",
"0.58537644",
"0.57591283",
"0.57145905",
... | 0.48700896 | 76 |
current distance from the root | private void indent(StringBuffer output, Node node) {
output.append("\n");
String lineNumber = (node == null) ? "" : "[" + node.getLine() + "]";
output.append(String.format("%5s ", lineNumber));
for (int i = 0; i < depth; ++i)
output.append(" ");
output.append("+-- ");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getFinalDistance(){\n return valori.get(end_node);\n }",
"double getDistance();",
"public double getDistance() { \n\t\treturn Math.pow(input.getAverageVoltage(), exp) * mul; \n\t}",
"public double distance(){\n return DistanceTraveled;\n }",
"public float getDistance(){\n... | [
"0.7226837",
"0.6865376",
"0.68082935",
"0.6786897",
"0.6757092",
"0.67534983",
"0.6728856",
"0.6668097",
"0.66679496",
"0.66679496",
"0.66451186",
"0.66323155",
"0.6620164",
"0.6611005",
"0.6589471",
"0.65669984",
"0.65294665",
"0.6526256",
"0.65165555",
"0.6495537",
"0.6466... | 0.0 | -1 |
String str = "(u(love)i)"; | public static void main(String[] args) {
String str = "(ed(et(oc))el)";
// String str = "(abcd)";
str = "ta()usw((((a))))";
//
//le(et(oc))de
//le(etco)de
// String[] arr = str.split("\\(");
// System.out.println(Arrays.toString(arr));
Solution solution = new Solution();
System.out.println(solution.reverseParentheses(str));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String hackerSpeak(String str) {\n\n String replace = str.replace(\"a\", \"4\").replace(\"e\", \"3\").replace(\"i\", \"1\").replace(\"o\", \"0\").replace(\"s\", \"5\");\n return replace;\n }",
"public static void main(String[] args) {\n\n \tString str = \"123abc你好efc\";\n\n \... | [
"0.59782577",
"0.59161115",
"0.5903178",
"0.57042533",
"0.5657723",
"0.5614543",
"0.53602195",
"0.53484374",
"0.5346798",
"0.533346",
"0.5325291",
"0.53192335",
"0.53145903",
"0.5270572",
"0.52701116",
"0.5263717",
"0.5259071",
"0.5244902",
"0.52410114",
"0.52279174",
"0.5220... | 0.5143172 | 25 |
method to insert user defined stock list or update | void insertOrUpdate(StockList stockList) throws Exception; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"stockFilePT102.StockDocument.Stock insertNewStock(int i);",
"@Override\n\tpublic void addInStock(Stock s) {\n\t\n\t}",
"int insert(ItemStockDO record);",
"int insert(ItemStockDO record);",
"int insertSelective(ItemStockDO record);",
"public void addStoreStock(String name, int amount);",
"public void se... | [
"0.71934056",
"0.6969349",
"0.69206667",
"0.69206667",
"0.67978746",
"0.6725413",
"0.67135864",
"0.6712184",
"0.66085744",
"0.6574456",
"0.65403265",
"0.6519175",
"0.6507048",
"0.6408273",
"0.63867176",
"0.6305674",
"0.63042635",
"0.6249952",
"0.62430364",
"0.62163943",
"0.62... | 0.8239847 | 0 |
fetch a single or multiple stock list | List<StockList> fetch(String title); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<StockList> fetchAll();",
"public List<StockItem> getStockList();",
"List<Stock> retrieveAllStocks(String symbol);",
"@Override\r\n\tpublic StockResponseModel getListOfStock() {\n\t\tStockResponseModel list = new StockResponseModel();\r\n\t\tList<StockEntities> stockRepoList = new ArrayList();\r\n\t\tLis... | [
"0.7848582",
"0.7485072",
"0.7225612",
"0.72103",
"0.7139481",
"0.67153347",
"0.6623127",
"0.65924907",
"0.6540856",
"0.6514597",
"0.64752567",
"0.6445606",
"0.6430225",
"0.64271134",
"0.64259255",
"0.64155906",
"0.6409139",
"0.6370075",
"0.629481",
"0.6291998",
"0.627383",
... | 0.8108194 | 0 |
fetch all of the user's stock lists. | List<StockList> fetchAll(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<StockItem> getStockList();",
"public List<StockFavorite> getListFavoriteStock(int userId);",
"public List<Stock> getAllStocks() {\n\n this.open();\n\n Cursor cursor = database.query(SQLiteHelper.TABLE_STOCK, allColumns, null, null, null, null, null);\n List<Stock> allStocks = n... | [
"0.69433725",
"0.6841752",
"0.66292685",
"0.65244573",
"0.6516595",
"0.64563143",
"0.64501363",
"0.6444759",
"0.6440891",
"0.64106023",
"0.6358039",
"0.62838626",
"0.61768484",
"0.61261433",
"0.6121003",
"0.6119492",
"0.6074521",
"0.60566723",
"0.6056305",
"0.6052407",
"0.598... | 0.715978 | 0 |
Reducing Operators > generally performed on finite set Conditional Operators > checks conditions | public static void main(String[] args) {
// count operator counter number of elements emmitted,
Observable<Integer> observable = Observable.just(1,2,3,4);
observable.count().subscribe(s->System.out.println(s));
// conditional opertors
// all() -> this operator checks condition for all values and returns false if any condition fails
observable.all(i->i<3).subscribe(s->System.out.println(s));
// any() -> this operator checks condition for all values and returns true if any condition is true
// empty() -> checks if observable have empty value and returns true/false
// contains() -> checks if specified item is contained/emmitted by observable
// sequenceEqual() -> checks if two sequences are equals (sequences contains same values)
observable.any(i->i<3).subscribe(s->System.out.println(s));
observable.filter(i->i<5).isEmpty().subscribe(s->System.out.println(s));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Object findOperatorNeedCheck();",
"boolean hasOperator();",
"protected boolean checkOperators()\n {\n Object loLeft ;\n Object loRight ;\n Object loOperator ;\n Object loConditionType ;\n boolean lboolOK = true ;\n\n for ( int liCtr = 1 ; liCtr <= 5 ; liCtr++ )\n {\n... | [
"0.726338",
"0.69809043",
"0.6757155",
"0.6688474",
"0.6504065",
"0.64402145",
"0.6184996",
"0.6167376",
"0.6153923",
"0.6153438",
"0.6092173",
"0.60617703",
"0.6055113",
"0.6055081",
"0.60488296",
"0.6014481",
"0.5955438",
"0.59482616",
"0.5924747",
"0.5919658",
"0.58990824"... | 0.0 | -1 |
store the values selected into a Calendar instance | @Override
public void onDateSet(DatePicker datePicker, int i, int i1, int i2) {
final Calendar c = Calendar.getInstance();
c.set(Calendar.YEAR, i);
c.set(Calendar.MONTH, i1);
c.set(Calendar.DAY_OF_MONTH, i2);
FilterFragment parentFrag = (FilterFragment) getTargetFragment();
parentFrag.onDatePass(c);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onSet(Calendar calendarSelected, Date dateSelected, int year,\n String monthFullName, String monthShortName, int monthNumber,\n int date, String weekDayFullName, String weekDayShortName,\n int hour24, int hour12, int min, int sec, String AM... | [
"0.6295115",
"0.6022221",
"0.6009509",
"0.59449303",
"0.5942713",
"0.591061",
"0.5893715",
"0.5893715",
"0.5871577",
"0.58404875",
"0.5809887",
"0.58092695",
"0.5793959",
"0.57897085",
"0.5787137",
"0.57638294",
"0.5754973",
"0.5751897",
"0.5723166",
"0.5708487",
"0.57043004"... | 0.0 | -1 |
Closes this input stream and releases any system resources associated with the stream; closes the method also. | @Override
public void close() throws IOException {
if (closed)
return; /* Allow multiple close calls */
closed = true;
try {
consume();
} finally {
super.close();
}
if (method != null)
method.close();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void closeStream() {\n output.close();\n input.close();\n }",
"@Override\n public void close() throws IOException {\n input.close();\n }",
"public void close() {\n\t\ttry {\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Overr... | [
"0.79279345",
"0.7767912",
"0.7595205",
"0.75555336",
"0.73307276",
"0.7190848",
"0.7122996",
"0.70553803",
"0.7044631",
"0.70355326",
"0.7008062",
"0.7004743",
"0.70011556",
"0.693755",
"0.6897453",
"0.6895465",
"0.6851754",
"0.6802819",
"0.67967653",
"0.6779326",
"0.6761761... | 0.6588985 | 29 |
umesto test bice zahtev za placanje | @RequestMapping(path="/initPaymentGet", method = RequestMethod.GET)//, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<Object> test() {
logger.info("Init payment");
//System.out.println("DTO: " + btcDTO.getPrice_currency());
String pom = "";
RestTemplate restTemplate = new RestTemplate();
HttpHeaders headers = new HttpHeaders();
headers.add("Authorization", "ab7fzPdN49-xBVoY_LdSifCZiVrqCbdcfjWdweJS");
ResponseEntity<String> responseEntity = new RestTemplate().exchange(CREATE_ORDER_API, HttpMethod.GET,
new HttpEntity<String>(pom, headers), String.class);
//restTemplate.getForEntity("https://google.rs", String.class);
//ResponseEntity<String> response = restTemplate.getForEntity("https://api-sandbox.coingate.com/v2/orders", String.class);
//ResponseEntity<String> response = restTemplate.postForEntity("https://api.coingate.com/v2/orders", btcDTO, String.class);
return new ResponseEntity<Object>(responseEntity,HttpStatus.OK);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\r\n public void elCerdoNoSePuedeAtender() {\n }",
"@Test\n public void testExistenceTestuJedneOsoby() {\n osBeznyMuz = new Osoba(120, 150, Barva.MODRA);\n testJedneOsoby(osBeznyMuz, 120, 150, 70, 140, Barva.MODRA);\n }",
"@Test\n public void testAvaaRuutu() {\n int x = 0;\n ... | [
"0.72357553",
"0.71027005",
"0.7090307",
"0.70712197",
"0.6994714",
"0.69840235",
"0.6983808",
"0.6948967",
"0.69318163",
"0.690746",
"0.68886006",
"0.68590146",
"0.6848844",
"0.6834203",
"0.6782526",
"0.67706895",
"0.6769539",
"0.67547244",
"0.6718854",
"0.67130864",
"0.6692... | 0.0 | -1 |
Metoda koja gadja Create Order na coingateu | @RequestMapping(path="/createOrder", method = RequestMethod.POST, produces = "application/json", consumes = "application/json")
public ResponseEntity<PaymentResponseDTO> createOrder(@RequestBody PaymentRequestDTO btcDTO) {
logger.info("Init payment");
SellerBitcoinInfo sbi = bitcoinRepo.findByidMagazine(btcDTO.getSellerId());
System.out.println("ADDRESS " + sbi.getBitcoinAddress());
String token = sbi.getBitcoinAddress();
String authToken = "Bearer " + token;
//trebali bismo da kreiramo transakciju koja ce biti u stanju "pending" sve dok korisnik ne plati ili mu ne istekne odredjeno vreme
//txRepo.save(tx);
//RestTemplate restTemplate = new RestTemplate();
//restTemplate.getForEntity("https://google.rs", String.class);
//restTemplate.getForEntity("https://api.coingate.com/v2/ping", String.class);
HttpHeaders headers = new HttpHeaders();
headers.add("Authorization", authToken);
System.out.println("Amount: " + btcDTO.getAmount());
CreateOrderRequestDTO order = new CreateOrderRequestDTO("1111", btcDTO.getAmount(), "BTC", "DO_NOT_CONVERT", "Title", "Description", "https://localhost:4200/success", "https://localhost:4200/failed", "https://localhost:4200/success", "token");
ResponseEntity<Object> responseEntity = new RestTemplate().exchange("https://api-sandbox.coingate.com/v2/orders", HttpMethod.POST,
new HttpEntity<Object>(order, headers), Object.class);
logger.info(responseEntity.getBody().toString());
ObjectMapper mapper = new ObjectMapper();
mapper.configure(Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);
BitCoinResponseDTO btcResponse = new BitCoinResponseDTO();
btcResponse = mapper.convertValue(responseEntity.getBody(), BitCoinResponseDTO.class);
String paymentUrl = btcResponse.getPayment_url();
logger.info(paymentUrl);
Tx tx = createTransaction(btcResponse,sbi);
txRepo.save(tx);
TxInfoDto txInfo = new TxInfoDto();
txInfo.setOrderId(btcDTO.getOrderId());
txInfo.setServiceWhoHandlePayment("https://localhost:8764/bitCoin");
txInfo.setPaymentId(tx.getorder_id()); //ovde se nalazi orderId koji je i na coingate-u
RestTemplate restTemplate = new RestTemplate();
ResponseEntity<TxInfoDto> r = restTemplate.postForEntity("https://localhost:8111/request/updateTxAfterPaymentInit", txInfo, TxInfoDto.class);
//BitCoinResponseDTO response = parser.parseList(responseEntity.getBody().toString());
//BitCoinResponseDTO responseDTO = responseEntity.;
//String pageToRedirec = responseDTO.getPayment_url();
//restTemplate.exchange
//ResponseEntity<String> response = restTemplate.postForEntity("https://api-sandbox.coingate.com/v2/orders", btcDTO, String.class);
PaymentResponseDTO responseDTO = new PaymentResponseDTO();
responseDTO.setPaymentUrl(paymentUrl);
responseDTO.setPaymentId(1l);
STATIC_ID = btcResponse.getId();
STATIC_TOKEN = authToken;
IS_CREATE = true;
//scheduleFixedDelayTask();
//scheduleFixedDelayTask(btcResponse.getId(), authToken);
return new ResponseEntity<PaymentResponseDTO>(responseDTO,HttpStatus.OK);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void create(Order order);",
"@Test\n\tpublic void createOrderTest() {\n\t\ttry {\n\t\t\tassertNull(salesOrderCtrl.getOrder());\n\t\t\tsalesOrderCtrl.createSalesOrder();\n\t\t\tassertNotNull(salesOrderCtrl.getOrder());\n\t\t} catch (Exception e) {\n\t\t\te.getMessage();\n\t\t}\n\t}",
"public void createNewOrder... | [
"0.7752912",
"0.71624124",
"0.70904136",
"0.70179087",
"0.69460696",
"0.69346756",
"0.69308794",
"0.6921919",
"0.69210726",
"0.6907669",
"0.6832976",
"0.68303335",
"0.6826795",
"0.6801275",
"0.6769019",
"0.6762509",
"0.67043394",
"0.67024493",
"0.6702062",
"0.66949016",
"0.66... | 0.6389261 | 37 |
/ Kreiranje transakcije na bekendu u momentu kad korisnik kreira | private Tx createTransaction(BitCoinResponseDTO btcDTO, SellerBitcoinInfo sbi) {
Tx tx = new Tx();
tx.setDate(new Date());
tx.setAmountOfMoney(btcDTO.getPrice_amount());
tx.setStatus(TxStatus.PENDING);
tx.setRecieverAddress(btcDTO.getPayment_url());
tx.setorder_id(btcDTO.getId()); //ovaj id je na coin gate-u i moram ga cuvati u transakciji
tx.setTxDescription("Porudzbina je kreirana od strane korisnika");
tx.setSbi(sbi);
//trebace ovde jos da se setuje id korisnika koji je kreirao porudzbinu kako bi kasnije mogao da getuje sve
//njegove transakcije
return tx;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public transaksi() {\n initComponents();\n judul();\n tampildata();\n judulbarang();\n tampilbarang();\n reset();\n autokode();\n total();\n lkembali.setText(\"Rp. 0\");\n bcek.requestFocus();\n ltgl.setText(hari); \n bhapus.setVi... | [
"0.6668743",
"0.60066307",
"0.5822365",
"0.5766976",
"0.566922",
"0.56686634",
"0.5661163",
"0.5656838",
"0.56464046",
"0.5635043",
"0.5519854",
"0.54968673",
"0.5491473",
"0.5480303",
"0.54712385",
"0.5444254",
"0.54421866",
"0.5426366",
"0.54187787",
"0.53576005",
"0.535345... | 0.5418567 | 19 |
/ Metoda za konkretno placanje, to be implemented | @RequestMapping(path="/checkout/{order_id}/{idMagazine}", method = RequestMethod.POST, produces = "application/json", consumes = "application/json")
public ResponseEntity<Object> checkout(@PathVariable Integer order_id, @PathVariable Long idMagazine) {
logger.info("Init checkout");
CheckoutResponseDTO checkoutDTO = new CheckoutResponseDTO();
SellerBitcoinInfo sbi = bitcoinRepo.findByidMagazine(idMagazine);
System.out.println("ADDRESS " + sbi.getBitcoinAddress());
String token = sbi.getBitcoinAddress();
String authToken = "Bearer " + token;
//trebali bismo da kreiramo transakciju koja ce biti u stanju "pending" sve dok korisnik ne plati ili mu ne istekne odredjeno vreme
//txRepo.save(tx);
//RestTemplate restTemplate = new RestTemplate();
//restTemplate.getForEntity("https://google.rs", String.class);
//restTemplate.getForEntity("https://api.coingate.com/v2/ping", String.class);
HttpHeaders headers = new HttpHeaders();
headers.add("Authorization", authToken);
ResponseEntity<Object> responseEntity = new RestTemplate().exchange("https://api-sandbox.coingate.com/v2/orders" + Integer.toString(order_id), HttpMethod.POST,
new HttpEntity<Object>(checkoutDTO, headers), Object.class);
logger.info(responseEntity.getBody().toString());
ObjectMapper mapper = new ObjectMapper();
mapper.configure(Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);
CheckoutResponseDTO btcResponse = new CheckoutResponseDTO();
btcResponse = mapper.convertValue(responseEntity.getBody(), CheckoutResponseDTO.class);
String paymentUrl = btcResponse.getPayment_url();
logger.info(paymentUrl);
//BitCoinResponseDTO response = parser.parseList(responseEntity.getBody().toString());
//BitCoinResponseDTO responseDTO = responseEntity.;
//String pageToRedirec = responseDTO.getPayment_url();
//restTemplate.exchange
//ResponseEntity<String> response = restTemplate.postForEntity("https://api-sandbox.coingate.com/v2/orders", btcDTO, String.class);
return new ResponseEntity<Object>(responseEntity,HttpStatus.OK);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"Petunia() {\r\n\t\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"p... | [
"0.66657645",
"0.65054893",
"0.64701366",
"0.6398407",
"0.6393092",
"0.63543695",
"0.63432807",
"0.6265124",
"0.62307096",
"0.62176293",
"0.6195965",
"0.6146808",
"0.61309886",
"0.6122964",
"0.61209697",
"0.61023116",
"0.6068367",
"0.6025106",
"0.6020756",
"0.6007963",
"0.600... | 0.0 | -1 |
/ Metoda koja svakih 2 min (15 sekundi radi demonstracije rada) proverava da li je transakcija prosla na coingateu. | @Scheduled(fixedDelay = 15000)
public void scheduleFixedDelayTask() {
List<Tx> listaTx = txRepo.findAll();
for (Tx tx : listaTx) {
if(tx.getStatus().equals(TxStatus.PENDING)) {
System.out.println(
"Fixed delay task - " + System.currentTimeMillis() / 20000);
//to be implemented
String auth = "Bearer " + tx.getSbi().getBitcoinAddress();
HttpHeaders headers = new HttpHeaders();
headers.add("Authorization", auth);
Integer orderId = tx.getorder_id();
GetOrderResponseDTO getOrderDTO = new GetOrderResponseDTO();
ResponseEntity<Object> responseEntity = new RestTemplate().exchange("https://api-sandbox.coingate.com/v2/orders/" + orderId, HttpMethod.GET,
new HttpEntity<Object>(getOrderDTO, headers), Object.class);
ObjectMapper mapper = new ObjectMapper();
mapper.configure(Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);
GetOrderResponseDTO gorResponse = new GetOrderResponseDTO();
gorResponse = mapper.convertValue(responseEntity.getBody(), GetOrderResponseDTO.class);
System.out.println("Order status: " + gorResponse.getStatus());
if(gorResponse.getStatus().equals("paid") ||
gorResponse.getStatus().equals("invalid") ||
gorResponse.getStatus().equals("expired") ||
gorResponse.getStatus().equals("canceled")) {
//naredne tri linije mi nisu nista jasne zasto sam ovo radio pre mesec dana
Tx tx2 = new Tx();
tx2 = txRepo.findByusername(gorResponse.getId());
System.out.println("TX: " + tx2.getorder_id());
RestTemplate restTemplate = new RestTemplate();
TxInfoDto txInfo;
if(gorResponse.getStatus().equals("paid")) {
tx.setStatus(TxStatus.PAID);
txInfo = new TxInfoDto(tx.getorder_id(), TxStatusReqHandler.SUCCESS, "https://localhost:8764/bitCoin");
} else if(gorResponse.getStatus().equals("invalid")) {
tx.setStatus(TxStatus.FAILED);
txInfo = new TxInfoDto(tx.getorder_id(), TxStatusReqHandler.FAILED, "https://localhost:8764/bitCoin");
} else if(gorResponse.getStatus().equals("expired")){
tx.setStatus(TxStatus.EXPIRED);
txInfo = new TxInfoDto(tx.getorder_id(), TxStatusReqHandler.FAILED, "https://localhost:8764/bitCoin");
} else {
tx.setStatus(TxStatus.CANCELED);
txInfo = new TxInfoDto(tx.getorder_id(), TxStatusReqHandler.ERROR, "https://localhost:8764/bitCoin");
}
txRepo.save(tx);
ResponseEntity<TxInfoDto> r = restTemplate.postForEntity("https://localhost:8111/request/updateTxAfterPaymentIsFinished", txInfo, TxInfoDto.class);
}
} else {
System.out.println("Nikom nista");
logger.info("Scheduled is working...");
}
}
System.out.println("Nema transakcija :(");
/* if(IS_CREATE) {
System.out.println(
"Fixed delay task - " + System.currentTimeMillis() / 20000);
String authToken = STATIC_TOKEN;
HttpHeaders headers = new HttpHeaders();
headers.add("Authorization", authToken);
System.out.println("authtoken : " + authToken);
GetOrderResponseDTO getOrderDTO = new GetOrderResponseDTO();
ResponseEntity<Object> responseEntity = new RestTemplate().exchange("https://api-sandbox.coingate.com/v2/orders/" + STATIC_ID, HttpMethod.GET,
new HttpEntity<Object>(getOrderDTO, headers), Object.class);
ObjectMapper mapper = new ObjectMapper();
mapper.configure(Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);
GetOrderResponseDTO gorResponse = new GetOrderResponseDTO();
gorResponse = mapper.convertValue(responseEntity.getBody(), GetOrderResponseDTO.class);
System.out.println("Order status: " + gorResponse.getStatus());
if(gorResponse.getStatus().equals("paid") || gorResponse.getStatus().equals("invalid") || gorResponse.getStatus().equals("expired")) {
/*Tx tx = new Tx();
tx = txRepo.findByOrder_Id(gorResponse.getId());
System.out.println("TX: " + tx.getorder_id());
if(gorResponse.getStatus().equals("paid")) {
//promenimo u bazi
//txRepo.getOne((Integer)gorResponse.getId());
tx.setStatus(TxStatus.PAID);
} else if(gorResponse.getStatus().equals("invalid")) {
tx.setStatus(TxStatus.FAILED);
} else {
tx.setStatus(TxStatus.EXPIRED);
}
txRepo.save(tx);*/
/*
IS_CREATE = false;
}
} else {
System.out.println("Nikom nista");
logger.info("Scheduled is working...");
}*/
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public transaksi() {\n initComponents();\n judul();\n tampildata();\n judulbarang();\n tampilbarang();\n reset();\n autokode();\n total();\n lkembali.setText(\"Rp. 0\");\n bcek.requestFocus();\n ltgl.setText(hari); \n bhapus.setVi... | [
"0.5769956",
"0.5754285",
"0.5690234",
"0.56901747",
"0.56510216",
"0.559834",
"0.55163443",
"0.55095404",
"0.55068296",
"0.54266435",
"0.541386",
"0.53151274",
"0.53005683",
"0.52976197",
"0.52579063",
"0.5257371",
"0.52467275",
"0.52355766",
"0.52031636",
"0.5191",
"0.51841... | 0.53170794 | 11 |
This method was generated by MyBatis Generator. This method returns the value of the database column his_books.id | public Long getId() {
return id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Id \n\t@Basic( optional = false )\n\t@Column( name = \"book_id\", nullable = false )\n\tpublic Integer getId() {\n\t\treturn this.id;\n\t\t\n\t}",
"public Integer getBookId() {\n return bookId;\n }",
"public Integer getBookId() {\n return bookId;\n }",
"public Integer getBookId() {\n ... | [
"0.74005157",
"0.70494276",
"0.70494276",
"0.70494276",
"0.684052",
"0.684052",
"0.6831318",
"0.6698455",
"0.6655966",
"0.6655966",
"0.6632953",
"0.65617645",
"0.64466304",
"0.63848734",
"0.6167155",
"0.60877895",
"0.6058332",
"0.6058332",
"0.6058332",
"0.6025148",
"0.6023869... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method sets the value of the database column his_books.id | public void setId(Long id) {
this.id = id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setBook_id(int book_id) {\n\tthis.book_id = book_id;\n}",
"public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }",
"public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }",
"public void setBookId(Integer bookId) {\n this.bookId = bookId;\n ... | [
"0.70415163",
"0.69763285",
"0.69763285",
"0.69577694",
"0.69577694",
"0.69577694",
"0.68400466",
"0.6617363",
"0.65705943",
"0.6487159",
"0.6345207",
"0.6294231",
"0.6294231",
"0.6294231",
"0.6189749",
"0.61583525",
"0.61370385",
"0.6130293",
"0.6122628",
"0.6118547",
"0.609... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method returns the value of the database column his_books.book_id | public String getBookId() {
return bookId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Id \n\t@Basic( optional = false )\n\t@Column( name = \"book_id\", nullable = false )\n\tpublic Integer getId() {\n\t\treturn this.id;\n\t\t\n\t}",
"public Integer getBookId() {\n return bookId;\n }",
"public Integer getBookId() {\n return bookId;\n }",
"public Integer getBookId() {\n ... | [
"0.73189634",
"0.7224461",
"0.7224461",
"0.7224461",
"0.69543624",
"0.6929713",
"0.6929713",
"0.69133466",
"0.68609273",
"0.68609273",
"0.680068",
"0.660998",
"0.6561413",
"0.63306075",
"0.63306075",
"0.63306075",
"0.6311156",
"0.6233314",
"0.6214165",
"0.62063694",
"0.619135... | 0.6801529 | 10 |
This method was generated by MyBatis Generator. This method sets the value of the database column his_books.book_id | public void setBookId(String bookId) {
this.bookId = bookId == null ? null : bookId.trim();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setBook_id(int book_id) {\n\tthis.book_id = book_id;\n}",
"public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }",
"public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }",
"public void setBookId(Integer bookId) {\n this.bookId = bookId;\n ... | [
"0.73523825",
"0.7339667",
"0.7339667",
"0.7339667",
"0.7167013",
"0.7167013",
"0.7071279",
"0.70416766",
"0.69810086",
"0.6947988",
"0.6686892",
"0.6456409",
"0.6456409",
"0.6456409",
"0.6356477",
"0.6328188",
"0.6287344",
"0.62328166",
"0.62289006",
"0.62289006",
"0.622777"... | 0.66826 | 11 |
This method was generated by MyBatis Generator. This method returns the value of the database column his_books.sta_date | public Long getStaDate() {
return staDate;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.sql.Timestamp getStatusdate()\n {\n return statusdate; \n }",
"public Date getBDate(){\n \treturn bDate;\n }",
"public String getDate(){ return this.start_date;}",
"public Timestamp getStatementDate();",
"public String Get_date() \n {\n \n return date;\n }",
"... | [
"0.62003726",
"0.60077417",
"0.59405214",
"0.59318423",
"0.5885333",
"0.5851686",
"0.5803021",
"0.57731855",
"0.57568115",
"0.57515943",
"0.57368344",
"0.5731691",
"0.572385",
"0.57049584",
"0.5704375",
"0.56953174",
"0.56902796",
"0.568769",
"0.56737804",
"0.5656979",
"0.562... | 0.6384408 | 0 |
This method was generated by MyBatis Generator. This method sets the value of the database column his_books.sta_date | public void setStaDate(Long staDate) {
this.staDate = staDate;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setDate(Date date) {\r\n \t\tthis.startDate = date;\r\n \t}",
"public void setStartDate(Date s);",
"public void setDate(java.util.Date param){\n \n this.localDate=param;\n \n\n ... | [
"0.62738156",
"0.62688994",
"0.6185875",
"0.6153973",
"0.6052556",
"0.6016958",
"0.59754974",
"0.595104",
"0.59481007",
"0.5934889",
"0.5926441",
"0.59151673",
"0.5900479",
"0.5896253",
"0.5896253",
"0.5896253",
"0.5896253",
"0.5896253",
"0.5896253",
"0.5896253",
"0.5896253",... | 0.66907686 | 0 |
This method was generated by MyBatis Generator. This method returns the value of the database column his_books.end_date | public Long getEndDate() {
return endDate;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.sql.Date getEndDate() {\n\treturn endDate;\n}",
"Date getEndDate();",
"Date getEndDate();",
"public Date getEndDate();",
"public Date getEndDate();",
"public String getEndDate(){\n\t\treturn this.endDate;\n\t}",
"public Date getEndDate()\r\n {\r\n return this.endDate;\r\n }",
... | [
"0.74253416",
"0.7136413",
"0.7136413",
"0.71118355",
"0.71118355",
"0.7103675",
"0.7079833",
"0.7061188",
"0.70584637",
"0.6985205",
"0.6974339",
"0.69551563",
"0.6941296",
"0.6930038",
"0.6888746",
"0.6888746",
"0.68518084",
"0.68518084",
"0.68193495",
"0.68193495",
"0.6819... | 0.681123 | 23 |
This method was generated by MyBatis Generator. This method sets the value of the database column his_books.end_date | public void setEndDate(Long endDate) {
this.endDate = endDate;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setEndDate(java.sql.Date newEndDate) {\n\tendDate = newEndDate;\n}",
"public void setEndDate(java.util.Date value);",
"public void setEndDate(Date end)\r\n {\r\n this.endDate = end;\r\n }",
"void setEndDate(Date endDate);",
"public void setEndDate(Date value) {\r\n this.endD... | [
"0.77520216",
"0.74122137",
"0.7404591",
"0.7359827",
"0.73563945",
"0.73513865",
"0.72035986",
"0.72035986",
"0.71296364",
"0.71296364",
"0.71296364",
"0.7085455",
"0.70220125",
"0.6992979",
"0.6976782",
"0.6976782",
"0.6884358",
"0.6873224",
"0.683536",
"0.6834843",
"0.6709... | 0.6942347 | 16 |
This method was generated by MyBatis Generator. This method returns the value of the database column his_books.account_id | public String getAccountId() {
return accountId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Column(name = \"ACCOUNT_ID\")\n\tpublic String getAccountID()\n\t{\n\t\treturn accountID;\n\t}",
"public Long getAccountID() {\n return accountID;\n }",
"public Long getAccountID() {\n return accountID;\n }",
"public Long getAccountID() {\n return accountID;\n }",
"public Long getAccountID... | [
"0.6854262",
"0.6815324",
"0.6815324",
"0.6709417",
"0.6709417",
"0.66452223",
"0.66452223",
"0.6620855",
"0.6610454",
"0.65950406",
"0.65848666",
"0.635162",
"0.63377655",
"0.6256175",
"0.6235676",
"0.62331206",
"0.6207809",
"0.6190923",
"0.6175487",
"0.6149299",
"0.61252373... | 0.55913323 | 74 |
This method was generated by MyBatis Generator. This method sets the value of the database column his_books.account_id | public void setAccountId(String accountId) {
this.accountId = accountId == null ? null : accountId.trim();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setAccountID(Long value) {\n this.accountID = value;\n }",
"public void setAccountID(Long value) {\n this.accountID = value;\n }",
"public void setC_BankAccount_ID (int C_BankAccount_ID);",
"public void setAccount_Id(java.lang.String account_Id) {\n this.account_Id = account_Id;\n ... | [
"0.65597063",
"0.65597063",
"0.64080405",
"0.61247855",
"0.60074663",
"0.59815264",
"0.59006655",
"0.5805233",
"0.580516",
"0.5793683",
"0.5788722",
"0.5765574",
"0.5754869",
"0.5754869",
"0.5749467",
"0.5718476",
"0.5717143",
"0.5710633",
"0.5705402",
"0.56950957",
"0.569509... | 0.5093549 | 85 |
This interface helps us to write JPA methods and get the relevant data from the data base. | @Repository
public interface CouponRepository extends JpaRepository<Coupon , Integer> {
/**
* This method finds specific coupon by using the company id and the title of coupon.
* @param companyId of the company that create this coupon
* @param title of the coupon
* @return Coupon object
*/
Coupon findByCompanyIdAndTitle(int companyId, String title);
/**
* This method find coupon by company id.
* The method helps us to get all of the coupons of specific company.
* @param companyId of the relevant company
* @return List of all the company coupons.
*/
List<Coupon> findByCompanyId(int companyId);
/**
* Find all the coupons until the inserted date.
* @param date defines the coupons list by the inserted date.
* @return list of all the coupons until the inserted date.
*/
List<Coupon> findByEndDateBefore(Date date);
/**
* The method finds the coupons with the id and the category that the company inserted.
* @param companyId of the logged in company.
* @param category of the coupon.
* @return a Coupon list by categories that the user or the company inserted.
*/
List<Coupon> findByCompanyIdAndCategory(int companyId, Category category);
/**
* The method finds the coupons with the id and the price that the company inserted.
* @param companyId of the logged in company.
* @param price of the coupon.
* @return a Coupon list by price that the user or the company inserted.
*/
List<Coupon> findByCompanyIdAndPriceLessThanEqual(int companyId, double price);
/**
* This repo responsible to get coupons by category.
* @param category of the coupons will be shown.
* @return list of the relevant coupons.
*/
List<Coupon> findByCategory(Category category);
/**
* This repo responsible to get coupons by maximum price.
* @param maxPrice of the coupons will be shown.
* @return list of the relevant coupons.
*/
List<Coupon> findByPrice(double maxPrice);
/**
* Sort the coupons by start date.
* We use this repo in the main page of the website.
* @return sorted list of the coupons.
*/
List<Coupon> findByOrderByStartDateDesc();
/**
* Sort the coupons by the most purchased coupons.
* We use this repo in the main page of the website.
* @return sorted list of the most popular coupons.
*/
@Query(value = "SELECT coupons_id FROM customers_coupons ORDER BY coupons_id ASC", nativeQuery = true)
List<Integer> findByPopularity();
/**
* Get all coupons that contains the search word.
* @param searchWord that the user search for.
* @return list of the filtered coupons.
*/
List<Coupon> findByTitleContaining(String searchWord);
/**
* Count all the coupons in the data base.
* @return number of the coupons in the database.
*/
@Query(value = "SELECT COUNT(*) FROM coupons", nativeQuery = true)
int countAllCoupons();
/**
* Count all the purchased coupons.
* @return number of the purchased coupons.
*/
@Query(value = "SELECT COUNT(*) FROM customers_coupons", nativeQuery = true)
int countAllCouponsPurchased();
/**
* Count all the coupons of specific company.
* @param companyId of the coupons
* @return number of the counted coupons.
*/
int countByCompanyId(int companyId);
/**
* Count all the coupons that purchased of specific company.
* @param companyId of the coupons.
* @return number of the counted coupons.
*/
@Query(value = "SELECT COUNT(*) FROM customers_coupons AS cvc INNER JOIN coupons AS c On cvc.coupons_id = c.id WHERE company_id = ?1" , nativeQuery = true)
int countAllCouponsPurchasedByCompany(int companyId);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"EntityData<?> getEntityData();",
"public interface AnutaEntityManager {\n\n /**\n * Saves entity in database\n * @param entity the entity to be saved\n * @param <T> the type if target entity\n * @return saved entity\n */\n public <T> T save(T entity);\n\n /**\n * Loads the entity... | [
"0.6665456",
"0.6452626",
"0.6440311",
"0.63725066",
"0.63365597",
"0.6328946",
"0.63196343",
"0.62265027",
"0.6224712",
"0.62191963",
"0.6170657",
"0.6164879",
"0.61644113",
"0.61607134",
"0.61599874",
"0.6151091",
"0.6136217",
"0.6131767",
"0.6087035",
"0.6076061",
"0.60573... | 0.0 | -1 |
This method finds specific coupon by using the company id and the title of coupon. | Coupon findByCompanyIdAndTitle(int companyId, String title); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<Coupon> findByCompanyId(int companyId);",
"List<Coupon> findByCompanyIdAndCategory(int companyId, Category category);",
"@WebMethod public boolean findCoupon(String coupon);",
"public Coupon addCoupon(Coupon coupon) throws CompanyDoesntExistException, CouponTitleAlreadyExistInThisCompanyException {\n ... | [
"0.72125715",
"0.67231685",
"0.6697886",
"0.6466871",
"0.6394164",
"0.6379336",
"0.6340856",
"0.6200164",
"0.61624867",
"0.61541975",
"0.61244947",
"0.605193",
"0.5993589",
"0.5970783",
"0.5957796",
"0.594309",
"0.5937681",
"0.5916306",
"0.59101415",
"0.5856396",
"0.57943016"... | 0.8151132 | 0 |
This method find coupon by company id. The method helps us to get all of the coupons of specific company. | List<Coupon> findByCompanyId(int companyId); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<Coupon> findByCompanyIdAndCategory(int companyId, Category category);",
"Coupon findByCompanyIdAndTitle(int companyId, String title);",
"List<Coupon> findByCompanyIdAndPriceLessThanEqual(int companyId, double price);",
"public Collection<Coupon> getCompanyCoupons() {\n return couponRepo.findCoupo... | [
"0.72295386",
"0.72290605",
"0.7063595",
"0.7029383",
"0.68121016",
"0.6732355",
"0.67047423",
"0.6697661",
"0.6664465",
"0.6647086",
"0.6477057",
"0.64570546",
"0.63912326",
"0.63613653",
"0.6247738",
"0.62022823",
"0.6188502",
"0.6171246",
"0.61663103",
"0.6162327",
"0.6147... | 0.8026537 | 0 |
Find all the coupons until the inserted date. | List<Coupon> findByEndDateBefore(Date date); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t/**\n\t * Returns all Coupons with end date up to value method received as an array\n\t * list sorted descended\n\t */\n\tpublic Collection<Coupon> getCouponsByDate(Date date, int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n... | [
"0.6087108",
"0.57188237",
"0.54081625",
"0.53688526",
"0.5360928",
"0.5187247",
"0.5111332",
"0.50765085",
"0.5023892",
"0.5007181",
"0.49903187",
"0.49242198",
"0.48711276",
"0.4845535",
"0.48454365",
"0.47924012",
"0.4789846",
"0.47673282",
"0.47097445",
"0.47047988",
"0.4... | 0.5652332 | 2 |
The method finds the coupons with the id and the category that the company inserted. | List<Coupon> findByCompanyIdAndCategory(int companyId, Category category); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Collection<Coupon> getCompanyCoupons(Category category) {\n return couponRepo.findByCompanyIDAndCategory(this.companyID, category);\n }",
"public ArrayList<Coupon> getCompanyCoupons(Category category) throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons();\r\n\t\tArr... | [
"0.67081386",
"0.6700891",
"0.65301526",
"0.6431999",
"0.6324561",
"0.6223688",
"0.62233746",
"0.6214647",
"0.6165078",
"0.61588603",
"0.6129093",
"0.6090391",
"0.5937412",
"0.5785573",
"0.5673377",
"0.5634736",
"0.5607726",
"0.559886",
"0.5584461",
"0.55759925",
"0.5574592",... | 0.6829888 | 0 |
The method finds the coupons with the id and the price that the company inserted. | List<Coupon> findByCompanyIdAndPriceLessThanEqual(int companyId, double price); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t/**\n\t * Returns all Coupons with price less than value method received as an\n\t * array list sorted descended\n\t */\n\tpublic Collection<Coupon> getCouponsByPrice(int price, int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool... | [
"0.7159053",
"0.6989906",
"0.65374863",
"0.6435685",
"0.6133209",
"0.61144674",
"0.6083278",
"0.5996305",
"0.59931",
"0.59480304",
"0.5942474",
"0.5932923",
"0.59140265",
"0.5890776",
"0.57997966",
"0.579331",
"0.57556766",
"0.5751916",
"0.57449317",
"0.5697694",
"0.5678354",... | 0.7152454 | 1 |
This repo responsible to get coupons by category. | List<Coupon> findByCategory(Category category); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<Coupon> findAllByCategory(Category category);",
"public Collection<Coupon> getCompanyCoupons(Category category) {\n return couponRepo.findByCompanyIDAndCategory(this.companyID, category);\n }",
"public ArrayList<Coupon> getCompanyCoupons(Category category) throws SQLException {\r\n\t\tArrayList<... | [
"0.7206294",
"0.7127971",
"0.68940586",
"0.6864294",
"0.6412646",
"0.6354328",
"0.6343832",
"0.6166599",
"0.6158319",
"0.61553866",
"0.6136251",
"0.6035071",
"0.5935109",
"0.59341073",
"0.5921154",
"0.5916387",
"0.59128726",
"0.58889025",
"0.58872026",
"0.58865356",
"0.588253... | 0.7412467 | 0 |
This repo responsible to get coupons by maximum price. | List<Coupon> findByPrice(double maxPrice); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Collection<Coupon> getCompanyCoupons(double maxPrice) {\n return couponRepo.findCouponsByCompanyIDAndPriceLessThanEqual(this.companyID, maxPrice);\n }",
"public ArrayList<Coupon> getCompanyCoupons(double maxPrice) throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons(... | [
"0.7165119",
"0.7123694",
"0.697116",
"0.6882793",
"0.66843426",
"0.6504569",
"0.6486196",
"0.64392585",
"0.6439003",
"0.63686746",
"0.6357414",
"0.62594974",
"0.61659217",
"0.6093147",
"0.6085897",
"0.6050502",
"0.6038399",
"0.60015184",
"0.5997913",
"0.5994489",
"0.5973625"... | 0.8212249 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.