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 |
|---|---|---|---|---|---|---|
Sets the name using the raw bytes and the string created from it by guessing or using the configured encoding. | protected void setName(final String name, final byte[] rawName) {
writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "e9c9991c-deb4-4a9e-9541-fb55f1b77235");
setName(name);
writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverag... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n name_ = value.toStringUtf8();\n }",
"private void setNameBytes(\n com.google.protobuf.ByteString value) {... | [
"0.737327",
"0.73562026",
"0.73562026",
"0.73562026",
"0.72121686",
"0.6918884",
"0.6918884",
"0.69106555",
"0.69106555",
"0.69106555",
"0.69106555",
"0.69106555",
"0.69106555",
"0.69106555",
"0.69106555",
"0.69106555",
"0.69106555",
"0.69106555",
"0.6905521",
"0.6905521",
"0... | 0.6781818 | 28 |
Returns the raw bytes that made up the name before it has been converted using the configured or guessed encoding. This method will return null if this instance has not been read from an archive. | public byte[] getRawName() {
writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "80c1d0d6-ecf6-46ce-8974-d51c0eec65f5");
if (rawName != null) {
writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "1419ab4b-022a-4d7f-b... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public byte[] getEncoded() \n {\n try\n {\n return super.getEncoded();\n }\n catch (IOException e)\n {\n return null;\n }\n }",
"public byte[] getName();",
"public String getDeclaredEncoding();",
"public String getEncoding() {\n ret... | [
"0.62277454",
"0.57598037",
"0.5650444",
"0.5630191",
"0.55849653",
"0.5582844",
"0.5582844",
"0.5582844",
"0.5582844",
"0.5582844",
"0.5582844",
"0.5582844",
"0.5582844",
"0.55765873",
"0.555839",
"0.555839",
"0.5524359",
"0.5476135",
"0.54708356",
"0.5469997",
"0.5463447",
... | 0.69107294 | 0 |
Sets the data offset. | protected void setDataOffset(long dataOffset) {
writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "88c62ab3-98d7-46cb-8121-80be7def254d");
this.dataOffset = dataOffset;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setOffset(double offset);",
"public void setOffset(int offset) {\r\n\t\tthis.offSet = offset;\r\n\t}",
"@Override\r\n public void setOffset(long offset) {\n }",
"public void setOffset(int offset) {\r\n this.offset = offset;\r\n }",
"public void setOffset(int offset) {\r\n currOf... | [
"0.72985846",
"0.7284867",
"0.7206812",
"0.7139489",
"0.7138409",
"0.7072884",
"0.7044474",
"0.6966728",
"0.69492066",
"0.6899694",
"0.68915427",
"0.6869801",
"0.68133",
"0.68111414",
"0.68111414",
"0.68111414",
"0.67524815",
"0.67123073",
"0.6685997",
"0.6685997",
"0.6679501... | 0.7129988 | 5 |
Get the hashCode of the entry. This uses the name as the hashcode. | @Override
public int hashCode() {
writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "6ebbad60-c086-483f-99f5-ae1b69cbca99");
return getName().hashCode();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int hashCode() {\n return name.hashCode();\n }",
"public int hashCode() {\n return name.hashCode();\n }",
"public int hashCode(){\n return name.hashCode();\n }",
"public int hashCode() {\n int result = 6;\n result = 31 * result * name.hashCode();\n ... | [
"0.75660825",
"0.74645215",
"0.74086535",
"0.73670536",
"0.7336104",
"0.7185847",
"0.7172561",
"0.71545327",
"0.7128322",
"0.7122505",
"0.71062714",
"0.71062714",
"0.7082472",
"0.70677656",
"0.7059514",
"0.7052404",
"0.702192",
"0.7010996",
"0.6992051",
"0.6978449",
"0.692344... | 0.6787289 | 24 |
The "general purpose bit" field. | public GeneralPurposeBit getGeneralPurposeBit() {
writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "892f16be-9f3a-431a-a6d9-28dcc530435b");
return gpb;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BitField getBitField(){\n \treturn bitField;\n }",
"public int getBit() {\r\n return _bit;\r\n }",
"public interface BitField {\n\n /**\n * @return the size of the field\n */\n int size();\n\n /**\n * set all values of the BitField with the rightmost value being index 0... | [
"0.7216197",
"0.70997024",
"0.67219",
"0.63659066",
"0.62399864",
"0.62192094",
"0.61413777",
"0.61381483",
"0.6121582",
"0.6054189",
"0.60430276",
"0.6013286",
"0.6013286",
"0.5965796",
"0.59391516",
"0.5930953",
"0.5920417",
"0.58738166",
"0.58682734",
"0.5859299",
"0.58576... | 0.6528714 | 3 |
The "general purpose bit" field. | public void setGeneralPurposeBit(final GeneralPurposeBit b) {
writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "ba5ac644-8158-4d0a-afb5-466e2a767476");
gpb = b;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BitField getBitField(){\n \treturn bitField;\n }",
"public int getBit() {\r\n return _bit;\r\n }",
"public interface BitField {\n\n /**\n * @return the size of the field\n */\n int size();\n\n /**\n * set all values of the BitField with the rightmost value being index 0... | [
"0.72171426",
"0.70990705",
"0.6722347",
"0.6529051",
"0.63639706",
"0.624059",
"0.6218506",
"0.6140495",
"0.61377066",
"0.61209494",
"0.605322",
"0.60422117",
"0.6011867",
"0.6011867",
"0.59655964",
"0.59398305",
"0.59304315",
"0.59207433",
"0.5871952",
"0.5869064",
"0.58583... | 0.5584067 | 48 |
If there are no extra fields, use the given fields as new extra data otherwise merge the fields assuming the existing fields and the new fields stem from different locations inside the archive. | private void mergeExtraFields(final ZipExtraField[] f, final boolean local) throws ZipException {
writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "4660ef72-97af-4c77-a8c0-451c0176ea1f");
if (extraFields == null) {
writeline("/home/ubuntu/results/cover... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setExtraFields(final ZipExtraField[] fields) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"e57536ae-1bcc-4181-a421-ac13bbd5a9a0\");\n final List<ZipExtraField> newFields = new ArrayList<ZipExtraField>();\n writeline(\"/home/ubuntu/... | [
"0.7183989",
"0.6729701",
"0.665069",
"0.5982724",
"0.5828805",
"0.56023747",
"0.55277115",
"0.5468438",
"0.5457142",
"0.53890485",
"0.5367304",
"0.536162",
"0.53112155",
"0.5241302",
"0.51736367",
"0.5161125",
"0.5120797",
"0.5091235",
"0.5084397",
"0.5034744",
"0.50292325",... | 0.6860952 | 1 |
Sets the "version made by" field. | public void setVersionMadeBy(final int versionMadeBy) {
writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "4f3a4f9c-a6d0-45d5-99d0-cedc79ad4b94");
this.versionMadeBy = versionMadeBy;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setVersion(long version);",
"void setVersion(String version);",
"void setVersion(String version);",
"public void setVersion(long param){\n \n // setting primitive attribute tracker to true\n \n ... | [
"0.6371589",
"0.6170341",
"0.6170341",
"0.6101211",
"0.60862917",
"0.60620135",
"0.6057954",
"0.60324407",
"0.5976147",
"0.59337074",
"0.5918645",
"0.59052545",
"0.59052545",
"0.59052545",
"0.59052545",
"0.59052545",
"0.59052545",
"0.59052545",
"0.59052545",
"0.59052545",
"0.... | 0.723946 | 0 |
Sets the "version required to expand" field. | public void setVersionRequired(final int versionRequired) {
writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "a3cfc1d1-f42d-4774-a02f-08271b842f43");
this.versionRequired = versionRequired;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setVersion(String version);",
"@CompositeValue(ignore=true)\n @XmlAttribute(name=\"version\")\n public void setVersion(Version version)\n {\n versionRange = new VersionRange(version, true, version, true);\n }",
"void setVersion(long version);",
"void setVersion(String version);",
"... | [
"0.6121146",
"0.6098822",
"0.6071798",
"0.6070614",
"0.6070614",
"0.6056473",
"0.59276134",
"0.59157157",
"0.58429974",
"0.58429974",
"0.58429974",
"0.58289003",
"0.5794881",
"0.57813895",
"0.57806915",
"0.5773024",
"0.57716066",
"0.57630664",
"0.5750056",
"0.5746905",
"0.574... | 0.58281124 | 12 |
The "version required to expand" field. | public int getVersionRequired() {
writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "ec31c6e5-34ef-44da-8808-414620998e2a");
return versionRequired;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@ApiModelProperty(value = \"(Is this valid?)\")\n public Long getVersion() {\n return version;\n }",
"public String getVersionConstraint() {\n return version;\n }",
"@ApiModelProperty(value = \"Software Statement version as provided by the organisation's PTC\")\n\n @Valid\n\n public BigDecimal... | [
"0.6804754",
"0.6674165",
"0.64950365",
"0.64614856",
"0.6444204",
"0.6409048",
"0.63975",
"0.6387709",
"0.6387709",
"0.6387709",
"0.6387709",
"0.6387709",
"0.6387709",
"0.6387709",
"0.6387709",
"0.6324045",
"0.6294297",
"0.6276682",
"0.6270078",
"0.625893",
"0.6248959",
"0... | 0.5953137 | 87 |
The "version made by" field. | public int getVersionMadeBy() {
writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "284fe80a-e714-45e1-aa2f-65828d5889c7");
return versionMadeBy;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getVersion()\n\t{\n\t\treturn \"$Date$\";\n\t}",
"public String getVersionDate();",
"public static String getVersion()\n {\n return \"$Id$\";\n }",
"public String getVersion()\r\n {\r\n return(\"Ver. 1.0\");\r\n }",
"public String getVersionNumber ();",
"public Str... | [
"0.6957432",
"0.6797854",
"0.6554161",
"0.6482959",
"0.6406343",
"0.63538426",
"0.63385814",
"0.6323003",
"0.6312326",
"0.6310795",
"0.62963974",
"0.626614",
"0.6254972",
"0.6251574",
"0.62461716",
"0.62358946",
"0.6222391",
"0.62151796",
"0.62040466",
"0.61976224",
"0.619667... | 0.7229806 | 0 |
The content of the flags field. | public int getRawFlag() {
writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "0811c831-ddd9-4df1-b31c-c5d631e39389");
return rawFlag;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getFlags() {\r\n \t\treturn flags;\r\n \t}",
"public byte[] getFlags() {\n return flags;\n }",
"public int getFlags() {\n return flags;\n }",
"public org.apache.axis.types.UnsignedInt getFlags() {\n return flags;\n }",
"public long getFlags() {\n }",
"p... | [
"0.7989398",
"0.7497036",
"0.7297307",
"0.7098499",
"0.7059775",
"0.70476496",
"0.70460963",
"0.70009995",
"0.69704014",
"0.6833208",
"0.6821035",
"0.6821035",
"0.663849",
"0.66015047",
"0.6546239",
"0.6530054",
"0.6529755",
"0.6426113",
"0.64193636",
"0.63818157",
"0.6303088... | 0.5398754 | 85 |
Sets the content of the flags field. | public void setRawFlag(final int rawFlag) {
writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "e6d9783a-df0e-4db2-926b-f8935921c8da");
this.rawFlag = rawFlag;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setFlags(final Flags flags);",
"public final native void setFlags(int value) /*-{\n\t\tvar jso = this.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()();\n\t\tjso.flags = value;\n }-*/;",
"public void setFlags(org.apache.axis.types.UnsignedInt flags) {\n this.flags = flags;\n }",
... | [
"0.78370506",
"0.72809005",
"0.7267466",
"0.71503055",
"0.69589",
"0.69073033",
"0.68629056",
"0.68514943",
"0.67939794",
"0.66356903",
"0.6624452",
"0.66104174",
"0.6602818",
"0.6602818",
"0.6500851",
"0.64675134",
"0.6422484",
"0.6421524",
"0.64087576",
"0.63426083",
"0.626... | 0.0 | -1 |
The source of the name field value. | public NameSource getNameSource() {
writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "0a7eceea-d228-42ea-bf8b-7fe5bc03373b");
return nameSource;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public String getName() {\n return source.getName();\n }",
"@VTID(27)\n java.lang.String getSourceName();",
"@Override\n\tpublic String getValue() {\n\t\treturn name;\n\t}",
"public java.lang.String getSourceName() {\r\n return localSourceName;\r\n }",
"String getValueNa... | [
"0.71908087",
"0.6841983",
"0.6835881",
"0.65860325",
"0.6548188",
"0.64728963",
"0.6472646",
"0.6441633",
"0.6420885",
"0.64178586",
"0.6372712",
"0.6367927",
"0.6367927",
"0.62878996",
"0.62614685",
"0.62117857",
"0.61957425",
"0.61666805",
"0.6150058",
"0.614603",
"0.61460... | 0.0 | -1 |
Sets the source of the name field value. | public void setNameSource(NameSource nameSource) {
writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "acfe2e92-6b9b-4a4d-962c-3dd62389739d");
this.nameSource = nameSource;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setSourceName(String name) {\n srcFileName = name;\n }",
"public void setSourceName(java.lang.String param) {\r\n localSourceNameTracker = param != null;\r\n\r\n this.localSourceName = param;\r\n }",
"public abstract void setName( String name ) throws SourceE... | [
"0.7490307",
"0.744267",
"0.71051306",
"0.70472056",
"0.69724214",
"0.68936676",
"0.67763007",
"0.676307",
"0.67401105",
"0.6663281",
"0.6663118",
"0.6663118",
"0.6663118",
"0.6643746",
"0.6618217",
"0.6602584",
"0.6592879",
"0.6587965",
"0.6587965",
"0.6575892",
"0.6546218",... | 0.6462099 | 39 |
The source of the comment field value. | public CommentSource getCommentSource() {
writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "8a9b1fe1-6895-465a-bd8d-8b98409b313e");
return commentSource;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getSource() {\n/* 312 */ return getValue(\"source\");\n/* */ }",
"public String sourceField() {\n return this.sourceField;\n }",
"public String getSource(){\n\t\treturn source.getEvaluatedValue();\n\t}",
"public String get_source() {\n\t\treturn source;\n\t}",
"String getC... | [
"0.67711496",
"0.67546207",
"0.66536874",
"0.6611548",
"0.65631104",
"0.6505404",
"0.6481015",
"0.6443842",
"0.64312",
"0.64148283",
"0.64148283",
"0.64148283",
"0.6385512",
"0.6367883",
"0.63654655",
"0.63633966",
"0.63523805",
"0.63406307",
"0.6337143",
"0.63314927",
"0.630... | 0.5866807 | 73 |
Sets the source of the comment field value. | public void setCommentSource(CommentSource commentSource) {
writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "45c406f7-67cc-42e3-b564-2494c21698c2");
this.commentSource = commentSource;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setSource(String value) {\n/* 304 */ setValue(\"source\", value);\n/* */ }",
"public void setSource(String source);",
"public void setSource (String source);",
"public void setSource(String source) {\n _source = source;\n }",
"public void setSource(String source) {\r... | [
"0.73794377",
"0.7096772",
"0.7036214",
"0.69864476",
"0.6941604",
"0.69215345",
"0.68893737",
"0.68893737",
"0.68184716",
"0.68184716",
"0.6799656",
"0.6790658",
"0.67682606",
"0.67682606",
"0.67280054",
"0.6727366",
"0.6580132",
"0.6580132",
"0.6556977",
"0.64291096",
"0.64... | 0.63356835 | 24 |
Manipulates the map once available. This callback is triggered when the map is ready to be used. This is where we can add markers or lines, add listeners or move the camera. In this case, we just add a marker near Sydney, Australia. If Google Play services is not installed on the device, the user will be prompted to in... | @Override
public void onMapReady(GoogleMap googleMap) {
mMap = googleMap;
// move the camera to the default position or move to last position before rotating the screen
if (mCameraPosition != null) {
mMap.moveCamera(CameraUpdateFactory.newCameraPosition(mCameraPosition));
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onMapReady(GoogleMap googleMap) {\n Geocoder geoCoder = new Geocoder(getActivity(), Locale.getDefault());\n double lat, lng;\n try {\n List<Address> addresses = geoCoder.getFromLocationName(\"Western Sydney Paramatta, NSW\", 5);\n ... | [
"0.81884885",
"0.8042996",
"0.80369604",
"0.8033771",
"0.7998488",
"0.79770344",
"0.7957945",
"0.7957621",
"0.7954723",
"0.79429656",
"0.7936834",
"0.79301476",
"0.7915297",
"0.79048723",
"0.7888234",
"0.7885085",
"0.7885085",
"0.7885085",
"0.7885085",
"0.7878164",
"0.7844682... | 0.0 | -1 |
save clicked marker to get info window of it later | @Override
public boolean onClusterItemClick(Person person) {
mClickedMarker = person;
mMarker = renderer.getMarker(mClickedMarker);
mMarker.showInfoWindow();
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onInfoWindowClick(Marker marker) {\n Integer markerId = markers.get(marker);\n InfoWindowClicked(markerId);\n }",
"@Override\n\t\t\tpublic void onInfoWindowClick(Marker marker) {\n\t\t\t}",
"@Override\n\t\t\tpublic void onInfoWindowClick(Marker marker) {\n\t\t\t\tint id = hashma... | [
"0.77157974",
"0.75176954",
"0.7497578",
"0.7387378",
"0.7320753",
"0.73033327",
"0.7122982",
"0.71082985",
"0.70782715",
"0.70475185",
"0.70370954",
"0.70089144",
"0.6923648",
"0.6922867",
"0.6832939",
"0.6795608",
"0.6795608",
"0.67655593",
"0.6761698",
"0.6761037",
"0.6714... | 0.6302288 | 53 |
here should be the source where we getting the data (Internet, Database, ...) | private List<Person> fetchingUtility() {
List<Person> fetchedList = new ArrayList<>();
fetchedList.add(new Person(-26.220616, 28.079329, "PJ0", "https://twitter.com/pjapplez", false));
fetchedList.add(new Person(-26.187616, 28.079329, "PJ1", "https://twitter.com/pjapplez", false));
fetch... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void readData() {\n ConnectivityManager connMgr = (ConnectivityManager)\n this.getSystemService(Context.CONNECTIVITY_SERVICE);\n\n // Get details on the currently active default data network\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n\n // If ther... | [
"0.66228175",
"0.65894085",
"0.6546605",
"0.64797485",
"0.64317656",
"0.6403308",
"0.63986975",
"0.6288887",
"0.6268781",
"0.6247454",
"0.6207099",
"0.61815643",
"0.61796844",
"0.6141805",
"0.6091664",
"0.608322",
"0.60576254",
"0.6033122",
"0.60010505",
"0.59962237",
"0.5992... | 0.0 | -1 |
Constructs a FreeCellModel with default values: the game has not started, and all the piles are initialized but empty. | public FreeCellModel() {
gameStarted = false;
foundationPiles = new ArrayList<IPile>();
cascadePiles = new ArrayList<IPile>();
openPiles = new ArrayList<IPile>();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public FreecellMultiMoveModel() {\n this.cascadePiles = null;\n this.foundationPiles = null;\n this.openPiles = null;\n this.numCascadePiles = 0;\n this.numOpenPiles = 0;\n this.gameStarted = false;\n }",
"@Test\n\tpublic void freeCellInitiallyHoldTest() {\n\t\tFreeCell obj = new FreeCell();\n... | [
"0.71057177",
"0.64176804",
"0.63930935",
"0.63460004",
"0.6262049",
"0.6159058",
"0.6126597",
"0.60244924",
"0.60068405",
"0.6006527",
"0.5961431",
"0.5947298",
"0.5888792",
"0.5870908",
"0.58632255",
"0.5820185",
"0.580873",
"0.58055365",
"0.5803963",
"0.5798912",
"0.579700... | 0.85875165 | 0 |
CHANGED for HW 4: Now checking pile type input for null. Also changed the check for if a card could be removed from the source pile. Instead of relying on a method canRemoveCard(int cardIdx) in the pile classes that took a card index and determined if the card at that index could be removed, now the check just determin... | @Override
public void move(PileType sourceType, int sourcePileNumber, int cardIndex, PileType destType,
int destPileNumber) throws IllegalArgumentException {
if (!gameStarted) {
throw new IllegalStateException("Cannot make move, game has not started");
}
if (sourcePileNumber < 0... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Card removeCard(){\n Card temp = pile[0]; //removes top card. putting placement card to avoid null pointer\n for(int i = 0; i < pilePlace; i++){ //shifts cards\n pile[i] = pile[i+1];\n }\n pilePlace--;\n return temp;\n\n }",
"public interface IPile<ICard> {\n\n /**\n * Adds an ICar... | [
"0.69373804",
"0.6517377",
"0.6209599",
"0.61826855",
"0.6098067",
"0.6078915",
"0.60703695",
"0.5954266",
"0.59516823",
"0.59511775",
"0.58468324",
"0.58099055",
"0.57946396",
"0.5752963",
"0.57219064",
"0.5686364",
"0.56644",
"0.5646424",
"0.56331235",
"0.5632542",
"0.55731... | 0.51482797 | 70 |
Randomizes the order of the cards in the given deck. CHANGED FOR HW 4: to use Collections.shuffle() for simplicity. This method may now seem redundant, but I kept it in because shuffling is a standard deck operation that should persist no matter what the data type used to represent a deck is, so here there is a deckspe... | protected void shuffle(List<Card> deck) {
Collections.shuffle(deck);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void shuffleDeck() {\n\t\tfor(int index = 0; index < this.getNumberOfCards(); index++) {\n\t\t\tint randomNumber = index + (int)(Math.random() * (this.getNumberOfCards() - index));\n\t\t\tCard temp = this.cardsInDeck[randomNumber];\n\t\t\tthis.cardsInDeck[randomNumber] = this.cardsInDeck[index];\n\t\t\tthis.cardsI... | [
"0.7932015",
"0.7826226",
"0.7776936",
"0.7774891",
"0.7724323",
"0.7720342",
"0.7687571",
"0.76299876",
"0.76261485",
"0.76261485",
"0.76041067",
"0.7518609",
"0.74957216",
"0.7455464",
"0.7424305",
"0.7418922",
"0.74031085",
"0.73712623",
"0.7356472",
"0.734157",
"0.7334934... | 0.77015233 | 6 |
Finds the pile of the given number and type from among this game's piles. | protected IPile getPile(PileType type, int pileNum) throws IllegalArgumentException {
switch (type) {
case FOUNDATION:
if ((pileNum >= 0) && (this.foundationPiles.size() > pileNum)) {
return this.foundationPiles.get(pileNum);
}
break;
case OPEN:
if ((pileNum >= ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Tile getTileAt(Position p);",
"SoccerPlayer find(Integer number);",
"private int getPileNumber(String sourceString) {\n String pileNumberString = sourceString.substring(1);\n return Integer.valueOf(pileNumberString);\n }",
"@Test\n public void multiplePiles() {\n Pile p1 = new Pile();\n ... | [
"0.54287475",
"0.50958675",
"0.5070254",
"0.50157666",
"0.49902612",
"0.49813804",
"0.49693495",
"0.4962578",
"0.49600857",
"0.49582842",
"0.4944965",
"0.49016285",
"0.48931062",
"0.48922333",
"0.48901397",
"0.4875009",
"0.4857463",
"0.4826419",
"0.4824498",
"0.48161373",
"0.... | 0.7436086 | 0 |
If the game has not yet started, it shouldn't be "over" | @Override
public boolean isGameOver() {
if (!gameStarted) {
return false;
}
// If any non-foundation pile still has cards, the game is not over.
for (IPile pile : this.cascadePiles) {
if (!pile.isEmpty()) {
return false;
}
}
for (IPile pile : this.openPiles) {
i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void gameOver() {\n\t\tgameOver=true;\n\t}",
"private void gameOver() {\n\t\t\n\t}",
"protected boolean hasGameStarted() {\r\n return super.hasGameStarted();\r\n }",
"public void isGameOver() { \r\n myGameOver = true;\r\n myGamePaused = true; \r\n }",
"@Override\n\tpubl... | [
"0.7602036",
"0.75247645",
"0.7483734",
"0.74715644",
"0.7435046",
"0.7370618",
"0.73633945",
"0.733828",
"0.7316302",
"0.7293396",
"0.7261778",
"0.7248474",
"0.7216208",
"0.7184631",
"0.71789813",
"0.7176954",
"0.7169591",
"0.7160019",
"0.7150383",
"0.7137219",
"0.7121227",
... | 0.0 | -1 |
Determines if the given deck is valid; i.e. has 52 cards, with no duplicates. There can only be 13 cards in a given suit, and only 4 suits, so if there are 52 cards, there are guaranteed to be no duplicates. | protected boolean isValidDeck(List<Card> deck) {
if (deck.size() != 52) { // Deck must be 52 cards
return false;
}
Set<Card> cards = new HashSet<Card>();
cards.addAll(deck);
return (cards.size() == 52);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected boolean isValid(List<Card> deck) {\r\n //Assume true\r\n boolean isValid = true;\r\n\r\n if (deck == null) {\r\n return false;\r\n }\r\n\r\n for (int i = 0; i < deck.size(); i++) {\r\n for (int j = i + 1; j < deck.size(); j++) {\r\n for (int k = j + 1; k < deck.size(); k++... | [
"0.8238207",
"0.7313629",
"0.71760833",
"0.7066001",
"0.6979502",
"0.6811008",
"0.6741653",
"0.6726894",
"0.6697196",
"0.66181856",
"0.6540706",
"0.65119624",
"0.64441603",
"0.64277583",
"0.6317823",
"0.6300059",
"0.6299096",
"0.62905866",
"0.613924",
"0.6138448",
"0.6118648"... | 0.8652007 | 0 |
1 agregar una persona | public static void main(String[] args) {
try {
System.out.print("Id resultado: " + PersonaABM.getInstancia().agregar("Apellido", "Generic", 14));
System.out.println("");
} catch (Exception e) {
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void crearNuevaPersona(Persona persona);",
"public void addPerson(Person p);",
"static public void addPersona(Persona c) { //metodo para añadir a lista y actualizar la lista en tiempo real\r\n listaPersona.add(c);\r\n listaG.setListaGrafica();\r\n \r\n \r\n \r\n }",
... | [
"0.7714015",
"0.7329832",
"0.7195031",
"0.7191404",
"0.7154227",
"0.71065885",
"0.7080489",
"0.70615095",
"0.7048872",
"0.70064765",
"0.69931155",
"0.6897875",
"0.6890305",
"0.68744427",
"0.6790048",
"0.6786885",
"0.6780705",
"0.67497617",
"0.67109424",
"0.6708584",
"0.667906... | 0.0 | -1 |
Get an instance of face service client to detect faces in image. | @Override
protected Face[] doInBackground(InputStream... params) {
FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();
try{
publishProgress("Detecting...");
// Start detection.
return faceServiceClient.detect(
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface FaceFinder {\n\n public CvFace[] detectFace(Bitmap bitmap);\n\n}",
"public static BufferedImage contornarFace(BufferedImage pImage) {\n System.out.println(\"\\nRunning DetectFaceDemo\");\n\n // Create a face detector from the cascade file in the resources\n // directory.\... | [
"0.63874024",
"0.6166669",
"0.61564094",
"0.6099939",
"0.5934104",
"0.58918643",
"0.5844377",
"0.58253795",
"0.5674702",
"0.5645493",
"0.56444365",
"0.5638061",
"0.55871934",
"0.55550265",
"0.55550265",
"0.55251145",
"0.54871166",
"0.54752785",
"0.5459553",
"0.5457535",
"0.53... | 0.58482796 | 6 |
Show the status of background detection task on screen. | @Override
protected void onProgressUpdate(String... values) {
setUiDuringBackgroundTask(values[0]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void showProfileBackground();",
"@Override\n public void run() {\n Message uiMSG;\n //Create message with only SHOW_ORIGINAL_COLOR argument\n uiMSG = BackgroundThread.this.uiHandler.obtainMessage(BidirectionalMessageActivity.SHOW_ORIGINAL_COLOR, 0, 0, null)... | [
"0.6183717",
"0.6008548",
"0.59887505",
"0.5965385",
"0.5946546",
"0.5847216",
"0.5830162",
"0.5829226",
"0.58077824",
"0.57483387",
"0.5742169",
"0.567763",
"0.5671642",
"0.5669274",
"0.5663153",
"0.5656668",
"0.5619438",
"0.5619438",
"0.56054306",
"0.55971193",
"0.55847794"... | 0.0 | -1 |
Show the status of background detection task on screen.a | @Override
protected void onProgressUpdate(String... values) {
setUiDuringBackgroundTask(values[0]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void enterBackground();",
"void showProfileBackground();",
"@Override\n public void onScreenStatus(boolean isAs) {\n }",
"@Override\n public void run() {\n Message uiMSG;\n //Create message with only SHOW_ORIGINAL_COLOR argument\n uiMSG = B... | [
"0.64135253",
"0.6338428",
"0.6292741",
"0.6017215",
"0.59534705",
"0.5879548",
"0.58674",
"0.5801499",
"0.5800602",
"0.58004135",
"0.5784554",
"0.57264876",
"0.5706273",
"0.56733143",
"0.5660345",
"0.5658398",
"0.5654542",
"0.5653022",
"0.5645999",
"0.5644017",
"0.5634078",
... | 0.0 | -1 |
Show the result on screen when detection is done. | @Override
protected void onPostExecute(IdentifyResult[] result) {
setUiAfterIdentification(result, mSucceed);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void onPostExecute(Face[] result) {\n if (check == 0) {\n setUiAfterDetection(result, mSucceed, 0);\n } else if (check == 1) {\n setUiAfterDetection(result, mSucceed, 1);\n }\n }",
"private void setUiAfterDetection... | [
"0.6611768",
"0.6551328",
"0.6441687",
"0.6367718",
"0.62927514",
"0.6168551",
"0.6156496",
"0.61087126",
"0.606662",
"0.5991048",
"0.59591866",
"0.5958424",
"0.5958424",
"0.59430337",
"0.59288865",
"0.5924529",
"0.5890497",
"0.5884059",
"0.5852055",
"0.58394706",
"0.58236843... | 0.55357575 | 53 |
Initialize with detection result. | FaceListAdapter(Face[] detectionResult) {
faces = new ArrayList<>();
faceThumbnails = new ArrayList<>();
mIdentifyResults = new ArrayList<>();
if (detectionResult != null) {
faces = Arrays.asList(detectionResult);
for (Face face: faces) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void initialize ()\n\t{\n\t\tSubsystems.goalVision.processNewImage();\n\t\t\n \t//Send positive values to go forwards.\n \tSubsystems.transmission.setLeftJoystickReversed(true);\n \tSubsystems.transmission.setRightJoystickReversed(true);\n\t}",
"protected void initialize() {\n\t\tRobot.sender_... | [
"0.6145711",
"0.60985464",
"0.5928454",
"0.58563787",
"0.5792697",
"0.5775008",
"0.5755182",
"0.5725333",
"0.5721165",
"0.5695255",
"0.56676584",
"0.5647244",
"0.56425995",
"0.5617441",
"0.5572036",
"0.55706453",
"0.5561605",
"0.55536544",
"0.5543834",
"0.55361646",
"0.551457... | 0.5433643 | 30 |
Initialize with detection result. | PersonGroupListAdapter() {
personGroupIdList = new ArrayList<>();
Set<String> personGroupIds
= StorageHelper.getAllPersonGroupIds(MainActivity.this);
for (String personGroupId: personGroupIds) {
personGroupIdList.add(personGroupId);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void initialize ()\n\t{\n\t\tSubsystems.goalVision.processNewImage();\n\t\t\n \t//Send positive values to go forwards.\n \tSubsystems.transmission.setLeftJoystickReversed(true);\n \tSubsystems.transmission.setRightJoystickReversed(true);\n\t}",
"protected void initialize() {\n\t\tRobot.sender_... | [
"0.6145711",
"0.60985464",
"0.5928454",
"0.58563787",
"0.5792697",
"0.5775008",
"0.5755182",
"0.5725333",
"0.5721165",
"0.5695255",
"0.56676584",
"0.5647244",
"0.56425995",
"0.5617441",
"0.5572036",
"0.55706453",
"0.5561605",
"0.55536544",
"0.5543834",
"0.55361646",
"0.551457... | 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.main, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {... | [
"0.7247938",
"0.7202959",
"0.7196692",
"0.71785426",
"0.7108701",
"0.70417315",
"0.70402646",
"0.70132303",
"0.7011096",
"0.69826573",
"0.6946997",
"0.69409776",
"0.6935366",
"0.69191027",
"0.69191027",
"0.6893088",
"0.6885528",
"0.6877815",
"0.68763673",
"0.686437",
"0.68643... | 0.0 | -1 |
Handle navigation view item clicks here. | @SuppressWarnings("StatementWithEmptyBody")
@Override
public boolean onNavigationItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.nav_camera) {
} else if (id == R.id.nav_gallery) {
Intent intent = new Intent(this, PersonGroupListActivity.class);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void onNavigationItemClicked(Element element);",
"@Override\n public void onClick(View view) { listener.onItemClick(view, getPosition()); }",
"void onDialogNavigationItemClicked(Element element);",
"@Override\n public void onClick(View view) {\n itemInterface.OnItemClickedListener(tr... | [
"0.7882029",
"0.7235578",
"0.6987005",
"0.69458413",
"0.6917864",
"0.6917864",
"0.6883472",
"0.6875181",
"0.68681556",
"0.6766498",
"0.67418456",
"0.67207",
"0.6716157",
"0.6713947",
"0.6698189",
"0.66980195",
"0.66793925",
"0.66624063",
"0.66595167",
"0.6646381",
"0.6641224"... | 0.0 | -1 |
Show the status of background detection task on screen. | private void setUiDuringBackgroundTask(String progress) {
progressDialog.setMessage(progress);
setInfo(progress);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void showProfileBackground();",
"@Override\n public void run() {\n Message uiMSG;\n //Create message with only SHOW_ORIGINAL_COLOR argument\n uiMSG = BackgroundThread.this.uiHandler.obtainMessage(BidirectionalMessageActivity.SHOW_ORIGINAL_COLOR, 0, 0, null)... | [
"0.6181879",
"0.6007181",
"0.5986315",
"0.59658796",
"0.5947657",
"0.5846524",
"0.5830389",
"0.5830052",
"0.5807531",
"0.574677",
"0.57417226",
"0.56773424",
"0.56719977",
"0.56703025",
"0.5662885",
"0.56553364",
"0.56183404",
"0.56183404",
"0.56061196",
"0.5596096",
"0.55822... | 0.0 | -1 |
Show the result on screen when detection is done. | private void setUiAfterIdentification(IdentifyResult[] result, boolean succeed) {
progressDialog.dismiss();
setAllButtonsEnabledStatus(true);
setIdentifyButtonEnabledStatus(false);
if (succeed) {
// Set the information about the detection result.
setInfo("Identi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void onPostExecute(Face[] result) {\n if (check == 0) {\n setUiAfterDetection(result, mSucceed, 0);\n } else if (check == 1) {\n setUiAfterDetection(result, mSucceed, 1);\n }\n }",
"private void setUiAfterDetection... | [
"0.66124755",
"0.6551317",
"0.6440604",
"0.63673246",
"0.6293871",
"0.616984",
"0.6108688",
"0.60680586",
"0.599148",
"0.5961114",
"0.5959931",
"0.5959931",
"0.5943728",
"0.59284085",
"0.592348",
"0.5890804",
"0.588436",
"0.58545333",
"0.5840926",
"0.582503",
"0.5810926",
"... | 0.61560154 | 6 |
Start detecting in image. | private void detect(Bitmap bitmap) {
// Put the image into an input stream for detection.
ByteArrayOutputStream output = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, output);
ByteArrayInputStream inputStream = new ByteArrayInputStream(output.toByteArray()... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void startDetectFaceInfo() {\n mProgressDialog.show();\n mFaceExecutor.submit(() -> {\n // first begin the face morphing\n FaceImage faceImage = FaceUtils.getFaceFromPath(\n mSelectPath, mImageSize.x, mImageSize.y);\n // each time detect the... | [
"0.6836086",
"0.65971464",
"0.64867866",
"0.64799374",
"0.64387465",
"0.6435355",
"0.64084905",
"0.62955207",
"0.6287073",
"0.62463033",
"0.6201134",
"0.6186747",
"0.61803484",
"0.6123359",
"0.610224",
"0.60951746",
"0.60883445",
"0.6078035",
"0.60349995",
"0.59610665",
"0.59... | 0.62161934 | 10 |
Called when the "Identify" button is clicked. | public void identify(View view) {
// Start detection task only if the image to detect is selected.
if (detected && mPersonGroupId != null) {
// Start a background task to identify faces in the image.
List<UUID> faceIds = new ArrayList<>();
for (Face face: mFaceListAd... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void identify() {\n\n\t}",
"public void addIdentifyListener(ActionListener actionListener) {\r\n jIdentify.addActionListener(actionListener);\r\n }",
"@FXML\n public void interviewClicked() {\n try {\n Interview selectedInterview = this.listInterview.getSelectionModel().ge... | [
"0.6835461",
"0.63223547",
"0.59997815",
"0.58440083",
"0.5834206",
"0.57874703",
"0.5766578",
"0.57396114",
"0.5729518",
"0.565009",
"0.5644025",
"0.56367993",
"0.5624003",
"0.5612344",
"0.56105256",
"0.55796665",
"0.55617076",
"0.55617076",
"0.54697865",
"0.54434836",
"0.54... | 0.5568388 | 16 |
Add a log item. | private void addLog(String log) {
LogHelper.addIdentificationLog(log);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addLog(String item) {\n\t\tlong itemTime = System.currentTimeMillis();\r\n\r\n\t\t// Measure total time\r\n\t\tlong itemTotalTime = (itemTime - start) / 1000;\r\n\t\tReporter.log(\"<td> - \" + item + itemTotalTime + \" </td>\");\r\n\t}",
"public void addLog(Log p) {\n logs.add(p);\n }",
... | [
"0.7098763",
"0.7080977",
"0.68204725",
"0.6570685",
"0.6548045",
"0.6451395",
"0.6447023",
"0.64438033",
"0.64438033",
"0.63819486",
"0.6335727",
"0.6299928",
"0.6286575",
"0.6281328",
"0.6245021",
"0.62225974",
"0.62214935",
"0.6216328",
"0.62147194",
"0.6173257",
"0.616522... | 0.6376923 | 10 |
Set whether the buttons are enabled. | private void setAllButtonsEnabledStatus(boolean isEnabled) {
Button identifyButton = (Button) findViewById(R.id.identify);
identifyButton.setEnabled(isEnabled);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setButtonsEnable(boolean b){\n addButton.setEnabled(b);\n clearButton.setEnabled(b);\n peelOffButton.setEnabled(b);\n buttonControlPanel.setEnabled(b);\n progressCheckBox.setEnabled(b);\n }",
"private void enableButtons() {\n\t\tcapture.setEnabled(true);\r\n\t\tstop.setEnabled(... | [
"0.7972591",
"0.79298633",
"0.78473574",
"0.777588",
"0.77713174",
"0.77395093",
"0.77356833",
"0.76617324",
"0.7615503",
"0.7577133",
"0.75541735",
"0.7490867",
"0.7486423",
"0.74847305",
"0.7397239",
"0.7338775",
"0.73113364",
"0.7278182",
"0.7262671",
"0.72528327",
"0.7235... | 0.73301363 | 16 |
Set the group button is enabled or not. | private void setIdentifyButtonEnabledStatus(boolean isEnabled) {
Button button = (Button) findViewById(R.id.identify);
button.setEnabled(isEnabled);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setGroupEnabled(int group, boolean enabled);",
"@Override\n public void setEnabled(boolean b)\n {\n btnDeselectAll.setEnabled(b);\n btnExport.setEnabled(b);\n btnSelectAll.setEnabled(b);\n checkBoxList1.setEnabled(b);\n\n }",
"Boolean groupingEnabled();",
"pub... | [
"0.7880107",
"0.67518836",
"0.6583206",
"0.65358174",
"0.6531646",
"0.6525775",
"0.65197694",
"0.64925706",
"0.6413022",
"0.6377915",
"0.637565",
"0.6328161",
"0.6312342",
"0.62973344",
"0.62503004",
"0.6233384",
"0.62278825",
"0.6226736",
"0.6200698",
"0.6190215",
"0.6174887... | 0.0 | -1 |
Set the group button is enabled or not. | private void refreshIdentifyButtonEnabledStatus() {
if (detected && mPersonGroupId != null) {
setIdentifyButtonEnabledStatus(true);
} else {
setIdentifyButtonEnabledStatus(false);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setGroupEnabled(int group, boolean enabled);",
"@Override\n public void setEnabled(boolean b)\n {\n btnDeselectAll.setEnabled(b);\n btnExport.setEnabled(b);\n btnSelectAll.setEnabled(b);\n checkBoxList1.setEnabled(b);\n\n }",
"Boolean groupingEnabled();",
"pub... | [
"0.788273",
"0.674913",
"0.6587467",
"0.65334076",
"0.6533013",
"0.6527454",
"0.6516718",
"0.648839",
"0.64095736",
"0.6374265",
"0.63729",
"0.6324086",
"0.63100225",
"0.62946874",
"0.6246891",
"0.6232283",
"0.6230867",
"0.62261194",
"0.61977893",
"0.6186415",
"0.61711025",
... | 0.0 | -1 |
Set the information panel on screen. | private void setInfo(String info) {
// TextView textView = (TextView) findViewById(R.id.info);
// textView.setText(info);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void setUpInfoPanel() {\n\t\t\n\t}",
"private void setInfoPanel()\r\n {\r\n //set up info panel\r\n unitPanel.setPlayer(worldPanel.getCurrentPlayer());\r\n\t\t\t\tunitPanel.setYear(year);\r\n int tempUnit = worldPanel.getCurrentUnit();\r\n\r\n ... | [
"0.766496",
"0.7525421",
"0.7270016",
"0.71691537",
"0.6922879",
"0.68814415",
"0.66843414",
"0.6591622",
"0.653033",
"0.64897466",
"0.64621216",
"0.639837",
"0.63861763",
"0.63729125",
"0.6336852",
"0.6333759",
"0.6318006",
"0.6290407",
"0.6269314",
"0.6252935",
"0.6230611",... | 0.0 | -1 |
Create a new object RecipeBook that will contain the recipes with the applicable list of ingredients | public static void main(String[] args) {
RecipeBook recipeBook= new RecipeBook();
recipeBook.setName("My Recipe Book");
// This is the default value that will be shown on the drop down list
recipeBook.newRecipe("Select an Option");
//Loading sample recipes into memory
//Create an object type Recipe
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Recipe getRecipe(){\n\t\tRecipe recipe = new Recipe();\n\t\trecipe.setName(name);\n\t\trecipe.setNumPersons(numPersons);\n\t\trecipe.setPrepTime(prepTime);\n\t\trecipe.setRestTime(restTime);\n\t\trecipe.setCookingTime(cookingTime);\n\t\tHashMap<Ingredient, Quantity> ingredients = new HashMap<Ingredient,Quan... | [
"0.69828427",
"0.63450277",
"0.6275055",
"0.6260309",
"0.61434174",
"0.6118297",
"0.61140007",
"0.61113",
"0.61011034",
"0.6093063",
"0.6087107",
"0.6069447",
"0.60674226",
"0.6066754",
"0.60640955",
"0.6045205",
"0.60381407",
"0.6007081",
"0.59842825",
"0.59736687",
"0.59570... | 0.61189497 | 5 |
So far, we have discussed how to consume an Optional object someone else created. If you want to write a method that creates an Optional object there are several static methods for that purpose. | public static void main(String[] args) {
Optional<Double> inversedNum = inverse(10D);
System.out.println(inversedNum.orElseThrow());
Double nullable = null;
// Optional<Double> op = Optional.of(nullable); - Null pointer exception
// The ofNullable method is intended as a bridge from possibly null... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Optional<T> toOptional();",
"public static void createOptionals() {\n String nullString = null;\n String emptyString = \"\";\n\n Optional.ofNullable(nullString);\n Optional.of(emptyString);\n try {\n Optional.of(nullString);\n } catch (NullPointerException e) ... | [
"0.7013598",
"0.6787915",
"0.6524052",
"0.6506476",
"0.6428628",
"0.64109975",
"0.6401143",
"0.6355484",
"0.6340451",
"0.622038",
"0.61911875",
"0.60888433",
"0.6048815",
"0.6023133",
"0.5987306",
"0.5982383",
"0.59693325",
"0.59168726",
"0.5893799",
"0.58921075",
"0.5871924"... | 0.0 | -1 |
Hit the low hanging fruit first | @Override
default boolean equivalentTo(Tree otherTree) {
if (this == otherTree)
return true;
if (otherTree == null || this.getKind() != otherTree.getKind() || this.hashCode() != otherTree.hashCode())
return false;
CatchTree other = (CatchTree) otherTree;
if (!Tree.equivalentTo(this.getBlock()... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void eatApple() {\n\t\teaten = peeled && !eaten ? true : false;\n\t}",
"private void harvest() {\n\t\t// if VERY far from flower, it must have died. start scouting\n\t\tif(grid.getDistance(grid.getLocation(targetFlower),grid.getLocation(this)) > 200) {\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// if crop s... | [
"0.6384537",
"0.6291993",
"0.6186345",
"0.60730803",
"0.6045739",
"0.6037438",
"0.5990698",
"0.5969768",
"0.5966653",
"0.59464884",
"0.5938621",
"0.59306926",
"0.5925894",
"0.5920475",
"0.5889398",
"0.58689654",
"0.58576846",
"0.5847392",
"0.5821586",
"0.58182096",
"0.5806392... | 0.0 | -1 |
MAIN Applies physics to the given drone for dt seconds, translating the drone dt seconds into the future. | public static void applyPhysics(Drone drone, float dt) throws DroneCrashException, MaxAoAException {
// stepsize bepalen
float h;
if (dt - drone.getPredictionMethod().getStepSize() >= 0) {
h = drone.getPredictionMethod().getStepSize();
} else if (dt > 0) {
h = dt;
} else {
return;
}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void run() {\n\n //if no time has elapsed, do not do anything\n if (Harness.getTime().equals(lastRunTime)) {\n return;\n }\n\n //double deltaV, deltaX;\n double newSpeed;\n double newPosition;\n double targetSpeed = 0;\n double currentSpeed... | [
"0.5891519",
"0.5680837",
"0.56767285",
"0.5530413",
"0.5510339",
"0.5500637",
"0.5497429",
"0.54842883",
"0.54372376",
"0.54284",
"0.54284",
"0.54284",
"0.54191417",
"0.54162794",
"0.537233",
"0.536219",
"0.53470224",
"0.5340974",
"0.5326415",
"0.52864677",
"0.5284493",
"0... | 0.65652263 | 0 |
Calculates and returns the linear and angular accelerations of the drone (in world frame). | private static Vector3f[] calculateAccelerations(Drone drone, float stepsize) throws MaxAoAException {
return calculateAccelerations(drone, calculateForces(drone, stepsize));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static Vector3f[] calculateAccelerations(Drone drone, Vector3f[] forces) {\r\n\t\t// linear acceleration\r\n\t\tVector3f linearAccelerationW = new Vector3f(forces[0].x / drone.getMass(), forces[0].y / drone.getMass(),\r\n\t\t\t\tforces[0].z / drone.getMass());\r\n\r\n\t\t// rotational inertia values\r\n\t\... | [
"0.6672496",
"0.6631986",
"0.6522913",
"0.6218627",
"0.62127674",
"0.6187674",
"0.60686815",
"0.5958533",
"0.59359336",
"0.59097075",
"0.5853644",
"0.5820635",
"0.581361",
"0.5789621",
"0.5778642",
"0.5772283",
"0.5767283",
"0.57443005",
"0.57297975",
"0.5688987",
"0.5676046"... | 0.6076306 | 6 |
Calculates and returns the linear and angular accelerations of the drone (in world frame). The given forces Vector3f[] array is assumed to contain the forces at index 0 and torque at index 1, both in drone frame. | private static Vector3f[] calculateAccelerations(Drone drone, Vector3f[] forces) {
// linear acceleration
Vector3f linearAccelerationW = new Vector3f(forces[0].x / drone.getMass(), forces[0].y / drone.getMass(),
forces[0].z / drone.getMass());
// rotational inertia values
float iXx = drone.getInertia... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static Vector3f[] calculateAccelerations(Drone drone, float stepsize) throws MaxAoAException {\r\n\t\treturn calculateAccelerations(drone, calculateForces(drone, stepsize));\r\n\t}",
"private void UpdateAcceleration()\n\t{\n\t\tVector2 newAcceleration = new Vector2(0,0);\n\t\t\n\t\tfor(int i=0;i<forcesLi... | [
"0.5926851",
"0.5711656",
"0.5447142",
"0.54140586",
"0.53196317",
"0.5193422",
"0.50581807",
"0.5046966",
"0.50006264",
"0.4960829",
"0.4960829",
"0.4960829",
"0.49305528",
"0.4928678",
"0.4883555",
"0.48394325",
"0.48284116",
"0.47941533",
"0.47853318",
"0.47683185",
"0.472... | 0.8340097 | 0 |
POSITION Calculates and returns the translation and rotation of the drone given its new velocities (in world frame). The given Vector3f[] array is assumed to contain the new linear velocity at index 0 and the new angular velocity at index 1, both in world frame. Note that this function also uses the previous velocities... | private static Vector3f[] calculatePositionDifferences(Drone drone, Vector3f[] newVelocities, float dt) {
// calculate the average linear velocity
Vector3f avgLinearVelocityW = average(drone.getLinearVelocity(), newVelocities[0]);
// calculate the translation
Vector3f deltaPositionW = (Vector3f) avg... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void updatePosition() {\n\t\tfor (int i = 0; i < encoders.length; i++) {\n\t\t\tdRot[i] = (encoders[i].get() - lastEncPos[i]) / this.cyclesPerRev;\n\t\t\tdPos[i] = dRot[i] * wheelDiameter * Math.PI;\n\t\t\tlastEncPos[i] = encoders[i].get();\n\t\t}\n\t\t\n\t\tdLinearPos = (dPos[0] + dPos[1]) / 2;\n\t\t\n\t\... | [
"0.5396677",
"0.53886056",
"0.5379024",
"0.5362899",
"0.53342825",
"0.5333167",
"0.5305563",
"0.51679754",
"0.5095229",
"0.50661635",
"0.4986049",
"0.4978138",
"0.49639744",
"0.49618146",
"0.49040413",
"0.48945493",
"0.48872477",
"0.4859159",
"0.48464966",
"0.48378897",
"0.48... | 0.7360373 | 0 |
Returns the average of the two given vectors. | private static Vector3f average(Vector3f a, Vector3f b) {
return new Vector3f(a.x + (b.x - a.x) / 2, a.y + (b.y - a.y) / 2, a.z + (b.z - a.z) / 2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static double[] vectorAddition(double[] a, double[] b) {\r\n\t\tdouble[] retval = new double[a.length];\r\n\t\tfor(int i = 0; i < a.length; i += 1) {\r\n\t\t\tretval[i] = a[i] + b[i];\r\n\t\t}\r\n\t\treturn retval;\r\n\t}",
"public static void addVectors( double[] v1, double[] v2, double[] result ) {\n ... | [
"0.6563903",
"0.63598835",
"0.6337773",
"0.6324279",
"0.62258255",
"0.61769533",
"0.6149417",
"0.6076032",
"0.60437065",
"0.6028297",
"0.59262747",
"0.58992714",
"0.58854127",
"0.5843805",
"0.58308053",
"0.5803596",
"0.5789227",
"0.5785062",
"0.57825875",
"0.57677734",
"0.576... | 0.7105897 | 0 |
GET para o id do registro | public long getId() { return id; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@GetMapping(\"/{idDinheiro}\")\n public Dinheiro findById(@PathVariable Long idDinheiro){\n return dinheiroRepository.findById(idDinheiro).get();\n }",
"@GetMapping(value = \"/consultarByID\")\n public ResponseEntity consultar(@RequestParam Long id) {\n return empleadoService.consultar(id)... | [
"0.71133035",
"0.70655113",
"0.6857049",
"0.6825531",
"0.6825531",
"0.6825531",
"0.6825531",
"0.6825531",
"0.6825531",
"0.6825531",
"0.6825531",
"0.6825531",
"0.6825531",
"0.6825531",
"0.6825531",
"0.6825531",
"0.6825531",
"0.6825531",
"0.6825531",
"0.6825531",
"0.6825531",
... | 0.0 | -1 |
SET para o id do registro | public void setId(long id) { this.id = id; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setId(int idNuevo)\n { \n this.id = idNuevo;\n }",
"private void setId(Integer id) { this.id = id; }",
"public void setId(int id){ this.id = id; }",
"void setId(Integer id);",
"public void setIdUsuario(int value) {\n this.idUsuario = value;\n }",
"public void setId( ... | [
"0.78642726",
"0.7445324",
"0.7353827",
"0.7349646",
"0.7295575",
"0.7286934",
"0.7286086",
"0.7269608",
"0.72536755",
"0.72536755",
"0.72536755",
"0.72536755",
"0.7237921",
"0.7237921",
"0.72243404",
"0.721415",
"0.7206755",
"0.7173519",
"0.7171076",
"0.71703124",
"0.7170312... | 0.7215275 | 16 |
GET para o valor da latitude | public float getLatitude() { return latitude; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Double getLatitude();",
"Double getLatitude();",
"double getLatitude();",
"long getLatitude();",
"int getLatitude();",
"public int getLat();",
"public String getLat() {\n return lat;\n }",
"public String getlat() {\n\t\treturn lat;\n\t}",
"public String getLatitude()\r\n {\r\n r... | [
"0.77278864",
"0.77278864",
"0.76727104",
"0.7620419",
"0.7554111",
"0.74866444",
"0.7239007",
"0.7168416",
"0.71623755",
"0.7092777",
"0.7092777",
"0.7092777",
"0.7073185",
"0.7067003",
"0.69964105",
"0.6961546",
"0.6943819",
"0.6939922",
"0.69390315",
"0.6900944",
"0.687298... | 0.71641207 | 8 |
SET para o valor da latitude | public void setLatitude(float latitude) { this.latitude = latitude; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setLatitude(Double latitude);",
"public void setLat(double value) {\n lat = value;\n }",
"public void setLat(double value) {\n this.lat = value;\n }",
"public void setLatitude(float value) {\n this.latitude = value;\n }",
"public void setLatitude (String strLatitude){\n ... | [
"0.8295492",
"0.7920534",
"0.77679044",
"0.75489366",
"0.74394214",
"0.741631",
"0.7367186",
"0.72756034",
"0.723265",
"0.7230242",
"0.72163224",
"0.71937287",
"0.7175438",
"0.70973206",
"0.70973206",
"0.709497",
"0.709284",
"0.70900553",
"0.7085357",
"0.7071765",
"0.70706344... | 0.7656532 | 3 |
GET para o valor da longitude | public float getLongitude() { return longitude; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"long getLongitude();",
"double getLongitude();",
"int getLongitude();",
"Double getLongitude();",
"Double getLongitude();",
"public int getLon();",
"public String getLongitude()\r\n {\r\n return longitude;\r\n }",
"public int getLongitude() {\n return longitude;\n }",
"public... | [
"0.81668663",
"0.8067083",
"0.80013245",
"0.79294074",
"0.79294074",
"0.77375597",
"0.75961393",
"0.7440858",
"0.74203616",
"0.74203616",
"0.7393896",
"0.73726547",
"0.7355156",
"0.73370457",
"0.73370457",
"0.73370457",
"0.73370457",
"0.7321404",
"0.73107475",
"0.73008144",
"... | 0.7472599 | 7 |
SET para o valor da longitude | public void setLongitude(float longitude) { this.longitude = longitude; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setLongitude(Double longitude);",
"public void setLon(double value) {\n lon = value;\n }",
"public void setLongitude(String longitude)\r\n {\r\n this.longitude = longitude; \r\n }",
"long getLongitude();",
"public void setLongitude(float value) {\n this.longitude = ... | [
"0.8453952",
"0.81768674",
"0.7589235",
"0.74668366",
"0.7444483",
"0.74044776",
"0.73370904",
"0.73229164",
"0.7315238",
"0.7315238",
"0.7301585",
"0.7299058",
"0.72838867",
"0.7282492",
"0.72799706",
"0.7261245",
"0.7261245",
"0.7253375",
"0.72364354",
"0.7231412",
"0.72239... | 0.77974933 | 2 |
GET para a data e hora da coleta das coordenadas GPS | public Date getDataGatheringDateTime() { return this.dataGatheringDateTime; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onClick(View v) {\n SubPlanListDTO llh = (SubPlanListDTO)v.getTag();\n //Toast.makeText(getApplicationContext(),\"위치 x=\"+llh.getLlh_x()+\"y=\"+llh.getLlh_y(),Toast.LENGTH_SHORT).show();\n ////여기수정하면됨...... | [
"0.61796665",
"0.6173651",
"0.611806",
"0.60415614",
"0.58928514",
"0.5875868",
"0.5858576",
"0.58507264",
"0.58415496",
"0.57971144",
"0.5676616",
"0.56706154",
"0.56564075",
"0.56287",
"0.5599673",
"0.55862164",
"0.55856496",
"0.5578117",
"0.5560271",
"0.55596155",
"0.55436... | 0.0 | -1 |
SET para a data e hora da coleta das coordenadas GPS | public void setDataGatheringDateTime(Date dateTime) { this.dataGatheringDateTime = dateTime; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void set_point ( String id,String longitud,String latitud, String id_cliente){\n this.id = id;\n this.longitud=longitud;\n this.latitud=latitud;\n this.id_cliente = id_cliente;\n Calendar c = Calendar.getInstance();\n SimpleDateFormat df = new SimpleDateFormat(\"yyy... | [
"0.64323324",
"0.6417064",
"0.6291466",
"0.59867084",
"0.5926996",
"0.5805794",
"0.58006376",
"0.5783768",
"0.5767684",
"0.5754527",
"0.56999964",
"0.56932724",
"0.5680061",
"0.5668208",
"0.56626487",
"0.56332284",
"0.5632251",
"0.56032795",
"0.56024224",
"0.5597268",
"0.5590... | 0.0 | -1 |
These must be initialized in the runOpmode | @Override
public void runOpMode() {
hw = new RobotHardware(robotName, hardwareMap);
rd = new RobotDrive(hw);
rs=new RobotSense(hw, telemetry);
/*rd.moveDist(RobotDrive.Direction.FORWARD, .5, .3);
rd.moveDist(RobotDrive.Direction.REVERSE, .5, .3);
rd.moveDist(Robo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void initOperation() {\n\t\tinitialized = true;\r\n\t}",
"@Override\n public abstract void runOpMode();",
"private cudaComputeMode()\r\n {\r\n }",
"private void initOperationMode() throws IllegalArgumentException {\n String writeModeStr = getProperties().getProperty(WRITE_MODE, \"single\")... | [
"0.6445536",
"0.6429513",
"0.6384415",
"0.6288649",
"0.6144974",
"0.6119435",
"0.59062827",
"0.59005266",
"0.5870183",
"0.58671665",
"0.5861385",
"0.58397555",
"0.5801953",
"0.5783338",
"0.5775833",
"0.5768233",
"0.5747397",
"0.5746296",
"0.57115734",
"0.57016486",
"0.5687656... | 0.54172796 | 64 |
based on Alon and Michaelov's calculations used in 2020 vision code: ScoreMatchingPipeline.calcAngleOffsetDegrees | public static double calculateHorizontalOffsetDegrees2(double centerX, double imageWidth, double camFovRadians) {
double imageCenter = imageWidth * 0.5;
double xOffset = centerX - imageCenter;
double focalLengthPixel = imageCenter / Math.tan(Math.toDegrees(camFovRadians) * 0.5 * Math.PI/180);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private float calculateAngle() {\r\n\r\n\t\tdouble angleTemp = Math.atan2(Target.getY() - y, Target.getX() - x);\r\n\t\t// I needed to use wikipedia to get this i\r\n\t\t// did not learn this in math and needed\r\n\t\t// to use a couplle youtube tutorials to\r\n\t\t// find out how to do the math in java\r\n\t\t// ... | [
"0.6923538",
"0.65216947",
"0.6450107",
"0.64081436",
"0.6276516",
"0.62752914",
"0.6266825",
"0.6202314",
"0.6186178",
"0.61594814",
"0.61594814",
"0.6156484",
"0.615488",
"0.61528903",
"0.6145031",
"0.614326",
"0.61416066",
"0.6114472",
"0.61076653",
"0.6098438",
"0.609425"... | 0.0 | -1 |
Create a simple Java program CurrentDateTime.java to print the current date and time. Locale.setDefault(Locale.ROOT); Locale.setDefault(new Locale("BG", "BG")); Locale.setDefault(Locale.US); | public static void main(String[] args) {
LocalDateTime dt = LocalDateTime.now();
System.out.println(dt);
System.out.printf(
"Today is %1$td.%1$tm.%1$tY\n", LocalDate.now());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void currentDateTime() {\n // Just the date\n LocalDate date = LocalDate.now();\n System.out.println(\"LocalDate now: \" + date);\n\n // Just the time\n LocalTime time = LocalTime.now();\n System.out.println(\"LocalTime now: \" + time);\n\n // Date and... | [
"0.72955006",
"0.71322745",
"0.7066887",
"0.6956372",
"0.69150794",
"0.6856413",
"0.68486917",
"0.67531574",
"0.6733537",
"0.6706275",
"0.66898257",
"0.6688768",
"0.66496575",
"0.6592659",
"0.6580763",
"0.6502544",
"0.64479077",
"0.6442345",
"0.6435405",
"0.64318657",
"0.6430... | 0.6818569 | 7 |
Get the bit depth of the image | public short getBitDepth() {
return getShort(ADACDictionary.PIXEL_BIT_DEPTH);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public byte getBitDepth();",
"public native int getDepth() throws MagickException;",
"int getBitsPerPixel();",
"int getColorDepth();",
"int depth();",
"int depth();",
"float getDepth();",
"float getDepth();",
"public int getDepth() {\n if (isLiveOrCompiled())\n if(!this.getCapabil... | [
"0.8008814",
"0.76396024",
"0.72180116",
"0.68214214",
"0.67779434",
"0.67779434",
"0.67509896",
"0.67509896",
"0.6708904",
"0.66738987",
"0.65979445",
"0.65532154",
"0.6493505",
"0.64243996",
"0.64075863",
"0.6386512",
"0.6325033",
"0.62037414",
"0.61856955",
"0.6171228",
"0... | 0.8056437 | 0 |
Return a floating point value represented by the key argument (a neardefinitive list is given in the dictionary class). | public float getFloat(short dictionaryKey) {
return floatsMap.get(dictionaryKey);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public float getFloat(String key)\n {\n return getFloat(key, 0);\n }",
"public Float getFloat(String key) throws AgentBuilderRuntimeException {\n\t\tif (!extContainsKey(key))\n\t\t\tthrow new AgentBuilderRuntimeException(\n\t\t\t\t\t\"Dictionary does not contain key \\\"\" + key + \"\\\"\");\n\t\tre... | [
"0.74096686",
"0.7308208",
"0.72899824",
"0.7177877",
"0.71126",
"0.7002785",
"0.6863695",
"0.6821657",
"0.6754448",
"0.67316103",
"0.6722492",
"0.6705209",
"0.6635582",
"0.66265863",
"0.6620947",
"0.65428495",
"0.6496515",
"0.6476977",
"0.63693774",
"0.63204443",
"0.62807983... | 0.74472344 | 0 |
get a string containing all the found keyvalue pairs. | public String toString() {
StringBuffer header = new StringBuffer();
Iterator<ADACKvp> it = keyList.iterator();
while (it.hasNext()) {
ADACKvp ak = it.next();
header.append(ADACDictionary.descriptions[ak.getKeyNum()]);
header.append(" = ");
header.append(ak.getString());
header.append("\n");
}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String toString() {\n\t\treturn \"{\" + Strings.join(\",\", keyValuePair) + \"}\";\n\t}",
"@Override\n\tpublic String toString() {\n\t\t\n\t\tSet<KeyValueData> keyvalueset = key_value_treemap.keySet();\n\t\tIterator<KeyValueData> iterator = keyvalueset.iterator();\n\t\tStringBuilder builder =... | [
"0.6573723",
"0.6425489",
"0.6373128",
"0.63598293",
"0.6246452",
"0.61535126",
"0.61495584",
"0.6122624",
"0.6098025",
"0.5982725",
"0.59557",
"0.59459275",
"0.5916084",
"0.5886055",
"0.5870736",
"0.58651537",
"0.58543867",
"0.5851366",
"0.58502245",
"0.58398116",
"0.5837182... | 0.5562015 | 50 |
Get the length of time of the acquisition of each frame. | public double getFrameTime() {
// Convert from milliseconds to seconds
return getInteger(ADACDictionary.FRAME_TIME) / 1000;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getFrameDuration();",
"public int getTimeLength() {\r\n return timeLength;\r\n }",
"public static int getTimeSeconds() {\n return Atlantis.getBwapi().getFrameCount() / 30;\n }",
"public static int getTimeFrames() {\n return Atlantis.getBwapi().getFrameCount();... | [
"0.7549564",
"0.72203034",
"0.69927377",
"0.6941405",
"0.6836379",
"0.6836379",
"0.67317396",
"0.67009073",
"0.66779095",
"0.6668236",
"0.66527605",
"0.66384715",
"0.6439894",
"0.6431565",
"0.64187133",
"0.64113677",
"0.6405453",
"0.6392314",
"0.6378199",
"0.6353881",
"0.6312... | 0.7501287 | 1 |
Get the image height in pixel units | public short getHeight() {
return getShort(ADACDictionary.Y_DIMENSIONS);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getImageHeight()\n {\n \n int retVal = getImageHeight_0(nativeObj);\n \n return retVal;\n }",
"public int getImageHeight()\n\t{\n\t\treturn imgHeight;\n\t}",
"public int getImageHeight() {\n\t\treturn imgHeight;\n\t}",
"public int getImageHeight() {\n\treturn hei... | [
"0.86137205",
"0.84318715",
"0.8370736",
"0.83146816",
"0.8187343",
"0.8171565",
"0.8031027",
"0.7990733",
"0.79565716",
"0.78845006",
"0.78504634",
"0.78378266",
"0.78378266",
"0.78378266",
"0.78378266",
"0.78378266",
"0.78378266",
"0.78289264",
"0.78289264",
"0.77966297",
"... | 0.0 | -1 |
Get the offset, in bytes, to the image data within the file | public int getImageOffset() {
if (isGated()) {
if (isReconstruction()) {
// Must have a gated reconstruction. For each gated interval
// there is an extra 128 byte header (beginning "adac01") block
// starting at the normal image offset location. Add this to the
// offset:
return ADACDiction... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long getFileOffset();",
"long getFileOffset();",
"int getRawOffset();",
"@Override\n public long getFilePointer() {\n return this.fileOffset + this.bufferPointer.bufferOffset;\n }",
"public abstract int getRawOffset();",
"public abstract int getRawOffset();",
"public long getOffset(... | [
"0.7475677",
"0.7368826",
"0.6748512",
"0.6733837",
"0.65217435",
"0.65217435",
"0.64431816",
"0.64316547",
"0.64316547",
"0.64316547",
"0.64204186",
"0.63694936",
"0.63633686",
"0.6358243",
"0.6346386",
"0.6340491",
"0.633352",
"0.6217053",
"0.61525124",
"0.6123868",
"0.6100... | 0.69374055 | 2 |
Return an integer value represented by the key argument (a neardefinitive list is given in the dictionary class). | public int getInteger(short dictionaryKey) {
return intsMap.get(dictionaryKey);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getInt(String key);",
"int getInt( String key, int def);",
"public int getInt(String key) {\n return Integer.parseInt(mMap.get(key));\n }",
"public Integer getInt(K key) throws ClassCastException;",
"public int getInt(String key)\n {\n return getInt(key, 0);\n }",
"publ... | [
"0.75517964",
"0.7195633",
"0.7101311",
"0.7093313",
"0.7037487",
"0.6943689",
"0.69306755",
"0.68307245",
"0.682586",
"0.67502147",
"0.6733157",
"0.6723149",
"0.66162795",
"0.6582287",
"0.6572853",
"0.65665996",
"0.6558151",
"0.65503967",
"0.65447724",
"0.65331864",
"0.65283... | 0.71914726 | 2 |
Get the number of intervals in a gated image set | public short getNumberOfGatedIntervals() {
return getShort(ADACDictionary.NUMBER_OF_IMAGE_SETS);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getNumberOfImages() {\n\n\t\tshort zdim = getZDim();\n\t\tzdim = zdim > 0 ? zdim : 1;\n\n\t\tshort slices = getNumberOfSlices();\n\t\tslices = slices > 0 ? slices : 1;\n\n\t\tshort intervals = getNumberOfGatedIntervals();\n\t\tintervals = intervals > 0 ? intervals : 1;\n\n\t\treturn zdim * slices * inte... | [
"0.68266594",
"0.66076756",
"0.65575653",
"0.65089405",
"0.6443204",
"0.62923175",
"0.62894726",
"0.61455256",
"0.6144114",
"0.6142258",
"0.6141641",
"0.610691",
"0.610379",
"0.60707545",
"0.60544485",
"0.60516137",
"0.6039659",
"0.6032952",
"0.6017815",
"0.6014765",
"0.60147... | 0.76309645 | 0 |
Get the total number of images in the file. | public int getNumberOfImages() {
short zdim = getZDim();
zdim = zdim > 0 ? zdim : 1;
short slices = getNumberOfSlices();
slices = slices > 0 ? slices : 1;
short intervals = getNumberOfGatedIntervals();
intervals = intervals > 0 ? intervals : 1;
return zdim * slices * intervals;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getNumberOfPhotos(){\n\t\tint num = 0;\n\t\ttry {\n\t\t\tFileInputStream in = new FileInputStream(\"images\");\n\t\t\t//Skipping magic number\n\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\tin.read();\n\t\t\t}\n\t\t\tbyte[] tmpVar = new byte[4];\n\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\ttmpVar[i] = (... | [
"0.8314842",
"0.7793645",
"0.7751664",
"0.7684363",
"0.7578019",
"0.75466585",
"0.7514005",
"0.73658955",
"0.73069584",
"0.73069584",
"0.72876304",
"0.7278761",
"0.72617805",
"0.7166955",
"0.70769376",
"0.70620596",
"0.70411575",
"0.6998797",
"0.69879574",
"0.6980463",
"0.696... | 0.7311188 | 8 |
Get the number of slices in a reconstructed data set. | public short getNumberOfSlices() {
return getShort(ADACDictionary.RECONSTRUCTED_SLICES);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int slices() {\n\treturn slices;\n}",
"public int size() {\n\treturn slices*rows*columns;\n}",
"int getDimensionsCount();",
"int numberOfDimensions();",
"public int getNumRows() {\n\t\treturn this.subset.length;\n\t}",
"public static int numSlices(int width,int height) // calculate the number of s... | [
"0.7295645",
"0.7226203",
"0.6561079",
"0.6462249",
"0.64528203",
"0.63612777",
"0.6324338",
"0.6273267",
"0.6249475",
"0.6237357",
"0.6189289",
"0.6134426",
"0.610562",
"0.610562",
"0.60407454",
"0.60072494",
"0.59961534",
"0.5979388",
"0.59692967",
"0.59692967",
"0.59322745... | 0.7460472 | 0 |
Get the pixel size in mm. The pixel pixel dimensions are calculated from the calibration factor. Calibration factor is the pixel size of a 1024x1024 pixel image acquired with the full field of view. Pixel size is calculated with the following equation: (1024 CALB)/(dim zoom) mm/pixel | public float getPixelSize() {
float pixelSize = 0;
float zoom = getFloat(ADACDictionary.ZOOM);
// Get calibration factor (CALB)
String calString = extrasMap.get(ExtrasKvp.CALIB_KEY);
// Some wholebody images have height > width. Typically 1024x512.
// Crocodile eats the biggest.
short height = getHeigh... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private float getRoughPixelSize() {\n\n\t\tfloat size = 380; // mm\n\t\tfloat pixels = getHeight();\n\t\treturn pixels > 0 ? size / pixels : 0;\n\n\t}",
"public int getPixelSize() {\n\t\treturn pixelSize;\n\t}",
"public double dimensionsToMeters() {\n\t\tdouble heightMeters = heightInInches / 39.370;\n\t\tdoub... | [
"0.71365196",
"0.6613454",
"0.6342041",
"0.6309561",
"0.61591303",
"0.61079174",
"0.6081306",
"0.6045607",
"0.60296094",
"0.5976115",
"0.5962716",
"0.5918531",
"0.59162736",
"0.5912471",
"0.59120834",
"0.59119034",
"0.58924085",
"0.5856122",
"0.58438784",
"0.58180976",
"0.581... | 0.8519852 | 0 |
Fall back on apriori knowledge of useful field of view size (520mm x 380mm), which gives a rough approximation. | private float getRoughPixelSize() {
float size = 380; // mm
float pixels = getHeight();
return pixels > 0 ? size / pixels : 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long estimateSize() {\n/* 1558 */ return this.est;\n/* */ }",
"public long estimateSize() {\n/* 1338 */ return this.est;\n/* */ }",
"public long estimateSize() {\n/* 1448 */ return this.est;\n/* */ }",
"public long estimateSize() {\n/* 1668 */ return ... | [
"0.6416813",
"0.6400795",
"0.63243973",
"0.626658",
"0.6165132",
"0.6021496",
"0.59842974",
"0.59447414",
"0.5915194",
"0.5887245",
"0.58352846",
"0.5761608",
"0.57067263",
"0.5704741",
"0.5690647",
"0.5655533",
"0.5631706",
"0.5618015",
"0.5599737",
"0.55877364",
"0.5570205"... | 0.6068933 | 5 |
Return a short integer value represented by the key argument (a neardefinitive list is given in the dictionary class). | public short getShort(short dictionaryKey) {
return shortsMap.get(dictionaryKey);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public short getShort(String key) {\n Object value = get(key);\n return ((value instanceof Long) ? (short)((Long)value).intValue() : 0);\n }",
"public short getShort(String key)\n {\n return getShort(key, (short) 0);\n }",
"public short s(String key) throws AgentBuilderRuntimeExce... | [
"0.7643876",
"0.75431347",
"0.73137873",
"0.71638393",
"0.68915075",
"0.6721509",
"0.64996403",
"0.64138657",
"0.63541335",
"0.63014764",
"0.6298102",
"0.62689215",
"0.6092394",
"0.60879314",
"0.60304284",
"0.60018414",
"0.5982129",
"0.589559",
"0.5884417",
"0.5884417",
"0.57... | 0.72709584 | 3 |
Return a string value represented by the key argument (a neardefinitive list is given in the dictionary class). | public String getString(short dictionaryKey) {
return stringsMap.get(dictionaryKey);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getString(String key);",
"String getString(String key);",
"private String getString(String key) {\n return key;\r\n }",
"public String getString(String key) {\r\n String value = (String) keyvaluepairs.get(key.toLowerCase());\r\n return value == null ? \"\" : value;\r\n }",
"public ... | [
"0.714939",
"0.71236974",
"0.7094003",
"0.70311224",
"0.70273757",
"0.67449766",
"0.67449766",
"0.67449766",
"0.67449766",
"0.67449766",
"0.67449766",
"0.67341983",
"0.66721964",
"0.65549606",
"0.654048",
"0.6448919",
"0.64374095",
"0.6343176",
"0.6340031",
"0.6331212",
"0.63... | 0.64309895 | 17 |
Get the image width in pixel units | public short getWidth() {
return getShort(ADACDictionary.X_DIMENSIONS);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getImageWidth()\n {\n \n int retVal = getImageWidth_0(nativeObj);\n \n return retVal;\n }",
"public int width() {\n return picture.width();\n }",
"public int width() {\n return picture().width();\n }",
"public int getImageWidth()\n\t{\n\t\tret... | [
"0.83086115",
"0.81582546",
"0.8124796",
"0.80715686",
"0.80128306",
"0.79627264",
"0.79148567",
"0.78612614",
"0.7839352",
"0.78162664",
"0.77475625",
"0.76303965",
"0.76303965",
"0.7568808",
"0.75677705",
"0.7548566",
"0.7547709",
"0.7547709",
"0.75473964",
"0.7533294",
"0.... | 0.75029194 | 27 |
Get the ZDimension. This is usually the number of frames of a dynamic data set. | public short getZDim() {
return getShort(ADACDictionary.Z_DIMENSIONS);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getDimZ() {\r\n return dimZ;\r\n }",
"public final int getDimension() {\r\n\t\treturn this.dimension;\r\n\t}",
"public int getDimension() {\n\t\treturn dimension;\n\t}",
"public int getZSize() {\n\t\treturn (highPoint.getBlockZ() - lowPoint.getBlockZ()) + 1;\n\t}",
"public byte getDime... | [
"0.8306666",
"0.70181817",
"0.6983799",
"0.6920066",
"0.6884697",
"0.6884697",
"0.6884337",
"0.68624884",
"0.68480104",
"0.66640306",
"0.66573",
"0.66212547",
"0.66034514",
"0.6600271",
"0.65925384",
"0.6577038",
"0.6576519",
"0.6566562",
"0.65630466",
"0.6553414",
"0.6541384... | 0.8432139 | 0 |
Gated data types will often require a 4D presentation. | public boolean isGated() {
if (isGated == null) {
String AD_Type = getString(ADACDictionary.DATA_TYPE);
if (AD_Type != null && AD_Type.startsWith("G")) {
// GE - Gated ECT
// GP - Gated planar (although these usually just get given DP)
isGated = true;
} else {
isGated = false;
}
}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic float[] getDemision() {\n\t\tfloat[] d = {x.getValue(),y.getValue(),width.getValue(),height.getValue()};\n\t\treturn d;\n\t}",
"private static final byte[] xfmt_d_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -94, 1, 0, 0, 0,\n\t\t\t\t0, -1, -1, -1, 28, 28, 28, -128, -1... | [
"0.5807251",
"0.56143725",
"0.55474263",
"0.5376079",
"0.5361663",
"0.5234648",
"0.52314353",
"0.51940995",
"0.5189934",
"0.5154675",
"0.5147938",
"0.51469266",
"0.5145069",
"0.5144927",
"0.5137463",
"0.5103925",
"0.5091441",
"0.5091047",
"0.50703216",
"0.5062298",
"0.5058383... | 0.0 | -1 |
Check if the image is a tomographic reconstruction. | public boolean isReconstruction() {
return getShort(ADACDictionary.RECONSTRUCTED_SLICES) > 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasImageByTransform();",
"public boolean hasImageByTransform() {\n return ((bitField0_ & 0x00001000) == 0x00001000);\n }",
"boolean isMotionImageryType();",
"public boolean hasImageByTransform() {\n return ((bitField0_ & 0x00000800) == 0x00000800);\n }",
"boolean isImageTileType... | [
"0.6677724",
"0.6061995",
"0.5963319",
"0.59124154",
"0.5890691",
"0.57813233",
"0.5725202",
"0.56790257",
"0.560754",
"0.559039",
"0.5574281",
"0.54581565",
"0.5438204",
"0.54106396",
"0.5380694",
"0.5369367",
"0.5350106",
"0.53408337",
"0.53327316",
"0.53198737",
"0.5268021... | 0.6233486 | 1 |
Parse the header information for keyvalue pairs. | private void parseHeader() throws IOException {
// ////////////////////////////////////////////////////////////
// Administrative header info
// ////////////////////////////////////////////////////////////
// First 10 bytes reserved for preamble
byte[] sixBytes = new byte[6];
keyBuffer.get(sixBytes, 0, 6)... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void parseHeader() {\n\t\tthis.release = (Integer) this.headerData.get(0);\n\t\tthis.endian = (ByteOrder) this.headerData.get(1);\n\t\tthis.K = (Short) this.headerData.get(2);\n\t\tthis.datasetLabel = (String) this.headerData.get(4);\n\t\tthis.datasetTimeStamp = (String) this.headerData.get(5);\n\t\tthis.ma... | [
"0.718822",
"0.68832827",
"0.6480069",
"0.6074393",
"0.602211",
"0.5965135",
"0.5961698",
"0.59368885",
"0.59357786",
"0.5758518",
"0.5669531",
"0.56546474",
"0.5543132",
"0.5505608",
"0.5494525",
"0.54845536",
"0.5480918",
"0.54254115",
"0.54197496",
"0.53590804",
"0.5352692... | 0.6513948 | 2 |
Read a byte keyvalue pair. | public void read(ByteKvp byteKvp) {
// How long is this byte[]?
int len = ADACDictionary.valLength[byteKvp.getKeyNum()];
byte[] bytes = new byte[len];
// Move the value buffer to the correct location
valBuffer.position(byteKvp.getFieldOffset());
valBuffer.get(bytes, 0, len);
byteKvp.setString(bytes);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ByteSequence getByteSequence(Key key) throws IOException;",
"byte readByte();",
"public byte[] get(byte[] key);",
"public abstract byte read_octet();",
"public byte readByte() throws IOException {\n return in.readByte();\n }",
"public byte getByte(String key) {\n Object value = get(key)... | [
"0.6573237",
"0.641572",
"0.625969",
"0.6118987",
"0.606582",
"0.6013126",
"0.60034776",
"0.5936356",
"0.58263457",
"0.5706267",
"0.569436",
"0.5692064",
"0.5685943",
"0.5684055",
"0.56507206",
"0.563435",
"0.5630641",
"0.56268245",
"0.56258565",
"0.558404",
"0.5537368",
"0... | 0.63397104 | 2 |
Read the "extra" keyvalue pair. | public void read(ExtrasKvp extraKvp) {
byte[] bytes = new byte[ExtrasKvp.LENGTH];
// Move the value buffer to the correct location
valBuffer.position(extraKvp.getFieldOffset());
valBuffer.get(bytes, 0, ExtrasKvp.LENGTH);
// Set the bytes string of the extras object
extraKvp.setData(bytes);
extrasMap = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public VersionedMap getExtra ()\n {\n return extra;\n }",
"public String getExtra2() {\n return extra2;\n }",
"Pair<String, String> getAdditionalAttribute();",
"Map<String, Object> extras();",
"public String[] getExtraInfo() {\n return extraInfo;\n }",
"public Strin... | [
"0.60533524",
"0.594448",
"0.59120893",
"0.589055",
"0.58814114",
"0.5792684",
"0.57637924",
"0.57552207",
"0.5739021",
"0.57279646",
"0.57115287",
"0.5702961",
"0.5662434",
"0.56248856",
"0.5588117",
"0.5588117",
"0.55722696",
"0.55641633",
"0.5562154",
"0.5540853",
"0.55321... | 0.7072825 | 0 |
Read a floating point keyvalue pair. | public void read(FloatKvp floatKvp) {
float floatValue = valBuffer.getFloat(floatKvp.getFieldOffset());
floatKvp.setValue(floatValue);
floatsMap.put(floatKvp.getKeyNum(), floatKvp.getValue());
logger.log(floatKvp.getLogString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"float readFloat();",
"double getDouble(String key) throws KeyValueStoreException;",
"public float getMandatoryFloat(String key) throws ConfigNotFoundException;",
"String floatRead();",
"public Float getFloat(String key) throws AgentBuilderRuntimeException {\n\t\tif (!extContainsKey(key))\n\t\t\tthrow new A... | [
"0.69298047",
"0.6726086",
"0.6725017",
"0.67062366",
"0.6580367",
"0.6552954",
"0.65268844",
"0.64156556",
"0.63893473",
"0.63575715",
"0.63470227",
"0.62929934",
"0.61938834",
"0.6184861",
"0.61250377",
"0.6042877",
"0.6014297",
"0.6011375",
"0.5998156",
"0.59719026",
"0.59... | 0.65155077 | 7 |
Read an integer keyvalue pair. | public void read(IntKvp intKvp) {
int m_Int = valBuffer.getInt(intKvp.getFieldOffset());
intKvp.setValue(m_Int);
intsMap.put(intKvp.getKeyNum(), intKvp.getValue());
logger.log(intKvp.getLogString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Integer getInt(K key) throws ClassCastException;",
"int getInt(String key);",
"int getInt(String key) throws KeyValueStoreException;",
"int getInt( String key, int def);",
"public Integer getIntegerData(String key) {\n return pref.getInt(key, 0);\n }",
"public int getInteger(String key) ... | [
"0.6836465",
"0.6807015",
"0.6783385",
"0.64856374",
"0.6449843",
"0.6411111",
"0.6271749",
"0.6264691",
"0.62314314",
"0.62300926",
"0.61873686",
"0.6115583",
"0.6082002",
"0.60729486",
"0.6053647",
"0.60404146",
"0.60376364",
"0.6032201",
"0.6030878",
"0.60283595",
"0.60077... | 0.6228646 | 10 |
Read a short integer keyvalue pair. | public void read(ShortKvp shortKvp) {
short shortValue = valBuffer.getShort(shortKvp.getFieldOffset());
shortKvp.setValue(shortValue);
shortsMap.put(shortKvp.getKeyNum(), shortKvp.getValue());
logger.log(shortKvp.getLogString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"short readShort();",
"public abstract short read_short();",
"short readShort() throws IOException;",
"abstract int readShort(int start);",
"public short readShort() throws IOException;",
"String shortRead();",
"public short readShort() {\n return ((short) readLong());\n }",
"public sh... | [
"0.75523454",
"0.738216",
"0.7175734",
"0.7132395",
"0.70980847",
"0.70129824",
"0.6937123",
"0.69338125",
"0.67425734",
"0.66384983",
"0.65976954",
"0.6514071",
"0.650024",
"0.6422567",
"0.64049864",
"0.6360216",
"0.63597363",
"0.63535535",
"0.63380414",
"0.62592643",
"0.623... | 0.65345556 | 11 |
TODO Acc1 double balance, int accNumber, met deposit, met withdraw, toString TODO Acc2 double withdrawLimit TODO Acc3 double minBalace TODO Bank name, accounts, metoda creare oricariu tip si adaugare | public static void main(String[] args) {
// write your code here
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public account(int acc,int Id,String Atype,double bal ){\n this.accNo = acc;\n this.id = Id;\n this.atype = Atype;\n this.abal = bal;\n }",
"public BankAcc(int accNum, double bal, String name, String email, String phone){\r\n System.out.println(\"DONE\");\r\n //can do some... | [
"0.7055321",
"0.6762537",
"0.65604484",
"0.64972067",
"0.62435216",
"0.6242438",
"0.6190345",
"0.61835706",
"0.6139609",
"0.61270034",
"0.6076816",
"0.6049254",
"0.6049086",
"0.6002803",
"0.5994549",
"0.5961881",
"0.59574306",
"0.59399897",
"0.593795",
"0.59054416",
"0.590448... | 0.0 | -1 |
System.out.println("Missile: " + missile.getX() + "/" + missile.getY()); | public void delMissile(Missile missile)
{
boolean remove = missiles.remove(missile);
try {
missile.finalize();
} catch (Throwable ex) {
Logger.getLogger(Object_.class.getName()).log(Level.SEVERE, null, ex);
}
//System.out.pri... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double smilePos(){\r\n\r\n\t\treturn smile.getY();\r\n\r\n\t}",
"public String getMissile() {\n return\n \" BB \\n\" +\n \" BB \\n\" +\n \" BB \\n\" +\n \" BB ... | [
"0.68464786",
"0.6627058",
"0.6594945",
"0.6291992",
"0.62760717",
"0.6236907",
"0.62074906",
"0.6148404",
"0.6125204",
"0.6114544",
"0.60961473",
"0.60828805",
"0.60772955",
"0.60497826",
"0.60416645",
"0.5999063",
"0.5981448",
"0.59812963",
"0.59633136",
"0.5948883",
"0.592... | 0.5554465 | 96 |
Instantiates a default Movement detector. | public MovementDetector(MovementListener movementListener) {
this(0.3f, 5000, movementListener);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected void defaultAttackInit() {\n\t\tVector2 temp = new Vector2();\n\n\t\t// CHECK IF MOVING VERTICALLY\n\t\tif (parent.velocity.y < 0) {\n\t\t\ttemp.y = -arrowSpeed;\n\t\t} else if (parent.velocity.y > 0) {\n\t\t\ttemp.y = arrowSpeed;\n\t\t}\n\n\t\t// CHECK IF MOVING SIDEWAYS\n\t\tif (parent.vel... | [
"0.59622276",
"0.5909196",
"0.5746732",
"0.57155854",
"0.568196",
"0.5679384",
"0.5632624",
"0.558601",
"0.5510519",
"0.54152167",
"0.5405637",
"0.5368504",
"0.53662837",
"0.5319972",
"0.531592",
"0.5310592",
"0.5288379",
"0.52850485",
"0.5277987",
"0.52576727",
"0.52512187",... | 0.67426574 | 0 |
logic to detect onMovement or onStationary | @Override
protected void onSensorEvent(SensorEvent sensorEvent) {
// https://developer.android.com/reference/android/hardware/SensorEvent.html#values
float x = sensorEvent.values[0];
float y = sensorEvent.values[1];
float z = sensorEvent.values[2];
/* Logic:
If there is no external force on... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void getMovements()\n {\n if(\n Greenfoot.isKeyDown(\"Up\")||Greenfoot.isKeyDown(\"W\")||\n Greenfoot.isKeyDown(\"Down\")||Greenfoot.isKeyDown(\"S\")||\n Greenfoot.isKeyDown(\"Right\")||Greenfoot.isKeyDown(\"D\")||\n Greenfoot.isKeyDown(\"Left\") ||Greenfoot.isKeyDown(\... | [
"0.6945696",
"0.6674615",
"0.64796793",
"0.6470737",
"0.6446802",
"0.6403374",
"0.6358317",
"0.6350835",
"0.62269884",
"0.6155993",
"0.6132435",
"0.6112901",
"0.61035156",
"0.60900444",
"0.6040033",
"0.6023451",
"0.6007138",
"0.59736866",
"0.5957824",
"0.591459",
"0.59083605"... | 0.57437474 | 30 |
Created by lubiao on 2018/3/1. | public interface LoginService {
boolean checkPassWord(UserInfo userInfo, String password);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r... | [
"0.60357547",
"0.58328545",
"0.5646545",
"0.5642386",
"0.55832773",
"0.55832773",
"0.55351985",
"0.5502112",
"0.55013037",
"0.5492427",
"0.54605454",
"0.54493564",
"0.54475665",
"0.544432",
"0.5442605",
"0.54389876",
"0.54381514",
"0.5437392",
"0.5437392",
"0.5437392",
"0.543... | 0.0 | -1 |
The current cluster state exposed by the discovery layer. Packagevisible for tests. | ClusterState state() {
return clusterStateSupplier.get();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String clusterState() {\n return this.clusterState;\n }",
"public ODocument clusterStatus() {\n checkConnected();\n return remote.getClusterStatus(user, password);\n }",
"@Override\n public ClusterStatus getCurrentClusterStatus() {\n if (getMemberList().size() > 1) {\n ... | [
"0.8259337",
"0.7785722",
"0.71384287",
"0.6759736",
"0.6708148",
"0.6708148",
"0.66525143",
"0.66356736",
"0.66175765",
"0.65913594",
"0.65530515",
"0.6503852",
"0.6467015",
"0.64472663",
"0.6439289",
"0.6413823",
"0.6404503",
"0.63828236",
"0.6269859",
"0.6203934",
"0.62033... | 0.7866073 | 1 |
Returns the tasks that are pending. | public List<PendingClusterTask> pendingTasks() {
final var currentTimeMillis = threadPool.relativeTimeInMillis();
return allBatchesStream().flatMap(e -> e.getPending(currentTimeMillis)).toList();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic List<Task> getTasks() {\n\t\treturn details.getPendingTasks();\n\t}",
"public long getPendingTasks()\n {\n return getTaskCount() - getCompletedTaskCount();\n }",
"public List<ScheduledTask> getAllPendingTasks() {\n \t\tSet<String> smembers = jedisConn.smembers(ALL_TASKS);\n \t\... | [
"0.7831527",
"0.76449364",
"0.75268346",
"0.7051112",
"0.7007736",
"0.69968575",
"0.68207985",
"0.6684706",
"0.6647195",
"0.6599277",
"0.65956455",
"0.65585184",
"0.654604",
"0.65319943",
"0.65124464",
"0.65063983",
"0.6504573",
"0.64605683",
"0.64562505",
"0.64562505",
"0.64... | 0.7791189 | 1 |
Returns the number of currently pending tasks. | public int numberOfPendingTasks() {
return allBatchesStream().mapToInt(Batch::getPendingCount).sum();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long getPendingTasks()\n {\n return getTaskCount() - getCompletedTaskCount();\n }",
"public int getNumTasks() {\n return tasks.size();\n }",
"public int getNumberOfTasks() {\n\t\treturn tasks.size();\n\t}",
"public java.lang.Integer getTaskCount() {\n return taskCount;\n ... | [
"0.8136498",
"0.7810209",
"0.7672212",
"0.7497705",
"0.74489117",
"0.7431785",
"0.7326455",
"0.73112524",
"0.7268568",
"0.7221356",
"0.7196939",
"0.7188041",
"0.7100043",
"0.7093277",
"0.7082716",
"0.7017004",
"0.69981813",
"0.6984594",
"0.69647175",
"0.69244707",
"0.6909883"... | 0.82762927 | 0 |
Returns the maximum wait time for tasks in the queue | public TimeValue getMaxTaskWaitTime() {
final var oldestTaskTimeMillis = allBatchesStream().mapToLong(Batch::getCreationTimeMillis).min().orElse(Long.MAX_VALUE);
if (oldestTaskTimeMillis == Long.MAX_VALUE) {
return TimeValue.ZERO;
}
return TimeValue.timeValueMillis(threadPo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getMaxWait() {\n\t\treturn this.maxWait;\n\t}",
"public static int maxWait(Queue Storage, int m){\n\t\tint wait = 0;\n\t\tfor(int i = 0; i<m; i++){\n\t\t\tJob temp = (Job)Storage.dequeue();\n\t\t\tif(wait < temp.getWaitTime()) wait = temp.getWaitTime();\n\t\t\tStorage.enqueue(temp);\n\t\t}\n\t\treturn... | [
"0.76737267",
"0.7193867",
"0.7076993",
"0.67624915",
"0.676014",
"0.66067976",
"0.65725976",
"0.6562581",
"0.6534953",
"0.6527362",
"0.64993405",
"0.6483412",
"0.6475739",
"0.64585906",
"0.64473945",
"0.6438808",
"0.6434295",
"0.6399498",
"0.6382412",
"0.6357799",
"0.6286689... | 0.77897435 | 0 |
[HISTORICAL NOTE] In the past, tasks executed by the master service would automatically be notified of acks if they implemented the ClusterStateAckListener interface (the interface formerly known as AckedClusterStateTaskListener). This implicit behaviour was a little troublesome and was removed in favour of having the ... | @Override
public void success(Runnable onPublicationSuccess) {
assert getTask() instanceof ClusterStateAckListener == false // see [HISTORICAL NOTE] above
: "tasks that implement ClusterStateAckListener must explicitly supply themselves as the ack listener";
assert incomp... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected boolean shouldAck() {\n return true;\n }",
"boolean needsAck() { return true; }",
"@SuppressWarnings(\"SleepWhileInLoop\")\n @Override\n public void operationStateChanged(TaskState newState,\n TaskEvent event, String...... | [
"0.56468886",
"0.56247437",
"0.5467236",
"0.54259753",
"0.53996027",
"0.5375238",
"0.53556764",
"0.52765125",
"0.5261609",
"0.5244702",
"0.5196166",
"0.5151262",
"0.5143432",
"0.51296204",
"0.5120323",
"0.51153296",
"0.51108295",
"0.5107115",
"0.5088351",
"0.5052762",
"0.5004... | 0.7111058 | 0 |
if the whole batch resulted in an exception then this overrides any tasklevel results whether successful or not | void onBatchFailure(Exception failure) {
this.failure = Objects.requireNonNull(failure);
this.publishedStateConsumer = null;
this.clusterStateAckListener = null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean hasErrorResults() {\n return false;\n }",
"@Override\n public void taskErrorMessage(Object result) {\n\n }",
"private void updateStatisticsOnNormalEnd(Operation op, OperationResult result) {\n ItemProcessingOutcomeType outcome;\n ... | [
"0.5979888",
"0.5866411",
"0.5739288",
"0.5649034",
"0.56415594",
"0.5543051",
"0.5508085",
"0.54955477",
"0.54851055",
"0.5449456",
"0.54437697",
"0.5409512",
"0.540539",
"0.5396336",
"0.5372541",
"0.5372541",
"0.5366851",
"0.5364257",
"0.53632957",
"0.53401417",
"0.5333659"... | 0.5252943 | 29 |
singlethreaded: started when totalQueueSize transitions from 0 to 1 and keeps calling itself until the queue is drained. | private void forkQueueProcessor() {
if (lifecycle.started() == false) {
drainQueueOnRejection(new FailedToCommitClusterStateException("node closed", getRejectionException()));
return;
}
assert totalQueueSize.get() > 0;
final var threadContext = threadPool.getThre... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void run() {\n\t\twhile (true) {\n\t\t\tif (queue.size() > 0) {\n\t\t\t\ttry {\n\t\t\t\t\tconsume();\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tqueueEfficency.set(0);\n\t\t\t\temptyQueueTime = ... | [
"0.6932007",
"0.6674405",
"0.66502",
"0.6602385",
"0.6597059",
"0.65555084",
"0.6541269",
"0.64387983",
"0.6436596",
"0.6390866",
"0.63788795",
"0.6307817",
"0.6290736",
"0.6225186",
"0.62163043",
"0.6215692",
"0.6155309",
"0.61475945",
"0.6129216",
"0.61260504",
"0.61129487"... | 0.6324436 | 11 |
List result = new ArrayList(); | @RequestMapping(value = { "/printReport.xls" }, method = RequestMethod.POST)
public void payOther(HttpServletRequest request, HttpServletResponse response) throws Exception {
String rptCode = request.getParameter("rptCode");
String pathFile = request.getSession().getServletContext().getRealPath("/report/excel/... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<T> getResults();",
"public List<New> list();",
"public List getList();",
"List<T> obtenerAll();",
"Object getTolist();",
"public ArrayList<Integer> getResults(){\n return results;\n }",
"public ArrayList<String> getResultList() {\n return resultList;\n }",
"List<?> getList();... | [
"0.72668266",
"0.7079035",
"0.69634527",
"0.69054765",
"0.68808514",
"0.68287164",
"0.6819557",
"0.67998356",
"0.6746828",
"0.67216957",
"0.6699425",
"0.6690439",
"0.6674936",
"0.6570561",
"0.6553031",
"0.6525593",
"0.64348257",
"0.64231366",
"0.6421547",
"0.64121085",
"0.639... | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.