query stringlengths 7 33.1k | document stringlengths 7 335k | metadata dict | negatives listlengths 3 101 | negative_scores listlengths 3 101 | document_score stringlengths 3 10 | document_rank stringclasses 102
values |
|---|---|---|---|---|---|---|
Method to call operation for insert text | public void insert(String text) {
cmd = new InsertCommand(text, editor);
invoker = new MiniEditorInvoker(cmd);
invoker.action();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void insert(String text, AttributeSet style) {\r\n\t\ttry {\r\n\t\t\tdocument.insertString(getCaretPosition(), text, style);\r\n\t\t} catch (BadLocationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@Override\n\t\tpublic void addText(String txt) {\n\t\t\t\n\t\t}",
"public void insertSt... | [
"0.68558985",
"0.66969365",
"0.65363926",
"0.6500963",
"0.6482706",
"0.64108133",
"0.6376596",
"0.6373188",
"0.6347923",
"0.63112485",
"0.62763166",
"0.61882776",
"0.61236286",
"0.61211413",
"0.6107257",
"0.60908806",
"0.6072882",
"0.6071305",
"0.6032301",
"0.5950214",
"0.593... | 0.7707553 | 0 |
Method to call operation for select text | public void select(int start, int end) {
cmd = new SelectCommand(start, end, editor);
invoker = new MiniEditorInvoker(cmd);
invoker.action();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public native final <T> Selection text(String value)/*-{\n\t\treturn this.text(value);\n\t}-*/;",
"public native final Selection text(final DatumFunction<String> callback) /*-{\n\t\treturn this\n\t\t\t\t.text(function(d, i) {\n\t\t\t\t\treturn callback.@com.github.gwtd3.api.functions.DatumFunction::apply(Lcom/go... | [
"0.7148903",
"0.68439716",
"0.6767826",
"0.6767826",
"0.6654559",
"0.6637434",
"0.66157347",
"0.6502107",
"0.646459",
"0.64084363",
"0.6379876",
"0.6378019",
"0.62857646",
"0.6282028",
"0.62157774",
"0.6172404",
"0.6168642",
"0.61556274",
"0.6096721",
"0.606802",
"0.60328174"... | 0.57378095 | 38 |
Method to call operation for copy text | public void copy() {
cmd = new CopyCommand(editor);
invoker = new MiniEditorInvoker(cmd);
invoker.action();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void performCopy() {\n \t\ttext.copy();\n \t}",
"public void onTextCopy()\n\t{\n\t}",
"public void copyText() {\n ((ClipboardManager) getActivity().getSystemService(\"clipboard\")).setPrimaryClip(ClipData.newPlainText(\"textFromCoolapk\", this.mBinding.text.getText()));\n Toast.show(getAct... | [
"0.793822",
"0.7465726",
"0.7207244",
"0.7056759",
"0.67021596",
"0.6443375",
"0.6413307",
"0.6412645",
"0.6407765",
"0.63981944",
"0.6250882",
"0.6221765",
"0.62206423",
"0.6152328",
"0.61404717",
"0.60533",
"0.60068184",
"0.59874725",
"0.59415966",
"0.59155804",
"0.5915283"... | 0.6379855 | 10 |
Method to call operation for cut text | public void cut() {
cmd = new CutCommand(editor);
invoker = new MiniEditorInvoker(cmd);
invoker.action();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onTextCut()\n\t{\n\t}",
"public void performCut() {\n \t\ttext.cut();\n \t\tcheckSelection();\n \t\tcheckDeleteable();\n \t\tcheckSelectable();\n \t}",
"public void cutSelection() {\r\n \t\t// Bertoli Marco\r\n \t\tclipboard.cut();\r\n \t}",
"public void cut(final int p0, final int p1) {\n ... | [
"0.7799008",
"0.7625799",
"0.6388251",
"0.61186916",
"0.60666215",
"0.5999128",
"0.5866894",
"0.58488727",
"0.56059325",
"0.5589746",
"0.5571445",
"0.54925215",
"0.54467887",
"0.53462666",
"0.53219604",
"0.53181654",
"0.5296018",
"0.529069",
"0.52852154",
"0.52217287",
"0.520... | 0.64087576 | 2 |
Method to call operation for paste text | public void paste() {
cmd = new PasteCommand(editor);
invoker = new MiniEditorInvoker(cmd);
invoker.action();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void performPaste() {\n \t\ttext.paste();\n \t\tcheckSelection();\n \t\tcheckDeleteable();\n \t\tcheckSelectable();\n \t}",
"public void pasteText(){\n try{\n CharSequence text = mClipboardManager.getTextFromClipboard();\n if(text != null && mConnection != null){\n ... | [
"0.7854951",
"0.7755361",
"0.7475482",
"0.721923",
"0.70290637",
"0.69604063",
"0.6843364",
"0.6831503",
"0.670197",
"0.6656253",
"0.6628329",
"0.6610946",
"0.6606266",
"0.6554626",
"0.6538986",
"0.6506413",
"0.6480726",
"0.63831824",
"0.6377591",
"0.6374312",
"0.63645834",
... | 0.74190396 | 3 |
Method to call operation for delete text | public void delete() {
cmd = new DeleteCommand(editor);
invoker = new MiniEditorInvoker(cmd);
invoker.action();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void performDelete() {\n \t\tif (text.getSelectionCount() > 0)\n \t\t\ttext.insert(StringStatics.BLANK);\n \t\telse {\n \t\t\t// remove the next character\n \t\t\tint pos = text.getCaretPosition();\n \t\t\tif (pos < text.getCharCount()) {\n \t\t\t\ttext.setSelection(pos, pos + 1);\n \t\t\t\ttext.insert(Stri... | [
"0.66406405",
"0.6596173",
"0.6577691",
"0.6477343",
"0.6337705",
"0.6337615",
"0.63162875",
"0.62906265",
"0.6229601",
"0.62071013",
"0.6201003",
"0.61753255",
"0.6173185",
"0.6144884",
"0.60931027",
"0.6085038",
"0.6081478",
"0.60764533",
"0.60737133",
"0.60608935",
"0.6049... | 0.59440374 | 26 |
Method to call operation for start recording | public void startRecord() {
cmd = new StartRecordCommand(editor);
invoker = new MiniEditorInvoker(cmd);
invoker.action();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void startRecording() {\n\n }",
"void startRecording() {\n synchronized (serviceConnection) {\n startNewTrackRequested = true;\n serviceConnection.startAndBind();\n \n // Binding was already requested before, it either already happened\n // (in which case running the callba... | [
"0.78367525",
"0.7101533",
"0.6925923",
"0.68848765",
"0.68755555",
"0.662867",
"0.650046",
"0.6481989",
"0.6386355",
"0.6372617",
"0.62636155",
"0.62215877",
"0.6182795",
"0.6125158",
"0.6114662",
"0.6067741",
"0.6060718",
"0.6044741",
"0.60104537",
"0.5987736",
"0.59766155"... | 0.65507865 | 6 |
Method to call operation for stop recording | public void stopRecord() {
cmd = new StopRecordCommand(editor);
invoker = new MiniEditorInvoker(cmd);
invoker.action();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void stopRecording() {\n\n }",
"public void StopRecording()\n {\n handler.stopRecording();\n\n }",
"private void stopRecording() {\n recoTransaction.stopRecording();\n }",
"public void stop() {\r\n\t\tisRecording = false;\r\n\t}",
"File stopRecording();",
"TimeInstrument... | [
"0.80225474",
"0.78619266",
"0.77146465",
"0.76713675",
"0.7428005",
"0.73527706",
"0.7350856",
"0.7243132",
"0.723059",
"0.72104007",
"0.7178489",
"0.7143963",
"0.711692",
"0.711692",
"0.711692",
"0.711692",
"0.711692",
"0.711692",
"0.711692",
"0.711692",
"0.711692",
"0.71... | 0.71742415 | 11 |
Method to call operation for replaying | public void replay() {
cmd = new ReplayRecordCommand(editor);
invoker = new MiniEditorInvoker(cmd);
invoker.action();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void replayNextOp() {\n\t\topNum++;\n\t\tif (opNum > ops.length) {\n\t\t\topNum = -1;\n\t\t\tupdate();\n\t\t} else if (!getExited()) {\n\t\t\tjavax.swing.SwingUtilities.invokeLater(doReplayNextOp);\n\t\t}\n\t}",
"private void play() {\n\t\tParcel pc = Parcel.obtain();\n\t\tParcel pc_reply = Parcel.obtain... | [
"0.6497798",
"0.63814116",
"0.61275023",
"0.58168226",
"0.5693962",
"0.56478035",
"0.56263703",
"0.5537254",
"0.5513309",
"0.54995555",
"0.54915667",
"0.54858",
"0.5480367",
"0.54724073",
"0.5471923",
"0.5467645",
"0.5427843",
"0.5413941",
"0.5383694",
"0.5381399",
"0.5373891... | 0.6726112 | 0 |
Method to call operation for undo | public void undo() {
cmd = new UndoCommand(editor);
invoker = new MiniEditorInvoker(cmd);
invoker.action();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract void internalUndo();",
"void undo();",
"public abstract void undo();",
"public void undo() {\n }",
"@Override\n T undo();",
"public void undoAction(){}",
"public void undo() {\n\t\t\r\n\t}",
"public void undo() throws CannotUndoException;",
"@Override\n\tpublic void undo() {\... | [
"0.8478818",
"0.8469834",
"0.8380741",
"0.83379406",
"0.8291451",
"0.8211344",
"0.80587906",
"0.8002802",
"0.7917927",
"0.7917927",
"0.7917927",
"0.7894641",
"0.78878206",
"0.78878206",
"0.7814287",
"0.78014576",
"0.77938575",
"0.77280164",
"0.76928324",
"0.76838416",
"0.7646... | 0.7687506 | 19 |
Method to call operation for redo | public void redo() {
cmd = new RedoCommand(editor);
invoker = new MiniEditorInvoker(cmd);
invoker.action();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void redo();",
"public abstract void redo();",
"public void redo() {\n\t\t\n\t}",
"@Override\n\tpublic void redo() {\n\t\t\n\t}",
"@Override\n public void redo() {\n\n }",
"public void redoAction() {\n executeAction();\n }",
"public void redo() throws CannotRedoException;",
"public St... | [
"0.8410086",
"0.84021723",
"0.83095425",
"0.8214474",
"0.81907994",
"0.78840965",
"0.7841203",
"0.7829721",
"0.78052443",
"0.7726673",
"0.7672025",
"0.75422955",
"0.7517385",
"0.7509688",
"0.7474329",
"0.7435631",
"0.73889977",
"0.73633885",
"0.73042226",
"0.7278587",
"0.7276... | 0.7262787 | 22 |
Method to call operation for read from file. | public void open(String filePath) {
cmd = new OpenCommand(editor, filePath);
invoker = new MiniEditorInvoker(cmd);
invoker.action();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void readFromFile() {\n\n\t}",
"public void readFile();",
"protected abstract void readFile();",
"public abstract void readFromFile( ) throws Exception;",
"public void performOperation() {\n processFile(this.scopedFile);\n }",
"protected abstract E readFile() throws Exception;",
"publi... | [
"0.64554816",
"0.6182953",
"0.60658556",
"0.60542345",
"0.59975296",
"0.5970082",
"0.59692496",
"0.58923244",
"0.5808895",
"0.58008105",
"0.5759555",
"0.57438976",
"0.5725249",
"0.57191443",
"0.5674342",
"0.5671826",
"0.56659514",
"0.56322736",
"0.5628588",
"0.5577427",
"0.55... | 0.0 | -1 |
Method to call operation for write to file. | public void write(String filePath) {
cmd = new WriteCommand(editor, filePath);
invoker = new MiniEditorInvoker(cmd);
invoker.action();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract void writeFile();",
"public abstract void writeToFile( );",
"static void writeOperations(){\n \ttry{\n \t\t\n\t\t\t// Create file \n\t\t\tFileWriter fstream = new FileWriter(FILE_FILEOP);\n\t\t\tBufferedWriter out = new BufferedWriter(fstream);\n\t \tfor (int i=0; i < operations.siz... | [
"0.6723489",
"0.65513426",
"0.64439225",
"0.6052708",
"0.6048943",
"0.59702086",
"0.59248406",
"0.5893463",
"0.5874864",
"0.5859715",
"0.5844864",
"0.57921183",
"0.5758637",
"0.5750079",
"0.5735037",
"0.5732849",
"0.567102",
"0.565091",
"0.56032634",
"0.55617476",
"0.5536002"... | 0.0 | -1 |
Constructor creates a new NewPropertyTypeDialogObject. | public NewPropertyTypeDialog(JFrame parent) {
super(parent, "New Property Type", true);
JPanel border = new JPanel();
border.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
this.getContentPane().setLayout(new BorderLayout(8, 8));
this.getContentPane().add(border, BorderLayout.CENTER);
this.cmbTypes = new JComboBox<String>(AnimationProperties.getAllPropertyTypes());
this.cmbTypes.setPreferredSize(new Dimension(250, this.cmbTypes
.getMinimumSize().height));
this.cmbTypes.setMaximumSize(new Dimension(Integer.MAX_VALUE, this.cmbTypes
.getMinimumSize().height));
this.cmbTypes.setAlignmentX(Component.LEFT_ALIGNMENT);
this.cmbTypes.setActionCommand("cmbTypes");
this.cmbTypes.addActionListener(this);
this.txtName = new JTextField();
this.txtName.setText("");
this.name = "";
this.txtName.setPreferredSize(new Dimension(250, this.txtName
.getMinimumSize().height));
this.txtName.setMaximumSize(new Dimension(Integer.MAX_VALUE, this.txtName
.getMinimumSize().height));
this.txtName.setAlignmentX(Component.LEFT_ALIGNMENT);
border.setLayout(new BoxLayout(border, BoxLayout.PAGE_AXIS));
JLabel lblType = new JLabel("Chose a Property Type:");
border.add(lblType);
border.add(Box.createRigidArea(new Dimension(0, 4)));
border.add(this.cmbTypes);
border.add(Box.createRigidArea(new Dimension(0, 10)));
JLabel lblName = new JLabel("Enter a Name:");
border.add(lblName);
border.add(Box.createRigidArea(new Dimension(0, 4)));
border.add(this.txtName);
border.add(Box.createRigidArea(new Dimension(0, 16)));
JPanel pBut = new JPanel();
pBut.setLayout(new BoxLayout(pBut, BoxLayout.LINE_AXIS));
pBut.setAlignmentX(Component.LEFT_ALIGNMENT);
pBut.add(Box.createHorizontalGlue());
JButton btnCancel = new JButton("Cancel");
btnCancel.setActionCommand("cancel");
btnCancel.addActionListener(this);
pBut.add(btnCancel);
pBut.add(Box.createRigidArea(new Dimension(8, 0)));
JButton btnOK = new JButton("OK");
btnOK.setActionCommand("ok");
btnOK.addActionListener(this);
pBut.add(btnOK);
border.add(pBut, BorderLayout.SOUTH);
this.getRootPane().setDefaultButton(btnOK);
this.txtName.requestFocus();
this.pack();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"PropertyType createPropertyType();",
"public ACLPropertyDialog() {\n this.setModal(true);\n try {\n jbInit();\n pack();\n }\n catch (Exception ex) {\n ex.printStackTrace();\n }\n }",
"public Dialog() {\n\t}",
"PropertyType(String propertyType) {\n this.prop... | [
"0.62322056",
"0.60872847",
"0.5933299",
"0.5808391",
"0.5804592",
"0.5745049",
"0.56797993",
"0.5587673",
"0.55667573",
"0.55535316",
"0.55311626",
"0.5501275",
"0.5487318",
"0.5431848",
"0.5357267",
"0.5351479",
"0.534066",
"0.5336432",
"0.5326462",
"0.5294378",
"0.5263538"... | 0.5852334 | 3 |
showDialog shows the dialog and returns if the user pressed th OK button. | public boolean showDialog() {
if (this.cmbTypes.getItemCount() > 0) {
this.cmbTypes.setSelectedIndex(0);
}
this.returnValue = false;
this.setVisible(true);
return this.returnValue;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"DialogResult show();",
"void CloseOkDialog();",
"private void successDialog() {\n AlertDialog dialog = _dialogFactory.createDialog(this, R.string.completed, R.string.success);\n\n dialog.setButton(DialogInterface.BUTTON_NEUTRAL, getString(R.string.ok), new DialogInterface.OnClickListener() {\n ... | [
"0.7868039",
"0.74118847",
"0.70307595",
"0.69127727",
"0.6883812",
"0.6781406",
"0.6732029",
"0.67236227",
"0.67143774",
"0.6705786",
"0.6642731",
"0.66255975",
"0.659162",
"0.6578588",
"0.6537205",
"0.65311795",
"0.6517849",
"0.6468094",
"0.6465662",
"0.64629734",
"0.646198... | 0.65921587 | 12 |
createNameForProperty creates a goodlooking name for the selected type of AnimationProperties. | private static String createNameForProperty(String prop) {
if (prop == null)
return "property";
String theProp = prop;
// remove last "AnimationProperties"
if (theProp.length() > 10
&& theProp.substring(theProp.length() - 10).equalsIgnoreCase(
"properties"))
theProp = theProp.substring(0, theProp.length() - 10);
// first char is lowercase
if (theProp.length() > 0)
theProp = theProp.toLowerCase().charAt(0) + theProp.substring(1);
return theProp;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"PropertyName getName();",
"String getPropertyName();",
"public String getPropertyName();",
"Property createProperty();",
"static String getAntPropertyName( final String property ) {\n if ( property != null &&\n property.startsWith( \"${\" ) && // NOI18N\n property.endsW... | [
"0.6496032",
"0.62504804",
"0.59731114",
"0.59346503",
"0.58357996",
"0.5729693",
"0.5671695",
"0.5629144",
"0.55307245",
"0.5522008",
"0.5503882",
"0.55011",
"0.54378986",
"0.5409916",
"0.53945833",
"0.53613245",
"0.5333156",
"0.5280767",
"0.5277132",
"0.52659243",
"0.524652... | 0.8256261 | 0 |
getName returns the selected name for the new AnimationProperties. | public String getName() {
return this.name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"PropertyName getName();",
"public String getName() {\n\t\treturn getNonVisualProperties().getName();\n\t}",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getName();",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getName();",
"public java.lang.String getName(... | [
"0.7225956",
"0.6946785",
"0.6845975",
"0.6845975",
"0.6735944",
"0.66886556",
"0.6686759",
"0.6686759",
"0.6686759",
"0.6686759",
"0.6686759",
"0.6686759",
"0.6686759",
"0.6686759",
"0.6686759",
"0.6686759",
"0.6686759",
"0.6686759",
"0.6686759",
"0.6686759",
"0.6686759",
... | 0.0 | -1 |
getType returns the selected type for the new AnimationProperties. | public String getAnimationType() {
return this.type;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getType() {\n\t\treturn ANIMATED;\n\t}",
"public TLPropertyType getType() {\n return type;\n }",
"public FractalType getType(){\r\n\t\treturn type;\r\n\t}",
"public ObjectProperty<ShapeType> typeProperty() {\n\t\t\treturn type;\n\t\t}",
"public static String getType() {\n type =... | [
"0.67508346",
"0.66620785",
"0.64666516",
"0.6445889",
"0.632918",
"0.62764865",
"0.6247826",
"0.62367356",
"0.61879545",
"0.61830735",
"0.61768705",
"0.61587125",
"0.61587125",
"0.61587125",
"0.61587125",
"0.61587125",
"0.61587125",
"0.61587125",
"0.61587125",
"0.61587125",
... | 0.7371512 | 0 |
/ A[i,j] : LCS for text1[0..i] and text2[0..1] A[i,j] = A[i1, j1] + 1 if( text1[i] == text2[j] ) MAX( A[i1,j], A[i, j1] ) if( text1[i] != text2[j]) | public int longestCommonSubsequence(String text1, String text2) {
int m = text1.length();
int n = text2.length();
int[][] dp = new int[ m + 1][];
for( int i = 0; i < dp.length; i++ ) {
dp[i] = new int[ n + 1];
}
for( int i = 1; i <= m; i++ ) {
char c1 = text1.charAt(i - 1);
for( int j = 1; j <= n; j++ ) {
char c2 = text2.charAt(j - 1);
if( c1 == c2 ) {
dp[i][j] = dp[i-1][j-1] + 1;
} else {
dp[i][j] = Math.max( dp[i-1][j], dp[i][j-1]);
}
}
}
return dp[m][n];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int longestCommonSubsequence(String text1, String text2) {\n\t\tint m=text1.length();\n\t\tint n=text2.length();\n\t\tint lcs[][]=new int[m+1][n+1];\n\t\t\n\t\tfor(int i=1; i<=m; i++) {\n\t\t\tfor(int j=1; j<=n; ++j){\n\t\t\t\tif(text1.charAt(i-1)==text2.charAt(j-1))\n\t\t\t\t\tlcs[i][j]=1+lcs[i-1][j-1];\n\... | [
"0.7401043",
"0.7298912",
"0.72505623",
"0.7219182",
"0.72102153",
"0.7165611",
"0.71025157",
"0.6994632",
"0.6967167",
"0.69420654",
"0.69352436",
"0.68087965",
"0.66334105",
"0.6590795",
"0.64913833",
"0.64832795",
"0.64240885",
"0.63425225",
"0.6338758",
"0.6269692",
"0.62... | 0.71941453 | 5 |
Creates a new blank action | protected CBlank(){
init( new CommonDockAction(){
public void bind( Dockable dockable ) {
// ignore
}
public <V> V createView( ViewTarget<V> target, ActionViewConverter converter, Dockable dockable ) {
return null;
}
public boolean trigger( Dockable dockable ) {
return false;
}
public void unbind( Dockable dockable ) {
// ignore
}
public CAction getAction(){
return CBlank.this;
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Action createAction();",
"Action createAction();",
"Action createAction();",
"NoAction createNoAction();",
"public void createAction() {\n }",
"public EmptyAction() {\n\t\tsetActionName(\"Empty Action\");\n\t}",
"@Override\n protected Action[] createActions() {\n return new Action[0];\n }",
"... | [
"0.7987927",
"0.7987927",
"0.7987927",
"0.79772985",
"0.7764561",
"0.74324316",
"0.71786255",
"0.68927306",
"0.683328",
"0.67724305",
"0.6764623",
"0.6752997",
"0.6740542",
"0.67012656",
"0.669966",
"0.6640323",
"0.6632843",
"0.6615011",
"0.6599826",
"0.6546665",
"0.65453047"... | 0.60424197 | 48 |
Calcula el perimetro de un triangulo | public static double trianglePerimeter(Point2D point1, Point2D point2, Point2D point3) {
double distance12 = point1.distance(point2);
double distance23 = point2.distance(point3);
double distance31 = point3.distance(point1);
return distance12 + distance23 + distance31;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic double calculaTributos() {\n\t\treturn numeroDePacientes * 10;\n\t}",
"double getPerimetro();",
"private double calculaPerimetro(){\r\n double perimetro;\r\n perimetro=(float) ((2*(cir.getY()-cir.getX()))*Math.PI);\r\n return perimetro;\r\n }",
"@Override\n publ... | [
"0.7127863",
"0.71234256",
"0.69741315",
"0.6943886",
"0.68966883",
"0.6723023",
"0.6582635",
"0.65787816",
"0.6516537",
"0.64783853",
"0.6475432",
"0.63648605",
"0.63431454",
"0.6271209",
"0.6123744",
"0.60787594",
"0.60205126",
"0.5983932",
"0.5880048",
"0.5845804",
"0.5844... | 0.0 | -1 |
Getter und Settermethoden, "public" | public int getId() {
return id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract Set method_1559();",
"String setValue();",
"public void setdat()\n {\n }",
"public String setter() {\n\t\treturn prefix(\"set\");\n\t}",
"public void get() {\n }",
"@Test\r\n\tpublic void testGettersSetters()\r\n\t{\r\n\t\tPerson p = new Person(42);\r\n\t\tp.setDisplayName(\"F... | [
"0.67608213",
"0.65341485",
"0.65253466",
"0.63860065",
"0.6384444",
"0.63668513",
"0.6287218",
"0.6254165",
"0.6244253",
"0.6207351",
"0.60769993",
"0.6076035",
"0.6057022",
"0.6036808",
"0.6027929",
"0.5989521",
"0.5985791",
"0.5979545",
"0.5975629",
"0.59580743",
"0.594923... | 0.0 | -1 |
action for this permission | public GrouperActivemqPermissionAction getAction() {
return this.action;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void permissionGranted(int requestCode);",
"abstract public void getPermission();",
"@Override\n public void onAction(List<String> permissions) {\n Log.e(TAG, \"permission success\");\n callback.onSuccess(permissions);\n\n }",
... | [
"0.68559307",
"0.6592582",
"0.6577491",
"0.64692485",
"0.63587993",
"0.6241883",
"0.6237451",
"0.6231458",
"0.6226177",
"0.6219266",
"0.6184181",
"0.6159403",
"0.6153083",
"0.6123346",
"0.6118703",
"0.6110639",
"0.6101675",
"0.60957325",
"0.6091926",
"0.6091926",
"0.6091926",... | 0.647182 | 3 |
action for this permission | public void setAction(GrouperActivemqPermissionAction action1) {
this.action = action1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void permissionGranted(int requestCode);",
"abstract public void getPermission();",
"@Override\n public void onAction(List<String> permissions) {\n Log.e(TAG, \"permission success\");\n callback.onSuccess(permissions);\n\n }",
... | [
"0.68559307",
"0.6592582",
"0.6577491",
"0.647182",
"0.64692485",
"0.63587993",
"0.6241883",
"0.6237451",
"0.6231458",
"0.6226177",
"0.6219266",
"0.6184181",
"0.6159403",
"0.6153083",
"0.6123346",
"0.6118703",
"0.6110639",
"0.6101675",
"0.60957325",
"0.6091926",
"0.6091926",
... | 0.6005544 | 37 |
fully qualified grouper destination for this permission: could end in __queue or __topic to be specific. could have a starting prefix to keep the destinations in a certain folder | public String getDestination() {
return this.destination;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getDestinationName();",
"public String getDestinationFolder()\n\t{\n\t\treturn destinationFolder;\n\t}",
"String getRouteDest();",
"public String getDestination() {\r\n return destination;\r\n }",
"public java.lang.String getDestination(){return this.destination;}",
"public String getDes... | [
"0.5829827",
"0.55613154",
"0.5560609",
"0.5489396",
"0.5485565",
"0.54513633",
"0.5434647",
"0.54322016",
"0.5423128",
"0.541352",
"0.5397152",
"0.53888327",
"0.5361187",
"0.5354436",
"0.53302234",
"0.5313154",
"0.53102505",
"0.5306525",
"0.52806944",
"0.5277022",
"0.5257938... | 0.5535471 | 3 |
fully qualified grouper destination for this permission: could end in __queue or __topic to be specific. could have a starting prefix to keep the destinations in a certain folder | public void setDestination(String destination1) {
this.destination = destination1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getDestinationName();",
"String getRouteDest();",
"public String getDestinationFolder()\n\t{\n\t\treturn destinationFolder;\n\t}",
"public String getDestination() {\r\n return this.destination;\r\n }",
"public String getDestination() {\r\n return destination;\r\n }",
"public java.lan... | [
"0.5831682",
"0.5562018",
"0.5561292",
"0.55371237",
"0.5490868",
"0.5487483",
"0.5452833",
"0.5436248",
"0.54337984",
"0.5424488",
"0.53986156",
"0.539059",
"0.5362516",
"0.5356286",
"0.53327686",
"0.53145266",
"0.5311612",
"0.5307872",
"0.52818686",
"0.527846",
"0.52593464"... | 0.5415419 | 10 |
TODO Autogenerated method stub | @Override
public void rename(String oldName, String newName) {
} | {
"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 boolean hasSubquery() {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
It is a factory method. | public static MovingAvgType buildMovingAvg(String movingAvgType, int movingAvgTimeSpan) {
MovingAvgType movingAvg = null;
if (ARITHMETIC_MOVING_AVG.equals(movingAvgType)) {
movingAvg = new ArithmeticMovingAvg(movingAvgTimeSpan);
} else if (EXPONENTIAL_MOVING_AVG.equals(movingAvgType)) {
movingAvg = new ExponentialMovingAvg(movingAvgTimeSpan);
}
return movingAvg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Reproducible newInstance();",
"@Override\n\tpublic void create () {\n\n\t}",
"@Override\n\tpublic void create() {\n\t\t\n\t}",
"@Override\n\tpublic void create() {\n\n\t}",
"@Override\r\n\tpublic void create() {\n\t\t\r\n\t}",
"private StickFactory() {\n\t}",
"public Factory() {\n\t\tsuper();\n\t}",
... | [
"0.737602",
"0.70359284",
"0.70187074",
"0.6965381",
"0.6961652",
"0.68708634",
"0.6860529",
"0.6825573",
"0.682491",
"0.681113",
"0.6782974",
"0.67610115",
"0.67102027",
"0.6703762",
"0.6685023",
"0.6617143",
"0.6597072",
"0.6571602",
"0.6560296",
"0.6554464",
"0.65470546",
... | 0.0 | -1 |
This method works up to get duplicate listings. | public List<Listing> _obtainDuplicates(String _strDesCampo) {
Form objForm = _obtainSearchForm(AppPreferences.getInstance(activity)
._loadCurrentModuleId());
String strField = "DES_CAMPO" + String.valueOf(objForm.getIntOrder())
+ "_LIS";
String[] projection = new String[] {
ListingDAO.TB_NAME + Constants.LBL_DOT + ListingDAO.COL_ID,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_IDE_LISTADO,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_NUM_DESCARGA,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_COD_FLUJO,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_COD_GESTIONCOMERCIAL,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_FEC_FECHA_INICIO,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_FEC_FECHA_FIN,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_IDE_USUARIO,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_CAN_GPS_CATASTRO_LATITUD,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_CAN_GPS_CATASTRO_LONGITUD,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_NUM_ORDEN_LISTADO,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_NUM_NRO_VISITA,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_COD_ESTADO,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_CAMPO01,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_CAMPO02,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_CAMPO03,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_CAMPO04,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_CAMPO05,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_CAMPO06,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_CAMPO07,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_CAMPO08,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_CAMPO09,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_CAMPO10,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_VALIDACION01,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_VALIDACION02,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_VALIDACION03,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_VALIDACION04,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_VALIDACION05,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_VALIDACION06,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_VALIDACION07,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_VALIDACION08,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_VALIDACION09,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_VALIDACION10,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_VALIDACION11,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_VALIDACION12,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_VALIDACION13,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_VALIDACION14,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_VALIDACION15,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_VALIDACION16,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_VALIDACION17,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_VALIDACION18,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_VALIDACION19,
ListingDAO.TB_NAME + Constants.LBL_DOT
+ ListingDAO.COL_DES_VALIDACION20,
ListingDAO.TB_NAME + Constants.LBL_DOT + strField };
String strWhere = strField + " = '" + _strDesCampo +"'";
/**
* Cursor android.content.ContentResolver.query(Uri uri, String[]
* projection, String selection, String[] selectionArgs, String
* sortOrder)
*/
Cursor cursorPayload = activity.getContentResolver().query(
ListingDAO.QUERY_ALL_LIST_URI, projection, strWhere , null, null);
List<Listing> lstDuplicateAll = ListingDAO.createObjects(cursorPayload);
// Cursor cursor = activity.getContentResolver().query(
// ListingDAO.QUERY_ALL_LIST_URI, projection, strWhere , null, null);
return lstDuplicateAll;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static void findDuplicate()\n\t{\n\n\t\tList<String> oList = null;\n\t\tSet<String> oSet = null;\n\t\ttry {\n\t\t\toList = new ArrayList<String>();\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\toList.add(\"Frog\");\n\t\t\toList.add(\"Dog\");\n\t\t\toList.add(\"Eagle\");\n\t\t\toList.add(\"Frog\");... | [
"0.6279139",
"0.61491907",
"0.6065411",
"0.6006309",
"0.58522755",
"0.5845532",
"0.58196646",
"0.5760746",
"0.5720407",
"0.5718642",
"0.5688735",
"0.5634997",
"0.5628156",
"0.5624178",
"0.5621759",
"0.56083775",
"0.56077087",
"0.56040114",
"0.556024",
"0.55230093",
"0.5516203... | 0.58274364 | 6 |
Obtener los medidores entre los que se puede elegir. | public List<UserValidation> _obtainLstUserValidationByIds(int intUserId,
int intValidationId) {
String[] selectionArgs = new String[] { String.valueOf(intUserId), String.valueOf(intValidationId)};
Cursor cursor = activity.getContentResolver().query(UserValidationDAO.QUERY_BY_IDS_URI, null, null,selectionArgs, null);
List<UserValidation> lstResult = UserValidationDAO.createObjects(cursor);
cursor.close();
return lstResult;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void getLactanciasMaternas() {\n mLactanciasMaternas = estudioAdapter.getListaLactanciaMaternasSinEnviar();\n //ca.close();\n }",
"private void mueveObjetos()\n {\n // Mueve las naves Ufo\n for (Ufo ufo : ufos) {\n ufo.moverUfo();\n }\n \n ... | [
"0.6501033",
"0.6316506",
"0.60450566",
"0.6021099",
"0.59985715",
"0.5949243",
"0.5788021",
"0.5764112",
"0.5722227",
"0.5717609",
"0.57126147",
"0.5710203",
"0.56982476",
"0.5697404",
"0.56337637",
"0.56173134",
"0.56122124",
"0.56009007",
"0.5589233",
"0.5585401",
"0.55843... | 0.0 | -1 |
Obtener las opciones a modificad a partir del PK. | public List<OptionModResult> _obtainOptionModResultsByOptionId(final int intOptionId) {
String[] selectionArgs = new String[] { String.valueOf(intOptionId) };
Cursor cursor = activity.getContentResolver().query(
OptionModResultDAO.QUERY_BY_OPTIONID_URI, null, null,
selectionArgs, null);
List<OptionModResult> lstResult = OptionModResultDAO.createObjects(cursor);
cursor.close();
return lstResult;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"LogicalTableModify.Operation getTableModOp();",
"int updateByPrimaryKeySelective(EpermissionDO record);",
"int updateByPrimaryKeySelective(Access record);",
"int updateByPrimaryKeySelective(Admin record);",
"int updateByPrimaryKeySelective(ErpOaLicKey record);",
"int updateByPrimaryKeySelective(Permissio... | [
"0.57834625",
"0.57078916",
"0.5403622",
"0.5394886",
"0.5382373",
"0.5370026",
"0.536926",
"0.5343358",
"0.5330672",
"0.52969533",
"0.5294046",
"0.52807814",
"0.5261671",
"0.5252694",
"0.5245595",
"0.5243883",
"0.5229022",
"0.5226259",
"0.52199966",
"0.52186495",
"0.5216893"... | 0.0 | -1 |
Obtener todas las opciones con estado diferente a 1. | public List<Option> _obtainAllNonAvailableOptions() {
Cursor cursor = activity.getContentResolver().query(
OptionDAO.QUERY_NON_AVAILABLE_OPTIONS_URI, null, null, null,null);
ArrayList<Option> lstResult = OptionDAO.createObjects(cursor);
cursor.close();
return lstResult;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void setOpc(int opc) {\n this.opc = opc;\n }",
"public void ejercicio01() {\r\n\t\tcabecera(\"01\",\"Seleccion de opciones\");\r\n\r\n\t\tRectangulo rectangulo=new Rectangulo(10,5);\r\n\t\tSystem.out.println(\"Introduce una opcion (1 - Area, 2 - Perimetro):\");\r\n\t\t// Inicio modificacion... | [
"0.5778235",
"0.56865185",
"0.5679601",
"0.56297433",
"0.55237293",
"0.5501519",
"0.5468967",
"0.5448429",
"0.54310936",
"0.5422736",
"0.5356453",
"0.5331292",
"0.53229415",
"0.52865505",
"0.5273928",
"0.5271713",
"0.5261493",
"0.5260237",
"0.5252544",
"0.52521664",
"0.524905... | 0.0 | -1 |
Obtener la ubicacion mas precisa del dispositivo | protected Track _obtainCurrentLocation() {
Cursor cursor = activity.getContentResolver().query(TrackDAO.QUERY_MOST_RECENT_URI, null,null,null,null);
Track objTrack = TrackDAO.createObject(cursor);
return objTrack;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public float carga(){\n return (this.capacidade/this.tamanho);\n }",
"public int precioFinal(){\r\n int monto=super.PrecioFinal();\r\n\t \t \r\n\t if (pulgadas>40){\r\n\t monto+=precioBase*0.3;\r\n\t }\r\n\t if (sintonizador){\r\n\t monto+=50;\r\n\t ... | [
"0.71431357",
"0.6822491",
"0.6820964",
"0.6736162",
"0.6685849",
"0.66474944",
"0.6617849",
"0.6530899",
"0.6515826",
"0.64648026",
"0.646311",
"0.64448315",
"0.6402529",
"0.63942",
"0.6374147",
"0.6326585",
"0.63060313",
"0.62804264",
"0.6248677",
"0.62260634",
"0.6196187",... | 0.0 | -1 |
Sets the bits requsted | public static void addAcl(boolean grant, Permission permssion, String key,
List<AclModification> modifications) {
if (grant) {
key = AclModification.grantKey(key);
} else {
key = AclModification.denyKey(key);
}
modifications.add(new AclModification(key, permssion.getPermission(),
AclModification.Operation.OP_OR));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setBits(int... values);",
"void setBit(int index, int value);",
"void setCollideBits (long bits);",
"public void set()\n\t{\n\t\tbitHolder.setValue(1);\n\t}",
"protected void setAll() {\n for (int i=0; i <= (Numbers.INTEGER_WIDTH*8-2); i++) {\n \tthis.setBitAt(i);\n } \t\n }... | [
"0.7432316",
"0.7419642",
"0.72185355",
"0.71957517",
"0.71857834",
"0.6962265",
"0.684865",
"0.6837365",
"0.68337715",
"0.66596895",
"0.6650481",
"0.65977746",
"0.6534296",
"0.6508369",
"0.65024024",
"0.64864826",
"0.64687866",
"0.6462459",
"0.6434775",
"0.64189845",
"0.6413... | 0.0 | -1 |
Unsets the bits requested | public static void removeAcl(boolean grant, Permission permssion, String key,
List<AclModification> modifications) {
if (grant) {
key = AclModification.grantKey(key);
} else {
key = AclModification.denyKey(key);
}
modifications.add(new AclModification(key, ~permssion.getPermission(),
AclModification.Operation.OP_AND));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void clearBits()\r\n {\r\n clear();\r\n }",
"public void clear()\n\t{\n\t\tbitHolder.setValue(0);\n\t}",
"protected void clearAll() {\n for (int i=0; i <= (Numbers.INTEGER_WIDTH*8-2); i++) {\n \tthis.clearBitAt(i);\n } \t\n }",
"public void clearFlag( int flag )... | [
"0.7416709",
"0.68837625",
"0.6870788",
"0.6711502",
"0.66445214",
"0.6577866",
"0.6572338",
"0.65628344",
"0.65628344",
"0.65550554",
"0.6538337",
"0.6522728",
"0.6440712",
"0.64361006",
"0.6405933",
"0.63945806",
"0.6382973",
"0.6362188",
"0.6341242",
"0.6305175",
"0.625847... | 0.0 | -1 |
inserisce il dado nella window del player e toglie il dado dal draft | public int doAction(Player player, GameBoard board, List<Integer> parameterForInserDie){
int resultOfAction;
int posDieOnDraft=parameterForInserDie.get(0);
int whichRow=parameterForInserDie.get(1);
int whichColumn=parameterForInserDie.get(2);
resultOfAction=checkInsert(player,board,posDieOnDraft,whichRow,whichColumn,false);
if(resultOfAction==1){
player.getWindow().insertDie(board.getDieDraft(posDieOnDraft),whichRow,whichColumn,"both");
board.removeDieFromDraft(posDieOnDraft);
player.setInsertDieInThisTurn(true);
}
return resultOfAction;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void vittoria() {\n Platform.runLater(() -> {\n /*Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Hai vinto\");\n alert.setHeaderText(\"Fine della partita\");\n alert.showAndWait();*/\n Parent root = null;\... | [
"0.5834626",
"0.57975525",
"0.5730117",
"0.56646246",
"0.5635168",
"0.56156164",
"0.5609593",
"0.55979824",
"0.5554596",
"0.55541456",
"0.5533109",
"0.5526915",
"0.5519988",
"0.5514168",
"0.5509891",
"0.5500819",
"0.54951036",
"0.5485065",
"0.54824144",
"0.5476124",
"0.546878... | 0.0 | -1 |
Put some fake scores for giving clues and guessing mystery words correctly | @BeforeEach
public void setup() {
Map<String, Integer> scores = new HashMap<String, Integer>();
Map<String, Integer> mysteryWords = new HashMap<String, Integer>();
//players
PlayerEntity player1 = new PlayerEntity();
player1.setUsername("A");
PlayerEntity player2 = new PlayerEntity();
player2.setUsername("B");
PlayerEntity player3 = new PlayerEntity();
player3.setUsername("C");
PlayerEntity player4 = new PlayerEntity();
player4.setUsername("D");
//put with scores into hash map
scores.put(player1.getUsername(),100);
scores.put(player2.getUsername(),200);
scores.put(player3.getUsername(),300);
scores.put(player4.getUsername(),400);
mysteryWords.put(player1.getUsername(), 1);
mysteryWords.put(player2.getUsername(), 2);
mysteryWords.put(player3.getUsername(), 3);
mysteryWords.put(player4.getUsername(), 4);
scoreboard.setScoreboard(scores);
scoreboard.setCorrectlyGuessedMysteryWordsPerPlayer(mysteryWords);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized void resetScore() {\n\t\twhile (true) {\n\t\t\tint existingValueW = getCaught();\n\t\t\tint existingValueG = getScore();\n\t\t\tint existingValueM = getMissed();\n\t\t\tint newValueW = 0;\n\t\t\tint newValueG = 0;\n\t\t\tint newValueM = 0;\n\t\t\tif (caughtWords.compareAndSet(existingValueW, ne... | [
"0.6755761",
"0.6731385",
"0.6578039",
"0.64654094",
"0.6372327",
"0.635692",
"0.63107806",
"0.6281164",
"0.62320906",
"0.6231934",
"0.6227558",
"0.6227513",
"0.61913365",
"0.61725754",
"0.6171552",
"0.61558634",
"0.6150117",
"0.6118667",
"0.61162597",
"0.6077487",
"0.6071982... | 0.0 | -1 |
Can the scoreboard transform itself correctly into a List of StatisticsGetDTOs? | @Test
void ScoreBoardIntoList() {
//Should be
List<StatisticsGetDTO> intended = new ArrayList<StatisticsGetDTO>();
StatisticsGetDTO statisticsGetDTO = new StatisticsGetDTO();
statisticsGetDTO.setScore(100);
statisticsGetDTO.setPlayerName("A");
statisticsGetDTO.setNumberOfCorrectlyGuessedMysteryWords(1);
intended.add(statisticsGetDTO);
statisticsGetDTO.setScore(200);
statisticsGetDTO.setPlayerName("B");
statisticsGetDTO.setNumberOfCorrectlyGuessedMysteryWords(2);
intended.add(statisticsGetDTO);
statisticsGetDTO.setScore(300);
statisticsGetDTO.setPlayerName("C");
statisticsGetDTO.setNumberOfCorrectlyGuessedMysteryWords(3);
intended.add(statisticsGetDTO);
statisticsGetDTO.setScore(400);
statisticsGetDTO.setPlayerName("D");
statisticsGetDTO.setNumberOfCorrectlyGuessedMysteryWords(4);
intended.add(statisticsGetDTO);
List<StatisticsGetDTO> actualList = scoreboard.transformIntoList();
List<Integer> scoresActualList = new ArrayList<Integer>();
List<String> namesActualList = new ArrayList<String>();
List<Integer> mysteryActualList = new ArrayList<Integer>();
for (StatisticsGetDTO element : actualList){
scoresActualList.add(element.getScore());
namesActualList.add(element.getPlayerName());
mysteryActualList.add(element.getNumberOfCorrectlyGuessedMysteryWords());
}
assertTrue(scoresActualList.contains(intended.get(0).getScore()));
assertTrue(scoresActualList.contains(intended.get(1).getScore()));
assertTrue(scoresActualList.contains(intended.get(2).getScore()));
assertTrue(scoresActualList.contains(intended.get(3).getScore()));
assertTrue(namesActualList.contains(intended.get(0).getPlayerName()));
assertTrue(namesActualList.contains(intended.get(1).getPlayerName()));
assertTrue(namesActualList.contains(intended.get(2).getPlayerName()));
assertTrue(namesActualList.contains(intended.get(3).getPlayerName()));
assertTrue(mysteryActualList.contains(intended.get(0).getNumberOfCorrectlyGuessedMysteryWords()));
assertTrue(mysteryActualList.contains(intended.get(1).getNumberOfCorrectlyGuessedMysteryWords()));
assertTrue(mysteryActualList.contains(intended.get(2).getNumberOfCorrectlyGuessedMysteryWords()));
assertTrue(mysteryActualList.contains(intended.get(3).getNumberOfCorrectlyGuessedMysteryWords()));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.util.List<org.tensorflow.proto.profiler.XStat> \n getStatsList();",
"java.util.List<net.iGap.proto.ProtoChannelGetMessagesStats.ChannelGetMessagesStatsResponse.Stats> \n getStatsList();",
"public abstract List<ScorePackage> getScores(List<T> observationList);",
"public interface MetricsServi... | [
"0.6330005",
"0.6011878",
"0.59305674",
"0.59206724",
"0.59177333",
"0.5907586",
"0.5899694",
"0.58661234",
"0.5841158",
"0.5784846",
"0.5781762",
"0.57011586",
"0.5679659",
"0.5671435",
"0.56084037",
"0.558745",
"0.55569094",
"0.5535459",
"0.55322677",
"0.55113655",
"0.54902... | 0.6606773 | 0 |
When a player is removed due to inactivity before a game has ended, he or she should also be taken out of the scoreboard | @Test
void removePlayersFromScoreBoardWhenRemovingSinglePlayer(){
//make sure map is not empty at beginning of game
assertEquals(4, scoreboard.getScore().size());
//add player to the list of players that should be removed
List<String> usersToBeRemoved=new ArrayList<>();
usersToBeRemoved.add("A");
//remove players in list
scoreboard.removePlayersFromScoreBoard(usersToBeRemoved);
//check that players were removed
assertEquals(3, scoreboard.getScore().size());
assertEquals(3,scoreboard.getCorrectlyGuessedMysteryWordsPerPlayer().size());
assertFalse(scoreboard.getScore().containsKey("A"));
assertFalse(scoreboard.getCorrectlyGuessedMysteryWordsPerPlayer().containsKey("A"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void endGame () {\n gameOver = true;\n System.out.println(\"Game over\");\n timer.cancel();\n }",
"void gameOver() {\n if (!running.compareAndSet(true, false)) return;\n for (PlayerController controller : playerControllers) {\n if (controller == null) continue;\n ... | [
"0.68625903",
"0.6775544",
"0.6703596",
"0.6695829",
"0.6665277",
"0.6648259",
"0.6630333",
"0.6629944",
"0.6555924",
"0.65555704",
"0.65310436",
"0.65309244",
"0.65199125",
"0.65087044",
"0.6481631",
"0.64632946",
"0.6442781",
"0.6439549",
"0.64323956",
"0.6401361",
"0.63997... | 0.0 | -1 |
make sure map is not empty at beginning of game | @Test
void removePlayersFromScoreBoardWorksWhenAllPlayersAreRemovedAtOnce(){
assertEquals(4, scoreboard.getScore().size());
//add all players to the list of players that should be removed
List<String> usersToBeRemoved=new ArrayList<>();
usersToBeRemoved.add("A");
usersToBeRemoved.add("B");
usersToBeRemoved.add("C");
usersToBeRemoved.add("D");
//remove players
scoreboard.removePlayersFromScoreBoard(usersToBeRemoved);
//check that players were removed
assertTrue(scoreboard.getScore().isEmpty());
assertTrue(scoreboard.getCorrectlyGuessedMysteryWordsPerPlayer().isEmpty());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void mapCheck(){\n\t\tfor(int x = 0; x < Params.world_width; x = x + 1){\n\t\t\tfor(int y = 0; y < Params.world_height; y = y + 1){\n\t\t\t\tif(map[x][y] > 1){\n\t\t\t\t\t//System.out.println(\"Encounter Missing. Position: (\" + x + \",\" + y + \").\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public ab... | [
"0.7364409",
"0.7251849",
"0.7251849",
"0.7129648",
"0.69748056",
"0.6853686",
"0.6773751",
"0.67520666",
"0.6733387",
"0.667469",
"0.6668766",
"0.66651124",
"0.6651613",
"0.66409814",
"0.663893",
"0.66095406",
"0.66070575",
"0.66070575",
"0.65611535",
"0.6540598",
"0.6536538... | 0.0 | -1 |
make sure map is not empty at beginning of game | @Test
void removePlayersFromScoreBoardDoesNothingIfNoPlayerMarkedForRemoval(){
assertEquals(4, scoreboard.getScore().size());
//do not add players to the list of players that should be removed
List<String> usersToBeRemoved=new ArrayList<>();
//remove players in list
scoreboard.removePlayersFromScoreBoard(usersToBeRemoved);
//check that players were removed
assertEquals(4, scoreboard.getScore().size());
assertEquals(4,scoreboard.getCorrectlyGuessedMysteryWordsPerPlayer().size());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void mapCheck(){\n\t\tfor(int x = 0; x < Params.world_width; x = x + 1){\n\t\t\tfor(int y = 0; y < Params.world_height; y = y + 1){\n\t\t\t\tif(map[x][y] > 1){\n\t\t\t\t\t//System.out.println(\"Encounter Missing. Position: (\" + x + \",\" + y + \").\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public ab... | [
"0.73649895",
"0.7251436",
"0.7251436",
"0.71295017",
"0.6975052",
"0.6853496",
"0.6772152",
"0.67515814",
"0.67322505",
"0.6674043",
"0.6667867",
"0.66639555",
"0.6650887",
"0.664012",
"0.6637488",
"0.6609667",
"0.66064876",
"0.66064876",
"0.6559846",
"0.6540566",
"0.6536786... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onAccuracyChanged(Sensor sensor, int accuracy)
{
} | {
"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 |
Java Program to Add Two Integers | public static void main(String args[])
{
int a=10,b=20;
int num1=10,num2=2;
System.out.println(a);
System.out.println(b);
// Java Program to Compute Quotient(/) and Remainder(%)
int quotient = num1 / num2;
int remainder = num1 % num2;
System.out.println("Quotient is: " + quotient);
System.out.println("Remainder is: " + remainder);
// Java Program to Swap Two Number
int first = 12, second = 24;
System.out.println("--Before swap--");
System.out.println("First number = " + first);
System.out.println("Second number = " + second);
first = first - second;
second = first + second;
first = second - first;
System.out.println("--After swap--");
System.out.println("First number = " + first);
System.out.println("Second number = " + second);
// Java Program to Check Whether a Number is Even or Odd
int x=3;
if(x%2==0){
System.out.println("EVEN Number");
} else{
System.out.println("ODD Number");
}
// Java Program to Check Whether an Alphabet is Vowel or Consonant
char ch = 'i';
if(ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u' )
System.out.println(ch + " is vowel");
else
System.out.println(ch + " is consonant");
// Java Program to Find the Largest Among Three Numbers
int nu1 = 10, nu2 = 20, nu3 = 7;
if( nu1 >= nu2 && nu1 >= nu3)
System.out.println(nu1+" is the largest Number");
else if (nu2 >= nu1 && nu2 >= nu3)
System.out.println(nu2+" is the largest Number");
else
System.out.println(nu3+" is the largest Number");
// Java Program to Check Whether a Character is Alphabet or Not
char c = 'A';
if( (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
System.out.println(c + " is an alphabet.");
else
System.out.println(c + " is not an alphabet.");
// Java Program to Find Factorial of a Number
int i,fact=1;
int number=5;
for(i=1;i<=number;i++){
fact=fact*i;
}
System.out.println("Factorial of Loop using "+number+" is: "+fact);
while(i<=number){
fact=fact*i;
i++;
}
System.out.println("Factorial of While using"+number+" is: "+fact);
// Java Program to Calculate the Sum of Natural Numbers
int num=100,sum=0;
for(i=1; i<=num; i++){
sum +=i;
}
System.out.println("Sum of using For Loop = " + sum);
while(i<=num){
sum=sum+i;
i++;
}
System.out.println("Sum of using While Loop = " + sum);
// Java Program to Generate Multiplication Table using for or while loop
int num11 = 5;
for(i = 1; i <= 10; ++i)
{
System.out.printf("%d * %d = %d \n", num11, i, num11 * i);
}
int ii = 1,num12 = 9 ;
while(ii <= 10)
{
System.out.printf("%d * %d = %d \n", num12, ii, num12 * ii);
ii++;
}
// Find GCD of two numbers using for loop and if statement
int n1 = 81, n2 = 153, gcd = 1;
for(int f = 1; f <= n1 && f <= n2; ++f)
{
// Checks if i is factor of both integers
if(n1 % f==0 && n2 % f==0)
gcd = f;
}
System.out.printf("G.C.D of %d and %d is %d", n1, n2, gcd);
// using while loop and if else statement
int n11 = 81, n22 = 153;
while(n11 != n22)
{
if(n11 > n22)
n11 -= n22;
else
n22 -= n11;
}
System.out.println("G.C.D = " + n11);
// LCM using while Loop and if Statement
int n12 = 72, n23 = 120, lcm;
lcm = (n12 > n23) ? n12 : n23;
while(true) {
if( lcm % n12 == 0 && lcm % n12 == 0 ) {
System.out.printf("The LCM of %d and %d is %d.", n12, n23, lcm);
break;
}
++lcm;
}
// Java Program to Display Characters from A to Z using loop
char z;
for(z = 'A'; z <= 'Z'; ++z)
System.out.print(z + " ");
char y;
for(y = 'a'; y <= 'z'; ++y)
System.out.print(y + " ");
//Prime Number Program in Java
int ix =0;
int numx =0;
String primeNumbers = "";
for (ix = 1; ix <= 100; ix++)
{
int counter=0;
for(numx =ix; numx>=1; numx--)
{
if(ix%numx==0)
{
counter = counter + 1;
}
}
if (counter ==2)
{
primeNumbers = primeNumbers + ix + " ";
}
}
System.out.println("Prime numbers from 1 to 100 are :");
System.out.println(primeNumbers);
//⦁Palindrome Program in Java
int n=1234521, rev=0, rem, temp;
temp = n;
for( ;n != 0; n /= 10 )
{
rem = n % 10;
rev= rev* 10 + rem;
}
if(temp== rev)
System.out.println(temp + " is a palindrome.");
else
System.out.println(temp + " is not a palindrome.");
//Right Pascal's Triangle
int iii, j;
System.out.print("Right Pascal's Triangle");
int row = 8;
for (iii= 0; iii<= row-1; iii++)
{
for (j=0; j<=iii; j++)
{
System.out.print("*"+ " ");
}
System.out.println("");
}
for (iii=row-1; iii>=0; iii--)
{
for(j=0; j <= iii-1;j++)
{
System.out.print("*"+ " ");
}
System.out.println("");
}
//Left Pascal's Triangle
int I, J, k;
System.out.print("Left Pascal's Triangle");
int rows = 10;
for (I= 1; I<= rows ; I++)
{
for (J=I; J <rows; J++)
{
System.out.print(" ");
}
for (k=1; k<=I;k++)
{
System.out.print("*");
}
System.out.println("");
}
for (I=rows; I>=1; I--)
{
for(J=I; J<=rows; J++)
{
System.out.print(" ");
}
for(k=1; k<I ;k++)
{
System.out.print("*");
}
System.out.println("");
}
//Sandglass Star Pattern
int i1, j1, k1, N=10;
System.out.print("Sandglass Star Pattern");
for (i1= 0; i1<= N-1 ; i1++)
{
for (j1=0; j1<i1; j1++)
{
System.out.print(" ");
}
for (k1=i1; k1<=N-1; k1++)
{
System.out.print("*" + " ");
}
System.out.println("");
}
for (i1= N-1; i1>= 0; i1--)
{
for (j1=0; j1<i1; j1++)
{
System.out.print(" ");
}
for (k1=i1; k1<=N-1; k1++)
{
System.out.print("*" + " ");
}
System.out.println("");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int addInt(int a, int b){\r\n\t\treturn a+b;\r\n\t}",
"public int addTwoNumbers(int a, int b) {\n return a + b;\n }",
"public int add(int a, int b) //add method take two int values and returns the sum\n {\n int sum = a + b;\n return sum;\n }",
"public Integer add(I... | [
"0.8049507",
"0.7984676",
"0.7671734",
"0.76191175",
"0.75826496",
"0.7572599",
"0.75486815",
"0.75218123",
"0.7492805",
"0.7490608",
"0.7482311",
"0.7431278",
"0.74215895",
"0.7416054",
"0.7391583",
"0.7391583",
"0.7319387",
"0.7307583",
"0.7277545",
"0.7273798",
"0.7221856"... | 0.0 | -1 |
return SpringUtil.getOfferCacheBean().query return DBConfigInitBean.getCacheHouse().getCacheParser(CaBillingPeriod.class).getSingle(new CacheCondition(CaBillingPeriod.Field.periodId, periodId)); return querySingle(CaBillingPeriod.class, new DBCondition(CaBillingPeriod.Field.periodId, periodId)); | protected CaBillingPeriod getCaBillingPeriod(Integer periodId)
{
List<CaBillingPeriod> periodList=getCaBillingPeriodList(periodId);
if(CommonUtil.isNotEmpty(periodList)){
return periodList.get(0);
}else{
return null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private BillingPeriod getBillingPeriod() {\n\t\treturn (BillingPeriod) this.getBean();\n\t}",
"private static OfferDAO getOfferDAO() {\n DbConnection dbConnection = new DbConnection();\n DBI dbi = dbConnection.getDBConnection();\n OfferDAO offerDAO = dbi.onDemand(OfferDAO.class);\n return... | [
"0.59920317",
"0.56368554",
"0.56308246",
"0.550532",
"0.54826504",
"0.5467216",
"0.54630506",
"0.5459572",
"0.54434776",
"0.54004574",
"0.5367278",
"0.53517735",
"0.53514355",
"0.53510684",
"0.53407544",
"0.5332399",
"0.5329892",
"0.53015924",
"0.5294903",
"0.52863246",
"0.5... | 0.6306813 | 0 |
return return DBConfigInitBean.getCacheHouse().getCacheParser(CaBillingCycleSpec.class).getSingle(new CacheCondition(CaBillingCycleSpec.Field.cycleSpecId, cycleSpecId)); return querySingle(CaBillingCycleSpec.class, new DBCondition(CaBillingCycleSpec.Field.cycleSpecId, cycleSpecId)); | protected CaBillingCycleSpec getCaBillingCycleSpec(Long cycleSpecId)
{
List<CaBillingCycleSpec> specList=getCaBillingCycleSpecList(cycleSpecId);
if(CommonUtil.isNotEmpty(specList)){
return specList.get(0);
}else{
return null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public LifeCardItem getLifeCardItem(String ctry, int zid, int cid, int pid) {\n LifeCardItem lcItem = null;\n LcMain lcMain;\n //Query query = em.createNamedQuery(\"LcMain.findByNumber\", LcMain.class);\n //Query query = em.createQuery(\"SELECT l FROM LcMain l WHERE UPPER(l.country)=:ctry AND l.zoneid=... | [
"0.5559583",
"0.54437923",
"0.5402585",
"0.5187277",
"0.51736784",
"0.51490927",
"0.51490486",
"0.5118049",
"0.50993717",
"0.5085456",
"0.5079341",
"0.50472444",
"0.50382346",
"0.50161475",
"0.49930254",
"0.4988334",
"0.49765185",
"0.49710652",
"0.49537337",
"0.49355453",
"0.... | 0.66596353 | 0 |
Resets the array to its original configuration and return it. | public int[] reset() {
System.out.println(Arrays.toString(soluzioneIniziale));
return soluzioneIniziale;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int[] reset() {\n\t\t\treturn originalArr;\n\t\t}",
"public int[] reset() {\n return Arrays.copyOf(origin, origin.length);\n }",
"public int[] reset() {\r\n return reset;\r\n }",
"public int[] reset() \n {\n return reset;\n }",
"public int[] reset() {\n re... | [
"0.7683946",
"0.697118",
"0.6904059",
"0.68361205",
"0.6714145",
"0.6640303",
"0.64434683",
"0.6318128",
"0.6288678",
"0.62609303",
"0.6259935",
"0.6196086",
"0.6185046",
"0.6129283",
"0.60915095",
"0.60055953",
"0.5967921",
"0.59418577",
"0.59418577",
"0.59418577",
"0.594185... | 0.601098 | 15 |
Returns a random shuffling of the array. | public int[] shuffle() {
Random random = new Random();
int posizioneRandom;
int i = 0;
int[] shuffleArray = new int[soluzione.length];
while(i < soluzione.length){
posizioneRandom = random.nextInt(soluzione.length);
if(shuffleArray[posizioneRandom] == 0){
shuffleArray[posizioneRandom] = soluzione[i];
i++;
}
continue;
}
soluzione = shuffleArray;
return soluzione;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int[] shuffle() {\n int len = data_random.length;\n Random rand = new Random();\n for (int i = 0; i < len; i++) {\n int r = rand.nextInt(len);\n int temp = data_random[i];\n data_random[i] = data_random[r];\n data_random[r]=temp;\n }\n... | [
"0.79378474",
"0.778238",
"0.77558976",
"0.7748851",
"0.769553",
"0.7656073",
"0.7656073",
"0.764616",
"0.7633283",
"0.7544139",
"0.74743384",
"0.745568",
"0.7454164",
"0.74540776",
"0.74223113",
"0.7409494",
"0.7409494",
"0.73869467",
"0.73639935",
"0.73605025",
"0.7356231",... | 0.647457 | 86 |
/ renamed from: com.facebook.drawee.backends.pipeline.b.b | public interface C13373b {
/* renamed from: a */
void mo32681a(String str, int i, boolean z);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\t\t\t\t\tpublic void onFbcompleate() {\n\n\t\t\t\t\t\t\t}",
"public interface Pipeline {\r\n /**\r\n * cancel the current execution\r\n */\r\n public void cancel();\r\n\r\n /**\r\n * @return true if the rendering was canceled the output is not valid if true\r\n */\r\n ... | [
"0.5243313",
"0.50323206",
"0.502851",
"0.50185114",
"0.50076133",
"0.49858025",
"0.4929735",
"0.4889356",
"0.48821783",
"0.4854473",
"0.48477846",
"0.4827563",
"0.48221424",
"0.4804112",
"0.47864243",
"0.47773233",
"0.47648743",
"0.47503597",
"0.4740591",
"0.47294495",
"0.47... | 0.0 | -1 |
/ renamed from: a | void mo32681a(String str, int i, boolean z); | {
"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 |
Checks if a given string is the string representation of an integer. | public static boolean isInteger(String s) {
try {
Integer.parseInt(s);
} catch (NumberFormatException e) {
return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static boolean is_int(String s) {\n try {\n Integer.parseInt(s);\n return true;\n } catch (NumberFormatException e) {\n return false;\n }\n }",
"public static boolean isInteger(String string) {\r\n\t try {\r\n\t Integer.valueOf(string);\r\n\t return true;\r\n\t ... | [
"0.82709646",
"0.82600814",
"0.82200783",
"0.818357",
"0.81377274",
"0.81189895",
"0.81076884",
"0.8044768",
"0.80406946",
"0.80274796",
"0.8024204",
"0.8017122",
"0.8005677",
"0.7988262",
"0.7984765",
"0.79398125",
"0.79111856",
"0.7879072",
"0.7838237",
"0.7835149",
"0.7703... | 0.8249485 | 2 |
Default constructor starts thread | public QueryThread(User u) {
user = u;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void init() {\n Thread run = new Thread(new Run());\n run.start();\n }",
"NetThread(){}",
"public void start() {\n thread = new Thread(this);\n thread.setPriority(Thread.MIN_PRIORITY);\n thread.start();\n }",
"ThreadStart createThreadStart();",
"public void s... | [
"0.75965583",
"0.7495333",
"0.7470075",
"0.7418529",
"0.7392394",
"0.7310358",
"0.72590685",
"0.7160212",
"0.7145251",
"0.71379507",
"0.7136374",
"0.7122114",
"0.7117373",
"0.7106213",
"0.7065849",
"0.7059789",
"0.7009814",
"0.69662845",
"0.6956922",
"0.69528145",
"0.6945704"... | 0.0 | -1 |
BuildingBlockDAO buildingBlockDAO = new BuildingBlockDAO(); | public String loginAction() throws Exception {
return "builder";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public OnibusDAO() {}",
"public StockCardReportDAO () {}",
"public ArAgingDetailReportDAO () {}",
"private CommentDAO() {\n\n\t}",
"private PurchaseDAO(){\n }",
"@SuppressWarnings(\"LawOfDemeter\")\n public AccessoryBO() throws PersistenceException {\n this.dao = DAOFactory.getDAOFactory().g... | [
"0.6981355",
"0.6804509",
"0.6796022",
"0.67880887",
"0.6786734",
"0.65690887",
"0.65467256",
"0.65391135",
"0.6520611",
"0.6454896",
"0.6437088",
"0.64338744",
"0.6395158",
"0.6389147",
"0.638623",
"0.6370816",
"0.6349206",
"0.6332949",
"0.63276833",
"0.6326559",
"0.6325495"... | 0.0 | -1 |
BuildingBlockDAO buildingBlockDAO = new BuildingBlockDAO(); | public String buildingBlockAction() throws Exception {
return "success";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public OnibusDAO() {}",
"public StockCardReportDAO () {}",
"public ArAgingDetailReportDAO () {}",
"private CommentDAO() {\n\n\t}",
"private PurchaseDAO(){\n }",
"@SuppressWarnings(\"LawOfDemeter\")\n public AccessoryBO() throws PersistenceException {\n this.dao = DAOFactory.getDAOFactory().g... | [
"0.6980877",
"0.6804027",
"0.6795577",
"0.678731",
"0.67861944",
"0.6569138",
"0.654624",
"0.6538042",
"0.6520815",
"0.6454994",
"0.64365184",
"0.6435112",
"0.63949716",
"0.6389135",
"0.6384988",
"0.6370779",
"0.6348557",
"0.6332463",
"0.6327222",
"0.6325573",
"0.63255626",
... | 0.0 | -1 |
BuildingBlockDAO buildingBlockDAO = new BuildingBlockDAO(); | public String buildingBlockAddAction() throws Exception {
return "success";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public OnibusDAO() {}",
"public StockCardReportDAO () {}",
"public ArAgingDetailReportDAO () {}",
"private CommentDAO() {\n\n\t}",
"private PurchaseDAO(){\n }",
"@SuppressWarnings(\"LawOfDemeter\")\n public AccessoryBO() throws PersistenceException {\n this.dao = DAOFactory.getDAOFactory().g... | [
"0.6980877",
"0.6804027",
"0.6795577",
"0.678731",
"0.67861944",
"0.6569138",
"0.654624",
"0.6538042",
"0.6520815",
"0.6454994",
"0.64365184",
"0.6435112",
"0.63949716",
"0.6389135",
"0.6384988",
"0.6370779",
"0.6348557",
"0.6332463",
"0.6327222",
"0.6325573",
"0.63255626",
... | 0.0 | -1 |
BuildingBlockDAO buildingBlockDAO = new BuildingBlockDAO(); | public String initialAction() throws Exception {
System.out.println(" *** initialAction **** ");
return "login";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public OnibusDAO() {}",
"public StockCardReportDAO () {}",
"public ArAgingDetailReportDAO () {}",
"private CommentDAO() {\n\n\t}",
"private PurchaseDAO(){\n }",
"@SuppressWarnings(\"LawOfDemeter\")\n public AccessoryBO() throws PersistenceException {\n this.dao = DAOFactory.getDAOFactory().g... | [
"0.6980877",
"0.6804027",
"0.6795577",
"0.678731",
"0.67861944",
"0.6569138",
"0.654624",
"0.6538042",
"0.6520815",
"0.6454994",
"0.64365184",
"0.6435112",
"0.63949716",
"0.6389135",
"0.6384988",
"0.6370779",
"0.6348557",
"0.6332463",
"0.6327222",
"0.6325573",
"0.63255626",
... | 0.0 | -1 |
Default constructor, calls parent default constructor and then initializes extended to 'A', price to 2176.33 and number to 10. | Etf()
{
super();
extended = 'A';
price = 2176.33;
number = 10;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Etf(char extended, double price, int number)\n {\n super();\n this.extended = extended;\n this.price = price;\n this.number = number;\n }",
"Etf(String name, String ticker, char extended, double price, int number)\n {\n super(name, ticker);\n this.extended = extended;\n t... | [
"0.65214187",
"0.6496708",
"0.6384762",
"0.63016343",
"0.6283603",
"0.6189827",
"0.6148071",
"0.61069965",
"0.6045489",
"0.59996563",
"0.59888417",
"0.5961036",
"0.595611",
"0.5953577",
"0.59379035",
"0.59277",
"0.5912641",
"0.58982104",
"0.587345",
"0.5851684",
"0.5839836",
... | 0.7252045 | 0 |
Parameterized constructor, calls parent default constructor and initializes extended, price and name fields to extended, price and name parameters' values. | Etf(char extended, double price, int number)
{
super();
this.extended = extended;
this.price = price;
this.number = number;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Objects(String item, double baseprice){\r\n this.item = item;\r\n this.baseprice = baseprice;\r\n }",
"private ProductData(int id, String name, double price) {\n\t\t\tthis.id = id;\n\t\t\tthis.name = name;\n\t\t\tthis.price = price;\n\t\t}",
"protected Option(String name, float price) {... | [
"0.6322777",
"0.62845826",
"0.6248352",
"0.6240538",
"0.6233519",
"0.6220296",
"0.62014276",
"0.6179125",
"0.6162195",
"0.6154709",
"0.6129993",
"0.6048786",
"0.59917915",
"0.59884936",
"0.59860784",
"0.5978186",
"0.5962076",
"0.59519726",
"0.59420264",
"0.5934656",
"0.593033... | 0.5770022 | 40 |
Parameterized constructor, calls parent default constructor and initializes extended, price and name fields to extended, price and name parameters' values. | Etf(String name, String ticker, char extended, double price, int number)
{
super(name, ticker);
this.extended = extended;
this.price = price;
this.number = number;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Objects(String item, double baseprice){\r\n this.item = item;\r\n this.baseprice = baseprice;\r\n }",
"private ProductData(int id, String name, double price) {\n\t\t\tthis.id = id;\n\t\t\tthis.name = name;\n\t\t\tthis.price = price;\n\t\t}",
"protected Option(String name, float price) {... | [
"0.6323391",
"0.6284419",
"0.62485874",
"0.6240851",
"0.6220526",
"0.6200547",
"0.61789364",
"0.61624926",
"0.61545825",
"0.6128885",
"0.60482603",
"0.5991521",
"0.5988132",
"0.598571",
"0.597865",
"0.59629387",
"0.5951342",
"0.594166",
"0.5934443",
"0.5930267",
"0.58943504",... | 0.623293 | 4 |
Sets the object's price | public void setPrice(double price)
{
this.price = price;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setPrice(Double price);",
"public void setPrice(double price)\n {\n this.price = price;\n }",
"public void setPrice(double price) {\r\n this.price = price;\r\n }",
"public void setPrice(double price) {\r\n this.price = price;\r\n }",
"public void setPrice(double... | [
"0.8221135",
"0.8206174",
"0.8166151",
"0.8166151",
"0.8166151",
"0.8136819",
"0.8136819",
"0.8136819",
"0.8136819",
"0.8136819",
"0.8136819",
"0.8136819",
"0.81082",
"0.81082",
"0.80644363",
"0.8050868",
"0.80277264",
"0.80174536",
"0.7981631",
"0.7981631",
"0.79490936",
"... | 0.8183711 | 2 |
Returns the object's price | public double getPrice()
{
return this.price;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getPrice() {\n return price_;\n }",
"public BigDecimal getPrice() {\n return price;\n }",
"public BigDecimal getPrice() {\n return price;\n }",
"public BigDecimal getPrice() {\n return price;\n }",
"public BigDecimal getPrice() {\n return price;\n ... | [
"0.8150728",
"0.8126985",
"0.8126985",
"0.8126985",
"0.8126985",
"0.8126985",
"0.81243044",
"0.81243044",
"0.81242734",
"0.81242734",
"0.81157684",
"0.81109583",
"0.8110764",
"0.81076723",
"0.81076723",
"0.81076723",
"0.81076723",
"0.8105839",
"0.8100682",
"0.8100682",
"0.810... | 0.80875325 | 32 |
Sets the object's number | public void setNumber(int number)
{
this.number = number;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setNumber(int number)\n {\n Number = number;\n }",
"public void setNumber(int number) {\r\n\t\tthis.num = number;\r\n\t}",
"void setNumber(int num) {\r\n\t\tnumber = num;\r\n\t}",
"public void setNumber(int number) {\n this.number = number;\n }",
"public void setNumber(int numb... | [
"0.7939619",
"0.777788",
"0.77248526",
"0.7714193",
"0.762038",
"0.7580424",
"0.7483743",
"0.7479517",
"0.7462855",
"0.74612945",
"0.74612945",
"0.74612945",
"0.72055614",
"0.71848536",
"0.7159293",
"0.7159293",
"0.71519834",
"0.71315867",
"0.7073389",
"0.7049787",
"0.7031723... | 0.7807444 | 1 |
Returns the object's number | public int getNumber()
{
return this.number;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getObjectNumber();",
"public int getNum() { return Num;}",
"public int getNumber() {\r\n\t\treturn number;\r\n\t}",
"public int getNumber() {\n\t\t\n\t\treturn number;\n\t}",
"public int number() {\n return number;\n }",
"public int getNumber() {\n\t\treturn number;\n\t}",
"public int get... | [
"0.839044",
"0.73939216",
"0.7349316",
"0.7343422",
"0.73380214",
"0.73211324",
"0.73211324",
"0.73211324",
"0.73211324",
"0.73164845",
"0.7307549",
"0.72860223",
"0.72361076",
"0.7231044",
"0.7228313",
"0.7195458",
"0.71802086",
"0.71728224",
"0.717222",
"0.7163035",
"0.7162... | 0.72209334 | 15 |
Sets the object's extended | public void setExtended(char extended)
{
this.extended = extended;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setExtended(boolean value) {\n this.extended = value;\n }",
"public void setExtObject(IComponent ext){\n\t\textObj = ext;\n\t}",
"public void setExtendable(boolean extendable)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n ... | [
"0.67990845",
"0.64516675",
"0.6436803",
"0.6396166",
"0.62846303",
"0.6169278",
"0.6056461",
"0.5980042",
"0.5929627",
"0.5882998",
"0.57711565",
"0.5750577",
"0.57337683",
"0.57061565",
"0.5629275",
"0.56197834",
"0.5496727",
"0.5489628",
"0.5439861",
"0.5408855",
"0.540418... | 0.647378 | 1 |
Returns the object's extended | public char getExtended()
{
return this.extended;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isExtended() {\n return extended;\n }",
"public boolean isExtended() {\n return isExtended;\n }",
"public Object getExtension(){\n\t\treturn ext;\n\t}",
"String getExtends();",
"public IComponent getExtObject(){\n\t\treturn extObj;\n\t}",
"public boolean extended() {\n ... | [
"0.72109896",
"0.70984316",
"0.7057258",
"0.70099145",
"0.692318",
"0.6796633",
"0.67099625",
"0.66950244",
"0.6666644",
"0.66092104",
"0.6585284",
"0.6585284",
"0.6585284",
"0.6546039",
"0.6444632",
"0.6418117",
"0.6393968",
"0.62384844",
"0.6235552",
"0.62122047",
"0.620004... | 0.64903176 | 14 |
Calls the parent toString method and returns a String containing that information as well as the object's price and number fields. | @Override
public String toString()
{
return super.toString() + " " + this.extended + " " + this.price +
" " + this.number;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String toString() {\n return \"\" + year + \" \" + make + \" \" + model + \", \" + color + \", \" + getTrans() + \", $\" + price;\n }",
"@Override\r\n public String toString() {\n return String.format(\"Title: %s%nPrice: %.2f%nDescription: %s%nRelease date: %s\",\r\n thi... | [
"0.7639203",
"0.7636561",
"0.761229",
"0.76084495",
"0.75986505",
"0.75831515",
"0.75803477",
"0.75788397",
"0.754419",
"0.7542515",
"0.75320715",
"0.7523225",
"0.7519028",
"0.747472",
"0.7456658",
"0.74418575",
"0.7440514",
"0.7438833",
"0.74290323",
"0.7425461",
"0.7422977"... | 0.8303827 | 0 |
Calculates the cost of the Etf by multiplying price by number | @Override
public double cost()
{
return this.price * this.number;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"double computePrintingCost(double price){\n //TODO calculate price and return it\n return price * printer.countCharactersPrinted();\n }",
"double calculatePrice();",
"public double calculateCost() {\n double output = price * (1 + taxRate);\n return output;\n }",
"private void cal... | [
"0.6991205",
"0.6977344",
"0.6977079",
"0.6880554",
"0.685816",
"0.67364997",
"0.67234576",
"0.6689609",
"0.6655126",
"0.6640917",
"0.6598223",
"0.6562455",
"0.6562197",
"0.6559596",
"0.65439945",
"0.65226674",
"0.64909106",
"0.64909106",
"0.6488158",
"0.64442575",
"0.6433924... | 0.7373127 | 0 |
bu fonsiyon time limiti gecemedi. 475 / 476 test cases passed. | public static String reverseString(String s) {
String reverse = "";
int length = s.length();
for(int i=0; i<length; i++){
//reverse += (s.charAt(length-1-i) + "");
reverse = reverse.concat(s.charAt(length-i-1) + "");
}
return reverse;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test(timeout = 4000)\n public void test12() throws Throwable {\n Player player0 = new Player();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"y\");\n player0.reset(true);\n Player player1 = new Player((-1817));\n player0.reset(false);\n System.setCurrentTimeMillis... | [
"0.63881296",
"0.62598455",
"0.6167789",
"0.61585224",
"0.60659635",
"0.6050821",
"0.6042556",
"0.6033041",
"0.60326153",
"0.60282964",
"0.60227585",
"0.59769773",
"0.5976321",
"0.5954113",
"0.59391415",
"0.59229976",
"0.5914567",
"0.5867262",
"0.58617604",
"0.5850027",
"0.58... | 0.0 | -1 |
bu daha hizli calisti | public static String reverseString2(String s) {
int length = s.length();
char[] arr = s.toCharArray();
for(int i=0; i< length / 2; i++){
char temp = arr[i];
arr[i] = arr[length-1-i];
arr[length-1-i] = temp;
}
return new String(arr);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void cajas() {\n\t\t\n\t}",
"private String elaboraIncipit() {\n String testo = VUOTA;\n\n if (usaHeadIncipit) {\n testo += elaboraIncipitSpecifico();\n testo += A_CAPO;\n }// fine del blocco if\n\n return testo;\n }",
"private static void sta... | [
"0.67743766",
"0.61798614",
"0.6164554",
"0.6107561",
"0.61071175",
"0.605559",
"0.60524386",
"0.6050391",
"0.6008548",
"0.6000192",
"0.5986239",
"0.59685063",
"0.59669876",
"0.59507257",
"0.59443074",
"0.5933186",
"0.5927659",
"0.592437",
"0.59129375",
"0.5912793",
"0.590056... | 0.0 | -1 |
/ local scope, cache on | public void testConversionsWithoutHandler()
throws Exception
{
VelocityEngine ve = createEngine(false);
testConversions(ve, "test_conv.vtl", "test_conv_without_handler");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setCached() {\n }",
"StackManipulation cached();",
"@Override\n public boolean isCaching() {\n return false;\n }",
"@Produces\n\t@ApplicationScoped\n\tpublic org.infinispan.AdvancedCache<Long, String> getLocalRequestCache() {\n\t\torg.infinispan.Cache<Long,String> basicCache = getLocalCac... | [
"0.6817479",
"0.64545333",
"0.63047725",
"0.62229395",
"0.6176698",
"0.6158766",
"0.60886914",
"0.6065882",
"0.60447943",
"0.6001848",
"0.59646046",
"0.5959289",
"0.5953453",
"0.5908512",
"0.5889388",
"0.58881855",
"0.57477987",
"0.5745466",
"0.57431304",
"0.5724697",
"0.5711... | 0.0 | -1 |
/ local scope, cache on | public void testConversionsWithHandler()
throws Exception
{
VelocityEngine ve = createEngine(true);
testConversions(ve, "test_conv.vtl", "test_conv_with_handler");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setCached() {\n }",
"StackManipulation cached();",
"@Override\n public boolean isCaching() {\n return false;\n }",
"@Produces\n\t@ApplicationScoped\n\tpublic org.infinispan.AdvancedCache<Long, String> getLocalRequestCache() {\n\t\torg.infinispan.Cache<Long,String> basicCache = getLocalCac... | [
"0.6817479",
"0.64545333",
"0.63047725",
"0.62229395",
"0.6176698",
"0.6158766",
"0.60886914",
"0.6065882",
"0.60447943",
"0.6001848",
"0.59646046",
"0.5959289",
"0.5953453",
"0.5908512",
"0.5889388",
"0.58881855",
"0.57477987",
"0.5745466",
"0.57431304",
"0.5724697",
"0.5711... | 0.0 | -1 |
Return and initialize engine | private VelocityEngine createEngine(boolean withConversionsHandler)
throws Exception
{
VelocityEngine ve = new VelocityEngine();
ve.setProperty( Velocity.VM_PERM_INLINE_LOCAL, Boolean.TRUE);
ve.setProperty(Velocity.RUNTIME_LOG_INSTANCE, log);
ve.setProperty(RuntimeConstants.RESOURCE_LOADER, "file");
ve.setProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH, TEST_COMPARE_DIR + "/conversion");
if (withConversionsHandler)
{
ve.setProperty(RuntimeConstants.EVENTHANDLER_METHODEXCEPTION, PrintException.class.getName());
}
else
{
ve.setProperty(RuntimeConstants.CONVERSION_HANDLER_CLASS, "none");
}
ve.init();
return ve;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void initEngine() {\n \n }",
"@Override\n public void initEngine() {\n \n }",
"public Engine() {\n super(0,0,0,0,null, \"ENGINE\");\n }",
"void init(@NotNull final AIEngine engine);",
"public static Engine getEngine(){\n Engine engine = null;\n ... | [
"0.7812684",
"0.7812684",
"0.7170476",
"0.69964385",
"0.69545674",
"0.68984747",
"0.6887119",
"0.68389994",
"0.67770916",
"0.6704396",
"0.66211057",
"0.66174567",
"0.65920013",
"0.6578994",
"0.65480316",
"0.65156806",
"0.64902234",
"0.6471743",
"0.6446784",
"0.64019436",
"0.6... | 0.60479873 | 41 |
Write response from server to textView | protected void onPostExecute(String page) {
textView.setText(page);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onResponse(String response) {\n mTextView.setText(\"Response is: \" + response);\n }",
"@Override\n public void onResponse(String response)\n {\n httpReturn.setText(\"RESPOSTA:\\n... | [
"0.7540928",
"0.7061836",
"0.7016153",
"0.6992891",
"0.6938768",
"0.6928005",
"0.6787135",
"0.6782021",
"0.67639077",
"0.6724845",
"0.66892594",
"0.6671353",
"0.66673815",
"0.6650066",
"0.66383433",
"0.65547985",
"0.64933956",
"0.6430616",
"0.6413244",
"0.6396527",
"0.6389058... | 0.0 | -1 |
/ Temporary method to get HTTP response for the request | private String convertStreamToString(InputStream is) {
BufferedReader reader = new BufferedReader(new InputStreamReader(is));
StringBuilder sb = new StringBuilder();
String line;
try {
while ((line = reader.readLine()) != null) {
sb.append(line).append('\n');
}
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
is.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return sb.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getResponse();",
"String getResponse();",
"public ServletResponse getResponse();",
"public Object getResponse ()\r\n {\r\n\r\n return response_;\r\n }",
"public abstract String getResponse();",
"public HTTPResponse get(HTTPRequest request) {\n\t\tHTTPResponse response = new ... | [
"0.76722646",
"0.7517295",
"0.74473006",
"0.71695715",
"0.715945",
"0.7149468",
"0.70060384",
"0.6998619",
"0.6879714",
"0.6852098",
"0.6821199",
"0.6809591",
"0.6808849",
"0.6808849",
"0.6808849",
"0.6808849",
"0.6808849",
"0.6794513",
"0.6764723",
"0.6752244",
"0.6748984",
... | 0.0 | -1 |
TODO CREATE INVENTORY FOR THIS,WATCH VIDEO ON COMPLEX PARTICLES,ADD THESE TO INVENTORY | @EventHandler
public void onClick(InventoryClickEvent e){
Inventory inv = e.getInventory();
Player p = (Player) e.getWhoClicked();
if(inv.getName().equals(ChatColor.AQUA+"EffectGui")){
if(e.getSlot() == 0){
PacketUtils.sendTitle(p, ChatColor.RED+"Flame Effect", "Has Been Enabled", 1, 2, 1);
flame.add(p.getUniqueId());
getConfig().set(p.getName()+"'s Flame.enabled", "yes");
saveConfig();
p.closeInventory();
e.setCancelled(true);
}
if(e.getSlot() == 1){
PacketUtils.sendTitle(p, ChatColor.RED+"Flame Effect", "Has Been Disabled", 1, 2, 1);
flame.remove(p.getUniqueId());
getConfig().set(p.getName()+"'s Flame.enabled", "no");
saveConfig();
p.closeInventory();
e.setCancelled(true);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void mo71540w() {\n boolean z;\n VideoItemParams requestId = VideoItemParams.newBuilder().setFragment(this.f73947d).setAweme(this.f73950g).setAwemeFromPage(this.f73953m).setEventType(this.f73944a).setMyProfile(this.f73946c).setPageType(this.f73954n).setEnterMethodValue(this.f74254j).setRequest... | [
"0.5788768",
"0.57199615",
"0.57176566",
"0.56782097",
"0.56610626",
"0.56493",
"0.5648799",
"0.5646356",
"0.5639971",
"0.5634357",
"0.5631907",
"0.56169474",
"0.55885553",
"0.555131",
"0.5548056",
"0.5541402",
"0.55138195",
"0.55041426",
"0.55021346",
"0.55003726",
"0.547903... | 0.0 | -1 |
Factory function that creates a mapReducer object of the appropriate data type class for this oshdb backend implemenation | public abstract <X extends OSHDBMapReducible> MapReducer<X> createMapReducer(Class<X> forClass); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public InMemoryCombiningReducer() {\n\n\t\t}",
"public interface Reducer<KeyIn extends WritableComparable<KeyIn> , ValueIn extends WritableComparable<ValueIn> , KeyOut extends WritableComparable<KeyOut> , ValueOut extends WritableComparable<ValueOut>> {\n\t\n\tpublic void reduce(KeyIn keyIn , Iterator<ValueIn> v... | [
"0.56560296",
"0.56388855",
"0.55249095",
"0.54160804",
"0.5369538",
"0.533273",
"0.52002996",
"0.5160414",
"0.5138678",
"0.5046648",
"0.4998388",
"0.49955028",
"0.49700463",
"0.4967759",
"0.49247912",
"0.49247274",
"0.48899132",
"0.4867596",
"0.48610768",
"0.4858983",
"0.485... | 0.8223294 | 0 |
returns metadata about the given OSHDB (for example copyright information, currentness of the data, spatial extent, etc.) | public abstract String metadata(String property); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Nullable\n @Generated\n @Selector(\"metadata\")\n public native NSDictionary<?, ?> metadata();",
"public MetaData getMetaData();",
"io.dstore.engine.MetaInformation getMetaInformation(int index);",
"io.dstore.engine.MetaInformation getMetaInformation(int index);",
"io.dstore.engine.MetaInformatio... | [
"0.58490574",
"0.57695425",
"0.5762886",
"0.5762886",
"0.5762886",
"0.5762886",
"0.5762886",
"0.56761676",
"0.56454635",
"0.55995685",
"0.5598432",
"0.55981785",
"0.55217266",
"0.55217266",
"0.55217266",
"0.55217266",
"0.55217266",
"0.54828334",
"0.5472656",
"0.5436417",
"0.5... | 0.48288152 | 89 |
sets the "table/cache" name prefix to be used with this oshdb | public OSHDBDatabase prefix(String prefix) {
this.prefix = prefix;
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setPrefix(String prefix);",
"@Override\n\tprotected String getCacheKeyPrefix() {\n\t\treturn super.getCacheKeyPrefix();\n\t}",
"private void splitTablePrefix(String prefix, Table table) {\n\t\twhile(prefix.trim().length() > 0) {\n\t\t\t// resolve \"hostmode=[share|exclusive]\";\n\t\t\tPattern pattern = Pa... | [
"0.63174826",
"0.62798077",
"0.6076143",
"0.59812886",
"0.5931997",
"0.58763516",
"0.582472",
"0.58119804",
"0.57789564",
"0.5738746",
"0.5726194",
"0.57241493",
"0.5687719",
"0.5667206",
"0.5655526",
"0.5655526",
"0.5648863",
"0.5638188",
"0.5617156",
"0.5606137",
"0.5602250... | 0.675836 | 0 |
returns the currently set db "table/cache" name prefix | public String prefix() {
return this.prefix;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Transient\n public String getCacheKey() {\n return this.getTableName();\n }",
"public String getDBTableName()\n\t{\n\t\treturn this.getClass().getSimpleName();\n\t}",
"public String getTableName() {\n\t\treturn this.getTableName(this.currentClass());\n\t}",
"public String getTableDbName() {\r\n... | [
"0.67249644",
"0.6653005",
"0.6514692",
"0.6476501",
"0.6449535",
"0.63890934",
"0.6357697",
"0.6183025",
"0.616416",
"0.6148796",
"0.6108826",
"0.6108826",
"0.6108826",
"0.6108826",
"0.60808206",
"0.60753125",
"0.60747784",
"0.6021309",
"0.6016591",
"0.60041755",
"0.60013306... | 0.54807806 | 94 |
JSONParser parser = new JSONParser(); | public Map<String,Double> doDetection(){
if(recordingFile!=null){
FileManager fm = new FileManager(recordingFile);
signal = fm.readFile();
if(signal!=null){
//for(int i=0;i<256;i++)
// System.out.print(signal[i]+", ");
System.out.println("tamaño:: "+signal.length);
Map<String,Double> resultadoCanal= classify();
System.out.println("resultadoCanal "+resultadoCanal.size());
return resultadoCanal;
}
}
else{
System.out.println("El archivo no existe");
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"TorrentJsonParser getJsonParser();",
"public TestRunJsonParser(){\n }",
"protected JsonParser getJsonParser( ) {\r\n\t\treturn jsonParser;\r\n\t}",
"private static void loadParser() {\n if(parser_ == null)\n parser_ = ConfigIOFactory.getInstance(\"json\");\n }",
"private JsonUtil() ... | [
"0.78375787",
"0.7252489",
"0.7247768",
"0.7239377",
"0.7074104",
"0.6905444",
"0.6875698",
"0.68338794",
"0.67268485",
"0.6611893",
"0.6580231",
"0.651468",
"0.64823645",
"0.6461589",
"0.6418066",
"0.63896245",
"0.632296",
"0.63177794",
"0.62897575",
"0.6285468",
"0.6237056"... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void decrementPop(int x) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void incrementPop(int x) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void configure(Context context) {
this.pollFrequency = context.getInteger(this.CONF_POLL_FREQUENCY, DEFAULT_POLL_FREQUENCY);
//zabbix hosts
String hosts = context.getString(this.CONF_HOSTS);
if (hosts == null || hosts.isEmpty()) {
throw new ConfigurationException("Hosts list cannot be empty.");
}
parseHostsFromString(hosts);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void start() {
try {
hostname = InetAddress.getLocalHost().getHostName().split("\\.")[0];
}catch (Exception ex2) {
logger.warn("Unknown error occured", ex2);
}
collectorRunnable.server = this;
if (service.isShutdown() || service.isTerminated()) {
service = Executors.newSingleThreadScheduledExecutor();
}
service.scheduleWithFixedDelay(collectorRunnable, 0,
pollFrequency, TimeUnit.SECONDS);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void stop() {
service.shutdown();
while (!service.isTerminated()) {
try {
logger.warn("Waiting for zabbix service to stop");
service.awaitTermination(500, TimeUnit.MILLISECONDS);
} catch (InterruptedException ex) {
logger.warn("Interrupted while waiting"
+ " for zabbix monitor to shutdown", ex);
service.shutdownNow();
}
}
zabbixServers.clear();
} | {
"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 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {... | [
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.6862... | 0.0 | -1 |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ... | [
"0.79041183",
"0.7805934",
"0.77659106",
"0.7727251",
"0.7631684",
"0.7621701",
"0.75839096",
"0.75300384",
"0.74873656",
"0.7458051",
"0.7458051",
"0.7438486",
"0.742157",
"0.7403794",
"0.7391802",
"0.73870087",
"0.7379108",
"0.7370295",
"0.7362194",
"0.7355759",
"0.73454577... | 0.0 | -1 |
Below method will not work if any number is repeating odd time The key to solve this problem is bit manipulation. XOR will return 1 only on two different bits. So if two numbers are the same, XOR will return 0. Finally only one number left. | public static int singleNumber(int[] A) {
int x = 0;
for (int a : A) {
x = x ^ a;
}
return x;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int singleNumber2(int[] nums) {\n int res = 0;\n for (int num : nums) {\n res ^= num;\n }\n return res;\n }",
"public static int singleNumberXOR(int[] nums) {\n\n int i = 0;\n for (int num : nums) {\n i ^= num;\n }\n\n return... | [
"0.6936267",
"0.69327515",
"0.6883419",
"0.6834304",
"0.6795365",
"0.6697747",
"0.66747004",
"0.66255915",
"0.66101867",
"0.6483748",
"0.64601547",
"0.6442926",
"0.64105266",
"0.6403261",
"0.63604826",
"0.63389796",
"0.63132006",
"0.6306473",
"0.6304141",
"0.6271335",
"0.6268... | 0.573807 | 64 |
The empty constructor for ProActive.newActive(). | public P2PFirstContact() {
// The empty constructor
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Produto() {}",
"public Activator() {\r\n\t}",
"private ObjActiveNotPlanned() {\n\t\tsuper(\"OBJ_ACTIVE_NOT_PLANNED\", Wetrn.WETRN);\n\n\t\t// Initialise data type\n\t\tgetDataType();\n\t}",
"public ACTable() {\r\n super();\r\n }",
"public Prova() {}",
"public Profile() {}",
"public Per... | [
"0.6653623",
"0.61791736",
"0.6158647",
"0.6112363",
"0.6078234",
"0.58514947",
"0.58454937",
"0.57815886",
"0.5740329",
"0.5723183",
"0.5720244",
"0.5718118",
"0.5711957",
"0.57099074",
"0.5700188",
"0.56916016",
"0.5671901",
"0.5665383",
"0.56534684",
"0.5648817",
"0.564767... | 0.54351556 | 68 |
Construct a new P2PFirstContact. | public P2PFirstContact(Vector peers, P2PAcquaintanceManager acquaintances,
P2PService local) {
this.peers = peers;
this.acqGroup = acquaintances;
this.localP2pService = local;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public P2PFirstContact() {\n // The empty constructor\n }",
"private Contact createBaseContact()\n {\n Contact contact = new Contact();\n contact.setName(new Name(new LastName(\"Doe\"), new FirstName(\"John\")));\n contact.setAddress(new Address(new StreetAddress(\"123 Main St... | [
"0.7711639",
"0.59570706",
"0.5904111",
"0.57841736",
"0.5770209",
"0.5760051",
"0.5724445",
"0.5724445",
"0.5724445",
"0.5673191",
"0.53846705",
"0.5378309",
"0.5329392",
"0.5300667",
"0.51313573",
"0.51261663",
"0.51133734",
"0.51065314",
"0.5087809",
"0.5067119",
"0.505223... | 0.6287603 | 1 |
Sequancialy try to contact all peer and add them in the group of acquaintances. | public void runActivity(Body body) {
this.peers = StartP2PService.checkingPeersUrl(this.peers);
// First coontact
connectingPeer();
while (body.isAlive()) {
if (this.peers.size() != 0) {
if (this.acqGroup.size() == 0) {
// We have some url and we know nobody
connectingPeer();
}
try {
Thread.sleep(Long.parseLong(System.getProperty(PROPERTY_TTU)));
} catch (Exception e) {
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void connectingPeer() {\n for (int index = 0; index < this.peers.size(); index++) {\n String peerUrl = urlAdderP2PNodeName((String) this.peers.get(index));\n try {\n Node distNode = NodeFactory.getNode(peerUrl);\n P2PService peer = (P2PService... | [
"0.7194329",
"0.5854281",
"0.5666508",
"0.5655992",
"0.56338745",
"0.55661964",
"0.5507185",
"0.5471742",
"0.5429113",
"0.5390252",
"0.5361651",
"0.5277631",
"0.5250047",
"0.52377415",
"0.5231754",
"0.5220142",
"0.51638293",
"0.51563746",
"0.5151288",
"0.51306546",
"0.5113474... | 0.0 | -1 |
Try to connect the peer with all peers inside list. | private void connectingPeer() {
for (int index = 0; index < this.peers.size(); index++) {
String peerUrl = urlAdderP2PNodeName((String) this.peers.get(index));
try {
Node distNode = NodeFactory.getNode(peerUrl);
P2PService peer = (P2PService) distNode.getActiveObjects(P2PService.class.getName())[0];
if (!peer.equals(this.localP2pService)) {
// Send a message to the remote peer to record me
peer.register(this.localP2pService);
// Add the peer in my group of acquaintances
this.acqGroup.add(peer);
}
} catch (Exception e) {
logger.debug("The peer at " + peerUrl +
" couldn't be contacted", e);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void connectToAll() {\n for (AStarNode node : getNodes()) {\n node.resetConnection();\n for (AStarNode connect : getNodes()) {\n if (isValid(node, connect)) {\n node.connect(connect);\n }\n }\n }\n }",
"pub... | [
"0.6921413",
"0.66952515",
"0.6567972",
"0.65097845",
"0.6470138",
"0.61357003",
"0.6124585",
"0.6005187",
"0.59704995",
"0.5917305",
"0.5910352",
"0.58398265",
"0.5810658",
"0.57575434",
"0.57137734",
"0.57124704",
"0.5677388",
"0.5673864",
"0.5632963",
"0.5613977",
"0.55849... | 0.69476175 | 0 |
Add the default name of the P2P Node to a specified url. | private static String urlAdderP2PNodeName(String url) {
if (url.endsWith("/")) {
url += P2P_NODE_NAME;
} else {
url += ("/" + P2P_NODE_NAME);
}
return url;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setNilUrlName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlString target = null;\r\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(URLNAME$12, 0);\r\n if (target == null)\... | [
"0.5741296",
"0.5719367",
"0.56815183",
"0.56056494",
"0.56038135",
"0.5581097",
"0.55140567",
"0.5272715",
"0.5240364",
"0.52173704",
"0.5158951",
"0.5109192",
"0.50778973",
"0.50544286",
"0.5040382",
"0.50242627",
"0.50241154",
"0.50186986",
"0.50163186",
"0.5008749",
"0.50... | 0.7138029 | 0 |
Pega o instante que terminou menos oque comecou e divide por 1000(milisegundo) | public long termina() {
return (System.currentTimeMillis() - inicio) / 1000;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DuploQuantidadeFaturacao(){\r\n faturacao = 0;\r\n quantidade = 0;\r\n }",
"@Test\n\tvoid calcularSalarioConMasCuarentaHorasPagoPositivoTest() {\n\t\tEmpleadoPorComision empleadoPorComision = new EmpleadoPorComision(\"Eiichiro oda\", \"p33\", 400000, 500000);\n\t\tdouble salarioEsperad... | [
"0.57835877",
"0.5642158",
"0.5626513",
"0.56103384",
"0.5551957",
"0.5520991",
"0.5514856",
"0.54792005",
"0.54606414",
"0.5449232",
"0.541578",
"0.53987193",
"0.53751606",
"0.53742075",
"0.5355826",
"0.5352461",
"0.53304124",
"0.5312822",
"0.53031975",
"0.52864695",
"0.5283... | 0.5555715 | 4 |
Sets whether or not native OS fonts should be used when possible. | public static void setUseNativeFonts ( final boolean useNativeFonts )
{
NativeFonts.useNativeFonts = useNativeFonts;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void doStandardFonts() {\r\n\t\trenderer.txt.setUseStandardFonts(ui.viewStandardFonts.isSelected());\r\n\t}",
"public boolean isFontSet() { return false; }",
"private void setFont() {\n\t}",
"private void setFont() {\n try {\n setFont(Font.loadFont(new FileInputStream(FONT_PATH),... | [
"0.72596335",
"0.6835969",
"0.669483",
"0.6621498",
"0.63954455",
"0.63669294",
"0.61762774",
"0.61742264",
"0.6134118",
"0.61088663",
"0.60672104",
"0.6033868",
"0.60256934",
"0.59900427",
"0.59400535",
"0.5919348",
"0.5912981",
"0.5912399",
"0.58909416",
"0.5874083",
"0.586... | 0.78050923 | 0 |
~ Constructors Creates a PushProjectIntoMultiJoinRule. | private PushProjectIntoMultiJoinRule()
{
super(
new RelOptRuleOperand(
ProjectRel.class,
new RelOptRuleOperand(MultiJoinRel.class, ANY)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Join createJoin();",
"Multi createMulti();",
"public Joins()\n {\n joins = new ArrayList<Join>();\n }",
"LogicalOperator rewriteJoin(ArrayList<CogroupInput> gis, LogicalPlan lp) throws ParseException, PlanException{\n\n log.trace(\"Entering rewriteJoin\");\n log.debug(\... | [
"0.52258205",
"0.51233685",
"0.4922506",
"0.49158898",
"0.48587722",
"0.48537588",
"0.48045284",
"0.4781775",
"0.45288515",
"0.44730625",
"0.44597092",
"0.44128743",
"0.4388128",
"0.43782568",
"0.43413603",
"0.43239498",
"0.4299166",
"0.42898378",
"0.42839038",
"0.42774022",
... | 0.78659034 | 0 |
TODO Autogenerated method stub | public boolean doBusiness() {
if(!verifyService.verify()) {
return false;
}
//doBusiness业务逻辑
System.out.println("处理业务逻辑。。。。");
//业务逻辑处理完后发送消息
sendMsgService.sendMsg();
return true;
} | {
"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 |
fire if last bullet was fired over 100ms ago | public void fireBullet(int direction , int posX, int posY ){
if ( clockBullet.getElapsedTime().asMilliseconds() > 100 ){
int lowestbulletNo = 10;
for( int i = 9; i > 0; i-- ){
if ( bulletSpace.get(i).isEnabled() == false){
lowestbulletNo = i;//find the first bullet in the gun barrol
}
}
if ( lowestbulletNo < 10 ){
bulletSpace.get(lowestbulletNo).setDirection(direction);
bulletSpace.get(lowestbulletNo).setDistance(0);
bulletSpace.get(lowestbulletNo).setPosX(posX - map.getX()) ;
bulletSpace.get(lowestbulletNo).setPosY(posY - map.getY()) ;
bulletSpace.get(lowestbulletNo).enabled(true);
bulletSpace.get(lowestbulletNo).setRotation(direction+1);
}
}
clockBullet.restart();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void fireBullet() {\n\r\n\t\tif (count > 0)\r\n\t\t\treturn;\r\n\t\t// ...and if all the bullets aren't currently in use...\r\n\t\tint slot = getAvailableBullet();\r\n\t\tif (slot < 0)\r\n\t\t\treturn;\r\n\t\t// ...then launch a new bullet\r\n\t\tbullets[slot].setLocation(locX, locY);\r\n\t\tbullets[slot].setDirec... | [
"0.66400826",
"0.6622434",
"0.63675034",
"0.63341856",
"0.6194662",
"0.6148526",
"0.6122824",
"0.6033919",
"0.598366",
"0.59150106",
"0.5913216",
"0.59077996",
"0.5897955",
"0.5839661",
"0.5832484",
"0.58319694",
"0.58254623",
"0.5809448",
"0.5809395",
"0.58042747",
"0.580001... | 0.581841 | 17 |
Returns the minimum ProbeLevel this MetricsRegistry is recording. | ProbeLevel minimumLevel(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Level getMinimumLevel() {\n\t\treturn minLevel;\n\t}",
"public int getLowerThreshold() {\n return lowerThreshold;\n }",
"public int getMinLoad() {\n\n\t\treturn this.minLoad;\n\t}",
"public int getLowerThreshold() {\r\n\t\tint lowerThreshold;\r\n\t\tlowerThreshold=this.lowerThreshold;... | [
"0.7070703",
"0.6517302",
"0.64663357",
"0.64287907",
"0.6332109",
"0.6329234",
"0.6140998",
"0.61157864",
"0.608604",
"0.59564775",
"0.59342015",
"0.58639103",
"0.58639103",
"0.58411455",
"0.5800394",
"0.5794524",
"0.5790124",
"0.5771786",
"0.57429355",
"0.569174",
"0.567869... | 0.7317139 | 0 |
Gets a set of all current probe names. The returned set is immutable and is a snapshot of the names. So the reader gets a stable view on the names. | Set<String> getNames(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Set<String> getNames() {\n\t\t//\t\tArrayList<String> names = new ArrayList<String>();\n\t\t//\t\tfor (NameSSA n : name.values())\n\t\t//\t\t\tnames.add(n.current());\n\t\treturn name.keySet();\n\t}",
"public Stream<String> getNames() {\n return names.stream();\n }",
"Collection<String> names(... | [
"0.736287",
"0.7259036",
"0.6837194",
"0.6759272",
"0.66951865",
"0.66312075",
"0.6622767",
"0.6574293",
"0.6555181",
"0.6487925",
"0.6434715",
"0.6346447",
"0.6254499",
"0.6148589",
"0.6145237",
"0.6136373",
"0.6126867",
"0.61112154",
"0.6109045",
"0.60915107",
"0.6089013",
... | 0.7256544 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.