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 |
|---|---|---|---|---|---|---|
Returns whether the stack is empty. | public boolean empty() {
return data.size() == 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean emptyStack() {\n return (expStack.size() == 0);\n }",
"public boolean isEmpty()\n {\n return stack.size() == 0;\n }",
"public boolean isEmpty() {\n \treturn stack.size() == 0;\n }",
"public boolean isEmpty()\n {\n return stack.isEmpty();\n }",
"publi... | [
"0.9056825",
"0.89871675",
"0.89270204",
"0.89137876",
"0.88953143",
"0.8862492",
"0.881352",
"0.8804085",
"0.8804085",
"0.8802169",
"0.8761835",
"0.8756231",
"0.87347007",
"0.87344116",
"0.8714369",
"0.87058264",
"0.8695712",
"0.8680448",
"0.8662702",
"0.863666",
"0.8620814"... | 0.0 | -1 |
add an element at a specific index. | public static void main(String[] args) {
List<String> s = new ArrayList<String>();
s.add("SONALI");// 0 index
s.add("SUNITA");// 1 index
s.add(1, "SUHANI");// SUNITA WIL BE MOVED TO 2 index
System.out.println(s);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void add(int index, T element);",
"void add(int index, T element);",
"void add(int index, Object element);",
"public void add(int index, E element);",
"public abstract void add(T element, int index);",
"public void add(int index, Object element) {\r\n addBefore(element, (index == size ? header : e... | [
"0.8776814",
"0.8776814",
"0.8744577",
"0.8694148",
"0.8523414",
"0.82142407",
"0.7895779",
"0.7874552",
"0.78331935",
"0.78182995",
"0.7791892",
"0.77714413",
"0.76597047",
"0.76439077",
"0.7641874",
"0.76406324",
"0.76278305",
"0.75954944",
"0.75835043",
"0.75808823",
"0.75... | 0.0 | -1 |
methods to be implemented | public int calculateVotes() {
return 1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n... | [
"0.7110757",
"0.69562864",
"0.69562864",
"0.6896726",
"0.6878356",
"0.6804304",
"0.67587715",
"0.672219",
"0.66528046",
"0.6641446",
"0.6635467",
"0.6586215",
"0.6577519",
"0.6563472",
"0.654419",
"0.65440685",
"0.65352213",
"0.6515858",
"0.6515858",
"0.6511036",
"0.65047824"... | 0.0 | -1 |
System.out.println("1,"+cGoodness); System.out.println("2,"+this.currentGoodness); System.out.println("getGoodnessDiff"+(cGoodness this.currentGoodness)); | public double getGoodnessDiff(double cGoodness) {
return (cGoodness - this.currentGoodness);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getDif()\n {\n return difficult;\n }",
"public int getProS() {\n/* 60 */ return this.proS;\n/* */ }",
"public int getGold(){\n return this.gold;\n }",
"public int getWorth() { return 1; }",
"public int getProT() {\n/* 78 */ return this.proT;\n/* */... | [
"0.63599175",
"0.6286766",
"0.59905905",
"0.59381205",
"0.59325385",
"0.58771783",
"0.5866055",
"0.5846731",
"0.58016735",
"0.57880634",
"0.5767795",
"0.57413936",
"0.5718941",
"0.57075495",
"0.5699884",
"0.5696965",
"0.5690213",
"0.56882775",
"0.5683011",
"0.5672302",
"0.567... | 0.6884634 | 0 |
Instantiates a new New document request dto. | public NewDocumentRequestDto() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public SingleRequest<?> create() {\n return new SingleRequest<>();\n }",
"public CreateDocumentController() {\n }",
"@POST\r\n public DocumentoDTO crearDocumento(DocumentoDTO documento){\r\n return new DocumentoDTO(logic.crearDocumento(documento.toEntity()));\r\n }",
"publi... | [
"0.60371625",
"0.5978692",
"0.59632385",
"0.5930882",
"0.58771753",
"0.57472676",
"0.5711239",
"0.566643",
"0.566382",
"0.5654646",
"0.56260896",
"0.5605648",
"0.56042993",
"0.5592029",
"0.5589057",
"0.55715203",
"0.5548892",
"0.5529896",
"0.5523293",
"0.55048597",
"0.5490047... | 0.7985217 | 0 |
Add an element. Extend the array, if necessary. | public void addElement(klasse o) {
if (OLast >= OSize) extend();
O[OLast++] = o;
ON++;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void add(T element){\r\n if (element == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n \r\n // If array is full, double the size\r\n if (size == elements.length) {\r\n resize(elements.length * 2);\r\n }\r\n \r\n elements[size] = element;\r\n ... | [
"0.76686954",
"0.74851155",
"0.74687976",
"0.7236848",
"0.7234069",
"0.72079545",
"0.7191772",
"0.71495",
"0.71209073",
"0.71136636",
"0.7108366",
"0.70951533",
"0.7067297",
"0.70622826",
"0.7040269",
"0.7035066",
"0.703323",
"0.70278144",
"0.7021878",
"0.69904786",
"0.693063... | 0.0 | -1 |
Extend the array, or get space by compressing it. | public void extend() {
if (ON < OLast / 2) {
compress();
return;
}
klasse o[] = (klasse[]) (new Object[2 * OSize]);
System.arraycopy(O, 0, o, 0, OLast);
OSize *= 2;
O = o;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void extendArray() {\n int index = size();\n Object[] temp = new Object[index + 1];\n for (int i=0; i < index; i++) {\n temp[i] = AL[i];\n }\n AL = temp;\n }",
"private void grow() {\n int growSize = size + (size<<1);\n array = Arrays.... | [
"0.6834972",
"0.63621175",
"0.6227546",
"0.61219835",
"0.6109796",
"0.6105929",
"0.60907",
"0.60828406",
"0.6019074",
"0.60187167",
"0.5853225",
"0.5841873",
"0.58014613",
"0.58008367",
"0.578745",
"0.5780825",
"0.57501084",
"0.5737114",
"0.5723198",
"0.57094306",
"0.57087356... | 0.65378135 | 1 |
Get an enumeration of this array. | public Enumeration<klasse> elements() {
compress();
EN = 0;
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public E output(int i) {\n return EnumMultiset.this.enumConstants[i];\n }",
"protected String getEnumeration()\n {\n return enumeration;\n }",
"public com.microsoft.schemas.xrm._2011.metadata.ImeMode.Enum getImeModeArray(int i)\r\n {\r\n synchronized... | [
"0.6522127",
"0.63263184",
"0.622976",
"0.6189847",
"0.6134288",
"0.612602",
"0.6106363",
"0.60650164",
"0.59970975",
"0.5951702",
"0.59332937",
"0.5900151",
"0.5886304",
"0.58852834",
"0.5882364",
"0.583674",
"0.5802216",
"0.57978195",
"0.57956284",
"0.579186",
"0.579186",
... | 0.50606704 | 77 |
Clear this array, but keep its memory! | public void removeAllElements() {
for (int i = 0; i < OLast; i++) O[i] = null;
ON = OLast = 0;
Gap = -1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void clear() {\n array.reset();\n }",
"@Override\n public void clear() {\n array = null;\n }",
"public void clear()\n\t{\n\t\tarraySize = 0;\n\t}",
"@Override\n public void clear() {\n for (int i = 0; i < this.size; i++) {\n this.data[i] = null;\n ... | [
"0.85122997",
"0.8298667",
"0.82131964",
"0.780934",
"0.7797042",
"0.7787704",
"0.7693049",
"0.7661516",
"0.761083",
"0.75804037",
"0.7580362",
"0.75784683",
"0.75706446",
"0.75382495",
"0.7529827",
"0.7504896",
"0.7503417",
"0.74871385",
"0.7461587",
"0.7442315",
"0.7383601"... | 0.0 | -1 |
Remove a single element. This will also compress the part below the element, or all, if it is not found. | public void removeElement(klasse o) {
int i = indexOf(o);
if (i < 0) return;
O[i] = null;
ON--;
if (Gap < 0 || Gap > i) Gap = i;
if (i == OLast - 1) OLast--;
while (OLast > 0 && O[OLast - 1] == null) OLast--;
if (Gap >= OLast) Gap = -1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"E remove(E element) {\n\t\t\tshort index = (short)((element.hashCode() >> 24) & 0x000000FF);\n\t\t\tE obj = nodes[index].remove(this, element.hashCode(), (byte) 1);\n\t\t\tif (obj != null) {\n\t\t\t\tsize--;\n\t\t\t}\n\t\t\treturn obj;\n\t\t}",
"public T remove (T element);",
"public T remove(T element) throws... | [
"0.72035444",
"0.71303105",
"0.6938551",
"0.68517476",
"0.68379796",
"0.68056977",
"0.6694632",
"0.65930486",
"0.65473396",
"0.65308857",
"0.6494083",
"0.63976854",
"0.6364606",
"0.62915874",
"0.62693554",
"0.62673587",
"0.6264286",
"0.62459",
"0.6240767",
"0.62216437",
"0.62... | 0.0 | -1 |
Find an element. Compress on the way. Check for the last element, returned by nextElement() first. Equality is checked with the equal() function. | public int indexOf(klasse o) {
if (EN > 0 && EN <= OLast && O[EN - 1].equals(o)) return EN - 1;
if (Gap < 0) {
for (int i = 0; i < OLast; i++) {
if (O[i].equals(o)) return i;
}
return -1;
}
for (int i = 0; i < Gap; i++) {
if... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int findNextElement() {\n\t\tif (hasNext()) {\n\t\t\tint value = this.index + 1;\n\t\t\treturn value;\n\n\t\t}\n\t\treturn -1;\n\t}",
"Object getNextElement() throws NoSuchElementException;",
"private void findNext() {\n \tthis.find(true);\n }",
"public T getElement(T equalElement) {\n\t\tItera... | [
"0.61543995",
"0.60146236",
"0.59800863",
"0.5770165",
"0.5736793",
"0.5732932",
"0.57000893",
"0.56424254",
"0.5573344",
"0.5573344",
"0.5573344",
"0.5573344",
"0.5573344",
"0.5573344",
"0.5573344",
"0.5573344",
"0.5573344",
"0.5573344",
"0.5573344",
"0.5573344",
"0.5573344"... | 0.0 | -1 |
Get the element at a given position. Second access will always be effective. First access compresses. Throws an exception, if the index is invalid. | public klasse elementAt(int n) {
if (n < 0 || n >= ON)
throw new ArrayIndexOutOfBoundsException(n);
if (Gap < 0 || n < Gap) return O[n];
int k = Gap;
for (int i = Gap; i < OLast; i++) {
if (O[i] == null) continue;
O[k] = O[i];
O[i] = null;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract Object get(int pos) throws IndexOutOfBoundsException;",
"public int get(int index);",
"public T get(int index);",
"public T get(int index);",
"public T get(int index);",
"E get(int i) throws IndexOutOfBoundsException;",
"abstract int get(int index);",
"E get( int index );",
"T get(i... | [
"0.7729813",
"0.77137625",
"0.7654991",
"0.7654991",
"0.7654991",
"0.7632187",
"0.7584717",
"0.75785273",
"0.7554718",
"0.7554718",
"0.7554718",
"0.7554718",
"0.7554718",
"0.7521098",
"0.7521098",
"0.75179243",
"0.74960274",
"0.7444662",
"0.7442194",
"0.7442194",
"0.73861283"... | 0.0 | -1 |
Get the array itself (compressed). Make sure, you also use size() to determine the true length of the array. Do not change objects beyond the size! Do not set objects to null! | public Object[] getArray() {
compress();
return O;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public byte[] array()\r\n/* 127: */ {\r\n/* 128:156 */ ensureAccessible();\r\n/* 129:157 */ return this.array;\r\n/* 130: */ }",
"@Override\n public Object[] toArray() {\n return Arrays.copyOf(data, size);\n }",
"public Object[] backingArray()\n {\n return array;\n }... | [
"0.63537186",
"0.63502115",
"0.6341958",
"0.6246997",
"0.6228132",
"0.6204955",
"0.61233914",
"0.6113753",
"0.6109942",
"0.61051977",
"0.6003784",
"0.5968867",
"0.59618837",
"0.59570205",
"0.5950167",
"0.59431976",
"0.59317875",
"0.5928844",
"0.5910383",
"0.59071213",
"0.5884... | 0.74684197 | 0 |
Copy the array into an object array of at least the same size. | public void copyInto(Object o[]) {
compress();
System.arraycopy(O, 0, o, 0, ON);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Object[] copyArray(Object[] source, int size) {\n\t\tObject[] destination = new Object[size];\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tdestination[i] = source[i];\n\t\t}\n\n\t\treturn destination;\n\t}",
"public void copyInto(Object[] anArray);",
"private Object copyArrayGrow1(Object array, Class... | [
"0.7569432",
"0.75068843",
"0.701532",
"0.6976176",
"0.67187667",
"0.6689796",
"0.660737",
"0.65425444",
"0.6483618",
"0.64540243",
"0.6413014",
"0.6397238",
"0.6290462",
"0.6234219",
"0.62251854",
"0.6215991",
"0.62082684",
"0.61793995",
"0.6127407",
"0.611628",
"0.61017424"... | 0.6411379 | 11 |
Test for equality with another vector, using equals. | public boolean equals(MyVector V) {
if (V.ON != ON) return false;
V.compress();
compress();
for (int i = 0; i < ON; i++) {
if (!V.O[i].equals(O[i])) return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean equals(Vector other){\n\t\treturn x == other.x && y == other.y && z == other.z;\n\t}",
"public static boolean equal(VectorIntf x, VectorIntf y) {\r\n if (x==null && y==null) \r\n\t\t\tthrow new IllegalArgumentException(\"both args null\");\r\n if (x==null || y==null) return false;\r\n if ... | [
"0.7307093",
"0.6998161",
"0.6728373",
"0.6714511",
"0.6581016",
"0.6491747",
"0.64475745",
"0.636415",
"0.6352992",
"0.6344585",
"0.6294116",
"0.62173635",
"0.6179345",
"0.6151063",
"0.61348146",
"0.6118833",
"0.6071692",
"0.60617304",
"0.6060764",
"0.59827465",
"0.5977996",... | 0.64076406 | 7 |
Test for equality with another vector, using object equality. | public boolean equalsIdentical(MyVector V) {
if (V.ON != ON) return false;
V.compress();
compress();
for (int i = 0; i < ON; i++) {
if (V.O[i] != O[i]) return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test//test equal\n public void testEqual() {\n MyVector vD1 = new MyVector(ORIGINALDOUBLEARRAY);\n MyVector vD2 = new MyVector(ORIGINALDOUBLEARRAY);\n double[] doubleArray = new double[]{3.0, 2.3, 1.0, 0.0, -1.1};\n MyVector diffVD3 = new MyVector(doubleArray);\n assertEquals... | [
"0.6972197",
"0.691968",
"0.67698556",
"0.67203367",
"0.66702485",
"0.6518693",
"0.63830745",
"0.63781255",
"0.6371607",
"0.6358009",
"0.6341278",
"0.6316928",
"0.62413335",
"0.6156901",
"0.6151393",
"0.6130774",
"0.6105292",
"0.61026716",
"0.60958534",
"0.6062969",
"0.605404... | 0.60203004 | 23 |
Truncate the vector to n elements, if it has more. | public void truncate(int n) {
if (n >= ON) return;
compress();
for (int i = n; i < OLast; i++) O[i] = null;
OLast = ON = n;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void truncate(int limit);",
"public void truncate() {\n if (this.size > this.limit) {\n removeFirst();\n }\n }",
"private static void trim( List<?> list, int n ) {\n \twhile (list.size() > n) {\n \t\tlist.remove(list.size() - 1);\n \t}\n }",
"pub... | [
"0.6411758",
"0.61537164",
"0.5974539",
"0.5559987",
"0.53897136",
"0.53222346",
"0.5218205",
"0.51302254",
"0.5023491",
"0.50189716",
"0.501174",
"0.5001852",
"0.4977843",
"0.4965593",
"0.4953537",
"0.49307498",
"0.49222496",
"0.49067786",
"0.4900655",
"0.48620975",
"0.48457... | 0.64103174 | 1 |
Gets a map that contains attributes that aren't bound to any typed property on this class. the map is keyed by the name of the attribute and the value is the string value of the attribute. the map returned by this method is live, and you can add new attribute by updating the map directly. Because of this design, there'... | public Map<QName, String> getOtherAttributes() {
return otherAttributes;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Map<String,Object> getAttributeMap() {\r\n return Maps.newHashMap(attributeMap);\r\n }",
"BidiMap<String, DictionarySimpleAttribute> getUnmodifiableAttributes() {\n\t\treturn UnmodifiableBidiMap.unmodifiableBidiMap(this.attributes);\n\t}",
"@Override\n\tpublic Map<String, Object> getAttributeM... | [
"0.7770249",
"0.768716",
"0.7652428",
"0.7615729",
"0.75460434",
"0.7474774",
"0.7440128",
"0.73869896",
"0.7327739",
"0.73243856",
"0.73243856",
"0.7301104",
"0.7224136",
"0.72090006",
"0.71638",
"0.7125818",
"0.7122004",
"0.7122004",
"0.7122004",
"0.70704186",
"0.7054213",
... | 0.6412912 | 43 |
Constructor for GameObject given position rotation and sprite | public PickupWeaponBase(Vec2 position, WeaponBase weaponBarrel) {
super(position, Vec2.ZERO, new Sprite("items/weaponBody"));
setSize(new Vec2(0.7, 0.7));
setRenderLayer(RenderLayer.RenderLayerName.HIGH_BLOCKS);
this.cli = weaponBarrel;
collider = new CircleCollider(this, 30);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"GameObject(int x, int y){\n loadSprite();\n this.x = x;\n this.y = y;\n }",
"public GameObject(GameObjectDefinition definition, Location location,\n\t\t\tint type, int rotation) {\n\t\tthis.definition = definition;\n\t\tthis.location = location;\n\t\tthis.type = type;\n\t\tthis.rotation =... | [
"0.67743075",
"0.65390664",
"0.65011644",
"0.6478393",
"0.64424556",
"0.63244694",
"0.6162789",
"0.61271566",
"0.6122893",
"0.61025965",
"0.60162276",
"0.60037357",
"0.5979885",
"0.5956375",
"0.58601713",
"0.5851385",
"0.58163166",
"0.5723811",
"0.5712145",
"0.5690284",
"0.56... | 0.0 | -1 |
Must be implemented with Describable. Prints a message to the screen when PickUpWeaponBase is picked up by player. | @Override
public void showMessage() {
MessageHandler.getInstance()
.writeMessage("This Base is different! \n Behold!");
Player p = ((RomInntrenger) GameApplication.getInstance()).getClosestPlayer(transform.getGlobalPosition());
p.getCurrentWeapon().setWeaponBase(cli);
col... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void toSelectingWeapon() {\n }",
"public void equipSelectedWeapon() {\n }",
"public void pickUp(Item item) {\n this.curItem = item;\n this.curItem.setNonDamagablePlayer(this);\n if (item instanceof PickupableWeaponHolder) {\n this.weapon = ((PickupableWeaponHolder)(item)).getWeapon()... | [
"0.6825087",
"0.6813447",
"0.6724722",
"0.6575566",
"0.62215394",
"0.62032247",
"0.6175368",
"0.61686593",
"0.6093377",
"0.60658777",
"0.6033952",
"0.5998935",
"0.599208",
"0.59615004",
"0.5946119",
"0.5916033",
"0.5862785",
"0.58211535",
"0.58182234",
"0.5788129",
"0.5771971... | 0.5967809 | 13 |
not used right now | private void addStudents() {
SimpleDateFormat sdf = new SimpleDateFormat("u");
String className = SchoolClassHandler.getTimetable().getClassName(new Integer(sdf.format(new Date())), new Date());
addButton(className);
} | {
"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 grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tprotected void interr()... | [
"0.6185394",
"0.61726886",
"0.6104661",
"0.6006777",
"0.5998131",
"0.59694767",
"0.5904649",
"0.5904649",
"0.5857314",
"0.58547324",
"0.58429813",
"0.58190024",
"0.5817078",
"0.5808394",
"0.5766198",
"0.5761523",
"0.57545733",
"0.5729107",
"0.5725973",
"0.5718025",
"0.568516"... | 0.0 | -1 |
Compiles an Archive using Shrinkwrap, containing those external dependencies necessary to run the tests. Note: This code will be needed at the start of each Arquillian test, but should not need to be edited, except to pass .class values to .addClasses(...) which are appropriate to the functionality you are trying to te... | @Deployment
public static Archive<?> createTestArchive() {
File[] libs = Maven.resolver().loadPomFromFile("pom.xml").resolve("io.swagger:swagger-jaxrs:1.5.15")
.withTransitivity().asFile();
return ShrinkWrap.create(WebArchive.class, "test.war")
.addPackages(true, "uk.ac.ncl.tongzhou.enterprisemiddleware")... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Deployment\n public static Archive<?> createTestArchive() {\n //HttpComponents and org.JSON are required by CustomerService\n File[] libs = Maven.resolver().loadPomFromFile(\"pom.xml\").resolve(\n \"org.apache.httpcomponents:httpclient:4.3.2\",\n \"org.json:json:2014... | [
"0.71713585",
"0.6890433",
"0.58845353",
"0.5844497",
"0.5731896",
"0.57016337",
"0.57010204",
"0.56170714",
"0.548788",
"0.54430616",
"0.5352575",
"0.5308061",
"0.5288589",
"0.52635705",
"0.52440965",
"0.51558685",
"0.49649665",
"0.49365065",
"0.48962057",
"0.4890721",
"0.48... | 0.663017 | 2 |
Register an initial user | @SuppressWarnings("unchecked")
@Test
@InSequence(3)
public void testDuplicateEmail() throws Exception {
Customer customer = createCustomerInstance("Jane Doe", "jane@mailinator.com", "02125551234");
customerRestService.createCustomer(customer);
// Register a different user with the same email
Customer anothe... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void register_user() {\n\n\t\tHttpRegister post = new HttpRegister();\n\t\tpost.execute(Config.URL + \"/api/newuser\");\n\n\t}",
"Boolean registerNewUser(User user);",
"void registerUser(User newUser);",
"private void registerUser()\n {\n /*AuthService.createAccount takes a Consumer<Boolean... | [
"0.78692836",
"0.7506739",
"0.74891925",
"0.7438242",
"0.7378627",
"0.7249776",
"0.7230874",
"0.72092456",
"0.7148131",
"0.70739675",
"0.70463264",
"0.69523215",
"0.6936487",
"0.69267696",
"0.6895335",
"0.68780243",
"0.6850317",
"0.6848932",
"0.6845927",
"0.68211913",
"0.6783... | 0.0 | -1 |
Creates a new instance of GLEnquiry | public GLEnquiry() {
this.setMenuName("Enquiry");
// this.setMenuList(new GLChartOfAccountsAnalysisBalancesMenu());
// this.setMenuList(new GLChartOfAccountsBalancesMenu());
this.setMenuList(new GLTransactionDaySummaryMI());
this.setMenuList(new GLTransactionsDetailMI());
t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public GpflFactoryImpl()\n {\n super();\n }",
"public Requisition() {\n\n }",
"Geq createGeq();",
"public InquiryGrupomuscularRequest()\r\n\t{\r\n\r\n\t}",
"public GantBuilder ( ) { }",
"NFRSoftgoal createNFRSoftgoal();",
"public railway_enquiry() {\n initComponents();\n }",
"public... | [
"0.61612815",
"0.5996081",
"0.58458394",
"0.582304",
"0.57684535",
"0.57475543",
"0.5659034",
"0.56160194",
"0.56118834",
"0.55166143",
"0.54892564",
"0.54727715",
"0.54699713",
"0.54407895",
"0.5416347",
"0.5413172",
"0.5395688",
"0.53933614",
"0.5376269",
"0.5368339",
"0.53... | 0.6858784 | 0 |
Generate a key for the new list | public void addNewList(GroceryList list) {
String key = listsRef.push().getKey();
Map<String, Object> postValues = list.toMap();
// TODO: lastUpdated
// Set the values
listsRef.child(key).setValue(postValues);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public KeyGenerator(SinglyLinkedList wList) {\n generateKey(wList);\n }",
"private int genKey()\n {\n return (nameValue.getData() + scopeDefined.getTag()).hashCode();\n }",
"String newKey();",
"private String createKey(ListPrefix listPrefix, KeyPrefix keyPrefix,\n ... | [
"0.6924966",
"0.68250537",
"0.68142366",
"0.6690118",
"0.6618211",
"0.6560645",
"0.6422024",
"0.6369774",
"0.6350031",
"0.62787515",
"0.625755",
"0.61643106",
"0.60664797",
"0.60648525",
"0.60615486",
"0.60400623",
"0.60230297",
"0.6005248",
"0.5977933",
"0.596904",
"0.594662... | 0.0 | -1 |
/ The reason is that the smallest and greater than one factor of a number cannot be more than the sqrt of N. And we stop as soon as we find a factor. For example, if N is 49, the smallest factor is 7. For 15, smallest factor is 3. | public static boolean isPrime(int num){
if(num<=1){
return false;
}
for(int i=2;i<=(long)Math.sqrt(num) ; i++){
if(num%i==0){
return false;
}
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int solution1(int N) {\n int numFactors = 0;\n for (int i = 1; i <= (double) Math.sqrt(N); i++) {\n if (N % i == 0) {\n if (i * i != N) {\n numFactors = numFactors + 2;\n } else if (i * i == N) {\n numFactors = numF... | [
"0.7419769",
"0.6947678",
"0.650291",
"0.64552504",
"0.6368214",
"0.63496864",
"0.63379526",
"0.6293993",
"0.6290237",
"0.62370485",
"0.6232179",
"0.6230693",
"0.61897004",
"0.6178059",
"0.6157577",
"0.6133451",
"0.6118565",
"0.6111401",
"0.6089064",
"0.6079502",
"0.6073985",... | 0.0 | -1 |
/ inizializza i mock ed il servizio da testare | @Before
public void setup() {
MockitoAnnotations.initMocks(this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void mock(){\n\n }",
"private Mocks() { }",
"public void testMock(){\n\t}",
"private DataClayMockObject() {\n\n\t}",
"@Before\n\tpublic void inicializarEnCadaTest() {\n\t\tthis.servicioDocumento = spy (new ServicioDocumentoImpl(repositorioDocumento));\n\n\t}",
"private MockClientFacade() {\... | [
"0.75723696",
"0.72790915",
"0.68689317",
"0.6838007",
"0.678331",
"0.6725844",
"0.65919346",
"0.65337664",
"0.6354191",
"0.6328691",
"0.6269765",
"0.6253151",
"0.6227518",
"0.62149745",
"0.62149745",
"0.6210237",
"0.61968875",
"0.61525613",
"0.6133599",
"0.611367",
"0.609958... | 0.5787649 | 60 |
/ verifica che, quando viene usato il servizio per creare un consumatore: 1) il consumatore viene salvato tramite il repository e 2) viene pubblicato un evento di creazione del consumatore / configura ConsumerRepository.save per settare l'id del consumatore | @Test
public void createConsumerTest() {
when(consumerRepository.save(any(Consumer.class)))
.then(invocation -> {
Consumer consumer = (Consumer) invocation.getArguments()[0];
consumer.setId(CONSUMER_ID);
return consumer;
});
/* invoca la creazione del consumatore */
Consumer consumer = co... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic boolean ajouterConseiller(Conseiller conseiller) {\n\t\treturn false;\n\t}",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,ClienteArchivo clientearchivo,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(ClienteArchivoCo... | [
"0.5799657",
"0.57285386",
"0.5723809",
"0.5713809",
"0.5711758",
"0.5695808",
"0.567103",
"0.56546843",
"0.5597595",
"0.5594069",
"0.5523391",
"0.552207",
"0.55032235",
"0.5499445",
"0.54940677",
"0.54924506",
"0.549185",
"0.54722416",
"0.5457981",
"0.54508877",
"0.54447806"... | 0.6225922 | 0 |
/ verifica che, quando viene usato il servizio per cercare un consumatore: 1) il consumatore viene cercato tramite il repository / configura ConsumerRepository.findById per trovare il consumatore | @Test
public void finConsumerdByIdTest() {
when(consumerRepository.findById(CONSUMER_ID))
// .thenReturn(Optional.of(CONSUMER));
.then(invocation -> {
Consumer consumer = new Consumer(CONSUMER_FIRST_NAME, CONSUMER_LAST_NAME);
consumer.setId(CONSUMER_ID);
return Optional.of(consumer);
});
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t@Transactional(readOnly=true)\n\tpublic List<Interesado> findByConsumidor(Consumidor consumidor) { \n\t\tSystem.out.println(\"entro2\");\n\t\treturn interesadoDao.findByConsumidor(consumidor); \n\t}",
"public Cliente buscarClientePorDocumento(String id) throws ExceptionService {\n Optional<Cl... | [
"0.5967618",
"0.5912499",
"0.57905096",
"0.5723887",
"0.5681413",
"0.56775653",
"0.5672302",
"0.5640779",
"0.56279725",
"0.5617356",
"0.5616211",
"0.5579485",
"0.55792266",
"0.55790293",
"0.5570609",
"0.55632114",
"0.5560025",
"0.55577433",
"0.5550008",
"0.55408794",
"0.55269... | 0.64137316 | 0 |
reset the start components | public void checkAndSetStart() {
System.out.println(" checkAndSetStart "+this.id +" size:"+this.components.size());
if(hasNoStart()) {
List<ComponentConfig> longestVisitedComps = new ArrayList<ComponentConfig>();
ComponentConfig longestVisitedComp = null;
int longestVisited = 0;
for(ComponentCo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void reset()\n {\n m_source_.setToStart();\n updateInternalState();\n }",
"public void reset() {\n //mLoader.reset();\n start();\n }",
"public void resetClick() {\n timeline.stop();\n startButton.setText(\"Start\");\n isRunning = false;\n ... | [
"0.7174821",
"0.7147488",
"0.7147273",
"0.7136476",
"0.70892423",
"0.7073714",
"0.7058236",
"0.70578647",
"0.7038836",
"0.70217323",
"0.7011002",
"0.6993751",
"0.69895935",
"0.6964412",
"0.69639784",
"0.6893282",
"0.68902093",
"0.6886458",
"0.68593323",
"0.6849909",
"0.684977... | 0.0 | -1 |
remove call to other component that does not existed in this submodel | public void clean() {
for(ComponentConfig comp: components ) {
List<Integer> cleanCalls = new ArrayList<Integer>();
if(comp.getCalls()!=null) {
for(int call:comp.getCalls()) {
if(hasComp(call)) {
cleanCalls.add(call);
}
}
int[] result = new int[cleanCalls.size()];
int i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\npublic void remove(VirtualComponent component) {\n\t\n}",
"@Override\npublic void remove(VirtualComponent comp, ObjectAdapter childAdapter) {\n\t\n}",
"@Override\npublic void remove(VirtualContainer parent, VirtualComponent component) {\n\t\n}",
"public void removeComponent(DrawingComponent compon... | [
"0.66298264",
"0.66226536",
"0.65371764",
"0.6404002",
"0.62908447",
"0.6214268",
"0.61755824",
"0.61630327",
"0.60943323",
"0.60639256",
"0.6050994",
"0.6046711",
"0.6042226",
"0.60294884",
"0.6028008",
"0.6028008",
"0.6028008",
"0.6028008",
"0.6028008",
"0.6028008",
"0.6028... | 0.5931345 | 27 |
Default Constructor Kelly May 11/11/2020 | public DBViewAllPilot() {
try {
statement = connection.createStatement();
viewAll(); //call the viewAll function;
}catch(SQLException ex) {
System.out.println("Database connection failed DBViewAllAircraft");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"defaultConstructor(){}",
"private Default()\n {}",
"void DefaultConstructor(){}",
"Constructor() {\r\n\t\t \r\n\t }",
"public Constructor(){\n\t\t\n\t}",
"ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}",
"public Pitonyak_09_02() {\r\n }",
"private Instantiat... | [
"0.79305947",
"0.7914428",
"0.78157705",
"0.7459926",
"0.7459294",
"0.7414234",
"0.7309289",
"0.72836655",
"0.7254249",
"0.72177505",
"0.7104103",
"0.7099299",
"0.70473444",
"0.69796264",
"0.6979096",
"0.6970475",
"0.6959638",
"0.6954579",
"0.69257355",
"0.69237936",
"0.69188... | 0.0 | -1 |
viewAll method that calls the View_All_Pilot stored procedure in the SQL DB Kelly May 11/11/2020 | public void viewAll() {
try {
String method = "{call CAFDB.dbo.View_All_Pilot}";
callable = connection.prepareCall(method);
//execute the query
ResultSet rs = callable.executeQuery();
/**
* Output from View_All_Pilot:
* 1 = PilotID - int
* 2 = FirstName - varchar (string)
* 3... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DBViewAllPilot() {\n\t\ttry {\n\t\tstatement = connection.createStatement(); \n\t\tviewAll(); //call the viewAll function; \n\t\t\n\t}catch(SQLException ex) {\n\t\tSystem.out.println(\"Database connection failed DBViewAllAircraft\"); \n\t}\n}",
"@RequestMapping(\"/pilot/viewall\")\n\tpublic String viewall... | [
"0.78104985",
"0.6823169",
"0.64761144",
"0.59811413",
"0.5969001",
"0.5915256",
"0.59043086",
"0.5856143",
"0.584759",
"0.5771593",
"0.56997705",
"0.56974",
"0.5670845",
"0.56701225",
"0.56266755",
"0.56029576",
"0.5510244",
"0.5501344",
"0.5498585",
"0.54932606",
"0.5418907... | 0.8001571 | 0 |
multiple get methods to access the ArrayLists individually | public ArrayList<Integer> getPilotID(){
return pilotID;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ArrayList<E> getAll();",
"public List getList();",
"public ArrayList getList() {\n \t\treturn list;\n \t}",
"public ArrayList getStudents();",
"Object getTolist();",
"public abstract List<T> getList();",
"public Object get(ListField list, int index) {\nif ( list == _lfBoys ) {\nreturn _listBoys.element... | [
"0.6407092",
"0.6296718",
"0.62056726",
"0.6195927",
"0.6175108",
"0.615329",
"0.6062536",
"0.6059419",
"0.59828925",
"0.5957558",
"0.5948418",
"0.5945747",
"0.59280235",
"0.5927191",
"0.5909074",
"0.58852863",
"0.5881122",
"0.58768",
"0.5871893",
"0.5854064",
"0.58371294",
... | 0.0 | -1 |
appends first and last name into an arrayList | public ArrayList<String> getFullName(){
ArrayList<String> fullName = new ArrayList<>();
for(int i =0; i<firstName.size(); i++) {
fullName.add(firstName.get(i) + " " + lastName.get(i));
}
return fullName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setDetails() {\n\t\tScanner input = new Scanner(System.in);\n\t\t\n//\t\tList<String> list1 = new ArrayList<String>();\n//\t\tlist1.add(\"Jhone\");\n//\t\tlist1.add(\"Jim\");\n\t\t\n//\t\tList<String> list2 = new ArrayList<String>();\n//\t\tlist2.add(\"USA\");\n//\t\tlist2.add(\"CA\");\n\n\t\tSystem.ou... | [
"0.60713106",
"0.6064289",
"0.5979176",
"0.5963248",
"0.59397835",
"0.5907029",
"0.58442277",
"0.5827114",
"0.57660264",
"0.57401323",
"0.57287854",
"0.57124156",
"0.5710012",
"0.56376684",
"0.56342196",
"0.563117",
"0.5630216",
"0.56263727",
"0.55781615",
"0.55687314",
"0.55... | 0.66835713 | 0 |
clearAllPilot method to clear all the ArrayLists with pilot information Kelly May 11/11/2020 | public void clearAllPilot() {
pilotID.clear();
firstName.clear();
lastName.clear();
dob.clear();
employeeNumber.clear();
dateOfHire.clear();
dateLeftCAF.clear();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void reset() {\r\n\t\tpilots.clear();\r\n\t\tcabinCrew.clear();\r\n\r\n\t}",
"public void clear(){\r\n MetersList.clear();\r\n }",
"void clearAllLists() {\n this.pm10Sensors.clear();\n this.tempSensors.clear();\n this.humidSensors.clear();\n }",
... | [
"0.6892552",
"0.6821955",
"0.6765913",
"0.663909",
"0.6606045",
"0.6489515",
"0.6364951",
"0.6364951",
"0.63397497",
"0.6308922",
"0.6297752",
"0.6282615",
"0.6282282",
"0.62819594",
"0.62819594",
"0.6263264",
"0.6263012",
"0.6258313",
"0.62041694",
"0.6201935",
"0.61978495",... | 0.83434516 | 0 |
TODO Autogenerated method stub | @Override
public Object getModel() {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void setModel(Object o) {
} | {
"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 |
construct a new Atom | public Atom(int givenProtons, int givenNeutrons, int givenElectrons)
{
protons = givenProtons;
neutrons = givenNeutrons;
electrons = givenElectrons;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected Atom createXAtom() {\n \t\treturn new Atom();\n \t}",
"private void constructAtom(String name, Set<SWRLAtom> antecedent, String value, String operator) throws Exception {\n if (searchOntology(name)) {\n if (ontologyOwlClassVocabulary.containsKey(name)) {\n constructClas... | [
"0.7430135",
"0.6195304",
"0.6102732",
"0.5994514",
"0.5942457",
"0.5689618",
"0.5662915",
"0.56356543",
"0.5554161",
"0.5459157",
"0.5437875",
"0.53328395",
"0.5322808",
"0.5273481",
"0.5255578",
"0.51804143",
"0.51780844",
"0.5142374",
"0.5113681",
"0.5082665",
"0.5059404",... | 0.6178724 | 2 |
get the atomic mass of this atom | public int getAtomicMass()
{
return protons+neutrons;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getAtomicMass() {\r\n\t\treturn protons + neutrons;\r\n\t}",
"public double getMass() {\n return mass;\n }",
"public double getMass() {\n return mass;\n }",
"public double getMass()\n\t{\n\t\treturn this.mass;\n\t}",
"public float getMass() {\n return mass;\n }",
... | [
"0.7999108",
"0.78782636",
"0.78782636",
"0.7850894",
"0.7845057",
"0.77940696",
"0.7789923",
"0.77559817",
"0.7644828",
"0.7587747",
"0.7489921",
"0.746049",
"0.7432685",
"0.7211973",
"0.7176195",
"0.7108404",
"0.70435745",
"0.6822102",
"0.679784",
"0.668303",
"0.668045",
... | 0.8035667 | 0 |
get the atomic charge of this atom | public int getAtomicCharge()
{
return protons-electrons;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getAtomicCharge() {\r\n\t\treturn protons - electrons;\r\n\t}",
"public ChargeComponent getCharge() {\r\n return charge;\r\n }",
"public BigDecimal getCHARGE() {\r\n return CHARGE;\r\n }",
"public java.lang.Float getCharge() {\n\t\treturn charge;\n\t}",
"public double getChar... | [
"0.8048934",
"0.75399107",
"0.7505196",
"0.7352328",
"0.70913374",
"0.70589304",
"0.69191974",
"0.6834027",
"0.6717453",
"0.6637139",
"0.64379305",
"0.6429562",
"0.63646245",
"0.6354694",
"0.62854487",
"0.6281966",
"0.6260507",
"0.6234461",
"0.6209391",
"0.6206046",
"0.619867... | 0.818952 | 0 |
decreases the proton and neutron count by 2 | public void decay()
{
protons -= 2;
neutrons -= 2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void decay() {\r\n\t\tprotons -= 2;\r\n\t\tneutrons -= 2;\r\n\t}",
"void decrementsGops();",
"private void devolver100() {\n cambio = cambio - 100;\n de100--;\n cambio100++;\n }",
"public void diminueVies() {\n\n nbVies_restantes.set(nbVies_restantes.get()-1);\n\n }"... | [
"0.6659547",
"0.5779345",
"0.5720552",
"0.5705601",
"0.5665709",
"0.56412506",
"0.5631502",
"0.55665034",
"0.5502645",
"0.54807156",
"0.5409504",
"0.53976816",
"0.53425765",
"0.531377",
"0.53005505",
"0.53005505",
"0.5260245",
"0.524404",
"0.5243459",
"0.5242553",
"0.52120864... | 0.65210676 | 1 |
Util for generation id | public interface IGeneratorIdService {
/**
* @return "unique" long id
*/
Long generateId();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static String generateId() {\r\n\t\treturn UUID.randomUUID().toString().replaceAll(\"-\", \"\");\r\n\t}",
"private static int generateId() {\n\t\treturn ++sId;\n\t}",
"private String creatUniqueID(){\n long ID = System.currentTimeMillis();\n return Long.toString(ID).substring(9,13);\n }",
"S... | [
"0.82725453",
"0.8056425",
"0.7982797",
"0.79655623",
"0.790947",
"0.7899518",
"0.7856485",
"0.7855903",
"0.78320795",
"0.78074753",
"0.77978295",
"0.77870107",
"0.77233714",
"0.7651246",
"0.76057434",
"0.7584845",
"0.75772154",
"0.7560984",
"0.75052524",
"0.74607366",
"0.744... | 0.7300325 | 31 |
Initialize the contents of the frame. | private void initialize() {
frmTrainmodelmodule = new JFrame();
frmTrainmodelmodule.setTitle("TrainModelModule");
frmTrainmodelmodule.setBounds(100, 100, 1161, 579);
frmTrainmodelmodule.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frmTrainmodelmodule.getContentPane().setLayout(null);
///////////... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BreukFrame() {\n super();\n initialize();\n }",
"public MainFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}",
"private void initialize() {\n\t\tthis.setSize(211, 449);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setTitle(\"JFrame\");\n\t}",
"public SiscobanFrame() {\r\n\t\tsuper();\r... | [
"0.77704835",
"0.75652915",
"0.7442664",
"0.7369101",
"0.7366378",
"0.7358479",
"0.73146075",
"0.73096764",
"0.72987294",
"0.72978777",
"0.7278321",
"0.72729623",
"0.7269468",
"0.7269468",
"0.7215727",
"0.7180792",
"0.71682984",
"0.7140954",
"0.7140953",
"0.7126852",
"0.71079... | 0.0 | -1 |
tenure of tabu status constructors | TabuSearchwithGreedy(double wl, double ar, TransactionClass tc, Partition p,
int useCase) {
super(wl, ar, tc, p, useCase);
// TODO Auto-generated constructor stub
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Status() {\n }",
"protected Status() {\r\n\t\t;\r\n\t}",
"public CreateStatus()\n {\n super(new DataMap(), null);\n }",
"public Status() {\n\n }",
"public Tabono() {\n }",
"public StatusComponent()\n {\n }",
"public Status(){\n this(StatusDescription.REGISTERED);\n ... | [
"0.7161485",
"0.7150005",
"0.71258897",
"0.70955503",
"0.67103815",
"0.6708779",
"0.66990113",
"0.66425604",
"0.6590854",
"0.65824735",
"0.65822357",
"0.6553414",
"0.64979535",
"0.6397526",
"0.63939637",
"0.63939637",
"0.63424593",
"0.6338416",
"0.6329256",
"0.63184226",
"0.6... | 0.0 | -1 |
nextMove: take next cheapest step based on cost of if unstable | public void makeNextMove() {
takeNextNonTabuedCheapestStep();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Move getBestMove() {\r\n\t\tSystem.out.println(\"getting best move\");\r\n\t\tChessConsole.printCurrentGameState(this.chessGame);\r\n\t\tSystem.out.println(\"thinking...\");\r\n\t\t\r\n\t\tList<Move> validMoves = generateMoves(false);\r\n\t\tint bestResult = Integer.MIN_VALUE;\r\n\t\tMove bestMove = null;\... | [
"0.66812617",
"0.66336364",
"0.65516335",
"0.6504919",
"0.649822",
"0.6468789",
"0.64639395",
"0.6434643",
"0.6421773",
"0.641829",
"0.63782036",
"0.63028204",
"0.6289977",
"0.62611187",
"0.62594044",
"0.61581826",
"0.6125704",
"0.61120886",
"0.6097406",
"0.60772645",
"0.6058... | 0.7013818 | 0 |
Encodes a tree to a single string. | public String serialize(TreeNode root) {
StringBuilder sb = new StringBuilder();
serialize(root,sb);
return sb.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void encodeTree(){\n StringBuilder builder = new StringBuilder();\n encodeTreeHelper(root,builder);\n }",
"public TreeNode encode(Node root) {\n return en(root);\n }",
"public String toTreeString() {\n return toTreeString(overallRoot);\n }",
"public String tree2Str(Tree... | [
"0.79797685",
"0.7266544",
"0.6766947",
"0.67098355",
"0.65929043",
"0.6520053",
"0.651422",
"0.6502086",
"0.6480438",
"0.6466228",
"0.6452631",
"0.6446793",
"0.6446198",
"0.64218706",
"0.6407569",
"0.64030504",
"0.64030504",
"0.64030504",
"0.6394578",
"0.6385417",
"0.6381468... | 0.62459517 | 35 |
Decodes your encoded data to tree. | public TreeNode deserialize(String data) {
String[] strs = data.split(",");
LinkedList<String> list = new LinkedList<>();
for(String s:strs){
list.add(s);
}
return deserialize(list);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public TreeNode deserialize(String data) {\n byte[] bytes = Base64.getDecoder().decode(data);\n IntBuffer intBuf = ByteBuffer.wrap(bytes)\n .order(ByteOrder.BIG_ENDIAN).asIntBuffer();\n int[] nums = new int[intBuf.remaining()];\n intBuf.get(nums);\n //for (int i = 0; i... | [
"0.6894664",
"0.6808548",
"0.650279",
"0.64891165",
"0.64851105",
"0.6415433",
"0.6362339",
"0.63083476",
"0.6284537",
"0.622987",
"0.6213446",
"0.6161982",
"0.6147146",
"0.6140804",
"0.6133282",
"0.6078927",
"0.6073399",
"0.6069482",
"0.6064389",
"0.60632867",
"0.6053727",
... | 0.56222343 | 60 |
Constructs a controller to coordinate the game and screen | public Controller(int n) {
// Enhanced Mode
if (n > 0) {
enhanced = true;
// keeps track of the number of times that the user has been given a new life
// for reaching
// a scoring threshold
numLiveUpdated = 0;
// Initializes/opens the sound files for enhanced mode
}
initiali... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MainController() {\n initializeControllers();\n initializeGui();\n runGameLoop();\n }",
"public GameController() {\r\n\t\tsuper();\r\n\t\tthis.model = Main.getModel();\r\n\t\tthis.player = this.model.getPlayer();\r\n\t\tthis.timeline = this.model.getIndefiniteTimeline();\r\n\t}",
... | [
"0.69840455",
"0.69730765",
"0.6949034",
"0.69392926",
"0.68090934",
"0.6790249",
"0.6781664",
"0.6720752",
"0.6701822",
"0.6692148",
"0.66838115",
"0.6649389",
"0.66404784",
"0.6638239",
"0.6601399",
"0.6553962",
"0.654265",
"0.6489629",
"0.64819735",
"0.6470105",
"0.6461547... | 0.0 | -1 |
Returns true if the game mode is in enhanced mode, and returns false otherwise | public boolean isEnhancedMode() {
return enhanced;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isEngineOn();",
"boolean hasMode();",
"@Override\n public boolean isStealthActive() {\n // Try to find a Mek Stealth system.\n for (Mounted mEquip : getMisc()) {\n MiscType mtype = (MiscType) mEquip.getType();\n if (mtype.hasFlag(MiscType.F_STEALTH)) {\n\n ... | [
"0.6743145",
"0.6635975",
"0.6464843",
"0.6394729",
"0.63934815",
"0.63350284",
"0.62904197",
"0.62591755",
"0.6240603",
"0.62298775",
"0.6206427",
"0.6132987",
"0.6123108",
"0.60638654",
"0.59783524",
"0.59738314",
"0.59518474",
"0.5947822",
"0.59356904",
"0.59353656",
"0.59... | 0.7908754 | 0 |
Returns the ship, or null if there isn't one | public Ship getShip() {
return ship;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Spaceship getTheSpaceship() {\n\t\tfor(GameObject object : gameObject)\n\t\t\tif(object instanceof Spaceship)\n\t\t\t\treturn (Spaceship) object;\n\t\treturn null;\n\t}",
"public Ship loadShip() {\n DbResponse d = db.select(DbTables.SHIP);\n Ship ship = null;\n\n try {\n i... | [
"0.77254945",
"0.7723071",
"0.7662856",
"0.7512577",
"0.7432063",
"0.71256584",
"0.7079235",
"0.7025025",
"0.68609196",
"0.6760289",
"0.6684411",
"0.6621121",
"0.64405304",
"0.63989913",
"0.63822865",
"0.63653743",
"0.6355992",
"0.63391984",
"0.6333068",
"0.6304169",
"0.62622... | 0.781134 | 1 |
Configures the game screen to display the splash screen | private void splashScreen() {
// Clear the screen, reset the level, and display the legend
clear();
display.setLegend("Asteroids");
// Place four asteroids near the corners of the screen.
placeAsteroids();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void showSplashScreen() {\r\n\r\n JPanel content = (JPanel) getContentPane();\r\n content.setBackground(Color.white);\r\n\r\n // setting the window's properties\r\n \r\n int width = 700;\r\n int height = 438;\r\n Dimension screen = Toolkit.getDefaultToolkit()... | [
"0.74685806",
"0.7453721",
"0.71698534",
"0.7137998",
"0.7111149",
"0.7104745",
"0.7021648",
"0.6941446",
"0.69216305",
"0.67711633",
"0.672097",
"0.6682769",
"0.66748846",
"0.6670227",
"0.6648109",
"0.6648109",
"0.6578763",
"0.65755737",
"0.65726656",
"0.6568186",
"0.6562837... | 0.7953296 | 0 |
The game is over. Displays a message to that effect. | private void finalScreen() {
display.setLegend(GAME_OVER);
display.removeKeyListener(this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void gameOver()\r\n {\n addObject(new Text(\"Game Over\"), 550, 300);\r\n backgroundMusic.pause();\r\n Greenfoot.stop();\r\n }",
"public void gameOver() {\r\n\t\tgameFrame.gameOver();\r\n\t\tnotifyViews();\r\n\t}",
"@Override\r\n\tpublic void gameOver() {\n\t\tover = true;\r\n... | [
"0.8199384",
"0.7909308",
"0.7906861",
"0.7889991",
"0.78879184",
"0.7874186",
"0.78540313",
"0.78296435",
"0.7793599",
"0.7642243",
"0.7642243",
"0.76191974",
"0.76186854",
"0.7590056",
"0.75664055",
"0.7542757",
"0.7392767",
"0.7381664",
"0.73782456",
"0.73744124",
"0.73716... | 0.0 | -1 |
Place a new ship in the center of the screen. Remove any existing ship first. | private void placeShip() {
// Expire the ship ship
Participant.expire(ship);
clipShip.stop();
// Create a new ship
ship = new Ship(SIZE / 2, SIZE / 2, -Math.PI / 2, this);
addParticipant(ship);
display.setLegend("");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void ship_respawn() {\n ship.resetPosition();\n ship_image_view.setX(ship.x_position); // Update the ship image position\n }",
"public Ship newShip(GameScreen screen){\n\t\tthis.ship = new Ship(screen);\n\t\treturn ship;\n\t}",
"public void addPlayerShip()\n\t{\n\t\t//if a PlayerShip ... | [
"0.722217",
"0.68478346",
"0.66322595",
"0.66267216",
"0.6506968",
"0.64849716",
"0.6409253",
"0.6378425",
"0.63259554",
"0.6284999",
"0.62723994",
"0.62689537",
"0.62665594",
"0.6233731",
"0.621067",
"0.6161366",
"0.6122554",
"0.6112514",
"0.6106764",
"0.60997826",
"0.609341... | 0.82363135 | 0 |
Places 3 debris objects and sets them all to expire slightly apart from each other | private void placeDebris(double x, double y) {
// Place three Debris objects
int variety = RANDOM.nextInt(4);
Debris d = new Debris(x, y, variety);
d.setVelocity(RANDOM.nextInt(16) / 10 + 1, 20);
variety = RANDOM.nextInt(4);
Debris d2 = new Debris(x + 5, y + 5, variety);
d2.setVelocity(RANDOM.n... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setBoostExpiration(){\r\n\t\tboostExpiration = GameController.getTimer() + 1000000000l * length;\r\n\t}",
"public void removeExpiredAuctions(){\r\n ArrayList <String> expiredAuction = new ArrayList <String>(super.size());\r\n for(String expiredKey: keySet()){\r\n if(getAuctio... | [
"0.5603393",
"0.5600707",
"0.55995244",
"0.55549705",
"0.5512298",
"0.5458975",
"0.54202235",
"0.5333544",
"0.53280914",
"0.53041124",
"0.5191258",
"0.51373935",
"0.5128477",
"0.5087504",
"0.5062237",
"0.5051879",
"0.4977448",
"0.49771306",
"0.49711362",
"0.4962293",
"0.49422... | 0.59438705 | 0 |
Places 4 dust objects at the given x and y coordinates | public void placeDust(double x, double y) {
// Place 4 dust objects, and add them as participants
Dust du = new Dust(x, y);
Dust du2 = new Dust(x + 5, y);
Dust du3 = new Dust(x + 5, y + 5);
Dust du4 = new Dust(x, y + 5);
addParticipant(du);
addParticipant(du2);
addParticipant(du3);
addParti... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void placeDebris(double x, double y) {\r\n\r\n\t\t// Place three Debris objects\r\n\t\tint variety = RANDOM.nextInt(4);\r\n\t\tDebris d = new Debris(x, y, variety);\r\n\t\td.setVelocity(RANDOM.nextInt(16) / 10 + 1, 20);\r\n\r\n\t\tvariety = RANDOM.nextInt(4);\r\n\t\tDebris d2 = new Debris(x + 5, y + 5, var... | [
"0.6596576",
"0.6574158",
"0.6315657",
"0.60236704",
"0.5879554",
"0.58338255",
"0.5833432",
"0.5833214",
"0.57702667",
"0.5724294",
"0.56670374",
"0.56055075",
"0.5585766",
"0.55792934",
"0.5572675",
"0.55264354",
"0.54997134",
"0.54913527",
"0.5487425",
"0.5478634",
"0.5474... | 0.77861977 | 0 |
Returns true if the Flame should be displayed and false if otherwise | public boolean getFlame() {
return flame;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isDisplay();",
"boolean isDisplay();",
"public boolean isFlashShow() {\n return (isBeautyShow() || isMaskSelected()) ? false : true;\n }",
"public boolean shouldShowFaceTransientIndication() {\n if (this.mBouncerShowing || !MiuiKeyguardUtils.isIndianRegion(this.mContext) || !Wallpape... | [
"0.68687874",
"0.68687874",
"0.6737179",
"0.64586407",
"0.64115024",
"0.6402886",
"0.63198483",
"0.6305653",
"0.628968",
"0.62894756",
"0.62563354",
"0.6235373",
"0.62334675",
"0.6163642",
"0.61428034",
"0.61330825",
"0.60777533",
"0.606668",
"0.6053503",
"0.6040934",
"0.6040... | 0.70315117 | 0 |
Place a bullet object at the given x and y coordinates | private void placeBullet(double x, double y) {
b = new Bullet(x, y);
addParticipant(b);
b.setVelocity(BULLET_SPEED, ship.getRotation());
new ParticipantCountdownTimer(b, "expire", BULLET_DURATION);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createBullet(String name, double x, double y) {\n Player player = (Player) players.get(name);\r\n if (player != null) {\r\n Bullet bullet = new Bullet(x, y);\r\n bullet.player = name;\r\n playAudio(\"shoot\");\r\n }\r\n }",
"public void shoot()... | [
"0.7762593",
"0.71605015",
"0.6864132",
"0.67735815",
"0.6690345",
"0.6605794",
"0.652559",
"0.6487069",
"0.6484469",
"0.6478239",
"0.64652175",
"0.6424205",
"0.63862747",
"0.6385351",
"0.6383703",
"0.6351486",
"0.63469976",
"0.63172597",
"0.6290653",
"0.6251216",
"0.6250608"... | 0.82025474 | 0 |
Places four asteroids near the corners of the screen. Gives them random velocities and rotations. | private void placeAsteroids() {
addParticipant(new Asteroid(0, 2, EDGE_OFFSET, EDGE_OFFSET, speed, this));
addParticipant(new Asteroid(1, 2, SIZE - EDGE_OFFSET, EDGE_OFFSET, 3, this));
addParticipant(new Asteroid(2, 2, EDGE_OFFSET, SIZE - EDGE_OFFSET, 3, this));
addParticipant(new Asteroid(3, 2, SIZE - EDGE... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Asteroid() {\n\t\t// create, seed random number\n\t\trandomNumber = new Random();\n\n\t\t// random location\n\t\tlocation = new Tuple(\n\t\t\t\t(randomNumber.nextDouble() - 0.5) * FIELD_SIZE, \n\t\t\t\t(randomNumber.nextDouble() - 0.5) * FIELD_SIZE, \n\t\t\t\t(randomNumber.nextDouble() - 0.5) * FIELD_SIZE);... | [
"0.6967742",
"0.67225474",
"0.6664802",
"0.66168475",
"0.6456423",
"0.634778",
"0.6310302",
"0.61561096",
"0.614022",
"0.6052253",
"0.6027491",
"0.60261947",
"0.6024037",
"0.59510034",
"0.5917044",
"0.58576137",
"0.5847782",
"0.57386494",
"0.57386154",
"0.5726277",
"0.5709994... | 0.70508236 | 0 |
Clears the screen so that nothing is displayed | private void clear() {
pstate.clear();
display.setLegend("");
ship = null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void clearScreen();",
"public void clearScreen()\n {\n showText(\"\", 150, 175);\n List objects = getObjects(null);\n if(objects != null)\n {\n removeObjects(objects);\n }\n }",
"public void clearScreen() \n\t{\n\t\tthis.myLineView.clearScreen();\n\t}"... | [
"0.8798866",
"0.878815",
"0.84344447",
"0.8301078",
"0.81875914",
"0.8113565",
"0.7965721",
"0.79279387",
"0.78452843",
"0.7842938",
"0.78217465",
"0.7815092",
"0.7807965",
"0.77314097",
"0.7706308",
"0.77004915",
"0.7684236",
"0.7670814",
"0.75632256",
"0.75502104",
"0.75222... | 0.6750913 | 89 |
Sets things up and begins a new game. | private void initialScreen() {
// Clear the screen
clear();
// Place four asteroids
placeAsteroids();
// Place the ship
placeShip();
// Reset statistics
lives = 3;
display.setLives(lives);
numLevel = 1;
display.setLevel(numLevel);
display.setScore(0);
speed = 3;
// Star... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void startGame() {\r\n this.setupGame();\r\n }",
"private void startGame() {\n\t\tmain.next_module = new Game(main, inputs, gameSelectionData);\n\t}",
"void newGame() {\n logger.log(\"New game starting.\");\n logger.log(divider);\n\n\n // Create the deck.\n createDeck();\n ... | [
"0.8119174",
"0.8103218",
"0.79362667",
"0.778537",
"0.76442075",
"0.7637165",
"0.76062137",
"0.75827724",
"0.75456333",
"0.7516333",
"0.7515288",
"0.7511032",
"0.74869597",
"0.7434312",
"0.73813504",
"0.73780495",
"0.7374256",
"0.7364444",
"0.7345581",
"0.7339582",
"0.733758... | 0.0 | -1 |
Adds a new Participant | public void addParticipant(Participant p) {
pstate.addParticipant(p);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void addParticipant(Participant participant);",
"public void onAddParticipant() {\n ParticipantDialog participantDialog = ParticipantDialog.getNewInstance();\n Optional<Participant> result = participantDialog.showAndWait();\n if (!result.isPresent()) {\n return;\n }\n\n ... | [
"0.84297544",
"0.7715708",
"0.75391906",
"0.72550416",
"0.7230252",
"0.7194476",
"0.70931053",
"0.70276767",
"0.67554694",
"0.6476816",
"0.6429599",
"0.63205004",
"0.62394404",
"0.61875653",
"0.614088",
"0.60928935",
"0.6043647",
"0.60432625",
"0.6035196",
"0.6012363",
"0.595... | 0.76965123 | 2 |
The ship has been destroyed | public void shipDestroyed() {
placeDebris(ship.getX(), ship.getY());
// Null out the ship
ship = null;
openShipSound();
// Decrement lives
lives--;
display.setLives(lives);
// Since the ship was destroyed, schedule a transition
scheduleTransition(END_DELAY);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void decLives()\n\t{\n\t\tlives--;\n\t\tshipSpawned = false;\t\n\t\tif(lives <= 0)\n\t\t{\n\t\t\tSystem.out.println(\"Game over\");\n\t\t\tif(isSound() && !isPaused())\n\t\t\t\tdeath.play();\n\t\t\tsetGameOver(true);\n\t\t\tnotifyObservers();\n\t\t\treturn;\n\t\t}\n\t\tthis.addPlayerShip();\n\t}",
"static... | [
"0.69015414",
"0.66642547",
"0.6660268",
"0.65595853",
"0.6535525",
"0.63165873",
"0.6292884",
"0.62574303",
"0.62554246",
"0.6222851",
"0.61889017",
"0.6183574",
"0.61793405",
"0.6150211",
"0.6147373",
"0.6144781",
"0.61039114",
"0.61028653",
"0.6019736",
"0.6018219",
"0.596... | 0.8447505 | 0 |
An asteroid of the given size has been destroyed | public void asteroidDestroyed(int size) {
// Update score based on asteroid size
numScore += ASTEROID_SCORE[size];
display.setScore(numScore);
// If all the asteroids are gone, schedule a transition
if (pstate.countAsteroids() == 0) {
scheduleTransition(END_DELAY);
}
openAsteroidSound();
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void shrinkSquare()\n {\n squareSize--;\n }",
"public void breakApart(final Asteroids asteroids)\n {\n Double2D location = asteroids.field.getObjectLocation(this);\n int[] sizes = breakMap[size][asteroids.random.nextInt(breakMap[size].length)];\n \n ... | [
"0.6084747",
"0.6072007",
"0.60599893",
"0.6058011",
"0.59177333",
"0.5791641",
"0.5785193",
"0.57729864",
"0.57696575",
"0.57447183",
"0.570056",
"0.5676394",
"0.56035227",
"0.5584164",
"0.5529284",
"0.552483",
"0.55201",
"0.54947746",
"0.5460741",
"0.539655",
"0.53879136",
... | 0.76389605 | 0 |
The alien has been destroyed | public void alienDestroyed() {
// Place 6 debris objects where the alien was located
placeDebris(alien.getX(), alien.getY());
placeDebris(alien.getX() + 1, alien.getY() + 1);
// Update the score
numScore += ALIENSHIP_SCORE[alien.getSize()];
display.setScore(numScore);
// Expire the alien from t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void destroy() {\n this.alive = false;\n }",
"public void destroy()\r\n\t{\r\n\t\tlog.fine(\"destroy\");\r\n\t}",
"@Override\r\n\tpublic void destroy()\r\n\t{\n\t\t\r\n\t}",
"public void destroy()\r\n\t{\n\t\t\r\n\t}",
"public void destroy() {\n\t\t\r\n\t}",
"public void destroy() {\n\t\... | [
"0.7257831",
"0.7221231",
"0.69920766",
"0.69911623",
"0.69848055",
"0.69848055",
"0.69848055",
"0.69848055",
"0.69743186",
"0.69671917",
"0.6961373",
"0.69589067",
"0.6946225",
"0.6917121",
"0.6912485",
"0.6912485",
"0.6912485",
"0.6912485",
"0.6912485",
"0.6912485",
"0.6912... | 0.7656914 | 0 |
Places an Alien ship of the given size (size 1 == large alien, size 0 == small alien) | public void placeAlien(int size) {
if (pstate.countAliens() == 0) {
// create a random int with a value of either 1 or -1
int a = -1;
int j = RANDOM.nextInt(2);
if (j == 0) {
a = -1;
} else {
a = 1;
}
// Create a random value for the starting y position of the alien
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Ship(String name, int size) {\r\n this.name = name;\r\n this.size = size;\r\n this.livesLeft = size;\r\n this.isSunk = false;\r\n }",
"public void setSize(int size){\n\t\tthis.shipSize = size;\n\t}",
"public void placeShip(int startTileX ,int startTileY , int orient,Tile m... | [
"0.68594146",
"0.67188823",
"0.6579163",
"0.59909827",
"0.5966179",
"0.59107417",
"0.590301",
"0.58749026",
"0.58515847",
"0.5849936",
"0.5816126",
"0.5784615",
"0.5778846",
"0.5757599",
"0.5751245",
"0.57048607",
"0.5665524",
"0.5558951",
"0.55187815",
"0.5491093",
"0.548312... | 0.72268045 | 0 |
Places an Alien ship of the given size (size 1 == large alien, size 0 == small alien) | public void placeAlienBullet() {
if (alien != null) {
// If the alien is large fires a bullet in a random direction
if (alien.getSize() == 1 && ship != null) {
// Create the alien bullet
ab = new AlienBullet(alien.getX(), alien.getY());
// give the alien bullet a random direction and the b... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void placeAlien(int size) {\r\n\r\n\t\tif (pstate.countAliens() == 0) {\r\n\t\t\t// create a random int with a value of either 1 or -1\r\n\t\t\tint a = -1;\r\n\t\t\tint j = RANDOM.nextInt(2);\r\n\t\t\tif (j == 0) {\r\n\t\t\t\ta = -1;\r\n\r\n\t\t\t} else {\r\n\t\t\t\ta = 1;\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// Cre... | [
"0.7226411",
"0.68593556",
"0.6719116",
"0.65787953",
"0.59911627",
"0.5966954",
"0.59110403",
"0.5903163",
"0.5874737",
"0.58517045",
"0.58490723",
"0.58168304",
"0.5783793",
"0.57791656",
"0.57575047",
"0.5750742",
"0.5705062",
"0.5558288",
"0.55188704",
"0.54912305",
"0.54... | 0.5666389 | 17 |
Schedules a transition m msecs in the future | private void scheduleTransition(int m) {
transitionTime = System.currentTimeMillis() + m;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void schedule(Runnable job, long delay, TimeUnit unit);",
"public void update(int m) {\r\n\t\tif (this.swit) {\r\n\t\t\tthis.time = time + m;\r\n\t\t\tthis.change = change + m;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.time = time + m; \r\n\t\t}\r\n\t}",
"private static void attendre (int tms) {\n tr... | [
"0.6220094",
"0.5881163",
"0.56538475",
"0.56538475",
"0.5640117",
"0.5628834",
"0.5472976",
"0.54724395",
"0.5469588",
"0.546724",
"0.5451718",
"0.5447336",
"0.5433267",
"0.5432565",
"0.5424886",
"0.53892165",
"0.5346839",
"0.53411484",
"0.53344876",
"0.53114784",
"0.5264484... | 0.854127 | 0 |
This method will be invoked because of button presses and timer events. | @Override
public void actionPerformed(ActionEvent e) {
// The start button has been pressed. Stop whatever we're doing
// and bring up the initial screen
if (e.getSource() instanceof JButton) {
// Initialize the speed, numScore, and numLevel values at the beginning of a new
// game
speed = 3;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void ipcallButtonPressed() {\n\t\tdialButtonPressed(true) ;\n\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void on_button_pressed(String button_n... | [
"0.6698537",
"0.66858166",
"0.66540825",
"0.66087157",
"0.65992683",
"0.6574196",
"0.6574196",
"0.6574196",
"0.656649",
"0.6547258",
"0.6546252",
"0.6534202",
"0.6533377",
"0.6519003",
"0.6516802",
"0.6509696",
"0.6509696",
"0.6509696",
"0.6509696",
"0.64753854",
"0.64753854"... | 0.0 | -1 |
Returns an iterator over the active participants | public Iterator<Participant> getParticipants() {
return pstate.getParticipants();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Iterator<Activity> getActivitiesIterator(){\n\t\treturn activities.iterator();\n\t}",
"Collection<Account> listParticipants() {\r\n\t\tupdatePastRelations();\r\n\t\treturn pastRelations;\r\n\t}",
"public List<Contact> getParticipants()\n {\n return new LinkedList<Contact>(participants.values()... | [
"0.64781815",
"0.6328788",
"0.63263386",
"0.6326267",
"0.62729704",
"0.6179917",
"0.6052968",
"0.599004",
"0.599004",
"0.59813845",
"0.5940327",
"0.5940327",
"0.5938447",
"0.59370935",
"0.592049",
"0.59155583",
"0.5892882",
"0.58830893",
"0.5882551",
"0.5860221",
"0.5835902",... | 0.80193037 | 0 |
If the transition time has been reached, transition to a new state | private void performTransition() {
// Do something only if the time has been reached
if (transitionTime <= System.currentTimeMillis()) {
// Clear the transition time
transitionTime = Long.MAX_VALUE;
// If there are no lives left, the game is over. Show the final
// screen.
if (lives <= 0) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean transition() {\n current = new State(ts++, hopper); \n if (terminus.isTerminus(current)) {\n return false;\n } else {\n hopper.sendBall(oneMinute);\n return true;\n }\n }",
"public void changeState(int transition) {\n lastState... | [
"0.71607286",
"0.6367681",
"0.63076764",
"0.6292581",
"0.6207107",
"0.61732084",
"0.6097855",
"0.6077221",
"0.60631627",
"0.6017925",
"0.5990135",
"0.5967842",
"0.596605",
"0.5960558",
"0.59508777",
"0.5946569",
"0.59371084",
"0.59130037",
"0.5909891",
"0.58598393",
"0.582986... | 0.6920059 | 1 |
If a key of interest is pressed, record that it is down. | @Override
public void keyPressed(KeyEvent e) {
if ((e.getKeyCode() == KeyEvent.VK_LEFT || e.getKeyCode() == KeyEvent.VK_A) && ship != null) {
turnLeft = 1;
}
if ((e.getKeyCode() == KeyEvent.VK_RIGHT || e.getKeyCode() == KeyEvent.VK_D) && ship != null) {
turnRight = 1;
}
if ((e.getKeyCode() == K... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void keyReleased() {\n if (key == 'z' || key == 'Z') shoot = false;\n if (keyCode == UP) up = false;\n if (keyCode == DOWN) down = false;\n if (keyCode == LEFT) left = false;\n if (keyCode == RIGHT) right = false;\n}",
"@Override\r\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\t\t\t\tint k... | [
"0.72101384",
"0.71781343",
"0.7112719",
"0.69513214",
"0.6911567",
"0.6868635",
"0.6851349",
"0.6851089",
"0.68128556",
"0.6804702",
"0.6781248",
"0.677281",
"0.67586863",
"0.67465585",
"0.67465585",
"0.67465585",
"0.67463565",
"0.67294157",
"0.6723746",
"0.6719532",
"0.6708... | 0.0 | -1 |
When the key of interest is released, record that it has been released | @Override
public void keyReleased(KeyEvent e) {
if ((e.getKeyCode() == KeyEvent.VK_LEFT || e.getKeyCode() == KeyEvent.VK_A)) {
turnLeft = 0;
}
if ((e.getKeyCode() == KeyEvent.VK_RIGHT || e.getKeyCode() == KeyEvent.VK_D)) {
turnRight = 0;
}
if ((e.getKeyCode() == KeyEvent.VK_UP || e.getKeyCode()... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public void keyReleased(RWTVirtualKey key) {\n\r\n }",
"@Override\n\tpublic void keyReleased(int k) {\n\n\t}",
"public void keyReleased(KeyEvent e) \r\n {\r\n \tkeyUser = 0;\r\n }",
"@Override\n\t\t\t\t\t\tpublic void keyReleased(KeyEvent arg0) {\n\n\t\t\t\t\t\t}",
"@Override\n... | [
"0.7263499",
"0.7094252",
"0.6696292",
"0.6692753",
"0.6692753",
"0.6692753",
"0.6692753",
"0.6692753",
"0.6692753",
"0.6692753",
"0.66344136",
"0.658487",
"0.658487",
"0.6576311",
"0.65722716",
"0.6568004",
"0.65130174",
"0.6496063",
"0.6496063",
"0.6496063",
"0.6496063",
... | 0.0 | -1 |
Updates the number of lives in enhanced mode, giving the user 1 an extra life for reaching the 4000, 8000, and 12000 point thresholds. | public void updateLives() {
if (enhanced == true && (numScore >= 4000 && numLiveUpdated == 0) || (numScore >= 8000 && numLiveUpdated == 1)
|| (numScore >= 12000 && numLiveUpdated == 2)) {
lives += 1;
numLiveUpdated += 1;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void increaseLife() {\n setChanged();\n notifyObservers(new Pair<>(\"increaseLives\", 1));\n }",
"@Override\n\tpublic void update() {\n\t\tage++;\n\t\tpoints = Globals.points;\n\t}",
"public void setLives(int lives){\n liveCount = lives;\n }",
"void gainHealth(int points) {\... | [
"0.6976118",
"0.6727578",
"0.6389452",
"0.61888367",
"0.6152126",
"0.6004888",
"0.5994735",
"0.5989757",
"0.59834206",
"0.59727603",
"0.5949288",
"0.5914534",
"0.5877704",
"0.5838136",
"0.58169657",
"0.58115894",
"0.5775172",
"0.5760408",
"0.5734211",
"0.57257223",
"0.5714115... | 0.7815896 | 0 |
Open and initialize the clips to be used for sounds in enhanced mode | public void initializeSounds() {
try {
sound a = new sound();
// Fire sound effect
clipFire = a.getSound();
streamFire = a.getStream();
// Shooting sound effect
clipShoot = a.getSound2();
streamShoot = a.getStream2();
// Sound when an alien is destroyed
clipAlienDestroyed = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void cenaSounds()\n {\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setTitle(\"Test Sound Clip\");\n this.setSize(300, 200);\n this.setVisible(false);\n\n try {\n // Open an audio input stream.\n //URL url = this.getClass().getClass... | [
"0.6482026",
"0.6406029",
"0.6399498",
"0.63841057",
"0.6369378",
"0.6360663",
"0.6353228",
"0.6306813",
"0.630272",
"0.6299845",
"0.62788916",
"0.6272984",
"0.6264893",
"0.6243724",
"0.62343264",
"0.62132555",
"0.62054807",
"0.6067419",
"0.60350573",
"0.6027657",
"0.5989917"... | 0.68019307 | 0 |
Start the alienDestroyed sound | public void openAlienDestroyedSound() {
if (clipAlienDestroyed.isOpen()) {
clipAlienDestroyed.start();
}
if (!(clipAlienDestroyed.isActive())) {
/*
* clip.stop(); clip.flush();
*/
clipAlienDestroyed.setFramePosition(0);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void stopSound(){\n p.stop(as);\n }",
"protected void stopTheSound(){\n mp.stop();\n }",
"public void alienDestroyed() {\r\n\t\t// Place 6 debris objects where the alien was located\r\n\t\tplaceDebris(alien.getX(), alien.getY());\r\n\t\tplaceDebris(alien.getX() + 1, alien.getY() + 1)... | [
"0.6651281",
"0.64293283",
"0.6369453",
"0.6330372",
"0.63122857",
"0.631097",
"0.6189342",
"0.61527365",
"0.6119517",
"0.60682666",
"0.60056335",
"0.5979664",
"0.5970681",
"0.5952448",
"0.59054995",
"0.5901957",
"0.58859897",
"0.586326",
"0.586326",
"0.586326",
"0.586326",
... | 0.79321903 | 0 |
Start the asteroidDestroyed sound | public void openAsteroidSound() {
sound a;
try {
a = new sound();
Clip asteroidSound = a.getSoundAsteroid();
asteroidSound.open(streamAsteroid);
if (clipAsteroid.isOpen()) {
clipAsteroid.start();
}
if (!(clipAsteroid.isActive())) {
/*
* clip.stop(); clip.flush();
*/... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void openAlienDestroyedSound() {\r\n\t\tif (clipAlienDestroyed.isOpen()) {\r\n\t\t\tclipAlienDestroyed.start();\r\n\t\t}\r\n\r\n\t\tif (!(clipAlienDestroyed.isActive())) {\r\n\t\t\t/*\r\n\t\t\t * clip.stop(); clip.flush();\r\n\t\t\t */\r\n\t\t\tclipAlienDestroyed.setFramePosition(0);\r\n\t\t}\r\n\r\n\t}",
... | [
"0.735395",
"0.67437726",
"0.6050794",
"0.60296065",
"0.60185784",
"0.6005829",
"0.59573334",
"0.5956544",
"0.5908495",
"0.58753866",
"0.5870914",
"0.5761995",
"0.5754261",
"0.57491213",
"0.57159317",
"0.57111245",
"0.56878805",
"0.56878805",
"0.5663228",
"0.5649813",
"0.5640... | 0.6022481 | 4 |
Return the asteroid destroyed sound | public Clip getClipAsteroid() {
return clipAsteroid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected String getDeathSound()\n {\n return null;\n }",
"protected String getDeathSound()\n {\n return null;\n }",
"protected String getLivingSound()\n {\n return null;\n }",
"protected String getLivingSound()\n {\n return null;\n }",
"public void playD... | [
"0.7028965",
"0.7028965",
"0.6924754",
"0.6924754",
"0.6828576",
"0.67517585",
"0.67517585",
"0.6566616",
"0.6559704",
"0.65368474",
"0.6533562",
"0.6428394",
"0.6404196",
"0.6400156",
"0.63992",
"0.6390415",
"0.63157123",
"0.63106984",
"0.623192",
"0.6207044",
"0.6182993",
... | 0.0 | -1 |
This setter method should only be used by unit tests | protected void setInspectionCategoryMappingService(InspectionCategoryMappingService service) {
this.inspectionCategoryMappingService = service;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void testSet() {\n\t}",
"@Test\r\n public void testSetValor() {\r\n \r\n }",
"@Test\r\n public void testSetUserId() {\r\n System.out.println(\"setUserId\");\r\n int userId = 0;\r\n \r\n instance.setUserId(userId);\r\n assertEquals(userId , inst... | [
"0.68875223",
"0.6554926",
"0.64401424",
"0.64339185",
"0.6352214",
"0.63388985",
"0.6333115",
"0.6297015",
"0.6244221",
"0.6222672",
"0.6205271",
"0.6198388",
"0.61869454",
"0.6183002",
"0.61795443",
"0.61724347",
"0.6170356",
"0.6158746",
"0.6156896",
"0.6153949",
"0.615172... | 0.0 | -1 |
Retorna texto formatado para insercao em query | public static String getDadoFormatado(String pDado, TiposDadosQuery pTipo) {
String dadoFormatado;
if (pDado != null) {
switch (pTipo)
{
case TEXTO:
dadoFormatado = "'" + verificaAspaSimples(pDado) + "'";
break;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String toInsert() {\r\n return \"(null,'\"+ ref + \"','\" + name + \"','\" + tel + \"','\" + address + \"')\";\r\n }",
"public String getInsertSQL()\n\t{\n\t\tString fieldList = \"parametro, dia, valor\";\n\t\treturn String.format(\"insert into alteracs (%s) values (%d, %d, %s)\",\n\t\t\t\tfield... | [
"0.72332656",
"0.6645996",
"0.6531685",
"0.6386587",
"0.6316747",
"0.6265875",
"0.621917",
"0.6208691",
"0.62029773",
"0.6154162",
"0.6134995",
"0.60820025",
"0.59232104",
"0.579011",
"0.57338965",
"0.570275",
"0.567309",
"0.5662722",
"0.5660105",
"0.5651487",
"0.56486756",
... | 0.511289 | 96 |
Retorna texto formatado para insercao em query | public static String getDadoFormatado(boolean pDado, TiposDadosQuery pTipo) {
StringBuilder dadoFormatado = new StringBuilder("");
if (pDado) {
dadoFormatado.append("true");
}
else {
dadoFormatado.append("false");
}
return dadoFor... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String toInsert() {\r\n return \"(null,'\"+ ref + \"','\" + name + \"','\" + tel + \"','\" + address + \"')\";\r\n }",
"public String getInsertSQL()\n\t{\n\t\tString fieldList = \"parametro, dia, valor\";\n\t\treturn String.format(\"insert into alteracs (%s) values (%d, %d, %s)\",\n\t\t\t\tfield... | [
"0.7233016",
"0.66461235",
"0.6532687",
"0.63874143",
"0.63174",
"0.62672967",
"0.62202305",
"0.62087464",
"0.6204161",
"0.61547345",
"0.61353797",
"0.6082596",
"0.5925019",
"0.5791024",
"0.5734974",
"0.5702277",
"0.5672253",
"0.56627274",
"0.5660367",
"0.56506246",
"0.564931... | 0.0 | -1 |
Retorna texto formatado para insercao em query | public static String getDadoFormatado(BigDecimal pDado, TiposDadosQuery pTipo) {
StringBuilder dadoFormatado = new StringBuilder("");
if (pDado == null) {
dadoFormatado.append("null");
}
else {
dadoFormatado.append(pDado.toPlainString());
}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String toInsert() {\r\n return \"(null,'\"+ ref + \"','\" + name + \"','\" + tel + \"','\" + address + \"')\";\r\n }",
"public String getInsertSQL()\n\t{\n\t\tString fieldList = \"parametro, dia, valor\";\n\t\treturn String.format(\"insert into alteracs (%s) values (%d, %d, %s)\",\n\t\t\t\tfield... | [
"0.72326946",
"0.6645976",
"0.6531908",
"0.6385464",
"0.6317184",
"0.62667924",
"0.6218983",
"0.6207176",
"0.6202967",
"0.6152886",
"0.6135076",
"0.6081536",
"0.5923255",
"0.579022",
"0.57346797",
"0.57026523",
"0.5672184",
"0.56620204",
"0.5659483",
"0.5651444",
"0.56477576"... | 0.0 | -1 |
Retorna texto formatado para insercao em query | public static String getDadoFormatado(int pDado, TiposDadosQuery pTipo) {
StringBuilder dadoFormatado = new StringBuilder("");
dadoFormatado.append(Integer.toString(pDado).toString());
return dadoFormatado.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String toInsert() {\r\n return \"(null,'\"+ ref + \"','\" + name + \"','\" + tel + \"','\" + address + \"')\";\r\n }",
"public String getInsertSQL()\n\t{\n\t\tString fieldList = \"parametro, dia, valor\";\n\t\treturn String.format(\"insert into alteracs (%s) values (%d, %d, %s)\",\n\t\t\t\tfield... | [
"0.72332656",
"0.6645996",
"0.6531685",
"0.6386587",
"0.6316747",
"0.6265875",
"0.621917",
"0.6208691",
"0.62029773",
"0.6154162",
"0.6134995",
"0.60820025",
"0.59232104",
"0.579011",
"0.57338965",
"0.570275",
"0.567309",
"0.5662722",
"0.5660105",
"0.5651487",
"0.56486756",
... | 0.0 | -1 |
Retorna texto formatado para insercao em query | public static String getDadoFormatado(long pDado, TiposDadosQuery pTipo) {
ConversorTipos conv = new ConversorTipos();
conv.setValorBase(pDado);
return conv.getString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String toInsert() {\r\n return \"(null,'\"+ ref + \"','\" + name + \"','\" + tel + \"','\" + address + \"')\";\r\n }",
"public String getInsertSQL()\n\t{\n\t\tString fieldList = \"parametro, dia, valor\";\n\t\treturn String.format(\"insert into alteracs (%s) values (%d, %d, %s)\",\n\t\t\t\tfield... | [
"0.72332656",
"0.6645996",
"0.6531685",
"0.6386587",
"0.6316747",
"0.6265875",
"0.621917",
"0.6208691",
"0.62029773",
"0.6154162",
"0.6134995",
"0.60820025",
"0.59232104",
"0.579011",
"0.57338965",
"0.570275",
"0.567309",
"0.5662722",
"0.5660105",
"0.5651487",
"0.56486756",
... | 0.0 | -1 |
Retorna texto formatado para insercao em query | public static String getDadoFormatado(Date pDado, TiposDadosQuery pTipo) {
StringBuilder dadoFormatado = new StringBuilder("");
if (pDado == null) {
dadoFormatado.append("null");
}
else {
dadoFormatado.append("'");
dadoFormatado.append(new Sim... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String toInsert() {\r\n return \"(null,'\"+ ref + \"','\" + name + \"','\" + tel + \"','\" + address + \"')\";\r\n }",
"public String getInsertSQL()\n\t{\n\t\tString fieldList = \"parametro, dia, valor\";\n\t\treturn String.format(\"insert into alteracs (%s) values (%d, %d, %s)\",\n\t\t\t\tfield... | [
"0.7233016",
"0.66461235",
"0.6532687",
"0.63874143",
"0.63174",
"0.62672967",
"0.62202305",
"0.62087464",
"0.6204161",
"0.61547345",
"0.61353797",
"0.6082596",
"0.5925019",
"0.5791024",
"0.5734974",
"0.5702277",
"0.5672253",
"0.56627274",
"0.5660367",
"0.56506246",
"0.564931... | 0.0 | -1 |
Convert formal type name for an array (i.e. java.lang.Object[] to the jni format (i.e. [Ljava.lang.Object;) This is used when a name is passed in from the IDE side. The VM side uses the jni format, and all of proxy uses the jni format. | public static String getJNIFormatName(String classname) {
if (classname.length() == 0 || !classname.endsWith("]")) //$NON-NLS-1$
return classname; // Not an array,or invalid
StringBuffer jni = new StringBuffer(classname.length());
int firstOpenBracket = classname.indexOf('[');
int ob = firstOpenBrac... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String getFormalTypeName(String jniName) {\n \t\tif (jniName.charAt(0) == '[') {\n \t\t\t// It is an array\n \t\t\tint dims = jniName.lastIndexOf('[')+1;\t// Number of dimensions\n \t\t\tint startType = dims;\n \t\t\tStringBuffer fName = new StringBuffer(jniName.length()+(2*dims)); \n\t\t\tif (jniNam... | [
"0.71666497",
"0.67398417",
"0.66788006",
"0.6390963",
"0.6320471",
"0.6107335",
"0.6027111",
"0.5952324",
"0.5947285",
"0.5914571",
"0.581782",
"0.5789807",
"0.5701808",
"0.5689977",
"0.5680456",
"0.5673143",
"0.5630919",
"0.56302434",
"0.5626407",
"0.56204396",
"0.5599816",... | 0.62989724 | 5 |
This converts from the JNI format to the formal typename. | public static String getFormalTypeName(String jniName) {
if (jniName.charAt(0) == '[') {
// It is an array
int dims = jniName.lastIndexOf('[')+1; // Number of dimensions
int startType = dims;
StringBuffer fName = new StringBuffer(jniName.length()+(2*dims));
if (jniName.charAt(startType) == 'L')
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String jniTypeName() {\n if (isCompoundTypeWrapper()) {\n // These are sent down as Buffers (e.g., jobject)\n return \"jobject\";\n }\n\n if (isArrayOfCompoundTypeWrappers()) {\n // These are returned as arrays of ByteBuffers (e.g., jobjectArray)\n return \"jobjectArray /* of By... | [
"0.70238656",
"0.652517",
"0.65158826",
"0.6441474",
"0.6385542",
"0.61345965",
"0.61223614",
"0.6009561",
"0.5869033",
"0.5869033",
"0.5869033",
"0.5869033",
"0.5869033",
"0.5869033",
"0.5869033",
"0.5869033",
"0.5869033",
"0.5869033",
"0.5869033",
"0.5869033",
"0.5869033",
... | 0.7008111 | 1 |
Convert the formal type name, with the given number of dimensions, to an array JNI type. | public static String getJNITypeName(String finalComponent, int dimensions) {
StringBuffer jni = new StringBuffer(finalComponent.length()+dimensions+2);
while (dimensions-- > 0) {
jni.append('[');
}
String shortSig = (String) MapTypes.MAP_TYPENAME_TO_SHORTSIG.get(finalComponent);
if (shortSig == n... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String toJavaType( String type ) {\n StringBuffer nat = new StringBuffer( 30 );\n int arraydim = 0;\n while ( type.charAt( arraydim ) == '[' ) arraydim++;\n type = type.substring( arraydim );\n switch ( type.charAt( 0 ) ) {\n default:\n throw new IllegalArgumentException( \... | [
"0.6039065",
"0.60243624",
"0.5979487",
"0.59394175",
"0.57457745",
"0.573816",
"0.5627873",
"0.55761933",
"0.5499579",
"0.54732233",
"0.5464092",
"0.54371536",
"0.5375558",
"0.5352135",
"0.5308981",
"0.52463216",
"0.5233571",
"0.52254397",
"0.52120763",
"0.51918375",
"0.5146... | 0.49235803 | 30 |
ListView Clicked item index | @Override
public void onItemClick(AdapterView<?> adapter, View view,
int position, long id) {
throwActivity(position, (String)listView.getItemAtPosition(position));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void onItemClick(int position);",
"public void onItemClick(View view, int position);",
"@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n\n Intent intent = new Intent(MainActivity.this, ImageActivity.class);\n intent.putExtra(\"index\", i... | [
"0.727802",
"0.7239286",
"0.7165664",
"0.71425855",
"0.71325344",
"0.7130872",
"0.71086955",
"0.71045315",
"0.7103713",
"0.71013945",
"0.7069466",
"0.7047616",
"0.7047616",
"0.7042995",
"0.7031777",
"0.70194507",
"0.70138186",
"0.6987547",
"0.6981235",
"0.69586766",
"0.695450... | 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.places, 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.7246451",
"0.7201833",
"0.7195169",
"0.7176824",
"0.71071094",
"0.7039687",
"0.70379424",
"0.7011622",
"0.70095545",
"0.69799995",
"0.6945173",
"0.69389343",
"0.6933555",
"0.69172555",
"0.69172555",
"0.68906796",
"0.688355",
"0.687496",
"0.6874772",
"0.68613136",
"0.686131... | 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();
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 |
.PlainTokenAction plain_action = 1; | boolean hasPlainAction(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"org.hyperledger.fabric.protos.token.Transaction.PlainTokenAction getPlainAction();",
"org.hyperledger.fabric.protos.token.Transaction.PlainTokenActionOrBuilder getPlainActionOrBuilder();",
"private PlainTokenAction(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"... | [
"0.7148013",
"0.67840284",
"0.64335275",
"0.6307667",
"0.6277779",
"0.6261444",
"0.62344927",
"0.6230079",
"0.6210272",
"0.62097347",
"0.6113519",
"0.6061834",
"0.6030614",
"0.6025248",
"0.5995282",
"0.5995282",
"0.5995282",
"0.5995282",
"0.5995282",
"0.5995282",
"0.5988666",... | 0.0 | -1 |
.PlainTokenAction plain_action = 1; | org.hyperledger.fabric.protos.token.Transaction.PlainTokenAction getPlainAction(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"org.hyperledger.fabric.protos.token.Transaction.PlainTokenActionOrBuilder getPlainActionOrBuilder();",
"private PlainTokenAction(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private Token () { }",
"void tokenchange();",
"public Builder setPlainAction(org.hyp... | [
"0.6784173",
"0.643421",
"0.63084626",
"0.6277919",
"0.6260859",
"0.6235223",
"0.62304133",
"0.6210552",
"0.6209701",
"0.6113603",
"0.60619324",
"0.6030647",
"0.60260844",
"0.5996384",
"0.5996384",
"0.5996384",
"0.5996384",
"0.5996384",
"0.5996384",
"0.5989664",
"0.597915",
... | 0.7148459 | 0 |
.PlainTokenAction plain_action = 1; | org.hyperledger.fabric.protos.token.Transaction.PlainTokenActionOrBuilder getPlainActionOrBuilder(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"org.hyperledger.fabric.protos.token.Transaction.PlainTokenAction getPlainAction();",
"private PlainTokenAction(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private Token () { }",
"void tokenchange();",
"public Builder setPlainAction(org.hyperledger.fabric.pr... | [
"0.7147269",
"0.6434504",
"0.6309605",
"0.627992",
"0.6259949",
"0.62356144",
"0.62324077",
"0.62120783",
"0.62077457",
"0.6111542",
"0.60599285",
"0.60309434",
"0.60273695",
"0.599674",
"0.599674",
"0.599674",
"0.599674",
"0.599674",
"0.599674",
"0.59899175",
"0.5980442",
... | 0.67828745 | 1 |
Use TokenTransaction.newBuilder() to construct. | private TokenTransaction(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static com.networknt.taiji.token.TokenTransactions.Builder newBuilder() {\n return new com.networknt.taiji.token.TokenTransactions.Builder();\n }",
"public static com.networknt.taiji.token.TokenTransactions.Builder newBuilder(com.networknt.taiji.token.TokenTransactions other) {\n return new com.net... | [
"0.7681209",
"0.74501324",
"0.7395263",
"0.7177733",
"0.64302176",
"0.63667244",
"0.6200909",
"0.61605203",
"0.61262035",
"0.599569",
"0.5958303",
"0.5850402",
"0.58090955",
"0.5783736",
"0.5774434",
"0.56826234",
"0.56749845",
"0.5579479",
"0.55555147",
"0.5546618",
"0.55320... | 0.784716 | 0 |
.PlainTokenAction plain_action = 1; | public boolean hasPlainAction() {
return actionCase_ == 1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"org.hyperledger.fabric.protos.token.Transaction.PlainTokenAction getPlainAction();",
"org.hyperledger.fabric.protos.token.Transaction.PlainTokenActionOrBuilder getPlainActionOrBuilder();",
"private PlainTokenAction(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"... | [
"0.7148013",
"0.67840284",
"0.64335275",
"0.6307667",
"0.6277779",
"0.6261444",
"0.62344927",
"0.6230079",
"0.6210272",
"0.62097347",
"0.6113519",
"0.6061834",
"0.6030614",
"0.6025248",
"0.5995282",
"0.5995282",
"0.5995282",
"0.5995282",
"0.5995282",
"0.5995282",
"0.5988666",... | 0.0 | -1 |
.PlainTokenAction plain_action = 1; | public org.hyperledger.fabric.protos.token.Transaction.PlainTokenAction getPlainAction() {
if (actionCase_ == 1) {
return (org.hyperledger.fabric.protos.token.Transaction.PlainTokenAction) action_;
}
return org.hyperledger.fabric.protos.token.Transaction.PlainTokenAction.getDefaultInstance();... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"org.hyperledger.fabric.protos.token.Transaction.PlainTokenAction getPlainAction();",
"org.hyperledger.fabric.protos.token.Transaction.PlainTokenActionOrBuilder getPlainActionOrBuilder();",
"private PlainTokenAction(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"... | [
"0.7148459",
"0.6784173",
"0.643421",
"0.63084626",
"0.6277919",
"0.6260859",
"0.6235223",
"0.62304133",
"0.6210552",
"0.6209701",
"0.60619324",
"0.6030647",
"0.60260844",
"0.5996384",
"0.5996384",
"0.5996384",
"0.5996384",
"0.5996384",
"0.5996384",
"0.5989664",
"0.597915",
... | 0.6113603 | 10 |
.PlainTokenAction plain_action = 1; | public org.hyperledger.fabric.protos.token.Transaction.PlainTokenActionOrBuilder getPlainActionOrBuilder() {
if (actionCase_ == 1) {
return (org.hyperledger.fabric.protos.token.Transaction.PlainTokenAction) action_;
}
return org.hyperledger.fabric.protos.token.Transaction.PlainTokenAction.get... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"org.hyperledger.fabric.protos.token.Transaction.PlainTokenAction getPlainAction();",
"org.hyperledger.fabric.protos.token.Transaction.PlainTokenActionOrBuilder getPlainActionOrBuilder();",
"private PlainTokenAction(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"... | [
"0.7147269",
"0.67828745",
"0.6434504",
"0.6309605",
"0.627992",
"0.6259949",
"0.62356144",
"0.62324077",
"0.62120783",
"0.6111542",
"0.60599285",
"0.60309434",
"0.60273695",
"0.599674",
"0.599674",
"0.599674",
"0.599674",
"0.599674",
"0.599674",
"0.59899175",
"0.5980442",
... | 0.62077457 | 9 |
.PlainTokenAction plain_action = 1; | public boolean hasPlainAction() {
return actionCase_ == 1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"org.hyperledger.fabric.protos.token.Transaction.PlainTokenAction getPlainAction();",
"org.hyperledger.fabric.protos.token.Transaction.PlainTokenActionOrBuilder getPlainActionOrBuilder();",
"private PlainTokenAction(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"... | [
"0.7148013",
"0.67840284",
"0.64335275",
"0.6307667",
"0.6277779",
"0.6261444",
"0.62344927",
"0.6230079",
"0.6210272",
"0.62097347",
"0.6113519",
"0.6061834",
"0.6030614",
"0.6025248",
"0.5995282",
"0.5995282",
"0.5995282",
"0.5995282",
"0.5995282",
"0.5995282",
"0.5988666",... | 0.0 | -1 |
.PlainTokenAction plain_action = 1; | public org.hyperledger.fabric.protos.token.Transaction.PlainTokenAction getPlainAction() {
if (plainActionBuilder_ == null) {
if (actionCase_ == 1) {
return (org.hyperledger.fabric.protos.token.Transaction.PlainTokenAction) action_;
}
return org.hyperledger.fabric.proto... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"org.hyperledger.fabric.protos.token.Transaction.PlainTokenAction getPlainAction();",
"org.hyperledger.fabric.protos.token.Transaction.PlainTokenActionOrBuilder getPlainActionOrBuilder();",
"private PlainTokenAction(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"... | [
"0.7148013",
"0.67840284",
"0.64335275",
"0.6307667",
"0.6277779",
"0.6261444",
"0.62344927",
"0.6230079",
"0.6210272",
"0.62097347",
"0.6113519",
"0.6030614",
"0.6025248",
"0.5995282",
"0.5995282",
"0.5995282",
"0.5995282",
"0.5995282",
"0.5995282",
"0.5988666",
"0.5978114",... | 0.6061834 | 11 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.