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 |
|---|---|---|---|---|---|---|
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_fm_profile, container, false);
//oncreate receive info
/////////
if(getArguments() != null){
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup... | [
"0.6739604",
"0.67235583",
"0.6721706",
"0.6698254",
"0.6691869",
"0.6687986",
"0.66869223",
"0.6684548",
"0.66766286",
"0.6674615",
"0.66654444",
"0.66654384",
"0.6664403",
"0.66596216",
"0.6653321",
"0.6647136",
"0.66423255",
"0.66388357",
"0.6637491",
"0.6634193",
"0.66251... | 0.0 | -1 |
Reads every char in the .txt of the level passed. Returns a String with every char. | private String getLevelChars(int level){
FileHandle levelFile = Gdx.files.internal("levels/level_" + level);
return levelFile.readString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void readWithFileReaderCharByChar(String filePath) throws IOException {\n try(FileReader reader = new FileReader(filePath)){\n int data;\n while((data = reader.read()) != -1){\n System.out.print((char) data);\n }\n }\n }",
"public sta... | [
"0.6093465",
"0.58937764",
"0.5676383",
"0.5657746",
"0.5643565",
"0.5628939",
"0.55793387",
"0.5552911",
"0.54214907",
"0.5398122",
"0.538538",
"0.5367891",
"0.53071314",
"0.5305593",
"0.5300627",
"0.528567",
"0.52659",
"0.5222744",
"0.52210724",
"0.52206975",
"0.5201452",
... | 0.73558193 | 0 |
dispatch the request to special message builder | public static List<Message> buildMessage(String s) throws Exception {
/*
* add(h2, ip2, port2) (h3, ip3, port3)
* out("abc", 3)
* in("abc", ?i:int)
* rd()
* input is trimed
*
*/
if (s.substring(0, 3).equalsIgnoreCase("add")) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void dispatchHandler(Message msg) {\n\t\t\n\t}",
"@Override\n public void action() {\n ACLMessage acl = receive();\n if (acl != null) {\n if (acl.getPerformative() == ACLMessage.REQUEST) {\n try {\n ContentE... | [
"0.61299133",
"0.61122465",
"0.60927135",
"0.60624605",
"0.60441524",
"0.6039538",
"0.60287637",
"0.6027362",
"0.6004651",
"0.60045606",
"0.5989475",
"0.5969381",
"0.5931103",
"0.5926223",
"0.59049344",
"0.5890486",
"0.5869687",
"0.58694947",
"0.5853072",
"0.5839386",
"0.5839... | 0.0 | -1 |
("abc", +3, 7.5, 7.5f, 2e3) | private static List<Message> buildOutMessage(String s) throws Exception {
Tuple tuple = tupleBuilder(s);
int ID = tupleToHost(tuple);
Host host = P1.nets.get(ID);
List<Message> messageList = new ArrayList<>();
messageList.add(new OUTMessage(host.getIP(), host.getPort(), tuple, ID... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void mo9698a(String str, float f);",
"public abstract float mo70722e(String str);",
"int mo9691a(String str, String str2, float f);",
"public abstract void mo70705a(String str, float f);",
"private static Tuple tupleBuilder(String s) throws Exception {\n\n if (s.length() < 3 || s.charAt(0) != '(' ||... | [
"0.614508",
"0.6039114",
"0.5799328",
"0.56958926",
"0.56332016",
"0.56146425",
"0.55781704",
"0.5577374",
"0.55284256",
"0.5495407",
"0.54922134",
"0.5484385",
"0.5454157",
"0.52327013",
"0.5215515",
"0.51867884",
"0.5182374",
"0.51600003",
"0.5159975",
"0.51550215",
"0.5150... | 0.0 | -1 |
("abc", +3, 7.5, 7.5f, 2e3) | private static boolean isTypeMatch(String s) {
s = s.substring(1, s.length() - 1);
/*
* input is
* case1: "abc", +3, -7.5, -7.5f, 2e3
* case2: ?i:int, ?f:float, ?s:string
*
* 1. split by "," , get field [" ?i:int ", " 3"]
* 2. check whether is ty... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void mo9698a(String str, float f);",
"public abstract float mo70722e(String str);",
"int mo9691a(String str, String str2, float f);",
"public abstract void mo70705a(String str, float f);",
"private static Tuple tupleBuilder(String s) throws Exception {\n\n if (s.length() < 3 || s.charAt(0) != '(' ||... | [
"0.6146452",
"0.6040365",
"0.58012384",
"0.5697773",
"0.563266",
"0.5617016",
"0.5578391",
"0.5578315",
"0.55278856",
"0.549644",
"0.5493986",
"0.54861313",
"0.5456011",
"0.5234817",
"0.5215479",
"0.51861775",
"0.5182869",
"0.51619375",
"0.51604825",
"0.51559734",
"0.51508373... | 0.0 | -1 |
/ input : case1: ("abc", +3, 7.5, 7.5f, 2e3) case2: ("abc", ?i:int, ?f:float, ?s:string) 1.substring and split by ",", get ["abc" , +3, 7.5, 7.5f, 2e3] 2.check each field case1: type match case2: String case3: float case4: int | private static Tuple tupleBuilder(String s) throws Exception {
if (s.length() < 3 || s.charAt(0) != '(' || s.charAt(s.length() - 1) != ')') {
System.out.print("Tuple format is wrong. ");
throw new Exception();
}
s = s.substring(1, s.length() - 1); // "abc", +3, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static boolean isTypeMatch(String s) {\n s = s.substring(1, s.length() - 1); \n /*\n * input is \n * case1: \"abc\", +3, -7.5, -7.5f, 2e3\n * case2: ?i:int, ?f:float, ?s:string\n * \n * 1. split by \",\" , get field [\" ?i:int \", \" 3\"]\n * 2... | [
"0.7130498",
"0.57801384",
"0.55335665",
"0.55242085",
"0.55154026",
"0.5454566",
"0.5374631",
"0.53481424",
"0.5291319",
"0.521879",
"0.52030987",
"0.5192274",
"0.51455253",
"0.51159143",
"0.5095488",
"0.5070784",
"0.507031",
"0.5064373",
"0.5035431",
"0.50153565",
"0.499899... | 0.6803708 | 1 |
Rebuild this object from JSON object | public ZeppaEventToUserRelationship(JSONObject json) {
this.key = (Key) json.get("key");
this.created = (Long) json.get("created");
this.updated = (Long) json.get("updated");
this.eventId = (Long) json.get("eventId");
this.eventHostId = (Long) json.get("eventHostId");
this.userId = (Long) json.get("userId")... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void fromJson(JSONObject jsonObject);",
"protected abstract JSONObject build();",
"@Override\n\tpublic void setObjectFromJSON(JSONObject j) throws JSONException{\n\t\tsetID(Integer.parseInt(j.getString(KEY_ID)));\n\t\tsetVehicleID(Integer.parseInt(j.getString(KEY_VEHICLE_IDVEHICLE)));\n\t\tsetI... | [
"0.62991905",
"0.61473393",
"0.61146224",
"0.5961147",
"0.5961147",
"0.5961147",
"0.59351677",
"0.5922232",
"0.5767957",
"0.5715543",
"0.5586455",
"0.5556023",
"0.55537105",
"0.55209106",
"0.5520292",
"0.54761493",
"0.54661644",
"0.5465272",
"0.54417384",
"0.54390645",
"0.543... | 0.0 | -1 |
Constructor for instantiating a relationship on the backend | public ZeppaEventToUserRelationship(ZeppaEvent event, Long userId,
Boolean wasInvited, Boolean isRecommended, Long invitedByUserId) {
this.created = System.currentTimeMillis();
this.updated = System.currentTimeMillis();
this.eventId = event.getId();
this.eventHostId = event.getHostId();
this.userId = userI... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Relationship() {\r\n\t}",
"Relationship createRelationship();",
"public Related() {\n }",
"Relation createRelation();",
"public TmRelationship() {\n this(\"TM_RELATIONSHIP\", null);\n }",
"public RelationshipElement ()\n\t{\n\t\tthis(null, null);\n\t}",
"RelationalDependency createR... | [
"0.7664427",
"0.7251349",
"0.71704274",
"0.6778808",
"0.66068625",
"0.6582153",
"0.630154",
"0.6170747",
"0.6054821",
"0.6044821",
"0.5958266",
"0.59371084",
"0.5887282",
"0.5884787",
"0.584329",
"0.5807468",
"0.5776574",
"0.57604384",
"0.57478935",
"0.5739786",
"0.56907856",... | 0.0 | -1 |
Este constructor marca por defecto a la sentencia como si se fuera a construir a partir de los valores que se le especifiquen. | public DefaultInsertQuery(Formatter formatter) {
super(formatter);
return_id = false;
isFromDefaultValues = false;
isFromSelect = false;
isFromValues = true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ValorVariavel() {\r\n }",
"public Constructor(){\n\t\t\n\t}",
"public CampoModelo(String valor, String etiqueta, Integer longitud)\n/* 10: */ {\n/* 11:17 */ this.valor = valor;\n/* 12:18 */ this.etiqueta = etiqueta;\n/* 13:19 */ this.longitud = longitud;\n/* 14: */ }",
"public F... | [
"0.68005496",
"0.67417186",
"0.66947913",
"0.66604555",
"0.6610345",
"0.6607245",
"0.6570187",
"0.6561451",
"0.65513456",
"0.65226716",
"0.6497744",
"0.6482126",
"0.64591074",
"0.64195424",
"0.6411115",
"0.6410535",
"0.6380004",
"0.6379532",
"0.6374514",
"0.63722414",
"0.6366... | 0.0 | -1 |
Finalises log, updates all states from master thief and thieves to its final states, log a line with updated info and the final messages. | public void logFinish_ConcentrationSiteUpdate(int clock) throws RemoteException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void completeCurrentLog() throws IOException;",
"void log() {\n\t\tm_drivetrain.log();\n\t\tm_forklift.log();\n\t}",
"@Override\n public void flush() {\n if (loggingEnabled) {\n changeLogger.logChange(changelogKey, state);\n }\n }",
"public void globalLog() {\n\t\tIterator iter... | [
"0.59128183",
"0.5809154",
"0.56627774",
"0.5630742",
"0.5627118",
"0.5507002",
"0.54616916",
"0.53988945",
"0.5384081",
"0.5302422",
"0.5263206",
"0.5247425",
"0.52461714",
"0.5245445",
"0.52278507",
"0.5193809",
"0.5176537",
"0.5148643",
"0.51402396",
"0.51157725",
"0.51068... | 0.4962873 | 28 |
linearizes and returns tail | private Node linearize2(Node node) {
if (node.children.size() == 0) {
return node;
}
Node ltail = linearize2(node.children.get(node.children.size() - 1));
while (node.children.size() > 1) {
Node lr = node.children.remove(node.children.size() - 1);
Node sl = node.children.get(node.children.size() - 1);... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public IntVector tail () {\n return tail;\n }",
"public ListNode getTail()\n {\n return tail;\n }",
"@Override\n\tpublic int taille() {\n\t\treturn 1;\n\t}",
"public void linearize(){\n Object []lin=new Object[size];\n int k=start;\n for(int i=0;i<size;i++){\n lin[i... | [
"0.59768045",
"0.5485758",
"0.5444277",
"0.54299945",
"0.53998375",
"0.5364015",
"0.5325494",
"0.52984333",
"0.52909756",
"0.5216282",
"0.5159096",
"0.51377374",
"0.50885224",
"0.50847507",
"0.50824714",
"0.50303286",
"0.50303286",
"0.49799886",
"0.49636564",
"0.49589851",
"0... | 0.5881856 | 1 |
size, min, max, height | public void multiSolver() {
msSize = 0;
msMin = Integer.MAX_VALUE;
msMax = Integer.MIN_VALUE;
msHeight = 0;
multiSolver(root, 0);
System.out.println("Size = " + msSize);
System.out.println("Min = " + msMin);
System.out.println("Max = " + msMax);
System.out.println("Height = " + msHeight);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setSize(float width, float height);",
"private void basicSize(){\n setSize(375,400);\n }",
"public void settings() { size(1200, 800); }",
"public Dimension getSize() { return new Dimension(width,height); }",
"public void size(final int theWidth, final int theHeight);",
"void setSiz... | [
"0.7112774",
"0.70662457",
"0.6937175",
"0.6924434",
"0.6917361",
"0.682718",
"0.6819678",
"0.680464",
"0.6663634",
"0.6662011",
"0.66500807",
"0.66500807",
"0.6607646",
"0.6606615",
"0.6603885",
"0.6595956",
"0.6514868",
"0.65122354",
"0.6484144",
"0.6467168",
"0.64664155",
... | 0.0 | -1 |
String projectId = getProjectId(); | @HEAD
public Response getStats() throws CloudException {
long containerCount = 0;
long bytesUsed = 0;
log.warn("Container stats not implemented");
ResponseBuilder response = Response.noContent();
response.header("X-Account-Container-Count", Long.toString(containerCount));
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getProjectId();",
"public Integer getProjectId() {\n return projectId;\n }",
"public String getProjectId() {\r\n return projectId;\r\n }",
"public String getProjectId() {\n return projectId;\n }",
"public long getProjectId() {\r\n return projectId;\r\n ... | [
"0.8592458",
"0.82017905",
"0.815375",
"0.8120449",
"0.803649",
"0.7979905",
"0.785668",
"0.785668",
"0.78099245",
"0.77758056",
"0.77679086",
"0.7755735",
"0.77388513",
"0.77230257",
"0.77117306",
"0.77038103",
"0.7499526",
"0.7490959",
"0.7383928",
"0.73300534",
"0.72781265... | 0.0 | -1 |
Created by berz on 16.09.14. | public interface ProductProcessorMP0 extends ProductProcessor {
void processFile(MultipartFile file, ContractImage contractImage, Contract contract) throws IOException, IllegalDataException;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpubli... | [
"0.5713473",
"0.57120895",
"0.5665416",
"0.5624021",
"0.5617748",
"0.55695736",
"0.55695736",
"0.5524974",
"0.5461066",
"0.5455962",
"0.54501885",
"0.5449475",
"0.5449475",
"0.5449475",
"0.5449475",
"0.5449475",
"0.5449017",
"0.54458255",
"0.5444518",
"0.54443365",
"0.5443740... | 0.0 | -1 |
Retrieve the icon to use for the specified Hibernate model object. | public static ImageIcon getIconForHibernateObject(TechnologyModelObject object) {
if (object instanceof HibernateImplementation) {
return REPOSITORY_ICON;
}
if (object instanceof HibernateModel) {
return MODEL_ICON;
}
if (object instanceof HibernateEntity) {
return ENTITY_ICON;
}
if (object insta... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Icon getIcon() {\n if (model != null)\n return model.getIcon(21, 16, \"model\"); //$NON-NLS-1$\n return null;\n }",
"public Icon getIcon(Object object);",
"public EntityIcon getIcon() {\r\n return icon;\r\n }",
"java.lang.String getIcon();",
"java.lang.String ge... | [
"0.75714546",
"0.7120973",
"0.698484",
"0.68587816",
"0.68587816",
"0.6789703",
"0.6789703",
"0.67303854",
"0.6670498",
"0.6575173",
"0.6575173",
"0.6575173",
"0.6575173",
"0.6559151",
"0.64979255",
"0.6463597",
"0.6354334",
"0.63149333",
"0.6292405",
"0.62829995",
"0.6282192... | 0.77427024 | 0 |
Switches which auto routine you are doing | public void run(int autoId)
{
switch(autoId)
{
case Config.Auto.idDoNothing:
{
doNothing();
break;
}
case Config.Auto.idDriveForwardEnc:
{
//drive.setTalonMode(true);
driveForwardEnc();
break;
}
case Config.Auto.idDriveForwardTimer:
{
drive... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void autonomousPeriodic() {\n \tswitch(autoSelected) {\n \tcase customAuto:\n //Put custom auto code here \n break;\n \tcase defaultAuto:\n \tdefault:\n \t//Put default auto code here\n break;\n \t}\n }",
"@Override\n public void autonomousPeriodic() {\... | [
"0.72130257",
"0.6828103",
"0.6828103",
"0.6828103",
"0.6828103",
"0.67321974",
"0.67321974",
"0.67321974",
"0.6542925",
"0.6258786",
"0.6258786",
"0.6194856",
"0.618009",
"0.61759144",
"0.6128023",
"0.6125087",
"0.60944474",
"0.5974023",
"0.5965857",
"0.59629196",
"0.5936999... | 0.6543127 | 8 |
Drives forward using encoder values | private void driveForwardEnc()
{
//drive.setPos(0, 0, Config.Auto.encDriveForwardDistance, Config.Auto.encDriveForwardDistance);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void testEncoder() {\n\n flMotor.setPower(0.50);\n frMotor.setPower(0.50);\n blMotor.setPower(0.50);\n brMotor.setPower(0.50);\n\n // wait while opmode is active and left motor is busy running to position.\n\n while (opModeIsActive() && flMotor.isBusy()) {\n ... | [
"0.65559757",
"0.6286482",
"0.6128251",
"0.6018758",
"0.595827",
"0.57878524",
"0.57527",
"0.56814057",
"0.56415737",
"0.56308997",
"0.5617098",
"0.56138915",
"0.55996823",
"0.5551533",
"0.5458657",
"0.545404",
"0.5398696",
"0.53883576",
"0.53743553",
"0.53545845",
"0.534807"... | 0.6742012 | 0 |
Drives forward using timer values | private void driveForwardTimer()
{
if(timer.get() < Config.Auto.timeDriveForward){
drive.setSpeed(0, 0, Config.Auto.driveForwardSpeed, Config.Auto.driveForwardSpeed);
System.out.println(timer.get());}
else
{
drive.setSpeed(0, 0, 0, 0);
autoStep++;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void moveForward() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t // 2\n\t\tseconds += tic;\n\t\tif (seconds >= 60.0) {\n\t\t\tseconds -= 60.0;\n\t\t\tminutes++;\n\t\t\tif (minutes == 60) {\n\t\t\t\tminutes = 0;\n\t\t\t\thours++;\n\t\t\t}\n\t\t}\n\t}",
"public void frameForward()\n{\n stop();\n setTime(getT... | [
"0.69239616",
"0.6832245",
"0.65927553",
"0.6220372",
"0.6205545",
"0.6099731",
"0.6078851",
"0.60437113",
"0.601862",
"0.6017429",
"0.60107845",
"0.60083085",
"0.60032374",
"0.5969616",
"0.5962168",
"0.594598",
"0.5944105",
"0.59306276",
"0.59264994",
"0.5909672",
"0.590615"... | 0.8155264 | 0 |
Gets all totes from the starting leftmost starting position use encoder values | private void getAllTotesLeftEnc()
{
switch(autoStep)
{
case 0:
{
pickUpTimer();
break;
}
case 1:
{
strafeRightEnc();
break;
}
case 2:
{
pickUpTimer();
break;
}
case 3:
{
strafeRightEnc();
break;
}
cas... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void getAllTotesRightEnc()\r\n\t{\r\n\t\tswitch(autoStep)\r\n\t\t{\r\n\t\t\tcase 0:\r\n\t\t\t{\r\n\t\t\t\tpickUpTimer();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase 1:\r\n\t\t\t{\r\n\t\t\t\tstrafeLeftEnc();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase 2:\r\n\t\t\t{\r\n\t\t\t\tpickUpTimer()... | [
"0.5262334",
"0.5163613",
"0.51428664",
"0.5120789",
"0.4946545",
"0.49233052",
"0.4898298",
"0.4869491",
"0.47962782",
"0.47568",
"0.4723923",
"0.4653476",
"0.46334603",
"0.4633012",
"0.4627912",
"0.46243757",
"0.46231985",
"0.4594768",
"0.4584898",
"0.45797533",
"0.45702457... | 0.5956091 | 0 |
Gets all totes from the starting center starting position use encoder values | private void getAllTotesCenterEnc()
{
switch(autoStep)
{
case 0:
{
pickUpTimer();
break;
}
case 1:
{
strafeRightEnc();
break;
}
case 2:
{
pickUpTimer();
break;
}
case 3:
{
strafeLeftEnc();
break;
}
ca... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void getAllTotesLeftEnc()\r\n\t{\r\n\t\tswitch(autoStep)\r\n\t\t{\r\n\t\t\tcase 0:\r\n\t\t\t{\r\n\t\t\t\tpickUpTimer();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase 1:\r\n\t\t\t{\r\n\t\t\t\tstrafeRightEnc();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase 2:\r\n\t\t\t{\r\n\t\t\t\tpickUpTimer()... | [
"0.5408845",
"0.5335644",
"0.51963073",
"0.51135707",
"0.5034383",
"0.49797192",
"0.49408734",
"0.49368423",
"0.49198052",
"0.4916018",
"0.48935926",
"0.48607966",
"0.48559678",
"0.48337552",
"0.4825355",
"0.48233172",
"0.48178002",
"0.48151866",
"0.48073435",
"0.4793886",
"0... | 0.5910496 | 0 |
Gets all totes from the starting rightmost starting position use encoder values | private void getAllTotesRightEnc()
{
switch(autoStep)
{
case 0:
{
pickUpTimer();
break;
}
case 1:
{
strafeLeftEnc();
break;
}
case 2:
{
pickUpTimer();
break;
}
case 3:
{
strafeLeftEnc();
break;
}
case... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void getAllTotesLeftEnc()\r\n\t{\r\n\t\tswitch(autoStep)\r\n\t\t{\r\n\t\t\tcase 0:\r\n\t\t\t{\r\n\t\t\t\tpickUpTimer();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase 1:\r\n\t\t\t{\r\n\t\t\t\tstrafeRightEnc();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase 2:\r\n\t\t\t{\r\n\t\t\t\tpickUpTimer()... | [
"0.55795044",
"0.52261627",
"0.5155798",
"0.50868684",
"0.49675074",
"0.47774538",
"0.4773064",
"0.47695854",
"0.47336033",
"0.4713015",
"0.46877307",
"0.4651654",
"0.45827672",
"0.45694298",
"0.45523676",
"0.45518667",
"0.45476764",
"0.45390204",
"0.452693",
"0.45249775",
"0... | 0.57605827 | 0 |
Gets all totes from the starting leftmost starting position use timer values | private void getAllTotesLeftTimer()
{
switch(autoStep)
{
case 0:
{
pickUpTimer();
break;
}
case 1:
{
strafeRightTimer();
break;
}
case 2:
{
pickUpTimer();
break;
}
case 3:
{
strafeRightTimer();
break;
}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void getAllTotesCenterTimer()\r\n\t{\r\n\t\tswitch(autoStep)\r\n\t\t{\r\n\t\t\tcase 0:\r\n\t\t\t{\r\n\t\t\t\tpickUpTimer();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase 1:\r\n\t\t\t{\r\n\t\t\t\tstrafeLeftTimer();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase 2:\r\n\t\t\t{\r\n\t\t\t\tpickUpTi... | [
"0.641903",
"0.6231331",
"0.582882",
"0.57041687",
"0.56022173",
"0.52307546",
"0.52173585",
"0.5204509",
"0.5137647",
"0.5135946",
"0.5128301",
"0.51168036",
"0.51131845",
"0.511046",
"0.5106791",
"0.509847",
"0.5094963",
"0.5054234",
"0.5040032",
"0.5034525",
"0.49972266",
... | 0.700605 | 0 |
Gets all totes from the starting center starting position use timer values | private void getAllTotesCenterTimer()
{
switch(autoStep)
{
case 0:
{
pickUpTimer();
break;
}
case 1:
{
strafeLeftTimer();
break;
}
case 2:
{
pickUpTimer();
break;
}
case 3:
{
strafeRightTimer();
break;
}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void getAllTotesLeftTimer()\r\n\t{\r\n\t\tswitch(autoStep)\r\n\t\t{\r\n\t\t\tcase 0:\r\n\t\t\t{\r\n\t\t\t\tpickUpTimer();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase 1:\r\n\t\t\t{\r\n\t\t\t\tstrafeRightTimer();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase 2:\r\n\t\t\t{\r\n\t\t\t\tpickUpTim... | [
"0.63000983",
"0.5710549",
"0.551877",
"0.54280627",
"0.53632855",
"0.5263447",
"0.52105695",
"0.50992954",
"0.50515676",
"0.504929",
"0.5047111",
"0.50449395",
"0.5042258",
"0.50385994",
"0.5010129",
"0.49837482",
"0.49645358",
"0.49629226",
"0.49483576",
"0.49383652",
"0.49... | 0.66753983 | 0 |
Gets all totes from the starting rightmost starting position use timer values | private void getAllTotesRightTimer()
{
switch(autoStep)
{
case 0:
{
pickUpTimer();
break;
}
case 1:
{
strafeLeftTimer();
break;
}
case 2:
{
pickUpTimer();
break;
}
case 3:
{
strafeLeftTimer();
break;
}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void getAllTotesLeftTimer()\r\n\t{\r\n\t\tswitch(autoStep)\r\n\t\t{\r\n\t\t\tcase 0:\r\n\t\t\t{\r\n\t\t\t\tpickUpTimer();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase 1:\r\n\t\t\t{\r\n\t\t\t\tstrafeRightTimer();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase 2:\r\n\t\t\t{\r\n\t\t\t\tpickUpTim... | [
"0.68595046",
"0.65940714",
"0.57874227",
"0.57831734",
"0.54641145",
"0.52923644",
"0.5285604",
"0.52806616",
"0.52799416",
"0.52717996",
"0.519118",
"0.51618886",
"0.5098258",
"0.50931394",
"0.50875545",
"0.50754994",
"0.5030906",
"0.50103974",
"0.49848676",
"0.4924004",
"0... | 0.6777975 | 1 |
Gets one tote then drives out of auto zone | private void getOneToteTimer()
{
switch(autoStep)
{
case 0:
{
pickUpTimer();
break;
}
case 1:
{
driveForwardTimer();
break;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void getDrivableLocations() {\n\t\t\tSystem.out.print(\"\\nPlaces you can drive to: \");\n\t\t\tfor (int i = 0; i < places.length; i++)\n\t\t\t\tif (places[i].drivable) //looks to see if you can drive there \n\t\t\t\t\tif ((places[i] != this)) //if it's not you're current location.\n\t\t\t\t\t\tSystem.out.print(p... | [
"0.5471479",
"0.53886366",
"0.5159863",
"0.5154484",
"0.50089127",
"0.49919966",
"0.48997235",
"0.48978123",
"0.48791653",
"0.48538956",
"0.48435453",
"0.4835934",
"0.48231083",
"0.4785658",
"0.4774922",
"0.47600606",
"0.47389546",
"0.4733734",
"0.4732233",
"0.472944",
"0.472... | 0.48914093 | 8 |
STrafes right based on encoder values | public void strafeRightEnc()
{
// drive.setPos(0, 0, Config.Auto.encStrafeDistance, Config.Auto.encStrafeDistance);
// if(Math.abs(drive.getFrontEncDist() - Config.Auto.encStrafeDistance) < Config.Auto.encTolerance && Math.abs(drive.getBackEncDist() - Config.Auto.encStrafeDistance) < Config.Auto.encTolerance)
//... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updateEncoders() {\n leftEnc.updateRate();\n rightEnc.updateRate();\n }",
"private void updateEncoders(){\r\n \r\n double min = Double.MAX_VALUE;\r\n double max = Double.MIN_VALUE;\r\n \r\n for(Encoder<T> encoder : encoders){\r\n if(encoder instanceof SimpleEncode... | [
"0.6388568",
"0.60089296",
"0.59803474",
"0.5978794",
"0.5838348",
"0.57558316",
"0.54475224",
"0.54465735",
"0.54104",
"0.54073584",
"0.5405587",
"0.5405326",
"0.5379861",
"0.53061146",
"0.5287695",
"0.525339",
"0.52384263",
"0.52232385",
"0.5215918",
"0.5177426",
"0.5146373... | 0.0 | -1 |
Strafes left based on encoder values | public void strafeLeftEnc()
{
// drive.setPos(0, 0, -Config.Auto.encStrafeDistance, -Config.Auto.encStrafeDistance);
// if(Math.abs(drive.getFrontEncDist() - Config.Auto.encStrafeDistance) < Config.Auto.encTolerance && Math.abs(drive.getBackEncDist() - Config.Auto.encStrafeDistance) < Config.Auto.encTolerance)
/... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Encoder getEncoderLeft() {return encoderLeft;}",
"public Encoder getLeftEnc() {\n return leftEnc;\n }",
"public CANEncoder getLeftEncoder() {\n return m_leftEncoder;\n }",
"public double getLeftEncoderDistance() {\n return this.leftEncoder.getDistance();\n }",
"public void re... | [
"0.7020082",
"0.6176159",
"0.598289",
"0.5935577",
"0.5578801",
"0.55730534",
"0.5534105",
"0.5528313",
"0.5513868",
"0.5418846",
"0.5287185",
"0.5228574",
"0.5218772",
"0.51727015",
"0.51681745",
"0.51544976",
"0.51540434",
"0.51302564",
"0.50993574",
"0.50482243",
"0.503598... | 0.52041084 | 13 |
Picks up an object | public void pickUpTimer()
{
System.out.println(timer.get());
if(timer.get() < Config.Auto.timeIntakeOpen)
{
//claw.openClaw();
System.out.println("in second if");
}
else if(timer.get() < Config.Auto.timeElevatorStack)
{
//elevator.setLevel(elevatorLevel);
//elevatorLevel++;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Object getObject();",
"Object getObject();",
"Object getObject();",
"Object getObject();",
"GameObject getObject();",
"public Object getObject();",
"public Object getObject() ;",
"private void pickObject(UsableActor actor) {\n \n System.out.println(\"USABLEACTORCONTAINER.Picking object\... | [
"0.6573051",
"0.6573051",
"0.6573051",
"0.6573051",
"0.65654075",
"0.65423614",
"0.6516587",
"0.6398011",
"0.60636336",
"0.5985887",
"0.5922638",
"0.5899992",
"0.58941936",
"0.5810106",
"0.57757246",
"0.5773163",
"0.5738854",
"0.57361853",
"0.5734222",
"0.57316333",
"0.567373... | 0.0 | -1 |
Strafes right based on timer values | public void strafeRightTimer()
{
if(timer.get() < Config.Auto.timeStrafe)
{
drive.setSpeed(0, 0, Config.Auto.strafeSpeed, Config.Auto.strafeSpeed);
}
else if(timer.get() < Config.Auto.timeDriveTowardTote)
{
System.out.println("in second else if");
drive.setSpeed(Config.Auto.driveTowardT... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void pickUpTimer()\r\n\t{\t\t\r\n\t\tSystem.out.println(timer.get());\r\n\t\tif(timer.get() < Config.Auto.timeIntakeOpen)\r\n\t\t{\r\n\t\t\t//claw.openClaw();\r\n\t\t\tSystem.out.println(\"in second if\");\r\n\t\t}\r\n\t\t\t\t\r\n\t\telse if(timer.get() < Config.Auto.timeElevatorStack)\r\n\t\t{\r\n\t\t\t//e... | [
"0.6555584",
"0.6193353",
"0.6178923",
"0.6112558",
"0.6086396",
"0.60572743",
"0.6051864",
"0.6042265",
"0.5970419",
"0.59670323",
"0.5961465",
"0.59260494",
"0.59187245",
"0.5915509",
"0.58325833",
"0.58145183",
"0.5812313",
"0.58121705",
"0.5803014",
"0.5730098",
"0.572887... | 0.62589663 | 1 |
Strafes left based on timer values | public void strafeLeftTimer()
{
if(timer.get() < Config.Auto.timeStrafe)
{
drive.setSpeed(0, 0, Config.Auto.strafeSpeed, Config.Auto.strafeSpeed);
}
else if(timer.get() < Config.Auto.timeDriveTowardTote)
{
System.out.println("in second else if");
drive.setSpeed(-Config.Auto.driveTowardT... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void timerTicked() {\n //subtracts one second from the timer of the current team\n if(state.getCurrentTeamsTurn() == Team.RED_TEAM) {\n state.setRedTeamSeconds(state.getRedTeamSeconds() - 1);\n } else {\n state.setBlueTeamSeconds(state.getBlueTeamSec... | [
"0.62293714",
"0.62094784",
"0.6170461",
"0.61380494",
"0.61244047",
"0.6035269",
"0.6015025",
"0.59932363",
"0.5989192",
"0.5931695",
"0.5913425",
"0.58873856",
"0.5863049",
"0.5803436",
"0.579383",
"0.5790022",
"0.57029665",
"0.56877077",
"0.56864095",
"0.5668938",
"0.56481... | 0.6895821 | 0 |
Resets the timer and auto step | public void reset()
{
timer.stop();
timer.reset();
autoStep = 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void resetTimer(){\n timerStarted = 0;\n }",
"void resetLoop () {\n try {\n timer.cancel();\n timer.purge();\n } catch (Exception e) {\n\n }\n timer = new Timer();\n timer.schedule(new LoopTask(), stepDelay, stepDelay);\n }",
"public ... | [
"0.7986415",
"0.793199",
"0.7696595",
"0.7536674",
"0.74755687",
"0.7257145",
"0.7243488",
"0.72309595",
"0.7209461",
"0.7182115",
"0.71209514",
"0.7106344",
"0.71038693",
"0.70964104",
"0.70944476",
"0.70785993",
"0.70570254",
"0.7040969",
"0.70388204",
"0.7019536",
"0.70172... | 0.86803323 | 0 |
Resets timer and encoder values and increases autoStep | public void endRoutine()
{
timer.stop();
timer.reset();
timer.start();
drive.encReset();
autoStep++;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void reset()\r\n\t{\r\n\t\ttimer.stop();\r\n\t\ttimer.reset();\r\n\t\tautoStep = 0;\r\n\t}",
"@Override\n public synchronized void reset() {\n m_accumulatedTime = 0;\n m_startTime = getMsClock();\n }",
"public void reset... | [
"0.72277343",
"0.6231776",
"0.62062985",
"0.61864734",
"0.6103387",
"0.6075244",
"0.60620385",
"0.60542697",
"0.60533607",
"0.60533607",
"0.60231256",
"0.5995819",
"0.5995053",
"0.59823734",
"0.59616596",
"0.59601647",
"0.59417665",
"0.59352785",
"0.59264356",
"0.5911032",
"0... | 0.56331724 | 51 |
Returns the set of values | public final Map<String, Object> getInternalMap() {
return values;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Set<T> values() {\n\t\t// This is immutable to prevent add/remove operation by 3rd party developers.\n\t\treturn Collections.unmodifiableSet(values);\n\t}",
"List getValues();",
"@Override\n\tpublic Collection<V> values() {\n\t\tArrayList<V> valores = new ArrayList<V>();\n\t\tIterator it = tabla.iterato... | [
"0.7864765",
"0.762861",
"0.75892425",
"0.7539104",
"0.7516869",
"0.74422544",
"0.7187666",
"0.71416575",
"0.71290535",
"0.71290535",
"0.71078867",
"0.70835495",
"0.7082782",
"0.70344603",
"0.70254666",
"0.70254666",
"0.7003604",
"0.6975632",
"0.6963957",
"0.6956991",
"0.6955... | 0.0 | -1 |
Add a set of couple values in the current set | public void merge(MapUtil newSet) {
Map<String, Object> newMap = newSet.getInternalMap();
for (Entry<String, Object> entry : newMap.entrySet()) {
values.put(entry.getKey(), entry.getValue());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"MultiSet<X> add(X x);",
"void addEmergingSymbols(Set<Integer> acc);",
"public void addAll (SetADT<T> set);",
"set.addAll(Arrays.asList(a));",
"public void add(final int[] newSet) {\n for (int i: newSet) {\n add(i);\n }\n }",
"public void addAll(Object... values) {\n verifyM... | [
"0.64481205",
"0.6355912",
"0.63162595",
"0.6298491",
"0.6221646",
"0.62008137",
"0.61684453",
"0.6166522",
"0.59090394",
"0.5893882",
"0.5862552",
"0.58487254",
"0.58005655",
"0.5796456",
"0.57395077",
"0.57344633",
"0.56989676",
"0.5646428",
"0.564082",
"0.56113297",
"0.559... | 0.0 | -1 |
Puts keyvalue pair inside the internal map, replacing previously existing key | public MapUtil put(String name, Object value) {
if (value != null) {
values.put(name, value);
}
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public V put(K key, V value) {\n reverseMap.put(value, key);\n return super.put(key, value);\n }",
"Object put(Object key, Object value);",
"@Override\n\tpublic V put(K key, V value) {\n\t\tV v = map.put(key, value);\n\t\tif (map.containsKey(key))\n\t\t\tkeys.add(key);\n\t\t\n\t... | [
"0.72270787",
"0.71579427",
"0.7049287",
"0.70012254",
"0.6987245",
"0.6931534",
"0.69169223",
"0.6916231",
"0.69103307",
"0.6891808",
"0.68814594",
"0.68600315",
"0.68527156",
"0.683534",
"0.6823548",
"0.67601585",
"0.6751717",
"0.67317826",
"0.67317826",
"0.6717175",
"0.669... | 0.0 | -1 |
Return the boolean associated to the key put in parameter ("name") | public boolean getBoolean(String name) {
Object val = values.get(name);
if (val == null) {
throw new IllegalArgumentException("Boolean value required, but not specified");
}
if (val instanceof Boolean) {
return (Boolean) val;
}
try {
return Boolean.parseBoolean((String) val);
} catch (Exception e... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean getBoolean(String name){\r\n try{return kd.getJSONObject(ug).getBoolean(name);}\r\n catch(JSONException e){return false;}\r\n }",
"public boolean getBoolean(String name)\n/* */ {\n/* 845 */ return getBoolean(name, false);\n/* */ }",
"public boolean getBoolean(... | [
"0.7218657",
"0.716151",
"0.7054667",
"0.70024836",
"0.6988793",
"0.69304293",
"0.6794505",
"0.67842734",
"0.67260206",
"0.6723614",
"0.6678491",
"0.6677263",
"0.6669384",
"0.66587824",
"0.665528",
"0.66208136",
"0.65686893",
"0.65632546",
"0.65452003",
"0.6540219",
"0.654021... | 0.6576102 | 16 |
Return the boolean associated to the key put in parameter ("name"). If the value associated to the key is null, this method returns the value of the parameter defaultValue. | public boolean getBoolean(String name, boolean defaultValue) {
final Object val = values.get(name);
if (val == null) {
return defaultValue;
}
if (val instanceof Boolean) {
return (Boolean) val;
}
try {
return Boolean.parseBoolean((String) val);
} catch (Exception e) {
throw new IllegalArgument... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean getBoolean(String key, boolean defaultValue);",
"public Boolean getBoolean(String key, Boolean defaultValue);",
"boolean getBoolean(String key, boolean defaultValue);",
"public boolean getBoolean(String name, boolean defaultValue)\n/* */ {\n/* 862 */ String value = getString(name);... | [
"0.78724813",
"0.77903837",
"0.7672881",
"0.7319595",
"0.7149952",
"0.6869232",
"0.68648624",
"0.67724854",
"0.67331666",
"0.6676596",
"0.66037583",
"0.65974945",
"0.65692466",
"0.65128595",
"0.6486509",
"0.6484258",
"0.6482639",
"0.6380666",
"0.63741654",
"0.6360015",
"0.629... | 0.71704334 | 4 |
Returns the int associated to the key put in parameter ("name"). If the value associated to the key is null, this method returns the value of the parameter defaultValue. | public byte getByte(String name, byte defaultValue) {
Object val = values.get(name);
if (val == null) {
return defaultValue;
}
if (val instanceof Number) {
return ((Number) val).byteValue();
}
try {
return Byte.parseByte((String) val);
} catch (Exception e) {
throw new IllegalArgumentException... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getInt(String key, int defaultValue);",
"public Integer getInteger(String key, Integer defaultValue);",
"public Integer getParaToInt(String name, Integer defaultValue) {\n\t\treturn toInt(request.getParameter(name), defaultValue);\n\t}",
"int getInt(String key, int defaultValue);",
"public stati... | [
"0.7420664",
"0.73627263",
"0.7225867",
"0.72104967",
"0.7196141",
"0.7158938",
"0.71080786",
"0.69895667",
"0.6962618",
"0.69419146",
"0.6913081",
"0.6902305",
"0.6861768",
"0.6839444",
"0.67587346",
"0.6712828",
"0.6637407",
"0.65976477",
"0.659221",
"0.65829223",
"0.654054... | 0.0 | -1 |
Returns the byte associated to the key put in parameter ("name"). | public byte getByte(String name) {
Object val = values.get(name);
if (val == null) {
throw new IllegalArgumentException("Byte value required, but not specified");
}
if (val instanceof Number) {
return ((Number) val).byteValue();
}
try {
return Byte.parseByte((String) val);
} catch (Exception e) {... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Byte getByte(String name) {\n Object o = get(name);\n if (o instanceof Number) {\n return ((Number)o).byteValue();\n }\n\n if (o != null) {\n try {\n String string = o.toString();\n if (string != null && string.length() > 0) {\n... | [
"0.69942975",
"0.69542974",
"0.68432665",
"0.6814995",
"0.66347414",
"0.6601234",
"0.6601234",
"0.6544321",
"0.6463445",
"0.63335496",
"0.63335496",
"0.63335496",
"0.62060606",
"0.62060606",
"0.62060606",
"0.62060606",
"0.62060606",
"0.62060606",
"0.62060606",
"0.62060606",
"... | 0.73339236 | 0 |
Returns the short associated to the key put in parameter ("name"). If the value associated to the key is null, this method returns the value of the parameter defaultValue. | public short getShort(String name, short defaultValue) {
Object val = values.get(name);
if (val == null) {
return defaultValue;
}
if (val instanceof Number) {
return ((Number) val).shortValue();
}
try {
return Short.parseShort((String) val);
} catch (Exception e) {
throw new IllegalArgumentExc... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getSettingByKey(String key, String defaultValue);",
"String getShortNameKey();",
"int getInfoOrDefault(\n int key,\n int defaultValue);",
"public String getParameter(String pname, String defaultValue) {\n\t\tString value = parameters.get(pname);\n\t\tif (value == null) {\n\t\t\treturn de... | [
"0.627342",
"0.6117835",
"0.59540015",
"0.5871746",
"0.5852231",
"0.5851462",
"0.57878494",
"0.5760205",
"0.5760205",
"0.5735734",
"0.5735734",
"0.5711844",
"0.56821525",
"0.56793165",
"0.567714",
"0.5672643",
"0.5672643",
"0.5671798",
"0.5669005",
"0.5664956",
"0.566072",
... | 0.7025357 | 0 |
Returns the short associated to the key put in parameter ("name"). | public short getShort(String name) {
final Object val = values.get(name);
if (val == null) {
throw new IllegalArgumentException("Short value required, but not specified");
}
if (val instanceof Number) {
return ((Number) val).shortValue();
}
try {
return Short.parseShort((String) val);
} catch (Ex... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getShortNameKey();",
"String getLongNameKey();",
"public short getShort(String key)\n {\n return getShort(key, (short) 0);\n }",
"private String getShortType(String aKey) {\n if (iConnection == null){\n return ModificationConversion.getShortType(aKey);\n } else {\n ... | [
"0.7639473",
"0.67773354",
"0.66879237",
"0.66598964",
"0.6658071",
"0.6520359",
"0.6509326",
"0.64200515",
"0.6411299",
"0.63523704",
"0.63523704",
"0.63523704",
"0.63523704",
"0.63523704",
"0.63523704",
"0.63523704",
"0.63523704",
"0.63523704",
"0.63523704",
"0.63523704",
"... | 0.677464 | 2 |
Returns the int associated to the key put in parameter ("name"). | public int getInt(String name) {
final Object val = values.get(name);
if (val == null) {
throw new IllegalArgumentException("Integer value required, but not specified");
}
if (val instanceof Number) {
return ((Number) val).intValue();
}
try {
return Integer.parseInt((String) val);
} catch (Except... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int getValue(final String name, final String key) {\n\t\treturn Integer.parseInt(bundleConstants.getString(name + SEPERATOR + key));\n\t}",
"public static int lookup (String name)\n {\n\tInteger result = MAP.get (name.toLowerCase ());\n\n\treturn (result == null) ? -1 : result;\n }",
"int getKey(... | [
"0.7407177",
"0.7315106",
"0.72806835",
"0.72806835",
"0.7280138",
"0.70766664",
"0.70231706",
"0.6934141",
"0.684609",
"0.68177915",
"0.68055326",
"0.6804299",
"0.6802778",
"0.6722182",
"0.6716324",
"0.6694746",
"0.6640747",
"0.6597504",
"0.6549962",
"0.65417904",
"0.6506557... | 0.6899306 | 8 |
Returns the int associated to the key put in parameter ("name"). If the value associated to the key is null, this method returns the value of the parameter defaultValue. | public int getInteger(String name, int defaultValue) {
final Object val = values.get(name);
if (val == null) {
return defaultValue;
}
if (val instanceof Number) {
return ((Number) val).intValue();
}
try {
return Integer.parseInt((String) val);
} catch (Exception e) {
throw new IllegalArgumentE... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getInt(String key, int defaultValue);",
"public Integer getInteger(String key, Integer defaultValue);",
"public Integer getParaToInt(String name, Integer defaultValue) {\n\t\treturn toInt(request.getParameter(name), defaultValue);\n\t}",
"int getInt(String key, int defaultValue);",
"public stati... | [
"0.74219346",
"0.7363841",
"0.72266823",
"0.7211595",
"0.719692",
"0.7108563",
"0.6990777",
"0.6963656",
"0.6943158",
"0.6915224",
"0.6903172",
"0.6863731",
"0.6840391",
"0.6760512",
"0.67145973",
"0.6638157",
"0.65987515",
"0.659426",
"0.6584537",
"0.6541455",
"0.6512316",
... | 0.7160888 | 5 |
Returns the int[] associated to the key put in parameter ("name"). If the value associated to the key is null, this method returns the value of the parameter defaultValue. | public int[] getIntArray(String name, String delimiter) {
final Object val = values.get(name);
if (val == null) {
return null;
}
if (val instanceof Number) {
return new int[]
{
((Number) val).intValue()
};
}
int c = 0;
String[] vals = ((String) val).split(delimiter);
int[] resu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int[] getIntArray(final String key, final int... defaultValue) {\n return get(int[].class, key, defaultValue);\n }",
"public int getInt(String key, int defaultValue);",
"public Integer getInteger(String key, Integer defaultValue);",
"public List<Integer> getAsIntegerList(String itemName, Lis... | [
"0.72996104",
"0.6291849",
"0.62365544",
"0.60798955",
"0.59955376",
"0.5977715",
"0.5916829",
"0.5839608",
"0.58110696",
"0.5754599",
"0.5742304",
"0.5740197",
"0.57197183",
"0.56816",
"0.56782556",
"0.5673481",
"0.55819565",
"0.55813456",
"0.5563006",
"0.55434173",
"0.55290... | 0.5600672 | 16 |
Returns the long associated to the key put in parameter ("name"). | public long getLong(String name) {
final Object val = values.get(name);
if (val == null) {
throw new IllegalArgumentException("Integer value required, but not specified");
}
if (val instanceof Number) {
return ((Number) val).longValue();
}
try {
return Long.parseLong((String) val);
} catch (Excep... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getLongNameKey();",
"public long getLong(String name) {\n Enumeration enumer = LONGS.elements();\n while(enumer.hasMoreElements()) {\n SimpleMessageObjectLongItem item = (SimpleMessageObjectLongItem) enumer.nextElement();\n if(item.getName().compareTo(name) == 0) {\n ... | [
"0.74353",
"0.73315746",
"0.68389875",
"0.67667764",
"0.6588645",
"0.65324825",
"0.64809024",
"0.64578223",
"0.6400997",
"0.63741356",
"0.6341631",
"0.6341631",
"0.6307448",
"0.62764174",
"0.62685287",
"0.62619096",
"0.6226303",
"0.6181586",
"0.6137853",
"0.6127503",
"0.60706... | 0.6636257 | 4 |
Returns the long associated to the key put in parameter ("name"). If the value associated to the key is null, this method returns the value of the parameter defaultValue. | public long getLong(String name, int defaultValue) {
final Object val = values.get(name);
if (val == null) {
return defaultValue;
}
if (val instanceof Number) {
return ((Number) val).longValue();
}
try {
return Long.parseLong((String) val);
} catch (Exception e) {
throw new IllegalArgumentExce... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long getLong(String key, long defaultValue);",
"public Long getLong(String key, Long defaultValue);",
"private long getLongProperty(ParameterList key, long defaultValue) \n throws NumberFormatException, NullPointerException, MissingOptionException{\n try {\n boolean ... | [
"0.7682995",
"0.74178207",
"0.7248373",
"0.7151971",
"0.7081404",
"0.68530697",
"0.67664075",
"0.6727764",
"0.663045",
"0.64899397",
"0.6456472",
"0.63927627",
"0.6331515",
"0.6310295",
"0.6278179",
"0.6250342",
"0.62259245",
"0.6217158",
"0.6213171",
"0.6209932",
"0.6182488"... | 0.6958133 | 5 |
Returns the float associated to the key put in parameter ("name"). | public float getFloat(String name) {
final Object val = values.get(name);
if (val == null) {
throw new IllegalArgumentException("Float value required, but not specified");
}
if (val instanceof Number) {
return ((Number) val).floatValue();
}
try {
return Float.parseFloat((String) val);
} catch (Ex... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public float getFloat(String key)\n {\n return getFloat(key, 0);\n }",
"public float getFloat(String name) {\n Enumeration enumer = FLOATS.elements();\n while(enumer.hasMoreElements()) {\n SimpleMessageObjectFloatItem item = (SimpleMessageObjectFloatItem) enumer.nextElement(... | [
"0.74994004",
"0.73327726",
"0.70851415",
"0.7055614",
"0.6949255",
"0.69400847",
"0.6936255",
"0.6920257",
"0.6903769",
"0.68083423",
"0.6738321",
"0.67328495",
"0.67192304",
"0.6661551",
"0.66043633",
"0.6569776",
"0.6565706",
"0.65304613",
"0.6446737",
"0.6419178",
"0.6390... | 0.62536645 | 26 |
Returns the float associated to the key put in parameter ("name"). If the value associated to the key is null, this method returns the value of the parameter defaultValue. | public float getFloat(String name, float defaultValue) {
final Object val = values.get(name);
if (val == null) {
return defaultValue;
}
if (val instanceof Number) {
return ((Number) val).floatValue();
}
try {
return Float.parseFloat((String) val);
} catch (Exception e) {
throw new IllegalArgum... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public float getFloat(String key, float defaultValue);",
"public Float getFloat(String key, Float defaultValue);",
"public float getFloat(String name, float defaultValue)\n/* */ {\n/* 984 */ String value = getString(name);\n/* 985 */ if (value == null) {\n/* 986 */ return defaultValue;\... | [
"0.8077002",
"0.7949593",
"0.76226914",
"0.7085257",
"0.70680124",
"0.69264597",
"0.6783383",
"0.650496",
"0.6486616",
"0.6429299",
"0.63980824",
"0.6367515",
"0.6306933",
"0.63019395",
"0.62675214",
"0.6251972",
"0.618222",
"0.6162907",
"0.6156469",
"0.60067385",
"0.5998698"... | 0.66554564 | 7 |
Returns the double associated to the key put in parameter ("name"). | public double getDouble(String name) {
final Object val = values.get(name);
if (val == null) {
throw new IllegalArgumentException("Float value required, but not specified");
}
if (val instanceof Number) {
return ((Number) val).doubleValue();
}
try {
return Double.parseDouble((String) val);
} catc... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double get (String name) {\n return this.lookup(name);\n }",
"public double getDouble(String name) {\n Enumeration enumer = DOUBLES.elements();\n while(enumer.hasMoreElements()) {\n SimpleMessageObjectDoubleItem item = (SimpleMessageObjectDoubleItem) enumer.nextElement()... | [
"0.7573451",
"0.7249242",
"0.71544",
"0.70302147",
"0.68441796",
"0.6818419",
"0.6724216",
"0.6660725",
"0.6648641",
"0.65879196",
"0.658025",
"0.6463367",
"0.64376163",
"0.642397",
"0.6417608",
"0.6414172",
"0.6361278",
"0.63532406",
"0.62626725",
"0.6247933",
"0.6238164",
... | 0.6300374 | 18 |
Returns the double associated to the key put in parameter ("name"). If the value associated to the key is null, this method returns the value of the parameter defaultValue. | public double getDouble(String name, float defaultValue) {
final Object val = values.get(name);
if (val == null) {
return defaultValue;
}
if (val instanceof Number) {
return ((Number) val).doubleValue();
}
try {
return Double.parseDouble((String) val);
} catch (Exception e) {
throw new Illegal... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Double getDouble(String key, Double defaultValue);",
"double getDouble(String key, double defaultValue);",
"public double getDouble(String name, double defaultValue)\n/* */ {\n/* 1028 */ String value = getString(name);\n/* 1029 */ return value == null ? defaultValue : Double.parseDouble(v... | [
"0.79776245",
"0.79445356",
"0.74537146",
"0.74396217",
"0.7432804",
"0.7344978",
"0.7222919",
"0.7137135",
"0.708302",
"0.70131737",
"0.6964161",
"0.694477",
"0.68825567",
"0.67906404",
"0.67529815",
"0.6726404",
"0.6708285",
"0.6667401",
"0.6559636",
"0.65478283",
"0.654540... | 0.6850772 | 13 |
Returns the String associated to the key put in parameter ("name"). | public String getString(String name) {
final Object val = values.get(name);
if (val == null) {
throw new IllegalArgumentException("String '" + name + "' value required, but not specified");
}
return String.valueOf(val);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Object getKey() { return name; }",
"public String getKeyName(){\n\n //returns the value of the keyName field\n return this.keyName;\n }",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"Stri... | [
"0.7320255",
"0.7122788",
"0.6962915",
"0.6962915",
"0.6962915",
"0.6962915",
"0.6962915",
"0.6962915",
"0.6962915",
"0.6962915",
"0.6962915",
"0.6962915",
"0.6962915",
"0.6962915",
"0.6962915",
"0.6959606",
"0.6959606",
"0.6959606",
"0.6959606",
"0.6959606",
"0.6959606",
"... | 0.0 | -1 |
Returns the String associated to the key put in parameter ("name"). If the value associated to the key is null, this method returns the value of the parameter defaultValue. | public String getString(String name, String defaultValue) {
final Object val = values.get(name);
if (val == null) {
return defaultValue;
}
return String.valueOf(val);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getString(String key, String defaultValue);",
"public String getString(String key, String defaultValue);",
"public String getAsString(String key, String defaultVal) {\n return entries.getProperty(key, defaultVal);\n }",
"String getString(String key, String defaultValue);",
"String getStri... | [
"0.6862102",
"0.6862102",
"0.67395204",
"0.67113274",
"0.67113274",
"0.665174",
"0.6599543",
"0.6573823",
"0.6556873",
"0.6552406",
"0.6537441",
"0.65365434",
"0.65216154",
"0.6478731",
"0.64328915",
"0.6404244",
"0.63451505",
"0.63333374",
"0.6327123",
"0.63264453",
"0.63088... | 0.6653977 | 5 |
Returns an enumeration of from the set | @SuppressWarnings("unchecked")
public <T extends Enum<T>> T getEnum(String name, Class<T> enumClass) {
final Object val = values.get(name);
if (val == null) {
throw new IllegalArgumentException("Enum value of type " + enumClass.getName() + " required, but not specified");
}
if (enumClass.isInstance(val)) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Enumeration createEnumeration();",
"public Iterator<E> elementIterator() {\n return new EnumMultiset<E>.Itr<E>() {\n /* access modifiers changed from: package-private */\n public E output(int i) {\n return EnumMultiset.this.enumConstants[i];\n }\n };\... | [
"0.6545029",
"0.63032037",
"0.62263846",
"0.6188276",
"0.6155809",
"0.61311346",
"0.612691",
"0.6075099",
"0.5879605",
"0.5872879",
"0.57993245",
"0.57755023",
"0.57731557",
"0.5763922",
"0.5711648",
"0.5641009",
"0.5628699",
"0.5626907",
"0.5604506",
"0.56028754",
"0.5597903... | 0.0 | -1 |
Returns an enumeration of from the set. If the enumeration is empty, the method returns the value of the parameter "defaultValue". | @SuppressWarnings("unchecked")
public <T extends Enum<T>> T getEnum(String name, Class<T> enumClass, T defaultValue) {
final Object val = values.get(name);
if (val == null) {
return defaultValue;
}
if (enumClass.isInstance(val)) {
return (T) val;
}
try {
return Enum.valueOf(enumClass, String.value... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"gov.nih.nlm.ncbi.www.MedlineSiDocument.MedlineSi.Type.Value.Enum getValue();",
"public static Object getEnumAttribute(Node archiveNode, String attrName, Object[] values, Object defaultValue) {\n\n Node attr = archiveNode.getAttributes().getNamedItem(attrName);\n if (attr != null) {\n String found = at... | [
"0.59642714",
"0.584273",
"0.5836319",
"0.5793837",
"0.5793837",
"0.5781527",
"0.5760846",
"0.5671413",
"0.5671413",
"0.56201726",
"0.55806863",
"0.55551004",
"0.54542875",
"0.5452514",
"0.5440217",
"0.54239905",
"0.5414141",
"0.53855956",
"0.5343073",
"0.5333753",
"0.5333753... | 0.5164258 | 32 |
/ Method: hashLexicons used to count the lexicon occurences in ham and spam documents i/p: email: the input that has lexicons | void hashLexicons(Email email) {
for (String s : email.processedMessage.keySet()) {
int tempCount = email.processedMessage.get(s);
if(email.ec==EmailClass.ham)
{
totalNumberOfWordsInHamDocuments= totalNumberOfWordsInHamDocuments+tempCount;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void hashLexicons() {\n for (int i = 0; i < trainingData.hamEmails.length; i++) {\n hashLexicons(trainingData.hamEmails[i]);\n }\n for (int i = 0; i < trainingData.spamEmails.length; i++) {\n hashLexicons(trainingData.spamEmails[i]);\n }\n }",
"public static v... | [
"0.82290566",
"0.5713905",
"0.56370384",
"0.56308246",
"0.56134164",
"0.55804634",
"0.5542293",
"0.54679865",
"0.5419525",
"0.5368279",
"0.5349548",
"0.53137",
"0.5284286",
"0.5283183",
"0.5263687",
"0.52478397",
"0.5233684",
"0.52036273",
"0.5163669",
"0.5149582",
"0.5142364... | 0.88804615 | 0 |
/ Method: hashLexicons wrapper method to hash lexicons | void hashLexicons() {
for (int i = 0; i < trainingData.hamEmails.length; i++) {
hashLexicons(trainingData.hamEmails[i]);
}
for (int i = 0; i < trainingData.spamEmails.length; i++) {
hashLexicons(trainingData.spamEmails[i]);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void hashLexicons(Email email) {\n for (String s : email.processedMessage.keySet()) {\n int tempCount = email.processedMessage.get(s);\n \n if(email.ec==EmailClass.ham)\n {\n totalNumberOfWordsInHamDocuments= totalNumberOfWordsInHamDocuments+tempCou... | [
"0.6771145",
"0.5978438",
"0.58420944",
"0.5812565",
"0.56624675",
"0.56357175",
"0.56357175",
"0.561367",
"0.5611033",
"0.5601177",
"0.559758",
"0.5579953",
"0.55548126",
"0.5519873",
"0.5491878",
"0.5483292",
"0.5480148",
"0.54670817",
"0.5464629",
"0.5445004",
"0.540471",
... | 0.811353 | 0 |
/ Method: findAccuracy. used to find the accuracy the test set. i/p: dirName: directory name of hte test set. ec: Class that the test set emails belong to | void findTruePositive(String dirName, EmailClass ec,boolean noStopWordsRemoval) throws IOException {
Email testEmails[];
File dir = new File(dirName);
File files[] = dir.listFiles();
testSamples+=files.length;
//long truePositive = 0;
for (int j = 0; j < files.length;) {... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private double findAccuracy(){\n double[] prediciton = this.learner.test(this.VS);\n ClassificationEvaluator CE = new ClassificationEvaluator(prediciton, this.VS);\n double tmp = CE.returnAccuracy(); //find accuracy\n return tmp;\n }",
"protected void calculateAccuracyOfTestFile( d... | [
"0.69157064",
"0.65631604",
"0.6491791",
"0.62730825",
"0.6177618",
"0.61302745",
"0.6045694",
"0.59858745",
"0.5926513",
"0.5820206",
"0.57994837",
"0.56387806",
"0.5577076",
"0.555111",
"0.5540674",
"0.553627",
"0.55272675",
"0.5480547",
"0.54577994",
"0.5434097",
"0.538893... | 0.57238567 | 11 |
/ Method: findClass. Used to find the clss for the test email. i/p: email | EmailClass findClass(Email email,boolean noStopWordsRemoval) {
//email.preprocessEmail(trainingData.stopwords,noStopWordsRemoval);
double hamProbability = 0;
double spamProbability = 0;
for (String s : email.processedMessage.keySet()) {
long n = email.processedMessage.get(s)... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public FindResult findClass(String className);",
"private Class<?> getClass(String parameterName, String classToCheck, final BeanValidationResult result) {\n if (StringUtils.isBlank(classToCheck)) {\n result.addResult(parameterName, classToCheck, ValidationStatus.INVALID, \"parameter is null or... | [
"0.63168114",
"0.5751511",
"0.5517617",
"0.5486428",
"0.5466216",
"0.5388321",
"0.53777695",
"0.53487796",
"0.53444797",
"0.5312613",
"0.525671",
"0.52537614",
"0.523448",
"0.52147615",
"0.5208563",
"0.5204483",
"0.5178598",
"0.5172951",
"0.51641816",
"0.5157351",
"0.5156944"... | 0.56249654 | 2 |
/ Method: test. wrapper method that calls the necesssary methods for testing the emails | void test(String hamEmailsDirectoryPath, String spamEmailsDirectoryPath,boolean noStopWordsRemoval) throws IOException {
hashLexicons();
//String hamEmailsDirectoryPath = "C:\\Users\\Praveen\\OneDrive\\Spring 2016\\Machine_Learning\\Assignment\\2\\test\\ham";
findTruePositive(hamEmailsDirectoryP... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void emailTest() {\n // TODO: test email\n }",
"@Test\n public void emailTest() {\n // TODO: test email\n }",
"@Test\n\tpublic void EmailUtility() {\n\n\t\tlog.info(\"Testing Starts\");\n\t\tperformCommonMocking();\n\t\t\n\t\tEmail emailMessage = new Email();\n\t\temail... | [
"0.77500165",
"0.77500165",
"0.73914874",
"0.7359065",
"0.71310854",
"0.70562094",
"0.7039625",
"0.69818544",
"0.6910591",
"0.68595654",
"0.6839101",
"0.6828796",
"0.68055737",
"0.67888904",
"0.673691",
"0.66683483",
"0.66576916",
"0.6650401",
"0.66296375",
"0.6625931",
"0.66... | 0.0 | -1 |
private final KafkaTemplate kafkaTemplate; | @GetMapping("/available")
public ResponseEntity<ApiResponseBase<List<ProductDTO>>> findByAvailability() {
ApiResponseBase<List<ProductDTO>> pagedApiResponseBase = new ApiResponseBase<>();
pagedApiResponseBase.setResponse(productService.getProductByAvailability());
// kafkaTemplate.send("Kafka... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Bean\r\n public KafkaTemplate<String, Object> kafkaTemplate() {\r\n return new KafkaTemplate<>(producerFactory());\r\n }",
"public KafkaConfig() { }",
"public KafkaJsonSerializer() {\n\n }",
"public interface KafkaService {\n\n /**\n * 发消息\n * @param topic 主题\n * @param obj 发送内容... | [
"0.8188604",
"0.6489204",
"0.6311912",
"0.62890965",
"0.62566185",
"0.61362207",
"0.608317",
"0.5962313",
"0.58126307",
"0.58067787",
"0.5805501",
"0.57962066",
"0.5779983",
"0.57016385",
"0.5672658",
"0.56621623",
"0.5647541",
"0.56419367",
"0.56236506",
"0.55710036",
"0.554... | 0.0 | -1 |
Simple method facing process. | public static int [] countChar(String str) {
char data [] = str.toCharArray();
int count [] = new int [2];
for (int i = 0; i < data.length; i++) {
if (data[i] == 'n' || data[i] == 'N')
count[0]++;
if (data[i] == 'm' || data[i] == 'M')
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void process();",
"public void process() {\n\n }",
"void process();",
"void process();",
"public void process() {\n\t}",
"@Override\n protected String process() {\n process.print();\n return \"hello world!!\";\n }",
"public s... | [
"0.73289657",
"0.71620166",
"0.71569264",
"0.71569264",
"0.71503925",
"0.7083444",
"0.6768145",
"0.6736098",
"0.6633863",
"0.66106856",
"0.6607392",
"0.65741515",
"0.65741515",
"0.65741515",
"0.65741515",
"0.65653265",
"0.65604204",
"0.6533295",
"0.6458985",
"0.6454604",
"0.6... | 0.0 | -1 |
wrt a program to calculate that student pass or not | public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
byte m1, m2, m3;
System.out.print("Enter your marks in Physics:");
m1 = sc.nextByte();
System.out.print("Enter your marks in Chemistry:");
m2 = sc.nextByte();
System.out.print(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasPass();",
"boolean hasPass();",
"public int calcPassedCourseNum(){\n int score = 0;\n \n score += course1.isPassed() ? 1 : 0;\n score += course2.isPassed() ? 1 : 0;\n score += course3.isPassed() ? 1 : 0;\n \n return score;\n }",
"public boolean p... | [
"0.66508675",
"0.66508675",
"0.65612245",
"0.64833766",
"0.6154604",
"0.6067019",
"0.6039485",
"0.59781235",
"0.59270215",
"0.58858883",
"0.5847903",
"0.58453774",
"0.58377904",
"0.58178735",
"0.5798636",
"0.57935476",
"0.5781442",
"0.575773",
"0.57401097",
"0.5734317",
"0.57... | 0.0 | -1 |
Find the doc comment corresponding to the specified item | public SVDBDocComment find(IProgressMonitor monitor, ISVDBItemBase item) {
SVDBDocComment comment = null;
// Must reach the file scope
ISVDBItemBase p = item;
while (p != null && p.getType() != SVDBItemType.File) {
if (p instanceof ISVDBChildItem) {
p = ((ISVDBChildItem)p).getParent();
} else... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract String getResolvedDocComment(Element forElement) throws IOException;",
"public WallItemComment getWallItemComment(long wallItemCommentId);",
"FeiWenComment selectByPrimaryKey(String cid);",
"private int findCommentPositionInItems(@NonNull GitHubComment comment) {\n int commentPosition ... | [
"0.64514714",
"0.60526884",
"0.5833234",
"0.5643914",
"0.55719054",
"0.5563277",
"0.5553444",
"0.55447555",
"0.5417801",
"0.5380909",
"0.53690875",
"0.5353645",
"0.53425306",
"0.5284647",
"0.52791303",
"0.52152866",
"0.52044123",
"0.5128775",
"0.51071435",
"0.5101641",
"0.509... | 0.73980176 | 0 |
Resolves which tip refs include the target commit. | private static Set<Ref> includedIn(final Repository repo, final RevWalk rw,
final RevCommit target, final Set<Ref> tipRefs) throws IOException,
MissingObjectException, IncorrectObjectTypeException {
Set<Ref> result = new HashSet<Ref>();
Map<RevCommit, Set<Ref>> tipsAndCommits = parseCommits(repo, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static Map<RevCommit, Set<Ref>> parseCommits(final Repository repo,\n final RevWalk rw, final Set<Ref> refs) throws IOException {\n Map<RevCommit, Set<Ref>> result = new HashMap<RevCommit, Set<Ref>>();\n for (Ref ref : refs) {\n final RevCommit commit;\n try {\n commit = rw.pars... | [
"0.54998064",
"0.48610324",
"0.48270926",
"0.47307652",
"0.4728021",
"0.47191986",
"0.4675938",
"0.46734047",
"0.46656948",
"0.46492532",
"0.46039036",
"0.45378727",
"0.4525309",
"0.45152706",
"0.4509599",
"0.44932717",
"0.44164464",
"0.44094908",
"0.43969214",
"0.43808857",
... | 0.69448245 | 0 |
Returns the short names of refs which are as well in the matchingRefs list as well as in the allRef list. | private static List<String> getMatchingRefNames(Set<Ref> matchingRefs,
Set<Ref> allRefs) {
List<String> refNames = new ArrayList<String>();
for (Ref matchingRef : matchingRefs) {
if (allRefs.contains(matchingRef)) {
refNames.add(Repository.shortenRefName(matchingRef.getName()));
}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.util.List<org.jetbrains.r.rinterop.RRef> \n getRefsList();",
"public Set<CompoundName> getResult() { return references; }",
"public Set<String> getVarRefNames() {\n List<Xnode> varRefs = matchAll(Xcode.VAR_REF);\n Set<String> names = new HashSet<>();\n for(Xnode varRef : varRefs) {\n na... | [
"0.548602",
"0.5216003",
"0.51998216",
"0.5139928",
"0.5087578",
"0.50847954",
"0.5014197",
"0.49910435",
"0.49547738",
"0.4953611",
"0.49317044",
"0.4839871",
"0.48234597",
"0.48134777",
"0.47940695",
"0.47675082",
"0.47658285",
"0.47501254",
"0.4730102",
"0.47201064",
"0.47... | 0.8242329 | 0 |
Parse commit of ref and store the relation between ref and commit. | private static Map<RevCommit, Set<Ref>> parseCommits(final Repository repo,
final RevWalk rw, final Set<Ref> refs) throws IOException {
Map<RevCommit, Set<Ref>> result = new HashMap<RevCommit, Set<Ref>>();
for (Ref ref : refs) {
final RevCommit commit;
try {
commit = rw.parseCommit(ref... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"GitCommit(RevCommit anRC) { _rev = anRC; }",
"Commit getCommit(String hash) {\n Commit newCommit = null;\n File gettin = new File(\".gitlet/commits/\" + hash);\n if (gettin.exists()) {\n return deserializeCommit(\".gitlet/commits/\" + hash);\n } else {\n return ... | [
"0.6053429",
"0.54980767",
"0.54468316",
"0.5446228",
"0.51784027",
"0.51467246",
"0.51220363",
"0.5121806",
"0.5110491",
"0.5071522",
"0.4989257",
"0.49116087",
"0.4866221",
"0.4845814",
"0.48319992",
"0.48241934",
"0.48043245",
"0.47741246",
"0.47674096",
"0.4761212",
"0.47... | 0.6123777 | 0 |
Greedy algorithm for MKP | public static int[][] greedy(float[] benefit, float[] weight, int[] knapsackWeight) {
// number of items
int itemLen = benefit.length;
// number of knapsacks
int knapsackLen = knapsackWeight.length;
// key: index of item, value: benefit / weight of item
Map<Integer, Float... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void run() {\n\t\tMap<Integer, Integer> roots = new TreeMap<Integer, Integer>();\n\t\t\n\t\tEdge[] edges = new Edge[this.edges.length];\n\t\tint n, weight, relevantEdges, root, lowerBound = 0;\n\t\n\t\t// Sort edges by weight.\n\t\tquickSort(0, this.edges.length - 1);\n\t\n\t\t// Compute initia... | [
"0.6122713",
"0.61189586",
"0.6109069",
"0.60389906",
"0.5786975",
"0.5740257",
"0.5726955",
"0.57136434",
"0.569433",
"0.56694126",
"0.56665707",
"0.5659162",
"0.5658578",
"0.56577224",
"0.56546235",
"0.5622926",
"0.5605434",
"0.5600832",
"0.55973256",
"0.5596482",
"0.559453... | 0.0 | -1 |
Neighborhood Search for MKP | public static int[][] neighborhoodSearch(float[] benefit, float[] weight, int[] knapsackWeight){
/*
Using greedy algorithm to put items in knapsacks
*/
// number of items
int itemLen = benefit.length;
// number of knapsacks
int knapsackLen = knapsackWeight.leng... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private LinkedList<int[]> neighborFinder(){\n LinkedList<int[]> neighborhood= new LinkedList<>();\n int[] curr_loc = blankFinder();\n int x = curr_loc[0];\n int y = curr_loc[1];\n if(x >0){\n neighborhood.add(new int[]{x-1, y});\n }\n if(x < n-1){\n ... | [
"0.6930928",
"0.6836482",
"0.6504054",
"0.6352653",
"0.63092303",
"0.6294967",
"0.6234428",
"0.6204254",
"0.6156958",
"0.6141051",
"0.606033",
"0.6034384",
"0.59563255",
"0.5951742",
"0.5947977",
"0.5936879",
"0.59189284",
"0.58752024",
"0.5843345",
"0.5829027",
"0.5811077",
... | 0.59764856 | 12 |
/ Random items and knapsacks | public static void main(String[] args) {
System.out.println("------Random items and knapsacks------");
int itemLen = 10;
int knapsackLen = 4;
float[] benefit = new float[itemLen];
float[] weight = new float[itemLen];
int[] knapsackWeight = new int[knapsackLen];
R... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Chromosome withRandomKnapsackItems() {\n this.knapsackSelection = generateRandomItems();\n return this;\n }",
"public static void main(String[] args) {\n\t\t\n\t\tint max_size,n; \n \n ArrayList<item> items=new ArrayList();\n\t\t// item 1, value 6, size 1\n items.add(n... | [
"0.7080063",
"0.6885797",
"0.6884053",
"0.6861491",
"0.67520136",
"0.6707714",
"0.6655557",
"0.6400094",
"0.6318961",
"0.62865627",
"0.62850094",
"0.6218116",
"0.61897916",
"0.61825126",
"0.6178758",
"0.6172623",
"0.61523175",
"0.61303294",
"0.61207753",
"0.60975164",
"0.6091... | 0.684574 | 4 |
private method for UTF8 encoding | private String UTF8Encode(String s) {
s = s.replace("\r\n", "\n");
int[] utftext = new int[s.length() * 3];
int utftextlen = 0;
for (int n = 0; n < s.length(); n++) {
int c = s.charAt(n);
if (c < 128) {
utftext[utftextlen++] = c;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void convertToUTF8() {\n FileInputStream istream = null;\n Writer out = null;\n try {\n istream = new FileInputStream(path);\n BufferedInputStream in = new BufferedInputStream(istream);\n CharsetDecoder charsetDecoder = Charset.forName(\"UTF-8\").newDeco... | [
"0.7301779",
"0.72069335",
"0.69510996",
"0.69500154",
"0.67331547",
"0.6728564",
"0.67263365",
"0.67228794",
"0.671865",
"0.67029893",
"0.67003953",
"0.6681192",
"0.6651897",
"0.66372746",
"0.6626607",
"0.6618294",
"0.6618294",
"0.6582135",
"0.6564144",
"0.6551949",
"0.65110... | 0.68273944 | 4 |
/ Template Properties, TO DO Button go_to_cart; NewOrderListViewAdapter newOrderListViewAdapter; public static final String DB_NAME = "Food.db"; public static final String TABLE_NAME = "food_table"; public static final String _id = "_id"; public static final String foof_item = "foof_item"; public static final String fo... | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_activity_impl_database);
/*
externalDbOpenHelper = new ExternalDbOpenHelper(this,DB_NAME);
database = externalDbOpenHelper.openDataBase();
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t public void onClick(View v)\n\t {\n\t\t\t sqLite=context.openOrCreateDatabase(\"basketbuddy\", context.MODE_PRIVATE, null);\n\t\t\t \n\t\t\t Cursor cc = sqLite.rawQuery(\"SELECT PRODUCT_QTY, PRODUCT_VALUE FROM CART WHERE PRODUCT_CODE =\"+Integer.parseInt(prod_name.getProductCode()), null... | [
"0.70785785",
"0.6817581",
"0.676217",
"0.6754442",
"0.67397016",
"0.66950834",
"0.66448194",
"0.66377544",
"0.65839165",
"0.6484829",
"0.64630145",
"0.6455022",
"0.64504623",
"0.6447708",
"0.6426102",
"0.6392726",
"0.6381159",
"0.6372195",
"0.6325316",
"0.6317664",
"0.631565... | 0.84557927 | 0 |
TODO Autogenerated method stub | public static void main(String[] args) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
Makes the changes performed from the last commit, the last rollback or the beginning of the transaction permanent | public void commit() throws SQLException {
connection.commit();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void commit()\n\t{\n\t\t_Status = DBRowStatus.Unchanged;\n\t}",
"public void forceCommitTx()\n{\n}",
"public void rollback();",
"public void commit() {\n tryCommit(true);\n }",
"public void commit() {\n doCommit();\n }",
"public void commit() {\n\t\tcommitted = true;\n\t}",
"pro... | [
"0.6815701",
"0.6770787",
"0.67613786",
"0.67590326",
"0.6720665",
"0.66709626",
"0.66521907",
"0.66359776",
"0.6629882",
"0.6614185",
"0.660858",
"0.65573406",
"0.6548484",
"0.6545111",
"0.65160453",
"0.6440791",
"0.6411417",
"0.6401531",
"0.6400815",
"0.63936305",
"0.639197... | 0.0 | -1 |
Reverts all the changes made since the transaction was created or commit was calles | public void rollback() throws SQLException {
connection.rollback();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void rollback();",
"public void undo() {\n\t\tif(committed){\n\t\t\treturn;\n\t\t}\n\t\tboolean [][] tempGrid = grid;\n\t\tgrid = backupGrid;\n\t\tbackupGrid = tempGrid;\n\n\t\tint [] tempWidths = widths;\n\t\twidths = backupWidths;\n\t\tbackupWidths = tempWidths;\n\n\t\tint [] tempHeights = heights;\n\t\... | [
"0.7010387",
"0.69103646",
"0.68972117",
"0.6858007",
"0.6823099",
"0.68182003",
"0.6811667",
"0.6781073",
"0.66340417",
"0.66264355",
"0.6618202",
"0.66003305",
"0.6589054",
"0.6509438",
"0.6502997",
"0.6472044",
"0.6461731",
"0.6458347",
"0.64335287",
"0.63851774",
"0.63747... | 0.0 | -1 |
Commits and frees the resources associated with the transaction | @Override
public void close() throws SQLException {
//Commit must be explicit before closing the connection
connection.commit();
connection.close();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void commit() {\r\n tx.commit();\r\n tx = new Transaction();\r\n }",
"public void commitTransaction() {\n\r\n\t}",
"void commitTransaction();",
"public void commit() {\n doCommit();\n }",
"public void commitTransaction() throws TransactionException {\n\t\t\r\n\t}",
"public void close() th... | [
"0.7841018",
"0.75381964",
"0.7460236",
"0.743349",
"0.7407136",
"0.7375572",
"0.73092896",
"0.72896",
"0.72374976",
"0.722551",
"0.7224794",
"0.7149855",
"0.7092682",
"0.70837873",
"0.70785975",
"0.70670855",
"0.7065637",
"0.7001035",
"0.6977287",
"0.6977287",
"0.6977287",
... | 0.6287109 | 56 |
Returns the connection to user to perform actions in the current transaction | Connection getConnection() {
return connection;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Nullable\n public String getConnectionUser()\n {\n return connectionUser;\n }",
"public Connection getTransactionConnection(){\n try {\n return rawDataSource.getConnection();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return null;\... | [
"0.6613672",
"0.6589599",
"0.6508447",
"0.6373561",
"0.63708824",
"0.63507116",
"0.63442016",
"0.6329278",
"0.6316139",
"0.628267",
"0.6190517",
"0.61671686",
"0.61671686",
"0.6152464",
"0.613689",
"0.6126343",
"0.6059496",
"0.6031641",
"0.6031641",
"0.6028124",
"0.5997163",
... | 0.6230142 | 10 |
call sms, email, push | public boolean sendAlert(Developer developer) {
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"SendSMSResponse sendSMSProcess(SendSMSRequest smsRequest) throws Exception;",
"public void sendSms() {\n\n }",
"public java.lang.String sendSMS(java.lang.String accessCode, java.lang.String toNumber, java.lang.String body) throws java.rmi.RemoteException;",
"void requestSendSMSCode(Context context,String ... | [
"0.71780753",
"0.6900706",
"0.6650021",
"0.65311",
"0.622972",
"0.6228858",
"0.61976105",
"0.6190965",
"0.6185584",
"0.6170192",
"0.6130605",
"0.61290264",
"0.60932875",
"0.6071766",
"0.60623556",
"0.6048489",
"0.6040899",
"0.60360765",
"0.6032598",
"0.60106075",
"0.6000125",... | 0.0 | -1 |
Convert list to array. FIXME:How to implement the generic version? | public static BoolExpr[] listToArray(List<BoolExpr> list) {
BoolExpr[] array = new BoolExpr[list.size()];
array = list.toArray(array);
return array;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static <T> T[] listToArray (Object list) {\n\tif (! (list instanceof Collection)) {\n\t\treturn (T[]) new Object[0];\n\t}\n\treturn (T[]) ((Collection) list).toArray();\n }",
"public Object[] toArray(){\n\n \tObject[] o = new Object[list.size()];\n\n o = list.toArray();\n\n \treturn o;\n\n ... | [
"0.780449",
"0.77772486",
"0.7771254",
"0.7608642",
"0.7161836",
"0.70048124",
"0.68986666",
"0.6896689",
"0.6824972",
"0.68092597",
"0.6739815",
"0.6739815",
"0.6739815",
"0.6738651",
"0.6721314",
"0.6696417",
"0.66748023",
"0.6657759",
"0.6580259",
"0.6567714",
"0.65214545"... | 0.6160808 | 56 |
/ recursively construct cons | private static AbstractList construct(LinkedList arg) {
if (arg.isEmpty())
return new EmptyList();
else {
Object fst = arg.pollFirst();
//FIXME: The stupid bug in Gson.
if (fst instanceof Double) fst = ((Double) fst).intValue();
return new Cons... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"InductiveList<E> cons(E elem);",
"@NonNull\n @SuppressWarnings( {\"rawtypes\", \"unchecked\", \"unused\"})\n static <V, U extends V> ConsList<V> cons(@Nullable U head,\n @NonNull Collection<? extends V> tail,\n ... | [
"0.62589556",
"0.56344926",
"0.5565712",
"0.5553035",
"0.5529723",
"0.54175735",
"0.54122716",
"0.5389271",
"0.53499657",
"0.5305512",
"0.5298531",
"0.5272833",
"0.5228812",
"0.5058677",
"0.49655956",
"0.49613512",
"0.4938202",
"0.48040423",
"0.4801762",
"0.47953114",
"0.4748... | 0.56453633 | 1 |
TODO Autogenerated method stub | public void perceptAttended(IPerceptualMemoryModuleEvent event)
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
TODO Autogenerated method stub | public void perceptIndexFound(IPerceptualMemoryModuleEvent event)
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
at the top of each cycle, we check for scene change | @Override
public void cycleStarted(ModelEvent event)
{
checkForChange();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void checkForChange()\n {\n double changeRatio = _sceneChangeListener.check();\n _sceneChangeValueSlot.setValue(changeRatio);\n\n /*\n * if the ratio exceeds threshold, and hasn't already, set the flag\n */\n if (_resetTimedEvent == null && changeRatio >= getSceneChangeThreshold())\n... | [
"0.7173493",
"0.6428397",
"0.634623",
"0.63010883",
"0.6244773",
"0.62400144",
"0.6133463",
"0.60931563",
"0.6077151",
"0.60715264",
"0.6030468",
"0.59952486",
"0.59783065",
"0.5956464",
"0.5943749",
"0.592087",
"0.5867716",
"0.58488744",
"0.5834717",
"0.58331734",
"0.5827751... | 0.0 | -1 |
no need to remove the feature listener as the agent will be disposed and remove ourselves | @Override
public void modelDisconnected(ModelEvent event)
{
_model.removeListener(this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void uninstallListeners() {\n }",
"protected void uninstallListeners() {\n }",
"protected void uninstallListeners() {\n\t}",
"private void freeAgent() {\n }",
"void removeListener(BotListener l);",
"public void cleanUp() { listener = null; }",
"public void agentDestroyed(ShellLaunchE... | [
"0.6290284",
"0.6290284",
"0.6285978",
"0.6277584",
"0.6238354",
"0.6233918",
"0.61122996",
"0.608643",
"0.6083269",
"0.60816044",
"0.6077689",
"0.6035223",
"0.6031893",
"0.60152316",
"0.5933134",
"0.58871853",
"0.585777",
"0.5807548",
"0.5796925",
"0.5792239",
"0.57686216",
... | 0.0 | -1 |
check to see if we should set the scenechange flag | protected void checkForChange()
{
double changeRatio = _sceneChangeListener.check();
_sceneChangeValueSlot.setValue(changeRatio);
/*
* if the ratio exceeds threshold, and hasn't already, set the flag
*/
if (_resetTimedEvent == null && changeRatio >= getSceneChangeThreshold())
{
_s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void isChanged()\n\t{\n\t\tchange = true;\n\t}",
"public boolean isScene() {\r\n\t\treturn scene;\r\n\t}",
"public boolean isGameChanged() {\n return gameChanged;\n }",
"private boolean canStartWave() {\n\n return uiStateManager.getState().equals(GameUIState.STANDBY);\n }",
"priv... | [
"0.6297815",
"0.61256945",
"0.6034631",
"0.60170096",
"0.59984034",
"0.5963182",
"0.5953953",
"0.5949624",
"0.5948645",
"0.5864678",
"0.5837335",
"0.58274615",
"0.57748073",
"0.5773604",
"0.5773604",
"0.5771448",
"0.57512695",
"0.5740559",
"0.57285786",
"0.5705576",
"0.570546... | 0.76253754 | 0 |
explicitly reset the scenechange flag, regardless of whether or not its been triggered | protected void reset()
{
if (_resetTimedEvent != null && !_resetTimedEvent.hasAborted()
&& !_resetTimedEvent.hasFired()) _resetTimedEvent.abort();
clearFlag();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void checkForChange()\n {\n double changeRatio = _sceneChangeListener.check();\n _sceneChangeValueSlot.setValue(changeRatio);\n\n /*\n * if the ratio exceeds threshold, and hasn't already, set the flag\n */\n if (_resetTimedEvent == null && changeRatio >= getSceneChangeThreshold())\n... | [
"0.70789135",
"0.6611719",
"0.64990324",
"0.6485076",
"0.6447588",
"0.6410213",
"0.63679326",
"0.63198984",
"0.630984",
"0.62608457",
"0.6253025",
"0.6213591",
"0.6188737",
"0.61563635",
"0.61524135",
"0.61226654",
"0.61017716",
"0.6093876",
"0.6081338",
"0.60760593",
"0.6069... | 0.0 | -1 |
METHODS CONSTRUCTORS Creates an LSPQuery. Typically, users of the SDARTS API will never need to do this. | public LSPQuery (String version, boolean dropStop,
String defaultAttributeSet, double minDocScore,
int maxDocs) {
this.version = version;
this.defaultAttributeSet = defaultAttributeSet;
this.dropStop = dropStop;
this.minDocScore = minDocScore;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract List createQuery(String query);",
"public Query createQuery() {\n\n String queryString = getQueryString();\n\n if (debug == true) {\n logger.info( \"Query String: {0}\", queryString);\n logger.info( \"Parameters: Max Results: {0}, First result: {1}, Order By: {... | [
"0.6253409",
"0.5901721",
"0.58236164",
"0.56898814",
"0.56533307",
"0.5647472",
"0.5638317",
"0.5607016",
"0.5592825",
"0.55626225",
"0.55294114",
"0.548152",
"0.5477135",
"0.5445888",
"0.54419607",
"0.5424506",
"0.5394219",
"0.53849673",
"0.53300226",
"0.53237194",
"0.53222... | 0.52900565 | 24 |
ACCESSORS Sets the LSPFilter of the query. The backend developer may need this method of the filter has to be altered, due to restrictions of the underlying colelction. | public void setFilter (LSPFilter filter) {
this.filter = filter;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setFilters(cwterm.service.rigctl.xsd.Filter[] param) {\n validateFilters(param);\n if (param != null) {\n localFiltersTracker = true;\n } else {\n localFiltersTracker = true;\n }\n this.localFilters = param;\n }",
"public void addFilterToPol... | [
"0.5078542",
"0.5062323",
"0.5051941",
"0.5009641",
"0.49956632",
"0.48975962",
"0.4865605",
"0.48560613",
"0.48527706",
"0.48373002",
"0.47958964",
"0.4776545",
"0.4776545",
"0.47583288",
"0.4677614",
"0.4669926",
"0.46645027",
"0.46513945",
"0.46503782",
"0.4637074",
"0.463... | 0.5307557 | 0 |
Returns the LSPFilter used in the query | public LSPFilter getFilter () {
return filter;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getFilter();",
"public String getFilter();",
"java.lang.String getFilter();",
"public String getFilter() {\n\t\treturn url.getFilter();\n }",
"Filter getFilter();",
"public Expression getFilter() {\n return this.filter;\n }",
"public String getFilter() {\n\t\treturn filter;\n\t}",
... | [
"0.68652326",
"0.68584204",
"0.68228984",
"0.6760802",
"0.6700237",
"0.66530716",
"0.6569955",
"0.65418494",
"0.652432",
"0.64243156",
"0.6385088",
"0.63699263",
"0.632605",
"0.6281035",
"0.6271312",
"0.6223733",
"0.6221968",
"0.6216861",
"0.6203675",
"0.6163143",
"0.6117745"... | 0.78857595 | 0 |
Sets the LSPRanking of the query. The backend developer may need this method of the filter has to be altered, due to restrictions of the underlying colelction. | public void setRanking (LSPRanking ranking) {
this.ranking = ranking;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Builder setRanking(int value) {\n bitField0_ |= 0x00000010;\n ranking_ = value;\n onChanged();\n return this;\n }",
"public LSPRanking getRanking () {\r\n return ranking;\r\n }",
"public void setRank(int aRank)\n {\n this.ranks = aRank;\n }",
"public a... | [
"0.6497738",
"0.62793344",
"0.6106714",
"0.6082205",
"0.59309834",
"0.5833113",
"0.5799005",
"0.575613",
"0.5753117",
"0.57418245",
"0.57212174",
"0.5678815",
"0.5577533",
"0.557108",
"0.557108",
"0.5569227",
"0.5496493",
"0.54605395",
"0.5443912",
"0.5436007",
"0.5379714",
... | 0.74433607 | 0 |
Returns the LSPRanking used in the query | public LSPRanking getRanking () {
return ranking;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getRanking();",
"public int getRanking() {\n return ranking_;\n }",
"public int getRanking() {\n return ranking_;\n }",
"long getRank();",
"public Ranking getRanking() {\n return ranking;\n }",
"public void setRanking (LSPRanking ranking) {\r\n this.ranking = rankin... | [
"0.7509086",
"0.7224395",
"0.71101636",
"0.70640576",
"0.7012889",
"0.6958926",
"0.68038154",
"0.6681666",
"0.6680732",
"0.6675085",
"0.66718465",
"0.6652084",
"0.6650126",
"0.6650126",
"0.6631",
"0.6608366",
"0.6567519",
"0.6554583",
"0.6543383",
"0.65038586",
"0.64904237",
... | 0.8197487 | 0 |
Sets the "sources" that the query should access. These are just another name for subcollections, aka BackEndLSPs. | public void setSources (LSPSource[] sources) {
this.sources = sources;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setCardDataSources(Vector<DataSource> sources) {\n cardDataSources = sources;\n }",
"public void setDataSources(ArrayList dataSources) {\n this.dataSources = dataSources;\n }",
"public void setConceptSources(List<String> sources){\n \tconceptSources = sources;\n }",
"protected... | [
"0.66352874",
"0.6617324",
"0.6613989",
"0.64690554",
"0.6258583",
"0.6235018",
"0.62201476",
"0.60783833",
"0.6050693",
"0.5956312",
"0.59323764",
"0.5909977",
"0.5860042",
"0.58455783",
"0.58361346",
"0.5828723",
"0.5817482",
"0.58155113",
"0.5768252",
"0.5700234",
"0.56870... | 0.74525553 | 0 |
Returns the sources used in the query. | public LSPSource[] getSources () {
return sources;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String[] getAllSources() {\n return this.sourceList.toArray(new String[0]);\n }",
"public List<String> getSources() {\n\t\treturn this.sources;\n\t}",
"public Collection<String> getSourceSites() {\n return mSourceMap.keySet();\n }",
"public Cursor querySources(){\n String sql = \"... | [
"0.7213461",
"0.7159447",
"0.70439607",
"0.6947195",
"0.66878504",
"0.6532062",
"0.6505012",
"0.64487845",
"0.64459485",
"0.6313966",
"0.62624097",
"0.6262162",
"0.6232831",
"0.62241685",
"0.62211627",
"0.6150854",
"0.6143837",
"0.6139773",
"0.61039686",
"0.6100749",
"0.60593... | 0.71064353 | 2 |
Sets the fields to appear in the query's response | public void setAnswerFields (LSPField[] answerFields) {
this.answerFields = answerFields;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n protected void setFieldValues (Object ... fields)\r\n {\n \r\n }",
"public QueryResponse(Query q) {\n this.q = q;\n this.docIDs = new HashSet<>();\n }",
"public void setFields(Map<String, String> fields) {\n this.fields = fields;\n }",
"private Respons... | [
"0.62750983",
"0.60279673",
"0.6001887",
"0.57835513",
"0.57666826",
"0.5740061",
"0.5695928",
"0.56654656",
"0.54463756",
"0.5443435",
"0.53999966",
"0.53791064",
"0.5346871",
"0.53455514",
"0.5283769",
"0.51972824",
"0.51636666",
"0.5154779",
"0.51395607",
"0.5131169",
"0.5... | 0.5040639 | 25 |
Returns the fields to appear in the query's response | public LSPField[] getAnswerFields () {
return answerFields;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getFields();",
"public List<String> retornaFields() {\n\t\treturn data.retornaFields();\n\t}",
"public String getFields() {\n return fields;\n }",
"private List<Field> getFields() {\n try {\n List<Field> fields = ResultSetUtil.getFields(databaseName, tableName, re... | [
"0.72493833",
"0.6860206",
"0.67989105",
"0.658124",
"0.6515986",
"0.6464591",
"0.6434154",
"0.6388916",
"0.631572",
"0.6297549",
"0.6268968",
"0.6253062",
"0.62107015",
"0.6182824",
"0.6161001",
"0.6149125",
"0.6080557",
"0.60719603",
"0.5934634",
"0.593022",
"0.59284735",
... | 0.0 | -1 |
Returns the fields to sort the docs in the query's response | public LSPSortByField[] getSortByFields () {
return sortByFields;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public IScapSyncSearchSortField[] getSortFields();",
"@Override\n protected List<String> getFieldOrder() {\n ArrayList<String> FieldOrder=new ArrayList<>();\n FieldOrder.add(\"eventId\");\n FieldOrder.add(\"timestamp\");\n FieldOrder.add(\"type\");\n ... | [
"0.6819512",
"0.6284739",
"0.6177667",
"0.6144193",
"0.6092066",
"0.6068529",
"0.60005575",
"0.5865127",
"0.5743738",
"0.5725322",
"0.5648098",
"0.56078863",
"0.5581817",
"0.5570734",
"0.5486225",
"0.5463023",
"0.54283375",
"0.5419566",
"0.54004765",
"0.53581536",
"0.5357812"... | 0.6551308 | 1 |
Sets the fields to sort the docs in the query's response | public void setSortByFields (LSPSortByField[] sortByFields) {
this.sortByFields = sortByFields;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public IScapSyncSearchSortField[] getSortFields();",
"public void sort() {\n documents.sort();\n }",
"void setOrderBy(DriveRequest<?> request, String orderBy);",
"public LSPSortByField[] getSortByFields () {\r\n return sortByFields;\r\n }",
"Map<String, org.springframework.batch.item.database.O... | [
"0.5965969",
"0.5907271",
"0.57433677",
"0.5677747",
"0.5636509",
"0.56012356",
"0.55409807",
"0.55235255",
"0.54880875",
"0.53064877",
"0.52593523",
"0.52330595",
"0.5222961",
"0.52033615",
"0.51823604",
"0.5180378",
"0.5174252",
"0.5117349",
"0.50372",
"0.5034885",
"0.50295... | 0.61278766 | 0 |
Returns whether to drop stop words in the query | public boolean getDropStop () {
return dropStop;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"default boolean isStopWord() {\n return meta(\"nlpcraft:nlp:stopword\");\n }",
"@Override\r\n\t\t\tpublic boolean isStopWord(String term) {\n\t\t\t\treturn false;\r\n\t\t\t}",
"public abstract boolean isStopWord(String term);",
"public boolean isStopWord(String word);",
"@Override\n\tprotected bo... | [
"0.76469684",
"0.7218512",
"0.7158909",
"0.7125654",
"0.6611979",
"0.65321225",
"0.64826685",
"0.644875",
"0.6365968",
"0.63224834",
"0.6239204",
"0.61797804",
"0.60797244",
"0.6054033",
"0.5871502",
"0.58561367",
"0.58466834",
"0.5711107",
"0.5705472",
"0.5703036",
"0.567010... | 0.49853975 | 71 |
Returns the minimum score a document needs to be included in the results | public double getMinDocScore () {
return minDocScore;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Number getMinimum() {\n return ((ADocument) getDocument()).min;\n }",
"public int getMinScore() {\r\n return minScore;\r\n\t}",
"public Score lowestScore()\n {\n Score lowest = new Score();\n int smallSoFar = 201;\n if(scores[0] == null)\n {\n return null;\... | [
"0.6971452",
"0.6859139",
"0.6629981",
"0.6526667",
"0.64182705",
"0.6346414",
"0.6229495",
"0.6208511",
"0.6184105",
"0.610947",
"0.60393435",
"0.59448767",
"0.5940508",
"0.59397465",
"0.5931145",
"0.5729946",
"0.5719003",
"0.57177216",
"0.57111007",
"0.5679689",
"0.5673604"... | 0.808497 | 0 |
Returns the maximum number of documents to be included in the results | public int getMaxDocs () {
return maxDocs;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public int maxDoc();",
"int getNumberOfDocuments();",
"int getDocumentCount();",
"Integer getMaxPageResults();",
"int numDocuments();",
"int getMaxResults();",
"protected int getMaxResults() {\n\t\treturn maxResults;\n\t}",
"public int size() {\n return documents.size();\n }",
"public ... | [
"0.7540535",
"0.74470174",
"0.72908926",
"0.7171013",
"0.68513274",
"0.68268585",
"0.67524636",
"0.6732651",
"0.669288",
"0.6638256",
"0.65974",
"0.6594569",
"0.65858155",
"0.65858155",
"0.65851516",
"0.6581131",
"0.6548021",
"0.64350235",
"0.6407701",
"0.6374274",
"0.6373356... | 0.77063787 | 0 |
Returns what version of protocol is being used. This is always STARTS 1.0 | public String getVersion () {
return version;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getProtocolVersion() {\n\tLogWriter.logMessage(LogWriter.TRACE_DEBUG,\"getProtocolVersion()\");\n Via via=(Via)sipHeader;\n return via.getProtocolVersion();\n }",
"public String getProtocolVersion() {\r\n return protocolVersion;\r\n }",
"public static int getProtocol() ... | [
"0.79589254",
"0.7830909",
"0.7810381",
"0.77893835",
"0.77039206",
"0.74176013",
"0.740392",
"0.734759",
"0.72917116",
"0.72138655",
"0.720213",
"0.7198987",
"0.711923",
"0.7040317",
"0.7024225",
"0.7004387",
"0.69959545",
"0.696974",
"0.6959148",
"0.6954222",
"0.69075304",
... | 0.6423964 | 46 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.