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 |
|---|---|---|---|---|---|---|
///////////////////////////////////////////////////////////////////////////////////used for forward chaining only ///////////////////////////////////////////////////////////////////////select a rule to fire based on specificity | public Rule selectRule(Vector ruleSet) {
Enumeration enum2 = ruleSet.elements() ;
long numClauses ;
Rule nextRule ;
Rule bestRule = (Rule)enum2.nextElement() ;
long max = bestRule.numAntecedents() ;
while (enum2.hasMoreElements()) {
nextRule = (Rule)enum2.nextElement() ;
if ((numClauses = nextRule.numAntecedents()) > max) {
max = numClauses ;
bestRule = nextRule ;
}
}
return bestRule ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Rule honorRules(InstanceWaypoint context){\n \t\t\n \t\tStyle style = getStyle(context);\n \t\tRule[] rules = SLD.rules(style);\n \t\t\n \t\t//do rules exist?\n \t\t\n \t\tif(rules == null || rules.length == 0){\n \t\t\treturn null;\n \t\t}\n \t\t\n \t\t\n \t\t//sort the elserules at the end\n \t\tif(rules... | [
"0.6521262",
"0.589344",
"0.5586065",
"0.5578872",
"0.5568958",
"0.5556402",
"0.54822",
"0.54280233",
"0.53585434",
"0.53502023",
"0.5321211",
"0.53035873",
"0.52756286",
"0.5221392",
"0.52130896",
"0.51910686",
"0.51556844",
"0.5153068",
"0.51519126",
"0.512781",
"0.51057535... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
protected void onResume() {
super.onResume();
updateBt(BT_VIRUS);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<String> getPageThemesByType(int id, int start, int maxCount) {
String hql="from Trip t where t.sequence.id=? order by t.serviceScore";
List<Trip> ts=getSession().createQuery(hql).setParameter(0, id).list();
List<String> list=new ArrayList<String>();
for(int i=start;i<start+maxCount&&i<ts.size();i++){
String theme=ts.get(i).getThemeontrips().iterator().next().getTheme().getName();
if(!list.contains(theme))
list.add(theme);
else
maxCount++;
}
return list;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<Theme> getThemeByName(String name) {
String hql="from Theme t where t.name=?";
return getSession().createQuery(hql).setParameter(0, name).list();
} | {
"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 |
/ Time Complexity O(n) Space Complexity O(1) Kadane's Algorithim Maximum Sum | public static int maximumSubArray(int arr[])
{
int sum=arr[0];
int maxSum = arr[0];
int n = arr.length;
for(int i=1;i<n;i++)
{
sum = Math.max(sum+arr[i], arr[i]);
maxSum = Math.max(maxSum, sum);
}
return maxSum;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static int maxSum()\n {\n // Find array sum and i*arr[i] with no rotation\n int arrSum = 0; // Stores sum of arr[i]\n int currVal = 0; // Stores sum of i*arr[i]\n for (int i=0; i<arr.length; i++)\n {\n arrSum = arrSum + arr[i];\n currVal = currVal+(i*ar... | [
"0.7240935",
"0.7227872",
"0.7144769",
"0.71074903",
"0.6926938",
"0.69224334",
"0.6911805",
"0.68712825",
"0.6773183",
"0.67534244",
"0.6738477",
"0.668517",
"0.6639001",
"0.6620849",
"0.6614504",
"0.66083175",
"0.65947276",
"0.6565034",
"0.6540337",
"0.6524759",
"0.6514379"... | 0.0 | -1 |
Create a Trigger with the given name, and group. | public AbstractTrigger(String name, String group, String jobName, String jobGroup) {
setName(name);
setGroup(group);
setJobName(jobName);
setJobGroup(jobGroup);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Nonnull\n public JDK8TriggerBuilder <T> withIdentity (final String name, final String group)\n {\n m_aTriggerKey = new TriggerKey (name, group);\n return this;\n }",
"public String createEventForGroup(String groupName) throws ParseException;",
"TriggerType createTriggerType();",
"public void create... | [
"0.6327168",
"0.58971566",
"0.57014585",
"0.5582321",
"0.5555977",
"0.5331999",
"0.52388555",
"0.5235219",
"0.5223564",
"0.51927745",
"0.5148791",
"0.5108757",
"0.50902355",
"0.5079169",
"0.5006604",
"0.49921846",
"0.4953912",
"0.49213076",
"0.4901366",
"0.48941147",
"0.48636... | 0.62004584 | 1 |
/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Interface. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get the name of this Trigger. | public String getName() {
return name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public EventName getName() {\n return this.name;\n }",
"public static String getTriggerField(){\n return WHAT_IS_THE_SOURCE_OF_FUNDS.getFieldNameValue();\n }",
"public String getName ( ) {\n\t\treturn extract ( handle -> handle.getName ( ) );\n\t}",
"ITrigger getTrigger(String sTriggerNam... | [
"0.7155335",
"0.6840671",
"0.6803958",
"0.6802454",
"0.6753956",
"0.6721266",
"0.6714002",
"0.6700054",
"0.6690587",
"0.66841125",
"0.6624713",
"0.66245687",
"0.6619379",
"0.6609503",
"0.65964615",
"0.65890473",
"0.65870506",
"0.65847063",
"0.6574639",
"0.6574639",
"0.6530992... | 0.0 | -1 |
Set the name of this Trigger. | public void setName(String name) {
if (name == null || name.trim().length() == 0) {
throw new IllegalArgumentException(
"Trigger name cannot be null or empty.");
}
this.name = name;
this.key = null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@IcalProperty(pindex = PropertyInfoIndex.NAME,\n required = true,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true)\n public void setName(final String val) {\n name = val;\n }",
"public void setName(String name) {\n\t\tthis.n... | [
"0.7416927",
"0.73762095",
"0.7369624",
"0.7353112",
"0.7353112",
"0.7334962",
"0.7310596",
"0.72887456",
"0.72887456",
"0.7279359",
"0.72772485",
"0.72731066",
"0.72708267",
"0.72708267",
"0.72578573",
"0.72578573",
"0.72578573",
"0.72578573",
"0.7237988",
"0.7237988",
"0.72... | 0.8429008 | 0 |
Get the group of this Trigger. | public String getGroup() {
return group;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getGroup() {\n\t\treturn group;\n\t}",
"public String getGroup() {\n return this.group;\n }",
"public Group getGroup() {\n return group;\n }",
"public String getGroup ()\n {\n return group;\n }",
"public String getGroup ()\n {\n r... | [
"0.76772094",
"0.76552945",
"0.763737",
"0.7619076",
"0.7619076",
"0.7583818",
"0.75316",
"0.7480858",
"0.72108364",
"0.7175308",
"0.7120999",
"0.7120999",
"0.7120999",
"0.7120999",
"0.7120999",
"0.7120999",
"0.7120999",
"0.7120999",
"0.7120999",
"0.7120999",
"0.7120999",
"... | 0.7678965 | 1 |
Set the name of this Trigger. | public void setGroup(String group) {
if (group != null && group.trim().length() == 0) {
throw new IllegalArgumentException(
"Group name cannot be an empty string.");
}
if(group == null) {
group = Scheduler.DEFAULT_GROUP;
}
this.group = group;
this.key = null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setName(String name) {\n if (name == null || name.trim().length() == 0) {\n throw new IllegalArgumentException(\n \"Trigger name cannot be null or empty.\");\n }\n\n this.name = name;\n this.key = null;\n }",
"@IcalProperty(pindex = Propert... | [
"0.8429008",
"0.7416927",
"0.73762095",
"0.7369624",
"0.7353112",
"0.7353112",
"0.7334962",
"0.7310596",
"0.72887456",
"0.72887456",
"0.7279359",
"0.72772485",
"0.72731066",
"0.72708267",
"0.72708267",
"0.72578573",
"0.72578573",
"0.72578573",
"0.72578573",
"0.7237988",
"0.72... | 0.0 | -1 |
Returns the 'full name' of the Trigger in the format "group.name". | public String getFullName() {
return group + "." + name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getName() {\n return String.format(\"%s %s\", getFirst(), getLast());\n }",
"public static String getTriggerField(){\n return WHAT_IS_THE_SOURCE_OF_FUNDS.getFieldNameValue();\n }",
"public String getNamePrefix() {\n if ( group==null )\n return super.getNamePrefix... | [
"0.6429217",
"0.62845325",
"0.6278667",
"0.6249849",
"0.6233518",
"0.6212298",
"0.6084226",
"0.6081472",
"0.6013476",
"0.5934209",
"0.59247106",
"0.59130186",
"0.590593",
"0.5847101",
"0.5764783",
"0.57040334",
"0.56875247",
"0.5670106",
"0.56489456",
"0.5627575",
"0.56191754... | 0.68031365 | 0 |
Returns the 'full name' of the Job that the Trigger points to, in the format "group.name". | public String getFullJobName() {
return jobGroup + "." + jobName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getTargetJobName();",
"public String getJobName() {\n return this.mJob;\n }",
"public java.lang.String getTargetJobName() {\n java.lang.Object ref = targetJobName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com... | [
"0.73927116",
"0.695819",
"0.6887139",
"0.6882644",
"0.6822708",
"0.6649235",
"0.6641678",
"0.6612197",
"0.6612197",
"0.64175606",
"0.6379597",
"0.6284903",
"0.6228807",
"0.62234086",
"0.6181453",
"0.6165885",
"0.61445624",
"0.6134066",
"0.61091363",
"0.6095681",
"0.6071495",... | 0.80713415 | 0 |
Return the description given to the Trigger instance by its creator (if any). | public String getDescription() {
return description;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract String getCreator();",
"public static String getTriggerField(){\n return WHAT_IS_THE_SOURCE_OF_FUNDS.getFieldNameValue();\n }",
"public String getCreator() {\n return this.creator;\n }",
"public String getCreator() {\r\n return creator;\r\n }",
"public String getCrea... | [
"0.6015498",
"0.59100884",
"0.59079754",
"0.58842033",
"0.58842033",
"0.5879691",
"0.5860999",
"0.5860999",
"0.5860999",
"0.5860999",
"0.5860999",
"0.5860999",
"0.5860999",
"0.5860999",
"0.5860999",
"0.57028335",
"0.55826235",
"0.55819803",
"0.5578651",
"0.5578651",
"0.557865... | 0.0 | -1 |
Set a description for the Trigger instance may be useful for remembering/displaying the purpose of the trigger, though the description has no meaning to Quartz. | public void setDescription(String description) {
this.description = description;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Nonnull\n public JDK8TriggerBuilder <T> withDescription (final String triggerDescription)\n {\n m_sDescription = triggerDescription;\n return this;\n }",
"public void setDescription(String description) {\n this.description = description;\r\n // changeSupport.firePropertyChange(\"descriptio... | [
"0.7379991",
"0.6930329",
"0.67860633",
"0.676121",
"0.676121",
"0.67476314",
"0.67427623",
"0.67427623",
"0.67427623",
"0.67427623",
"0.67427623",
"0.67427623",
"0.6728911",
"0.6717936",
"0.6717936",
"0.6717936",
"0.6717936",
"0.6717936",
"0.6695928",
"0.669506",
"0.6689888"... | 0.0 | -1 |
Get the JobDataMap that is associated with the Trigger. Changes made to this map during job execution are not repersisted, and in fact typically result in an IllegalStateException. | public JobDataMap getJobDataMap() {
if (jobDataMap == null) {
jobDataMap = new JobDataMap();
}
return jobDataMap;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ObservableList<Job> getJobData() {\n return jobData;\n }",
"public abstract Map<String, Trigger> getTriggers();",
"public Map<String, Object> getCurrentData() throws Exception;",
"JobConf getJobConf() {\n return jobConf;\n }",
"public void setJobDataMap(JobDataMap jobDataMap) {\n... | [
"0.5714544",
"0.5537865",
"0.53598726",
"0.52141684",
"0.5183257",
"0.5040619",
"0.501434",
"0.49732873",
"0.49484104",
"0.4943409",
"0.491317",
"0.49115026",
"0.49057534",
"0.48863098",
"0.4849254",
"0.4817827",
"0.48155585",
"0.47821745",
"0.47481975",
"0.47337267",
"0.4722... | 0.7602976 | 0 |
Set the JobDataMap to be associated with the Trigger. | public void setJobDataMap(JobDataMap jobDataMap) {
this.jobDataMap = jobDataMap;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void setTriggers(Map<String, Trigger> triggers);",
"public void setData(Map<E, String> data) {\n\t\tthis.data = data;\n\t}",
"public TriggerMessage(String processInstanceId, Object data) {\n\t\tthis.processInstanceId = processInstanceId;\n\t\tthis.payload = data;\n\t}",
"public void setHC_Job... | [
"0.5513042",
"0.5388933",
"0.52749383",
"0.52325594",
"0.52029014",
"0.5201245",
"0.50795686",
"0.5038368",
"0.5021187",
"0.50204265",
"0.49931684",
"0.4988868",
"0.4977638",
"0.4970052",
"0.49395403",
"0.49264887",
"0.49235004",
"0.49163583",
"0.4903892",
"0.49001476",
"0.48... | 0.7304204 | 0 |
The priority of a Trigger acts as a tiebreaker such that if two Triggers have the same scheduled fire time, then the one with the higher priority will get first access to a worker thread. If not explicitly set, the default value is 5. | public int getPriority() {
return priority;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public JDK8TriggerBuilder <T> withPriority (final int triggerPriority)\n {\n m_nPriority = triggerPriority;\n return this;\n }",
"private void raisePriority() {\n Thread cThr = Thread.currentThread();\n _priority = (byte)((cThr instanceof H2O.FJWThr) ? ((H2O.FJWThr)cThr)._priority+1 : super.priorit... | [
"0.6581204",
"0.63750756",
"0.58654255",
"0.57872784",
"0.57687396",
"0.57519656",
"0.57368976",
"0.57362884",
"0.57015675",
"0.56317073",
"0.55680794",
"0.55610746",
"0.5516108",
"0.54979515",
"0.54795104",
"0.5478579",
"0.54261315",
"0.54261315",
"0.5405267",
"0.5399298",
"... | 0.5189997 | 70 |
The priority of a Trigger acts as a tie breaker such that if two Triggers have the same scheduled fire time, then Quartz will do its best to give the one with the higher priority first access to a worker thread. If not explicitly set, the default value is 5. | public void setPriority(int priority) {
this.priority = priority;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public JDK8TriggerBuilder <T> withPriority (final int triggerPriority)\n {\n m_nPriority = triggerPriority;\n return this;\n }",
"private void raisePriority() {\n Thread cThr = Thread.currentThread();\n _priority = (byte)((cThr instanceof H2O.FJWThr) ? ((H2O.FJWThr)cThr)._priority+1 : super.priorit... | [
"0.6542818",
"0.6008161",
"0.56865484",
"0.565869",
"0.56510127",
"0.5648758",
"0.55603564",
"0.5481952",
"0.54753417",
"0.54635984",
"0.54482293",
"0.53701866",
"0.5362277",
"0.53369045",
"0.52934134",
"0.52779096",
"0.5261952",
"0.5257113",
"0.52195334",
"0.52157855",
"0.52... | 0.50965625 | 33 |
This method should not be used by the Quartz client. Called by the scheduler at the time a Trigger is first added to the scheduler, in order to have the Trigger compute its first fire time, based on any associated calendar. After this method has been called, getNextFireTime() should return a valid answer. | public abstract Date computeFirstFireTime(Calendar calendar); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract Date getNextFireTime();",
"public abstract Date getFinalFireTime();",
"@Test\n\t@Ignore\n\tpublic void testScheduler() {\n\t\torg.springframework.scheduling.support.CronTrigger trigger = new CronTrigger(\"0 0 0 * * *\");\n\t\tCalendar today = Calendar.getInstance();\n\t\ttoday.add(Calendar.DAY_... | [
"0.6937616",
"0.5957808",
"0.57517654",
"0.5750201",
"0.5733211",
"0.5591187",
"0.55682427",
"0.54332715",
"0.5390885",
"0.53863174",
"0.5381111",
"0.5364568",
"0.5359685",
"0.5333282",
"0.53171843",
"0.5314072",
"0.53067535",
"0.53058743",
"0.52816296",
"0.527264",
"0.516113... | 0.6465504 | 1 |
Get the time at which the Trigger should occur. | public abstract Date getStartTime(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getUpdateTriggerTime();",
"public int getUpdateTriggerTime() {\n return instance.getUpdateTriggerTime();\n }",
"public int getUpdateTriggerTime() {\n return updateTriggerTime_;\n }",
"public abstract Date getPreviousFireTime();",
"public abstract Date getFinalFireTime();",
"public... | [
"0.718352",
"0.70944744",
"0.7046346",
"0.7044609",
"0.6942304",
"0.68180615",
"0.6763391",
"0.66108966",
"0.65877146",
"0.65877146",
"0.65875405",
"0.6581069",
"0.65748346",
"0.65620375",
"0.6527075",
"0.65113306",
"0.64761734",
"0.64761734",
"0.64761734",
"0.6435556",
"0.64... | 0.0 | -1 |
The time at which the trigger's scheduling should start. May or may not be the first actual fire time of the trigger, depending upon the type of trigger and the settings of the other properties of the trigger. However the first actual first time will not be before this date. Setting a value in the past may cause a new trigger to compute a first fire time that is in the past, which may cause an immediate misfire of the trigger. | public abstract void setStartTime(Date startTime); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Date getDefaultStartTime()\r\n {\r\n return (m_defaultStartTime);\r\n }",
"public abstract Date getPreviousFireTime();",
"public abstract Date getNextFireTime();",
"public Date getStartTime() {\n\t\treturn getOriginatingTime();\n\t}",
"public abstract Date getFinalFireTime();",
"public Ti... | [
"0.65434545",
"0.64940107",
"0.6409908",
"0.63867986",
"0.6299049",
"0.6230454",
"0.6227341",
"0.61749685",
"0.61354226",
"0.6118681",
"0.6116968",
"0.61114794",
"0.60861444",
"0.6030594",
"0.60202736",
"0.59861916",
"0.5957326",
"0.5957326",
"0.59554243",
"0.59554243",
"0.59... | 0.0 | -1 |
Set the time at which the Trigger should quit repeating regardless of any remaining repeats (based on the trigger's particular repeat settings). | public abstract void setEndTime(Date endTime); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setTime(int start, int end, int repeat)\n {\n if (start == end) setTime(start);\n else\n {\n this.start = start;\n this.end = end;\n this.repeat = repeat;\n }\n }",
"public static void resetTime() {\n\t\ttime = TimeUtils.millis();\n\t... | [
"0.5935052",
"0.5887371",
"0.58515924",
"0.58059025",
"0.57997274",
"0.57943785",
"0.57784075",
"0.5759101",
"0.5740267",
"0.57039833",
"0.5677229",
"0.5631681",
"0.5584546",
"0.55746573",
"0.5560352",
"0.5545186",
"0.5529034",
"0.55266345",
"0.55078465",
"0.5490261",
"0.5475... | 0.0 | -1 |
Get the time at which the Trigger should quit repeating regardless of any remaining repeats (based on the trigger's particular repeat settings). | public abstract Date getEndTime(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getEndTime()\n {\n if (isRepeated()) return end;\n else return time;\n }",
"public int getTime()\n {\n if (isRepeated()) return start;\n else return time;\n }",
"public int getRepeatInterval()\n {\n if (isRepeated()) return repeat;\n else retu... | [
"0.6362243",
"0.61022365",
"0.6080687",
"0.59752697",
"0.58338106",
"0.58175737",
"0.5780848",
"0.57694775",
"0.5722594",
"0.57143277",
"0.5694223",
"0.5663494",
"0.56193656",
"0.5613759",
"0.56110716",
"0.5582631",
"0.5561066",
"0.5560448",
"0.555927",
"0.55144626",
"0.55043... | 0.0 | -1 |
Returns the next time at which the Trigger is scheduled to fire. If the trigger will not fire again, null will be returned. Note that the time returned can possibly be in the past, if the time that was computed for the trigger to next fire has already arrived, but the scheduler has not yet been able to fire the trigger (which would likely be due to lack of resources e.g. threads). The value returned is not guaranteed to be valid until after the Trigger has been added to the scheduler. | public abstract Date getNextFireTime(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getNextTime(){\n\t\tif(timeoutSet.peek() == null && eventSet.peek() == null) return Double.MAX_VALUE;\n\t\telse if(eventSet.peek() != null && timeoutSet.peek() != null) return Math.min(eventSet.peek().getTime(), timeoutSet.peek().getTime());\n\t\telse if(eventSet.peek() == null && timeoutSet.peek() !... | [
"0.66930324",
"0.65551305",
"0.6423434",
"0.60011387",
"0.57688534",
"0.5672416",
"0.5665899",
"0.5593646",
"0.55690396",
"0.5514951",
"0.54087186",
"0.5396792",
"0.5386823",
"0.5294309",
"0.52757806",
"0.5263939",
"0.52497923",
"0.52150494",
"0.52010846",
"0.51768017",
"0.51... | 0.6273861 | 3 |
Returns the previous time at which the Trigger fired. If the trigger has not yet fired, null will be returned. | public abstract Date getPreviousFireTime(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getUpdateTriggerTime() {\n return instance.getUpdateTriggerTime();\n }",
"int getUpdateTriggerTime();",
"public double getLastTime()\n\t{\n\t\tdouble time = Double.NaN;\n\t\tfinal Entry< Double, V > entry = getLastEntry();\n\t\tif( entry != null )\n\t\t{\n\t\t\ttime = entry.getKey();\n\t... | [
"0.62390924",
"0.6195274",
"0.6152098",
"0.6141449",
"0.6125025",
"0.59802306",
"0.5931242",
"0.5900334",
"0.5891104",
"0.5859611",
"0.58583933",
"0.5816834",
"0.5774656",
"0.5764481",
"0.5753705",
"0.57458854",
"0.56806564",
"0.56716555",
"0.56398726",
"0.56396735",
"0.56390... | 0.7021419 | 0 |
Returns the next time at which the Trigger will fire, after the given time. If the trigger will not fire after the given time, null will be returned. | public abstract Date getFireTimeAfter(Date afterTime); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract Date getNextFireTime();",
"public double getNextTime(){\n\t\tif(timeoutSet.peek() == null && eventSet.peek() == null) return Double.MAX_VALUE;\n\t\telse if(eventSet.peek() != null && timeoutSet.peek() != null) return Math.min(eventSet.peek().getTime(), timeoutSet.peek().getTime());\n\t\telse if(e... | [
"0.6271457",
"0.6049722",
"0.59163564",
"0.58150005",
"0.5753085",
"0.5701746",
"0.5693483",
"0.56664425",
"0.55311126",
"0.5391647",
"0.52839506",
"0.5274492",
"0.51841956",
"0.51705426",
"0.51239574",
"0.5094456",
"0.5080782",
"0.5070003",
"0.50683063",
"0.50550675",
"0.501... | 0.6455401 | 0 |
Returns the last time at which the Trigger will fire, if the Trigger will repeat indefinitely, null will be returned. Note that the return time may be in the past. | public abstract Date getFinalFireTime(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long lastTime()\r\n/* 219: */ {\r\n/* 220:412 */ return this.lastTime.get();\r\n/* 221: */ }",
"public double getLastTime()\n\t{\n\t\tdouble time = Double.NaN;\n\t\tfinal Entry< Double, V > entry = getLastEntry();\n\t\tif( entry != null )\n\t\t{\n\t\t\ttime = entry.getKey();\n\t\t}\n\t\tretu... | [
"0.6925157",
"0.678661",
"0.66117406",
"0.6522349",
"0.6505575",
"0.6487196",
"0.64124465",
"0.63961816",
"0.63946897",
"0.63525194",
"0.633567",
"0.6286013",
"0.6280388",
"0.62648743",
"0.623932",
"0.6216139",
"0.6188523",
"0.6143847",
"0.61407787",
"0.6124703",
"0.60780346"... | 0.64589334 | 6 |
Set the instruction the Scheduler should be given for handling misfire situations for this Trigger the concrete Trigger type that you are using will have defined a set of additional MISFIRE_INSTRUCTION_XXX constants that may be passed to this method. If not explicitly set, the default value is MISFIRE_INSTRUCTION_SMART_POLICY. | public void setMisfireInstruction(int misfireInstruction) {
if (!validateMisfireInstruction(misfireInstruction)) {
throw new IllegalArgumentException(
"The misfire instruction code is invalid for this type of trigger.");
}
this.misfireInstruction = misfireInstruction;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getMisfireInstruction() {\n return misfireInstruction;\n }",
"public void setInstruction(Instruction instruction) {\n this.instruction = instruction;\n }",
"public void setInstruction(String instruction)\n\t\t{\n\t\t\tif(instruction == null)\n\t\t\t{\n\t\t\t\tinstruction = \"\";\... | [
"0.6086663",
"0.6035634",
"0.59254485",
"0.55300516",
"0.49112815",
"0.4766693",
"0.47277924",
"0.4722473",
"0.47129998",
"0.46970367",
"0.4660434",
"0.465214",
"0.46313584",
"0.46308112",
"0.4595625",
"0.45774606",
"0.45287544",
"0.45112327",
"0.45056957",
"0.4484375",
"0.44... | 0.7215486 | 0 |
Get the instruction the Scheduler should be given for handling misfire situations for this Trigger the concrete Trigger type that you are using will have defined a set of additional MISFIRE_INSTRUCTION_XXX constants that may be passed to this method. If not explicitly set, the default value is MISFIRE_INSTRUCTION_SMART_POLICY. | public int getMisfireInstruction() {
return misfireInstruction;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setMisfireInstruction(int misfireInstruction) {\n if (!validateMisfireInstruction(misfireInstruction)) {\n throw new IllegalArgumentException(\n \"The misfire instruction code is invalid for this type of trigger.\");\n }\n this.misfireInstruction =... | [
"0.6126239",
"0.5432007",
"0.53310525",
"0.5274733",
"0.525124",
"0.5150794",
"0.47903353",
"0.46776175",
"0.46748927",
"0.4667337",
"0.46427298",
"0.4502734",
"0.44497293",
"0.44493115",
"0.44414136",
"0.4416542",
"0.4392056",
"0.43628836",
"0.43575886",
"0.4320478",
"0.4310... | 0.679019 | 0 |
This method should not be used by the Quartz client. To be implemented by the concrete classes that extend this class. The implementation should update the Trigger's state based on the MISFIRE_INSTRUCTION_XXX that was selected when the Trigger was created. | public abstract void updateAfterMisfire(Calendar cal); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void onTrigger();",
"public abstract void setTriggerOrAction();",
"@Override\n\t\tvoid runCommand() {\n\t\t\ttrigger.execute();\n\t\t}",
"public void setMisfireInstruction(int misfireInstruction) {\n if (!validateMisfireInstruction(misfireInstruction)) {\n throw new IllegalA... | [
"0.63564503",
"0.5930465",
"0.59111786",
"0.58512616",
"0.58465844",
"0.5825759",
"0.57489645",
"0.56265587",
"0.56020916",
"0.5598569",
"0.5586958",
"0.5570329",
"0.55645716",
"0.55349463",
"0.55148",
"0.5416014",
"0.5413852",
"0.53941554",
"0.5381003",
"0.5369249",
"0.53487... | 0.0 | -1 |
This method should not be used by the Quartz client. To be implemented by the concrete class. The implementation should update the Trigger's state based on the given new version of the associated Calendar (the state should be updated so that it's next fire time is appropriate given the Calendar's new settings). | public abstract void updateWithNewCalendar(Calendar cal, long misfireThreshold); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void triggerEvent() {\n\t\ts.changeOpenState();\n\t\ts.setChangedAndNotify();\n\t\t\n\t}",
"public abstract void updateAfterMisfire(Calendar cal);",
"void rescheduleAJob(String oldTriggerName, String oldTriggerGroup, Trigger newTrigger);",
"@Override\n\tpublic void eventDate(Date newDate) {\n\t\t\n\t}... | [
"0.5733932",
"0.5647571",
"0.55533177",
"0.5427889",
"0.5427256",
"0.5407242",
"0.52759516",
"0.525091",
"0.5237475",
"0.5225869",
"0.51524365",
"0.5126995",
"0.51075596",
"0.5098891",
"0.50875586",
"0.50854844",
"0.50701314",
"0.5054463",
"0.50265",
"0.5023134",
"0.5017639",... | 0.619571 | 0 |
Validates whether the properties of the JobDetail are valid for submission into a Scheduler. | public void validate() throws SchedulerException {
if (name == null) {
throw new SchedulerException("Trigger's name cannot be null");
}
if (group == null) {
throw new SchedulerException("Trigger's group cannot be null");
}
if (jobName == null) {
throw new SchedulerException(
"Trigger's related Job's name cannot be null");
}
if (jobGroup == null) {
throw new SchedulerException(
"Trigger's related Job's group cannot be null");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void validateSchedular() {\n boolean startDateCheck = false, cronTimeCheck = false, dateFormatCheck = false;\n /*\n Schedular Properties\n */\n\n System.out.println(\"Date: \" + startDate.getValue());\n if (startDate.getValue() != null) {\n System.ou... | [
"0.6514474",
"0.58681446",
"0.57570493",
"0.5660065",
"0.55481315",
"0.5515282",
"0.55035526",
"0.545766",
"0.5412142",
"0.5410052",
"0.53563106",
"0.52398926",
"0.52354956",
"0.52351445",
"0.52307975",
"0.52102566",
"0.5197347",
"0.51844937",
"0.5177073",
"0.51741934",
"0.51... | 0.6512955 | 1 |
This method should not be used by the Quartz client. | public String getFireInstanceId() {
return fireInstanceId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void scheduleJob() {\n\n }",
"protected void beforeJobExecution() {\n\t}",
"public void execute(JobExecutionContext context) throws JobExecutionException {\n \tSystem.out.println(\"This is a scheduled job for HRIS using Quartz 2.2.1 running every 10 minutes\");\n \tSystem.out.println(\... | [
"0.6429403",
"0.6362516",
"0.60564476",
"0.6039762",
"0.5967015",
"0.59361976",
"0.5930101",
"0.59184974",
"0.5827934",
"0.57889247",
"0.577941",
"0.57676387",
"0.575597",
"0.57197416",
"0.57197416",
"0.57197416",
"0.57180625",
"0.5708841",
"0.56926984",
"0.5682859",
"0.56606... | 0.0 | -1 |
Return a simple string representation of this object. | @Override
public String toString() {
return "Trigger '" + getFullName() + "': triggerClass: '"
+ getClass().getName() + " calendar: '" + getCalendarName()
+ "' misfireInstruction: " + getMisfireInstruction()
+ " nextFireTime: " + getNextFireTime();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String toString() { return stringify(this, true); }",
"public String toString() {\n\t\treturn this.toJSON().toString();\n\t}",
"public String toString() {\n\t\treturn this.toJSON().toString();\n\t}",
"@Override\n public String toString() {\n // TODO: Using Serializer\n return Serializ... | [
"0.85209006",
"0.841777",
"0.841777",
"0.8366974",
"0.83522326",
"0.82382506",
"0.81876093",
"0.8168637",
"0.8142355",
"0.81271034",
"0.8122489",
"0.8105754",
"0.8081656",
"0.8078452",
"0.8054295",
"0.8035403",
"0.8006206",
"0.7991388",
"0.79908043",
"0.7911887",
"0.7888493",... | 0.0 | -1 |
Compare the next fire time of this Trigger to that of another by comparing their keys, or in other words, sorts them according to the natural (i.e. alphabetical) order of their keys. | public int compareTo(Trigger other) {
if(other.getKey() == null && getKey() == null)
return 0;
if(other.getKey() == null)
return -1;
if(getKey() == null)
return 1;
return getKey().compareTo(other.getKey());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\t\t\t\tpublic int compare(twi arg0, twi arg1) {\n\t\t\t\t\tif (arg0.timestamp > arg1.timestamp) {\r\n\t\t\t\t\t\treturn -1;\r\n\t\t\t\t\t} else if (arg0.timestamp < arg1.timestamp) {\r\n\t\t\t\t\t\treturn 1;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}",
"@Override\n\t... | [
"0.59415233",
"0.58007926",
"0.5771608",
"0.57273114",
"0.5716339",
"0.5702798",
"0.56408376",
"0.55707",
"0.55703145",
"0.5531499",
"0.5496987",
"0.5462607",
"0.5459532",
"0.5453181",
"0.54478955",
"0.54365873",
"0.54150665",
"0.5407493",
"0.5402779",
"0.53999925",
"0.539380... | 0.65033805 | 0 |
Trigger equality is based upon the equality of the TriggerKey. | @Override
public boolean equals(Object o) {
if(!(o instanceof Trigger))
return false;
Trigger other = (Trigger)o;
return !(other.getKey() == null || getKey() == null) && getKey().equals(other.getKey());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean equals(final Object obj) {\n if (obj instanceof FlowTriggerEvent) {\n FlowTriggerEvent te2 = (FlowTriggerEvent) obj;\n if (type == te2.type && name.equals(te2.name)\n && ((payload == null && te2.payload == null)\n || (pay... | [
"0.6319926",
"0.61255985",
"0.6032469",
"0.60120094",
"0.5995465",
"0.5732173",
"0.57080233",
"0.567004",
"0.5604735",
"0.55966014",
"0.5564081",
"0.55259854",
"0.5508978",
"0.54320496",
"0.5413017",
"0.54028445",
"0.54012483",
"0.53783774",
"0.53758955",
"0.5372334",
"0.5344... | 0.7611459 | 0 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
buttonGroup1 = new javax.swing.ButtonGroup();
jFrame1 = new javax.swing.JFrame();
mainPanel = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
flds_classname = new javax.swing.JTextField();
btn_constructor = new javax.swing.JRadioButton();
btn_fields = new javax.swing.JRadioButton();
btn_methods = new javax.swing.JRadioButton();
jScrollPane1 = new javax.swing.JScrollPane();
flds_tb = new javax.swing.JTextArea();
statusPanel = new javax.swing.JPanel();
javax.swing.JSeparator statusPanelSeparator = new javax.swing.JSeparator();
statusMessageLabel = new javax.swing.JLabel();
statusAnimationLabel = new javax.swing.JLabel();
progressBar = new javax.swing.JProgressBar();
menuBar = new javax.swing.JMenuBar();
javax.swing.JMenu fileMenu = new javax.swing.JMenu();
javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem();
javax.swing.JMenu helpMenu = new javax.swing.JMenu();
javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem();
jFrame1.setName("jFrame1"); // NOI18N
jFrame1.setResizable(false);
mainPanel.setName("mainPanel"); // NOI18N
org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(addsub.AddSubApp.class).getContext().getResourceMap(AddSubView.class);
jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
jLabel1.setName("jLabel1"); // NOI18N
flds_classname.setText(resourceMap.getString("flds_classname.text")); // NOI18N
flds_classname.setName("flds_classname"); // NOI18N
flds_classname.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyReleased(java.awt.event.KeyEvent evt) {
flds_classnameKeyReleased(evt);
}
});
buttonGroup1.add(btn_constructor);
btn_constructor.setSelected(true);
btn_constructor.setText(resourceMap.getString("btn_constructor.text")); // NOI18N
btn_constructor.setName("btn_constructor"); // NOI18N
btn_constructor.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
btn_constructorMouseClicked(evt);
}
});
buttonGroup1.add(btn_fields);
btn_fields.setText(resourceMap.getString("btn_fields.text")); // NOI18N
btn_fields.setName("btn_fields"); // NOI18N
btn_fields.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
btn_fieldsMouseClicked(evt);
}
});
buttonGroup1.add(btn_methods);
btn_methods.setText(resourceMap.getString("btn_methods.text")); // NOI18N
btn_methods.setName("btn_methods"); // NOI18N
btn_methods.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
btn_methodsMouseClicked(evt);
}
});
jScrollPane1.setName("jScrollPane1"); // NOI18N
flds_tb.setColumns(20);
flds_tb.setRows(5);
flds_tb.setName("flds_tb"); // NOI18N
jScrollPane1.setViewportView(flds_tb);
javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel);
mainPanel.setLayout(mainPanelLayout);
mainPanelLayout.setHorizontalGroup(
mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(mainPanelLayout.createSequentialGroup()
.addGap(33, 33, 33)
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(mainPanelLayout.createSequentialGroup()
.addComponent(jLabel1)
.addGap(33, 33, 33))
.addGroup(mainPanelLayout.createSequentialGroup()
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(mainPanelLayout.createSequentialGroup()
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(btn_fields)
.addComponent(btn_methods))
.addGap(15, 15, 15))
.addComponent(btn_constructor))
.addGap(18, 18, 18)))
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 472, Short.MAX_VALUE)
.addComponent(flds_classname, javax.swing.GroupLayout.PREFERRED_SIZE, 472, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(80, Short.MAX_VALUE))
);
mainPanelLayout.setVerticalGroup(
mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, mainPanelLayout.createSequentialGroup()
.addGap(29, 29, 29)
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel1)
.addComponent(flds_classname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(mainPanelLayout.createSequentialGroup()
.addGap(26, 26, 26)
.addComponent(btn_constructor)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btn_fields)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(btn_methods))
.addGroup(mainPanelLayout.createSequentialGroup()
.addGap(18, 18, 18)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 215, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(30, 30, 30))
);
statusPanel.setName("statusPanel"); // NOI18N
statusPanelSeparator.setName("statusPanelSeparator"); // NOI18N
statusMessageLabel.setName("statusMessageLabel"); // NOI18N
statusAnimationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
statusAnimationLabel.setName("statusAnimationLabel"); // NOI18N
progressBar.setName("progressBar"); // NOI18N
javax.swing.GroupLayout statusPanelLayout = new javax.swing.GroupLayout(statusPanel);
statusPanel.setLayout(statusPanelLayout);
statusPanelLayout.setHorizontalGroup(
statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(statusPanelSeparator, javax.swing.GroupLayout.DEFAULT_SIZE, 700, Short.MAX_VALUE)
.addGroup(statusPanelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(statusMessageLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 525, Short.MAX_VALUE)
.addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(statusAnimationLabel)
.addContainerGap())
);
statusPanelLayout.setVerticalGroup(
statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(statusPanelLayout.createSequentialGroup()
.addComponent(statusPanelSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(statusMessageLabel)
.addComponent(statusAnimationLabel)
.addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(3, 3, 3))
);
menuBar.setName("menuBar"); // NOI18N
fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N
fileMenu.setName("fileMenu"); // NOI18N
javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(addsub.AddSubApp.class).getContext().getActionMap(AddSubView.class, this);
exitMenuItem.setAction(actionMap.get("quit")); // NOI18N
exitMenuItem.setName("exitMenuItem"); // NOI18N
fileMenu.add(exitMenuItem);
menuBar.add(fileMenu);
helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N
helpMenu.setName("helpMenu"); // NOI18N
aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N
aboutMenuItem.setName("aboutMenuItem"); // NOI18N
helpMenu.add(aboutMenuItem);
menuBar.add(helpMenu);
jFrame1.setJMenuBar(menuBar);
javax.swing.GroupLayout jFrame1Layout = new javax.swing.GroupLayout(jFrame1.getContentPane());
jFrame1.getContentPane().setLayout(jFrame1Layout);
jFrame1Layout.setHorizontalGroup(
jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(mainPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(statusPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
jFrame1Layout.setVerticalGroup(
jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jFrame1Layout.createSequentialGroup()
.addComponent(mainPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 306, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 19, Short.MAX_VALUE)
.addComponent(statusPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
);
setComponent(mainPanel);
setMenuBar(menuBar);
setStatusBar(statusPanel);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n ... | [
"0.73195875",
"0.7291065",
"0.7291065",
"0.7291065",
"0.7286258",
"0.7248489",
"0.7213822",
"0.7208757",
"0.7195916",
"0.7190243",
"0.7184025",
"0.71591616",
"0.7148041",
"0.70930153",
"0.7080625",
"0.7056986",
"0.6987694",
"0.69770867",
"0.6955136",
"0.69538426",
"0.69452894... | 0.0 | -1 |
//GENEND:initComponents events due key pressed into textbox....... | private void flds_classnameKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_flds_classnameKeyReleased
// only update if class is changed..
if (!AddSubApp.getClassName().equals(this.flds_classname.getText()) ){
AddSubApp.setClassName(this.flds_classname.getText());
/* updatint textbox for info display*/
if (this.btn_constructor.isSelected()){
this.flds_tb.setText(AddSubApp.getConstructorsText());
}
else if (this.btn_fields.isSelected()){
this.flds_tb.setText(AddSubApp.getFieldsText());
}
else if (this.btn_methods.isSelected()){
this.flds_tb.setText(AddSubApp.getMethodsText());
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void jTextField1KeyPressed(java.awt.event.KeyEvent evt) {\n \n }",
"private void txtNamaKeyPressed(java.awt.event.KeyEvent evt) {\n\n }",
"private void codigoProductoTBKeyPressed(java.awt.event.KeyEvent evt) {\n }",
"private void vatTxtKeyTyped(java.awt.event.KeyEvent evt) {\n }",
"@... | [
"0.7726246",
"0.75353587",
"0.7188154",
"0.7110412",
"0.7049336",
"0.69670993",
"0.69193566",
"0.68532306",
"0.68193614",
"0.67725265",
"0.67703027",
"0.67635137",
"0.6728431",
"0.6721809",
"0.67057294",
"0.66730845",
"0.6653765",
"0.66517895",
"0.66160095",
"0.6596082",
"0.6... | 0.0 | -1 |
repeated string resource_patterns = 2; | java.util.List<java.lang.String>
getResourcePatternsList(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getResourcePatternsCount();",
"java.lang.String getResourcePatterns(int index);",
"static int getNumPatterns() { return 64; }",
"com.google.protobuf.ByteString\n getResourcePatternsBytes(int index);",
"public void setPattern(String pattern)\n/* */ {\n/* 71 */ setPatterns... | [
"0.70099646",
"0.6625953",
"0.63169163",
"0.596186",
"0.5754644",
"0.5639238",
"0.55445486",
"0.5432659",
"0.54206693",
"0.5414246",
"0.5296294",
"0.5295093",
"0.5276571",
"0.52438676",
"0.5226451",
"0.5218071",
"0.51119006",
"0.5101573",
"0.5089008",
"0.50751805",
"0.5065234... | 0.6148779 | 3 |
repeated string resource_patterns = 2; | int getResourcePatternsCount(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getResourcePatterns(int index);",
"static int getNumPatterns() { return 64; }",
"java.util.List<java.lang.String>\n getResourcePatternsList();",
"com.google.protobuf.ByteString\n getResourcePatternsBytes(int index);",
"public void setPattern(String pattern)\n/* ... | [
"0.6625953",
"0.63169163",
"0.6148779",
"0.596186",
"0.5754644",
"0.5639238",
"0.55445486",
"0.5432659",
"0.54206693",
"0.5414246",
"0.5296294",
"0.5295093",
"0.5276571",
"0.52438676",
"0.5226451",
"0.5218071",
"0.51119006",
"0.5101573",
"0.5089008",
"0.50751805",
"0.5065234"... | 0.70099646 | 0 |
repeated string resource_patterns = 2; | java.lang.String getResourcePatterns(int index); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getResourcePatternsCount();",
"static int getNumPatterns() { return 64; }",
"java.util.List<java.lang.String>\n getResourcePatternsList();",
"com.google.protobuf.ByteString\n getResourcePatternsBytes(int index);",
"public void setPattern(String pattern)\n/* */ {\n/* 71 ... | [
"0.70102745",
"0.63171977",
"0.614899",
"0.5962302",
"0.5754785",
"0.56401736",
"0.55445844",
"0.5433226",
"0.5420315",
"0.54146755",
"0.52962816",
"0.52954173",
"0.5276438",
"0.5243955",
"0.5226408",
"0.52184",
"0.51119876",
"0.5101496",
"0.5089172",
"0.5075194",
"0.5065478"... | 0.662616 | 1 |
repeated string resource_patterns = 2; | com.google.protobuf.ByteString
getResourcePatternsBytes(int index); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getResourcePatternsCount();",
"java.lang.String getResourcePatterns(int index);",
"static int getNumPatterns() { return 64; }",
"java.util.List<java.lang.String>\n getResourcePatternsList();",
"public void setPattern(String pattern)\n/* */ {\n/* 71 */ setPatterns(new Str... | [
"0.70099646",
"0.6625953",
"0.63169163",
"0.6148779",
"0.5754644",
"0.5639238",
"0.55445486",
"0.5432659",
"0.54206693",
"0.5414246",
"0.5296294",
"0.5295093",
"0.5276571",
"0.52438676",
"0.5226451",
"0.5218071",
"0.51119006",
"0.5101573",
"0.5089008",
"0.50751805",
"0.506523... | 0.596186 | 4 |
Call the menu class and the show function The show function outputs the menu for the user and allows the user to pick an option and change the picture around | public static void main(String[] args) throws Throwable {
System.out.println();
System.out.println("|Please read the README.txt for instructions |");
System.out.println("|Or please follow steps 1 - 4 to generate image |");
System.out.println("|=============================================================|");
System.out.println();
new Menu().show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void show() {\n texturaFondo = new Texture(\"fondoMenu.jpg\");\n\n crearMenu();\n }",
"private static void showMenu(){\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"What would you like to do?\");\r\n\t\tSystem.out.println(\"0) Show Shape information\");\r\n\t\tSy... | [
"0.7436625",
"0.735524",
"0.7094734",
"0.70544606",
"0.6986207",
"0.69772977",
"0.6937371",
"0.6895071",
"0.6884481",
"0.6847553",
"0.67663294",
"0.6745555",
"0.6732764",
"0.67188853",
"0.67084473",
"0.66819066",
"0.6678628",
"0.6645895",
"0.66456914",
"0.66396034",
"0.663193... | 0.0 | -1 |
Constructor defaults to left join | public FetchJoinInformation(String property) {
this(property, JoinType.LEFT);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void leftJoin(){\n\t\t\n\t\tCriteriaBuilder criteriaBuilder = em.getCriteriaBuilder();\n\t\tCriteriaQuery<Course> criteriaQuery = criteriaBuilder.createQuery(Course.class);\n\t\t\n\t\t//Define Roots\n\t\tRoot<Course> courseRoot = criteriaQuery.from(Course.class);\n\t\t\n\t\t//Define Predicates\n\t\... | [
"0.6853452",
"0.66320306",
"0.65926135",
"0.6185741",
"0.60928905",
"0.60616994",
"0.60538393",
"0.5994545",
"0.59095925",
"0.5887951",
"0.5833282",
"0.57745874",
"0.5764654",
"0.57643",
"0.57513636",
"0.57206243",
"0.57035136",
"0.56855255",
"0.56672937",
"0.55381423",
"0.55... | 0.56077474 | 19 |
Creates an array based on the specified vararg | public static FetchJoinInformation[] of(FetchJoinInformation... joins) {
return joins;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Array createArray();",
"ArrayValue createArrayValue();",
"public static <T> T[] createArray (T... args) {\n\tif (args == null) { return (T[]) new Object[0]; };\n\treturn args;\n }",
"public static IntegerVarArray make(int[] buffer) {\n\t\treturn new IntegerVarArray(buffer);\n\t}",
"static <T> T[] toArray(... | [
"0.7400976",
"0.6651443",
"0.6500103",
"0.63160306",
"0.62472653",
"0.62185",
"0.620125",
"0.6171681",
"0.6023878",
"0.59461343",
"0.5917444",
"0.59154373",
"0.5843981",
"0.5833815",
"0.58202326",
"0.5809798",
"0.579081",
"0.57698816",
"0.5767366",
"0.5734805",
"0.57313615",
... | 0.0 | -1 |
Create a FetchJoinInformation based on the provided property | public static FetchJoinInformation of(String property) {
return new FetchJoinInformation(property);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static FetchJoinInformation of(String property, JoinType joinType) {\n\t\treturn new FetchJoinInformation(property, joinType);\n\t}",
"public FetchJoinInformation(String property) {\n\t\tthis(property, JoinType.LEFT);\n\t}",
"Join createJoin();",
"private void handleJoinColumns(JsonNode propertyNode, ... | [
"0.72232527",
"0.7179222",
"0.59034336",
"0.56891525",
"0.5679078",
"0.55855596",
"0.534519",
"0.52904266",
"0.5061375",
"0.5043494",
"0.5036525",
"0.49917153",
"0.49821115",
"0.47902575",
"0.4785159",
"0.47505865",
"0.46812624",
"0.46495903",
"0.46239984",
"0.45934758",
"0.4... | 0.8072848 | 0 |
Create a FetchJoinInformation based on the provided property and join type | public static FetchJoinInformation of(String property, JoinType joinType) {
return new FetchJoinInformation(property, joinType);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static FetchJoinInformation of(String property) {\n\t\treturn new FetchJoinInformation(property);\n\t}",
"public FetchJoinInformation(String property) {\n\t\tthis(property, JoinType.LEFT);\n\t}",
"@Override\n public ActualProperties visitIndexJoin(IndexJoinNode node, List<ActualProperties> inputP... | [
"0.73012286",
"0.6594061",
"0.6180818",
"0.6063528",
"0.59948725",
"0.5612186",
"0.54566115",
"0.54537135",
"0.54219127",
"0.54187",
"0.5405297",
"0.5233083",
"0.520949",
"0.5182683",
"0.501027",
"0.49321377",
"0.49287683",
"0.4924309",
"0.4921457",
"0.49105287",
"0.48371428"... | 0.7848682 | 0 |
TODO Autogenerated method stub | public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("XAC DINH SO HOAN HAO");
System.out.println();
int j = 0;
while (j < j+1)
{
int number;//biến số nhập vào
do
{
//nhập số cần xác định
System.out.print("Nhap so can xac dinh: ");
number = scan.nextInt();
}
while (number < 0); //bắt người dùng nhập số dương
int i; //khai báo biến i dùng để thực hiện bài toán
int sumDivisor = 0; //tổng các ước
for (i = 1; i < number ;i++ )
{
if (number % i == 0)
{
sumDivisor += i;
}
}
//xác định số đó có phải số hoàn hảo hay không
if (sumDivisor == number)
{
System.out.println(number +" La so hoan hao.");
}
else
{
System.out.println(number + " Khong phai la so hoan hao.");
}
System.out.println();
}
} | {
"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 |
Initializes the controller class. | @Override
public void initialize(URL url, ResourceBundle rb) {
// TODO
single_count.setItems(options);
single_count.setValue(options.get(0));
double_count.setItems(options);
double_count.setValue(options.get(0));
from_date.getChronology().dateNow();
from_date.setValue(Trip_plan.city_start);
//System.out.println(LocalDate.now());
final Callback<DatePicker, DateCell> dayCellFactory
= new Callback<DatePicker, DateCell>() {
@Override
public DateCell call(final DatePicker datePicker) {
return new DateCell() {
@Override
public void updateItem(LocalDate item, boolean empty) {
super.updateItem(item, empty);
if (item.isBefore(
Trip_plan.city_start)) {
// System.out.println("hey");
setDisable(true);
setStyle("-fx-background-color: #ffc0cb;");
}
}
};
}
};
from_date.setDayCellFactory(dayCellFactory);
final Callback<DatePicker, DateCell> dayCelFactory
= new Callback<DatePicker, DateCell>() {
@Override
public DateCell call(final DatePicker datePicker) {
return new DateCell() {
@Override
public void updateItem(LocalDate item, boolean empty) {
super.updateItem(item, empty);
if (item.isAfter(
Trip_plan.city_end)||(item.isBefore(from_date.getValue()))) {
// System.out.println("hey");
setDisable(true);
setStyle("-fx-background-color: #ffc0cb;");
}
}
};
}
};
to_date.setDayCellFactory(dayCelFactory);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initialize() {\n\t\tcontroller = Controller.getInstance();\n\t}",
"public MainController() {\n\t\tcontroller = new Controller(this);\n\t}",
"public abstract void initController();",
"public Controller() {\n super();\n }",
"public Controller() {\n super();\n }",
"public Co... | [
"0.81267494",
"0.7854314",
"0.7833242",
"0.77628046",
"0.77628046",
"0.7601901",
"0.7451344",
"0.74380225",
"0.74313986",
"0.74237424",
"0.7406829",
"0.73422337",
"0.73283935",
"0.72643036",
"0.72241026",
"0.7101988",
"0.7059505",
"0.6987808",
"0.6972957",
"0.6943927",
"0.691... | 0.0 | -1 |
This method was generated by Abator for iBATIS. This method corresponds to the database table lgk_user_group | Long insert(UserGroup record); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<UserGroupImp> fetchUserGroupByName (String userGroupName);",
"public void joinGroup(Group group) {\n try {\n conn = dao.getConnection();\n ps = conn.prepareStatement(\"SELECT * FROM USERS_GROUPS WHERE USER_ID=? AND GROUP_ID=?\");\n ps.setString(1, Session.getInstance(\"\").getUserName());\... | [
"0.6799069",
"0.6684918",
"0.6661789",
"0.66499805",
"0.65841687",
"0.6434915",
"0.6379696",
"0.63488865",
"0.62819076",
"0.6262287",
"0.617754",
"0.6129136",
"0.61198545",
"0.6110924",
"0.6110468",
"0.60815245",
"0.6073163",
"0.6036063",
"0.6032267",
"0.6031343",
"0.6031343"... | 0.0 | -1 |
This method was generated by Abator for iBATIS. This method corresponds to the database table lgk_user_group | int updateByPrimaryKey(UserGroup record); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<UserGroupImp> fetchUserGroupByName (String userGroupName);",
"public void joinGroup(Group group) {\n try {\n conn = dao.getConnection();\n ps = conn.prepareStatement(\"SELECT * FROM USERS_GROUPS WHERE USER_ID=? AND GROUP_ID=?\");\n ps.setString(1, Session.getInstance(\"\").getUserName());\... | [
"0.67993623",
"0.66834444",
"0.66610485",
"0.6649495",
"0.6584011",
"0.64348614",
"0.63810605",
"0.6351145",
"0.62821513",
"0.6262756",
"0.61781013",
"0.6129332",
"0.61206937",
"0.6111906",
"0.61097455",
"0.6082717",
"0.60734475",
"0.603536",
"0.6034013",
"0.6034013",
"0.6032... | 0.0 | -1 |
This method was generated by Abator for iBATIS. This method corresponds to the database table lgk_user_group | int updateByPrimaryKeySelective(UserGroup record); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<UserGroupImp> fetchUserGroupByName (String userGroupName);",
"public void joinGroup(Group group) {\n try {\n conn = dao.getConnection();\n ps = conn.prepareStatement(\"SELECT * FROM USERS_GROUPS WHERE USER_ID=? AND GROUP_ID=?\");\n ps.setString(1, Session.getInstance(\"\").getUserName());\... | [
"0.67993623",
"0.66834444",
"0.66610485",
"0.6649495",
"0.6584011",
"0.64348614",
"0.63810605",
"0.6351145",
"0.62821513",
"0.6262756",
"0.61781013",
"0.6129332",
"0.61206937",
"0.6111906",
"0.61097455",
"0.6082717",
"0.60734475",
"0.603536",
"0.6034013",
"0.6034013",
"0.6032... | 0.0 | -1 |
This method was generated by Abator for iBATIS. This method corresponds to the database table lgk_user_group | List<UserGroup> selectByExample(UserGroupExample example); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<UserGroupImp> fetchUserGroupByName (String userGroupName);",
"public void joinGroup(Group group) {\n try {\n conn = dao.getConnection();\n ps = conn.prepareStatement(\"SELECT * FROM USERS_GROUPS WHERE USER_ID=? AND GROUP_ID=?\");\n ps.setString(1, Session.getInstance(\"\").getUserName());\... | [
"0.6799837",
"0.6682229",
"0.66575456",
"0.664809",
"0.6582466",
"0.6434495",
"0.63800645",
"0.63456243",
"0.62828976",
"0.6259785",
"0.6176455",
"0.6129029",
"0.611914",
"0.6107853",
"0.61077946",
"0.6078801",
"0.60718995",
"0.6031035",
"0.6030655",
"0.6030534",
"0.6030534",... | 0.0 | -1 |
This method was generated by Abator for iBATIS. This method corresponds to the database table lgk_user_group | UserGroup selectByPrimaryKey(Long id_user_group); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<UserGroupImp> fetchUserGroupByName (String userGroupName);",
"public void joinGroup(Group group) {\n try {\n conn = dao.getConnection();\n ps = conn.prepareStatement(\"SELECT * FROM USERS_GROUPS WHERE USER_ID=? AND GROUP_ID=?\");\n ps.setString(1, Session.getInstance(\"\").getUserName());\... | [
"0.6799069",
"0.6684918",
"0.6661789",
"0.66499805",
"0.6434915",
"0.6379696",
"0.63488865",
"0.62819076",
"0.6262287",
"0.617754",
"0.6129136",
"0.61198545",
"0.6110924",
"0.6110468",
"0.60815245",
"0.6073163",
"0.6036063",
"0.6032267",
"0.6031343",
"0.6031343",
"0.60089463"... | 0.65841687 | 4 |
This method was generated by Abator for iBATIS. This method corresponds to the database table lgk_user_group | int deleteByPrimaryKey(Long id_user_group); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<UserGroupImp> fetchUserGroupByName (String userGroupName);",
"public void joinGroup(Group group) {\n try {\n conn = dao.getConnection();\n ps = conn.prepareStatement(\"SELECT * FROM USERS_GROUPS WHERE USER_ID=? AND GROUP_ID=?\");\n ps.setString(1, Session.getInstance(\"\").getUserName());\... | [
"0.67993623",
"0.66834444",
"0.66610485",
"0.6649495",
"0.6584011",
"0.64348614",
"0.63810605",
"0.6351145",
"0.62821513",
"0.6262756",
"0.61781013",
"0.6129332",
"0.61206937",
"0.6111906",
"0.61097455",
"0.6082717",
"0.60734475",
"0.603536",
"0.6034013",
"0.6034013",
"0.6032... | 0.0 | -1 |
This method was generated by Abator for iBATIS. This method corresponds to the database table lgk_user_group | int countByExample(UserGroupExample example); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<UserGroupImp> fetchUserGroupByName (String userGroupName);",
"public void joinGroup(Group group) {\n try {\n conn = dao.getConnection();\n ps = conn.prepareStatement(\"SELECT * FROM USERS_GROUPS WHERE USER_ID=? AND GROUP_ID=?\");\n ps.setString(1, Session.getInstance(\"\").getUserName());\... | [
"0.67993623",
"0.66834444",
"0.66610485",
"0.6649495",
"0.6584011",
"0.64348614",
"0.63810605",
"0.6351145",
"0.62821513",
"0.6262756",
"0.61781013",
"0.6129332",
"0.61206937",
"0.6111906",
"0.61097455",
"0.6082717",
"0.60734475",
"0.603536",
"0.6034013",
"0.6034013",
"0.6032... | 0.0 | -1 |
Remove row from model | public void removeRow(int row) {
data.remove(row);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void actionPerformed(ActionEvent e) {\n model.deleteRow();\n }",
"private void tampilkan() {\n int row = table.getRowCount();\n for(int a= 0; a<row;a++){\n model.removeRow(0);\n }\n \n \n }",
"private void emptyModel() {\n whil... | [
"0.71747833",
"0.6910679",
"0.68739134",
"0.68437433",
"0.6794703",
"0.6785206",
"0.67317927",
"0.6693414",
"0.6688276",
"0.66574764",
"0.66291535",
"0.662459",
"0.65979445",
"0.65544486",
"0.65534997",
"0.65244466",
"0.6522041",
"0.6508776",
"0.6505805",
"0.6503614",
"0.6471... | 0.6773077 | 6 |
/ Exercise 1: implement Constructor | @Override
public List<String> getIngredients() {
return ingredients;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Constructor(){\n\t\t\n\t}",
"ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"public Student() {\n//\t\tname = \"\";\n//\t\tage = 0;\n\t\t\n\t\t\n\t\t//call constructors inside of other constructors\n\t\tthis(999,0);\n\t}",
"@Test... | [
"0.7023973",
"0.6750279",
"0.67439324",
"0.66217566",
"0.66190034",
"0.66190034",
"0.65535647",
"0.6523366",
"0.6507744",
"0.6484956",
"0.64132625",
"0.6392948",
"0.6391902",
"0.6350868",
"0.63322353",
"0.63319916",
"0.6328856",
"0.6324167",
"0.63234043",
"0.629051",
"0.62787... | 0.0 | -1 |
TODO Autogenerated method stub | public Integer getBanana() {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | public Integer getApple() {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
Reset the objects for a new round | @Override
public void newGame() {
round = 0;
newRound();
gameOverSoundPlayed = false;
// Reset player scores
for (Player player : players) {
setPlayerScore(player, 0);
}
// Reset all button press counters
for (IButton button : buttons) {
button.resetPressCounter();
}
// Start the game timer
deltaTimeAlive = getPhysicsTickMillis();
deltaTimeDead = deltaTimeAlive / 4;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void reset() {\n\tthis.pinguins = new ArrayList<>();\n\tthis.pinguinCourant = null;\n\tthis.pret = false;\n\tthis.scoreGlacons = 0;\n\tthis.scorePoissons = 0;\n }",
"private void reset() {\n darkSquare.reset();\n lightSquare.reset();\n background.reset();\n border.reset();\n... | [
"0.71914",
"0.7067845",
"0.70637727",
"0.70247006",
"0.70180666",
"0.7007835",
"0.7005004",
"0.69911677",
"0.69903654",
"0.69743824",
"0.69697684",
"0.6958714",
"0.695522",
"0.6947447",
"0.6925117",
"0.6860975",
"0.6844485",
"0.68267983",
"0.68046397",
"0.6801432",
"0.6799833... | 0.0 | -1 |
Returns true if any button's press counter is greater than zero. | @SuppressWarnings("unused")
private boolean wasAnyButtonPressed() {
for (ArcadeButton button : buttons) {
if (button.getPressCounter() > 0) {
return true;
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isSetClickcount() {\n return __isset_bit_vector.get(__CLICKCOUNT_ISSET_ID);\n }",
"public boolean isPressed(int b) {\n if (b >= 0 && b < buttonPressed.length) {\n return buttonPressed[b] && !buttonLastPressed[b];\n } else {\n return false;\n }\n }"... | [
"0.70618194",
"0.695051",
"0.6766239",
"0.664711",
"0.6604428",
"0.657112",
"0.64243186",
"0.6397696",
"0.6391937",
"0.6380337",
"0.6250231",
"0.6231008",
"0.6172282",
"0.60561496",
"0.6054483",
"0.6045024",
"0.6036459",
"0.6033335",
"0.6028009",
"0.6003954",
"0.59728944",
... | 0.7907218 | 0 |
The normal game tick. | private void physicsTickAlive() {
// Physics stuff
setThrusts();
moveEverything(deltaTimeAlive);
ageScoreMarkers(deltaTimeAlive);
shootBullets();
collideTankToWall();
collideTankToTank();
collideBulletToWall();
collideBulletToTank();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void tick() {\r\n }",
"public void tick() {\n\t}",
"public void tick() {\n\t}",
"public void tick() {\r\n tick++;\r\n }",
"public void tick() {\n\t\ttick(1);\n\t}",
"public void tick();",
"public void tick();",
"public void tick();",
"public void tick(){\r\n if(timer != 0... | [
"0.8010256",
"0.7940257",
"0.7940257",
"0.7890731",
"0.78268564",
"0.7754783",
"0.7754783",
"0.7754783",
"0.7743611",
"0.7714077",
"0.7714077",
"0.7702281",
"0.7701187",
"0.76456577",
"0.7613388",
"0.7613388",
"0.754418",
"0.75109124",
"0.7500349",
"0.7493792",
"0.7493792",
... | 0.0 | -1 |
The game tick after someone has died. | private void physicsTickDead() {
// Check the round end counter
if (checkRoundEndCounter()) {
return;
}
// Physics stuff
setThrusts();
moveEverything(deltaTimeDead);
ageScoreMarkers(deltaTimeAlive);
shootBullets();
collideTankToWall();
collideBulletToWall();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean deathTick(Game game) {\n\t\treturn false;\n\t}",
"public void lifeLost() {\n\n\t\tif (invincipleTimer <= currentTickCount) {\n\t\t\tSystem.out.println(\"Life Lost!\");\n\n\t\t\thealth--;\n\t\t\tinvincipleTimer = currentTickCount + invicibleLength;\n\t\t}\n\t}",
"@Override\n \tpublic void notifyD... | [
"0.7031289",
"0.6989064",
"0.6740533",
"0.6726203",
"0.6720664",
"0.6705943",
"0.6703104",
"0.67015713",
"0.664341",
"0.6629605",
"0.6608252",
"0.6597049",
"0.65880597",
"0.65596473",
"0.6521867",
"0.6515566",
"0.6513339",
"0.6487663",
"0.64418626",
"0.64341563",
"0.6422662",... | 0.65572274 | 14 |
Read buttons, set spaceship thrusts | private void setThrusts() {
for (int i = 0; i < players.length; i++) {
Player player = players[i];
// Apply drag always
tanks[i].acceleration = tanks[i].velocity
.scalarProduct(-tankDrag);
tanks[i].angularAcceleration = -tanks[i].angularVelocity * tankSteeringDrag;
// Skip if dead
if (!tanks[i].isAlive()) {
continue;
}
// Get skid steer button presses
boolean leftPressed = player.getButton(BUTTON_LEFT).isPressed();
boolean rightPressed = player.getButton(BUTTON_RIGHT).isPressed();
if (leftPressed) {
if (rightPressed) {
// Forward
tanks[i].acceleration.add(new Vector2D(tankThrust, tanks[i].angle, true));
} else {
// Left
// tanks[i].angle -= Math.PI / stepsPerHalfTurn;
tanks[i].angularAcceleration -= tankSteeringAccel;
}
} else {
if (rightPressed) {
// Right
// tanks[i].angle += Math.PI / stepsPerHalfTurn;
tanks[i].angularAcceleration += tankSteeringAccel;
} else {
// Stop
}
}
// Rotate velocity so that the tanks can't slide sideways
/*Vector2D unit = new Vector2D(1d, tanks[i].angle, true);
double velocityMagnitude = tanks[i].velocity.dotProduct(unit);
tanks[i].velocity = new Vector2D(velocityMagnitude, tanks[i].angle, true);*/
tanks[i].velocity.setAngle(tanks[i].angle);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void norm3JS() {\n\n // Drive\n axLeftX.setAxis(leftJoystick, 0); //Mecanum (Arcade) Left/Right turn\n axLeftY.setAxis(leftJoystick, 1); //Mecanum (Arcade) Fwd/Bkwd\n axRightX.setAxis(rightJoystick, 0); //Mecanum Rotate orientation\n axRightY.setAxi... | [
"0.5798902",
"0.57228005",
"0.5708692",
"0.56521064",
"0.56459904",
"0.56013507",
"0.55981153",
"0.5555192",
"0.55385274",
"0.55310106",
"0.5528722",
"0.5526416",
"0.55204016",
"0.55046254",
"0.5485018",
"0.5451188",
"0.5414267",
"0.54132867",
"0.54050124",
"0.53798413",
"0.5... | 0.5645349 | 5 |
Age score markers and remove ones that are too old | private void ageScoreMarkers(long deltaTime) {
for (int i = 0; i < scoreMarkers.size(); i++) {
ScoreMarker scoreMarker = scoreMarkers.get(i);
scoreMarker.move(deltaTime);
if (scoreMarkers.get(i).getAge() > scoreMarkerMaxAge) {
scoreMarkers.remove(i--);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void removeOldParticles(int maxAge) {\n\t\t// Track the whole array\n\t\tfor (int i = 0; i < particles.length; i++) {\n\t\t\t// If the particle is null reference, continue to track\n\t\t\tif (particles[i] == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// If the particle's age is greater than 80\n\t\t... | [
"0.6140855",
"0.59009564",
"0.5615582",
"0.54366904",
"0.54005814",
"0.5265901",
"0.52614266",
"0.51884216",
"0.51707906",
"0.5105017",
"0.5008605",
"0.49726126",
"0.49479598",
"0.4928214",
"0.4916015",
"0.4909575",
"0.48851633",
"0.48815328",
"0.48802978",
"0.48769453",
"0.4... | 0.6911113 | 0 |
Sets a player's score to the given value and updates the score markers. | private void setPlayerScore(Player player, int newScore) {
player.score = Math.max(newScore, 0);
for (ScoreMarker scoreMarker : playerScoreMarkers) {
if (scoreMarker.getOwner() == player) {
scoreMarker.value = String.valueOf(player.score);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setScoreValue(int scoreValue);",
"public static void setPlayerScore(int score)\r\n\t{\r\n\t\tGame.playerScore = score;\r\n\t}",
"public void setScore(float value) {\n this.score = value;\n }",
"public void setNewScore(String player, int score) {\n\t\t\n\t}",
"public void setScore(jav... | [
"0.7933543",
"0.78653073",
"0.7777413",
"0.7695592",
"0.75415754",
"0.7515737",
"0.75019556",
"0.74818546",
"0.742959",
"0.7405972",
"0.7392362",
"0.7369897",
"0.7369897",
"0.7355839",
"0.7345291",
"0.7336746",
"0.73284423",
"0.7318578",
"0.7318578",
"0.7318578",
"0.7318578",... | 0.8102925 | 0 |
State of the game | public boolean isRoundOver() {
int numberOfLiving = 0;
boolean nobodyHasAmmo = true;
for (int i = 0; i < players.length; i++) {
// The round is over if someone is dead
if (tanks[i].isAlive()) {
numberOfLiving++;
}
nobodyHasAmmo &= tanks[i].getAmmo() == 0;
}
// Return true if one or none players are living, or stalemate
return numberOfLiving <= 1 || (nobodyHasAmmo && bullets.isEmpty());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public GameState(){\n this.gameResults = \"\";\n initVars();\n this.theme = DEFAULT_THEME;\n this.board = new Board(DEFAULT_BOARD);\n createSetOfPlayers(DEFAULT_PLAYERS, DEFAULT_AUTOPLAYER, DEFAULT_AUTOMODE);\n }",
"public void displayCurrentState(State game);",
"private v... | [
"0.77573997",
"0.7684476",
"0.7482314",
"0.74309254",
"0.7327109",
"0.73237073",
"0.73014194",
"0.7271614",
"0.7246965",
"0.7164911",
"0.7164432",
"0.71322143",
"0.705295",
"0.70306265",
"0.70221555",
"0.70048153",
"0.69725215",
"0.6949828",
"0.6940382",
"0.6928511",
"0.69285... | 0.0 | -1 |
Scale by the delta time | @Override
public void drawVideoFrame(Graphics g, double extrapolate) {
long extrapolateTime = (long)(extrapolate *
(isRoundOver() ? deltaTimeDead : deltaTimeAlive));
// Clear the frame (background colour)
g.setColor(new Color(0x006000));
g.fillRect(0, 0, getGameWidthPixels(), getGameHeightPixels());
// Draw the tank fragments
for (Fragment fragment : fragments) {
g.setColor(getOwnerColor(fragment));
drawPolygon(g, fragment, extrapolateTime);
}
// Draw the walls
for (Wall wall : walls) {
g.setColor(Color.LIGHT_GRAY);
drawPolygon(g, wall, extrapolateTime);
}
// Draw the player tanks
for (Tank tank : tanks) {
if (!tank.isAlive()) {
continue;
}
g.setColor(getOwnerColor(tank));
drawPhysicsObject(g, tank, extrapolateTime, true);
}
// DEBUG
// Draw lines demonstrating surface normals
/*if (DebugMode.isEnabled() && walls.size() >= 2) {
Wall wall = walls.get(1);
for (Bullet bullet : bullets) {
SpaceVector2D surfaceNormal = wall.getSurfaceNormal(bullet.position);
g.setColor(Color.GREEN);
g.drawLine((int)surfaceNormal.position.x, (int)surfaceNormal.position.y,
(int)bullet.position.x, (int)bullet.position.y);
g.setColor(Color.RED);
Vector2D normalVectorEnd = surfaceNormal.position.sum(surfaceNormal.vector.scalarProduct(30d));
g.drawLine((int)surfaceNormal.position.x, (int)surfaceNormal.position.y,
(int)normalVectorEnd.x, (int)normalVectorEnd.y);
}
}*/
// Draw the bullets
for (Bullet bullet : bullets) {
g.setColor(getOwnerColor(bullet));
drawPhysicsObject(g, bullet, extrapolateTime);
}
// Draw score markers
for (ScoreMarker scoreMarker : scoreMarkers) {
drawScoreMarker(g, scoreMarker);
}
for (ScoreMarker scoreMarker : playerScoreMarkers) {
drawScoreMarker(g, scoreMarker);
}
// Draw health markers
for (int i = 0; i < players.length; i++) {
g.setColor(players[i].getColor());
final int rectWidth = 8, rectHeight = 11, rectSpacing = 15;
int yBack = i == 0 ? (getGameHeightPixels() / 10 - 6) : (getGameHeightPixels() * 9 / 10 + 6);
int yFront = yBack + (i == 0 ? rectHeight : -rectHeight);
int xFirst = i == 0 ? 50 : (getGameWidthPixels() - (50 + rectWidth) - 1);
int xPerHealth = i == 0 ? -rectSpacing : rectSpacing;
for (int h = 0; h < tanks[i].getHealth(); h++) {
int xHealth = xPerHealth * h;
Polygon rectangle = new Polygon(
new int[] { xFirst + xHealth,
xFirst + xHealth,
xFirst + rectWidth + xHealth,
xFirst + rectWidth + xHealth },
new int[] { yBack, yFront, yFront, yBack }, 4);
g.drawPolygon(rectangle);
}
// DEBUG
// Draw a line connecting the tanks
/*if (DebugMode.isEnabled()) {
g.setColor(Color.BLUE);
g.drawLine((int)tanks[0].position.x, (int)tanks[0].position.y,
(int)tanks[1].position.x, (int)tanks[1].position.y);
}*/
}
// Draw ammo markers
for (int i = 0; i < players.length; i++) {
g.setColor(players[i].getColor());
int barWidth = 2 * tanks[i].getAmmo();
int barHeight = 6;
int xBar = i == 0 ? (59 - barWidth) : (getGameWidthPixels() - 59);
int yBar = i == 0 ? 65 : (getGameHeightPixels() - 65 - barHeight);
for (int h = 0; h < tanks[i].getHealth(); h++) {
g.fillRect(xBar, yBar, barWidth, barHeight);
}
}
// Draw text on top of everything
final int yLine1 = getGameHeightPixels() / 5;
final int yLine2 = yLine1 - 15;
if (demoMode) {
drawTextMarker(g, "DEMO", yLine1);
drawTextMarker(g, "PRESS ANY BUTTON TO START", yLine2);
} else if (roundStartCounter < roundStartTicks) {
String startString = round > roundsPerGame
? "OVERTIME"
: String.format("ROUND %d OF %d", round, roundsPerGame);
drawTextMarker(g, startString, yLine1);
} else if (roundOverCounter > 0 && roundOverCounter <= roundOverTicks) {
drawTextMarker(g, String.format("ROUND %0$d OVER", round), yLine1);
} else if (roundOverCounter > roundOverTicks && roundOverCounter <= gameOverTicks) {
drawTextMarker(g, "GAME OVER", yLine1);
boolean player0Wins = players[0].score > players[1].score;
boolean player1Wins = players[1].score > players[0].score;
if (player0Wins) {
drawTextMarker(g, new String[] { "YOU WIN!", "YOU LOSE!" }, yLine2, players[0]);
} else if (player1Wins) {
drawTextMarker(g, new String[] { "YOU LOSE!", "YOU WIN!" }, yLine2, players[1]);
} else {
// Tie
// (We never come here, because overtime is implemented)
drawTextMarker(g, "IT'S A TIE!", yLine2);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void increaseTimescale() {\n\t\ttimeScaler = timeScaler>=5 ? 5 : timeScaler + TIMESCLALER_FACTOR;\n\t}",
"public void decreaseTimescale() {\n\t\ttimeScaler = timeScaler<=1 ? 1 : timeScaler - TIMESCLALER_FACTOR;\n\t}",
"private void setScale() {\n this.particleScale = (1 - ((float) slowTime / 50)) * (... | [
"0.70355433",
"0.68342924",
"0.65662193",
"0.6564731",
"0.63412505",
"0.6316797",
"0.62997514",
"0.62318206",
"0.6138427",
"0.61091226",
"0.6023575",
"0.5983274",
"0.5971752",
"0.59671056",
"0.59666145",
"0.591466",
"0.5899268",
"0.58727646",
"0.5859025",
"0.58542573",
"0.578... | 0.0 | -1 |
Draws a physics object as a circle. | private void drawPhysicsObject(Graphics g, PhysicsObject obj, long extrapolateTime) {
drawPhysicsObject(g, obj, extrapolateTime, false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ShapeComponent drawCircle()\n\t{\n\t\tShapeComponent circleComponent = new ShapeComponent(radius*2, radius*2, \n\t\t\t\t\"circle\");\n\t\treturn circleComponent;\n\t}",
"@Override\n public void draw() {\n drawAPI.drawCircle(radius, x, y); \n }",
"protected void renderCircle(Graphics g, int x, int... | [
"0.7395534",
"0.7108087",
"0.686288",
"0.6789004",
"0.6766625",
"0.67656374",
"0.67013913",
"0.6626416",
"0.6589706",
"0.65459275",
"0.651763",
"0.65075016",
"0.64961815",
"0.6429809",
"0.6429331",
"0.6413182",
"0.6256972",
"0.6248266",
"0.6247675",
"0.6222392",
"0.6204051",
... | 0.0 | -1 |
Get the spaceship outline as a polygon | private static void drawPolygon(Graphics g, IPolygon polygonObj, long extrapolateTime) {
Polygon polygon = polygonObj.getOutline(extrapolateTime);
// Fill and draw outline
g.fillPolygon(polygon);
g.drawPolygon(polygon);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected Polygon getPolygon() throws NoninvertibleTransformException {\n ArrayList closedPoints = new ArrayList(getCoordinates());\n\n if (!closedPoints.get(0).equals(closedPoints.get(closedPoints.size() - 1))) {\n closedPoints.add(new Coordinate((Coordinate) closedPoints.get(0)));\n ... | [
"0.6539067",
"0.6538527",
"0.6331262",
"0.6220954",
"0.62074655",
"0.61518365",
"0.61022377",
"0.6089898",
"0.60194325",
"0.5989377",
"0.59330815",
"0.59173",
"0.5910261",
"0.59096134",
"0.5860284",
"0.578257",
"0.5699266",
"0.5692848",
"0.56129944",
"0.5563893",
"0.55475384"... | 0.5417363 | 30 |
Draws neutral score markers with arbitrary text, visible to both players. Score marker positions are defined in pixels, not physics units. | private void drawTextMarker(Graphics g, String message, int yLine) {
int xCenter = getGameWidthPixels() / 2;
Vector2DLong position0Inverted = new Vector2DLong(xCenter, yLine),
position1NonInverted = new Vector2DLong(xCenter, getGameHeightPhysics() - yLine);
drawScoreMarker(g, new ScoreMarker(message, position0Inverted, null, true));
drawScoreMarker(g, new ScoreMarker(message, position1NonInverted, null, false));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void drawTextMarker(Graphics g, String[] messages, int yLine, Player owner) {\n\t\tint xCenter = getGameWidthPixels() / 2;\n\t\tVector2DLong position0Inverted = new Vector2DLong(xCenter, yLine),\n\t\t\t\tposition1NonInverted = new Vector2DLong(xCenter, getGameHeightPixels() - yLine);\n\t\tdrawScoreMarker(g... | [
"0.6687043",
"0.60159683",
"0.59890443",
"0.57320476",
"0.5500652",
"0.54540324",
"0.54198456",
"0.5365396",
"0.5347561",
"0.5340514",
"0.53333044",
"0.53280395",
"0.5307834",
"0.5305679",
"0.52533937",
"0.5177789",
"0.5167602",
"0.51616114",
"0.5161049",
"0.5160262",
"0.5152... | 0.640513 | 1 |
Draws score markers with arbitrary text for each player. Score marker positions are defined in pixels, not physics units. | private void drawTextMarker(Graphics g, String[] messages, int yLine, Player owner) {
int xCenter = getGameWidthPixels() / 2;
Vector2DLong position0Inverted = new Vector2DLong(xCenter, yLine),
position1NonInverted = new Vector2DLong(xCenter, getGameHeightPixels() - yLine);
drawScoreMarker(g, new ScoreMarker(messages[0], position0Inverted, owner, true));
drawScoreMarker(g, new ScoreMarker(messages[1], position1NonInverted, owner, false));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void drawScore() {\n\t\tString score = myWorld.getScore() + \"\";\n\n\t\t// Draw shadow first\n\t\tAssetLoader.shadow.draw(batcher, \"\" + myWorld.getScore(), (136 / 2)\n\t\t\t\t- (3 * score.length()), 12);\n\t\t// Draw text\n\t\tAssetLoader.font.draw(batcher, \"\" + myWorld.getScore(), (136 / 2)\n\t\t\t\t... | [
"0.6838675",
"0.67827594",
"0.6455823",
"0.6327687",
"0.6000161",
"0.59370226",
"0.5874647",
"0.5870905",
"0.58703864",
"0.5865583",
"0.58437043",
"0.5814351",
"0.5783001",
"0.5774191",
"0.5742534",
"0.57276964",
"0.5712594",
"0.5706504",
"0.5685527",
"0.5669843",
"0.56653666... | 0.7029064 | 0 |
Create a new conversation URL: /conversations/create Parameters should be: members (list of members for the group, separated by semicolons ';') [string] isgroup (whether this conversation is a group or not) [boolean] Will also enqueue an update for all members On success: Returns the conversation id. Returns a 200 (OK) status code. On failure: Returns no text. Returns a 400 (BAD REQUEST) status code. This likely means that the amount of members was smaller than two, or that the amount of members did not match the given conversation type. OR Returns no text. Returns a 410 (GONE) status code. This likely means that one of the provided members did not exist. | @Override
protected void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException {
if (!h.isActive()) res.setStatus(HttpStatus.INTERNAL_SERVER_ERROR_500);
String[] members = req.getParameter("members").split(";");
boolean group = Boolean.parseBoolean(req.getParameter("isgroup"));
Document conversation = null;
if (group) {
if (members.length < 2) {
res.setStatus(HttpStatus.BAD_REQUEST_400);
return;
} else {
conversation = h.createNewConversation(members, true);
}
} else {
if (members.length != 2) {
res.setStatus(HttpStatus.BAD_REQUEST_400);
return;
} else {
conversation = h.createNewConversation(members, false);
}
}
if (conversation != null) {
h.enqueueUserConversationUpdates(members, Conversation.fromDocument(conversation));
res.getWriter().print(conversation.getObjectId("_id").toString());
res.setStatus(HttpStatus.OK_200);
} else {
res.setStatus(HttpStatus.GONE_410);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void createConversation(@NonNull final ConversationCreate request, @Nullable Callback<ComapiResult<ConversationDetails>> callback);",
"@POST\n @Path(\"/{groupId}\")\n public Response createMessage(Message m,\n @PathParam(\"groupId\") long groupId,\n ... | [
"0.5734503",
"0.5580566",
"0.5498081",
"0.52259505",
"0.51821005",
"0.5124526",
"0.5054708",
"0.5053014",
"0.500631",
"0.49664152",
"0.48231405",
"0.48172912",
"0.48057568",
"0.4787018",
"0.47868937",
"0.47827163",
"0.47720692",
"0.47680813",
"0.47297543",
"0.4711724",
"0.470... | 0.5594037 | 1 |
navigating to monthly grid | public void getXpathFromGrid(){
System.out.println("Monthly");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onClick(View v) {\n currentCalendar.add(Calendar.MONTH, 1);\n //drawMonth(workingDays);\n //drawMonth(workingDays, holidays);\n Log.i(\"***********\", \"DrawMonth called on nextmonth\");\n drawMonth(workin... | [
"0.5843702",
"0.58206165",
"0.57768583",
"0.574883",
"0.56935155",
"0.5672603",
"0.56444585",
"0.561436",
"0.56136036",
"0.5537387",
"0.551539",
"0.5506975",
"0.54774666",
"0.54520583",
"0.54517466",
"0.54338765",
"0.5425905",
"0.5397856",
"0.5384866",
"0.5366016",
"0.5358169... | 0.6479215 | 0 |
navigating to weekly grid | public void getXpathFromGrid(){
System.out.println("Weekly");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void refreshWeek() {\n\t\tthis.showWeek(this.currentMonday);\n\t}",
"public static void viewWeekSchedule() {\n\t\tWeek w = new Week();\n\t\t\n\t\tprintWeekTitles();\n\t\tint weekID = Utility.askInt(\"\\nSelect week to view: \");\n\t\tw = aweek.get(weekID);\n\t\t\n\t\tviewWeek(w);\n\t\t\n\t}",
"public vo... | [
"0.6482476",
"0.6290918",
"0.6028853",
"0.601467",
"0.5861197",
"0.5798345",
"0.57429636",
"0.5733093",
"0.5690108",
"0.56856805",
"0.5670086",
"0.5666206",
"0.564864",
"0.56136334",
"0.5579397",
"0.5561899",
"0.55455846",
"0.552137",
"0.5491046",
"0.54483515",
"0.5427534",
... | 0.66928005 | 0 |
Get Last(Max) Leave Application Id : from upto this max Leave Application Id, Leave Applications are moved to KeyPayIntLeaveApplication table | private void updateKeyPayIntLeaveAppTable(Long companyId) {
Long maxLeaveApplicationId = keyPayIntLeaveApplicationDAO
.getMaxApprovedLeaveAppId(companyId);
if (maxLeaveApplicationId == null) {
maxLeaveApplicationId = 0l;
}
// maxLeaveApplicationId = 62409l;
// Get Leave Approved and Leave Cancel applications (i.e. those
// applications are not still moved to KeyPayIntLeaveApplication table)
List<LeaveApplication> approvedLeaveForKeyPayInt = leaveApplicationDAO
.getApprovedNCancelLeaveForKeyPayInt(maxLeaveApplicationId,
companyId, PayAsiaConstants.LEAVE_STATUS_COMPLETED);
for (LeaveApplication leaveApplication : approvedLeaveForKeyPayInt) {
KeyPayIntLeaveApplication keyPayIntLeaveApplication = new KeyPayIntLeaveApplication();
keyPayIntLeaveApplication.setLeaveApplication(leaveApplication);
keyPayIntLeaveApplication.setCompany(leaveApplication.getCompany());
keyPayIntLeaveApplication.setEmployeeNumber(leaveApplication
.getEmployee().getEmployeeNumber());
keyPayIntLeaveApplication.setStartDate(leaveApplication
.getStartDate());
keyPayIntLeaveApplication.setEndDate(leaveApplication.getEndDate());
keyPayIntLeaveApplication.setHours(new BigDecimal(leaveApplication
.getTotalDays()));
keyPayIntLeaveApplication.setLeaveTypeName(leaveApplication
.getEmployeeLeaveSchemeType().getLeaveSchemeType()
.getLeaveTypeMaster().getLeaveTypeName());
keyPayIntLeaveApplication.setRemarks(leaveApplication.getReason());
if (leaveApplication.getLeaveCancelApplication() == null) {
keyPayIntLeaveApplication
.setLeaveStatus(PayAsiaConstants.LEAVE_STATUS_APPROVED);
} else {
keyPayIntLeaveApplication
.setLeaveStatus(PayAsiaConstants.LEAVE_STATUS_CANCELLED);
keyPayIntLeaveApplication
.setCancelLeaveApplicationId(leaveApplication
.getLeaveCancelApplication()
.getLeaveApplicationId());
}
keyPayIntLeaveApplication
.setSyncStatus(PayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_UNPROCESS);
keyPayIntLeaveApplicationDAO.save(keyPayIntLeaveApplication);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void getLastId() {\n for (int i = 0; i < remindersTable.getRowCount(); i++) {\n if (parseInt(remindersTable.getValueAt(i, 7).toString()) > maxId) {\n maxId = parseInt(remindersTable.getValueAt(i, 7).toString());\n }\n }\n }",
"public int getLastLoginA... | [
"0.5817684",
"0.56551164",
"0.5598903",
"0.5580223",
"0.5500423",
"0.5483742",
"0.54796547",
"0.54522747",
"0.54216844",
"0.54056734",
"0.5393098",
"0.53757477",
"0.53688157",
"0.5361286",
"0.5326121",
"0.5308371",
"0.52630496",
"0.52065",
"0.51753265",
"0.5167277",
"0.516131... | 0.7068298 | 0 |
move Leave Applications(Approved and cancel leave) to KeyPayIntLeaveApplication table updateKeyPayIntLeaveAppTable(companyId); | @Override
public void sendApprovedLeaveApp(Long companyId,
Map<String, Long> leaveCategoryMap, String baseURL, String apiKey) {
SimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory();
setInternalProxy(requestFactory);
Company companyVO = companyDAO.findById(companyId);
// Find All Leave which is not send(Sync) to KeyPay
List<KeyPayIntLeaveApplication> keyPayIntLeaveAppList = keyPayIntLeaveApplicationDAO
.findByCondition(
PayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_SUCCESS,
PayAsiaConstants.LEAVE_TRANSACTION_TYPE_LEAVE_APPROVED,
companyId);
Map<String, String> empNumExternalIdMap = new HashMap<String, String>();
if (!keyPayIntLeaveAppList.isEmpty()) {
HRISPreference hrisPreferenceVO = hrisPreferenceDAO
.findByCompanyId(companyId);
if (hrisPreferenceVO != null
&& hrisPreferenceVO.getExternalId() != null) {
List<Object[]> keyPayEmpExternalIdList = getKeyPayExternalIdList(
hrisPreferenceVO.getExternalId(), companyId,
companyVO.getDateFormat(), null);
for (Object[] extIdObj : keyPayEmpExternalIdList) {
if (extIdObj != null && extIdObj[0] != null
&& extIdObj[1] != null) {
empNumExternalIdMap.put(String.valueOf(extIdObj[1]),
String.valueOf(extIdObj[0]));
}
}
}
for (KeyPayIntLeaveApplication keyPayIntLeaveApplication : keyPayIntLeaveAppList) {
if (empNumExternalIdMap.get(keyPayIntLeaveApplication
.getEmployeeNumber()) == null) {
continue;
}
RestTemplate restTemplate = new RestTemplate(requestFactory);
String url = baseURL
+ "/employee/"
+ empNumExternalIdMap.get(keyPayIntLeaveApplication
.getEmployeeNumber()) + "/leaverequest";
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
headers.add("Authorization", "Basic " + apiKey);
// create request body
JSONObject request = new JSONObject();
try {
request.put("EmployeeId", empNumExternalIdMap
.get(keyPayIntLeaveApplication.getEmployeeNumber()));
request.put("FromDate", DateUtils.timeStampToString(
keyPayIntLeaveApplication.getStartDate(),
PayAsiaConstants.DATE_FORMAT_YYYY_MM_DD));
request.put("ToDate", DateUtils.timeStampToString(
keyPayIntLeaveApplication.getEndDate(),
PayAsiaConstants.DATE_FORMAT_YYYY_MM_DD));
request.put("Hours", keyPayIntLeaveApplication.getHours());
request.put("LeaveCategoryId", leaveCategoryMap
.get(keyPayIntLeaveApplication.getLeaveTypeName()));
if (StringUtils.isNotBlank(keyPayIntLeaveApplication
.getRemarks())
&& keyPayIntLeaveApplication.getRemarks().length() > 250) {
request.put("Notes", keyPayIntLeaveApplication
.getRemarks().substring(0, 250));
} else {
request.put("Notes",
keyPayIntLeaveApplication.getRemarks());
}
request.put("AutomaticallyApprove", true);
} catch (JSONException e) {
LOGGER.error(e.getMessage(), e);
}
HttpEntity<String> entity = new HttpEntity<String>(
request.toString(), headers);
restTemplate.getMessageConverters().add(
new StringHttpMessageConverter());
JSONObject jsonObj;
ResponseEntity<String> response1 =null;
try {
LOGGER.info("Request: "+request.toString());
response1 = restTemplate.exchange(
url, HttpMethod.POST, entity, String.class);
LOGGER.info("Response Body In Try Section: "+response1.getBody());
// System.out.println("response>>>");
// System.out.println(response1.getBody());
jsonObj = new JSONObject(response1.getBody());
if (jsonObj.getString("status") != null
&& jsonObj
.getString("status")
.equalsIgnoreCase(
PayAsiaConstants.LEAVE_TRANSACTION_TYPE_LEAVE_APPROVED)) {
keyPayIntLeaveApplication
.setExternalLeaveRequestId(jsonObj
.getLong("id"));
keyPayIntLeaveApplication
.setSyncStatus(PayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_SUCCESS);
keyPayIntLeaveApplicationDAO
.update(keyPayIntLeaveApplication);
}
} catch (Exception e) {
keyPayIntLeaveApplication
.setSyncStatus(PayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_FAILED);
keyPayIntLeaveApplicationDAO
.update(keyPayIntLeaveApplication);
LOGGER.info("In Catch Response : "+response1);
LOGGER.info("In Catch Response Body: "+response1.getBody());
LOGGER.error(e.getMessage(), e);
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void updateKeyPayIntLeaveAppTable(Long companyId) {\n\t\tLong maxLeaveApplicationId = keyPayIntLeaveApplicationDAO\n\t\t\t\t.getMaxApprovedLeaveAppId(companyId);\n\t\tif (maxLeaveApplicationId == null) {\n\t\t\tmaxLeaveApplicationId = 0l;\n\t\t}\n\t\t// maxLeaveApplicationId = 62409l;\n\n\t\t// Get Leave A... | [
"0.84211814",
"0.60841256",
"0.58360153",
"0.58166134",
"0.56354785",
"0.5615822",
"0.5501015",
"0.54624516",
"0.53917503",
"0.5378986",
"0.53750384",
"0.53539264",
"0.53428626",
"0.5338168",
"0.53190005",
"0.52996093",
"0.51591086",
"0.5149847",
"0.5142345",
"0.5107866",
"0.... | 0.62615085 | 1 |
move Leave Applications(Approved and cancel leave) to KeyPayIntLeaveApplication table updateKeyPayIntLeaveAppTable(companyId); | @Override
public void sendCancelledLeaveApp(Long companyId,
Map<String, Long> leaveCategoryMap, String baseURL, String apiKey) {
SimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory();
setInternalProxy(requestFactory);
Company companyVO = companyDAO.findById(companyId);
// Find All Leave which is not send(Sync) to KeyPay
List<KeyPayIntLeaveApplication> keyPayIntLeaveAppList = keyPayIntLeaveApplicationDAO
.findByCondition(
PayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_SUCCESS,
PayAsiaConstants.LEAVE_TRANSACTION_TYPE_LEAVE_CANCELLED,
companyId);
Map<String, String> empNumExternalIdMap = new HashMap<String, String>();
if (!keyPayIntLeaveAppList.isEmpty()) {
HRISPreference hrisPreferenceVO = hrisPreferenceDAO
.findByCompanyId(companyId);
if (hrisPreferenceVO != null
&& hrisPreferenceVO.getExternalId() != null) {
List<Object[]> keyPayEmpExternalIdList = getKeyPayExternalIdList(
hrisPreferenceVO.getExternalId(), companyId,
companyVO.getDateFormat(), null);
for (Object[] extIdObj : keyPayEmpExternalIdList) {
if (extIdObj != null && extIdObj[0] != null
&& extIdObj[1] != null) {
empNumExternalIdMap.put(String.valueOf(extIdObj[1]),
String.valueOf(extIdObj[0]));
}
}
}
for (KeyPayIntLeaveApplication keyPayIntLeaveApplication : keyPayIntLeaveAppList) {
if (empNumExternalIdMap.get(keyPayIntLeaveApplication
.getEmployeeNumber()) == null) {
continue;
}
String leaveRequestId = "";
KeyPayIntLeaveApplication leaveApplication = keyPayIntLeaveApplicationDAO
.findByLeaveAppId(
companyId,
keyPayIntLeaveApplication
.getCancelLeaveApplicationId(),
PayAsiaConstants.LEAVE_TRANSACTION_TYPE_LEAVE_CANCELLED);
if (leaveApplication != null
&& leaveApplication.getExternalLeaveRequestId() != null) {
leaveRequestId = String.valueOf(leaveApplication
.getExternalLeaveRequestId());
} else {
leaveRequestId = getLeaveRequestForEmployee(
empNumExternalIdMap.get(keyPayIntLeaveApplication
.getEmployeeNumber()),
keyPayIntLeaveApplication, leaveCategoryMap,
baseURL, apiKey);
}
if (StringUtils.isNotBlank(leaveRequestId)) {
RestTemplate restTemplate = new RestTemplate(requestFactory);
String url = baseURL
+ "/employee/"
+ empNumExternalIdMap.get(keyPayIntLeaveApplication
.getEmployeeNumber()) + "/leaverequest/"
+ leaveRequestId;
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
headers.add("Authorization", "Basic " + apiKey);
Map<String, String> params = new HashMap<String, String>();
HttpEntity<Map> entity = new HttpEntity<Map>(params,
headers);
restTemplate.getMessageConverters().add(
new StringHttpMessageConverter());
JSONObject jsonObj;
try {
ResponseEntity<String> response1 = restTemplate
.exchange(url, HttpMethod.DELETE, entity,
String.class);
// System.out.println("response>>>");
// System.out.println(response1.getBody());
jsonObj = new JSONObject(response1.getBody());
if (jsonObj.getString("status") != null
&& jsonObj
.getString("status")
.equalsIgnoreCase(
PayAsiaConstants.LEAVE_TRANSACTION_TYPE_LEAVE_CANCELLED)) {
keyPayIntLeaveApplication
.setExternalLeaveRequestId(jsonObj
.getLong("id"));
keyPayIntLeaveApplication
.setSyncStatus(PayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_SUCCESS);
keyPayIntLeaveApplicationDAO
.update(keyPayIntLeaveApplication);
}
} catch (Exception e) {
keyPayIntLeaveApplication
.setSyncStatus(PayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_FAILED);
keyPayIntLeaveApplicationDAO
.update(keyPayIntLeaveApplication);
LOGGER.error(e.getMessage(), e);
}
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void updateKeyPayIntLeaveAppTable(Long companyId) {\n\t\tLong maxLeaveApplicationId = keyPayIntLeaveApplicationDAO\n\t\t\t\t.getMaxApprovedLeaveAppId(companyId);\n\t\tif (maxLeaveApplicationId == null) {\n\t\t\tmaxLeaveApplicationId = 0l;\n\t\t}\n\t\t// maxLeaveApplicationId = 62409l;\n\n\t\t// Get Leave A... | [
"0.8419399",
"0.62589043",
"0.58363",
"0.5817725",
"0.56377053",
"0.56173813",
"0.5502781",
"0.54663676",
"0.5394459",
"0.53800184",
"0.5377041",
"0.53567016",
"0.5344791",
"0.533971",
"0.5318392",
"0.53008765",
"0.51597255",
"0.51534855",
"0.5146121",
"0.5109783",
"0.5099707... | 0.60807383 | 2 |
Set proxy for development | private void setInternalProxy(SimpleClientHttpRequestFactory requestFactory) {
if (PAYASIA_MIND_PROXY_ENABLED_FOR_DEV) {
Proxy proxy = new Proxy(Type.HTTP, new InetSocketAddress(
PAYASIA_MIND_PROXY_HOSTNAME, PAYASIA_MIND_PROXY_PORT));
requestFactory.setProxy(proxy);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected static void setProxyLocation(URI proxyLocation) {\n Program.proxyLocation = proxyLocation;\n Program.proxyLocationSet = true;\n }",
"public void setHttpProxyHost(String host);",
"public void setProxy(Proxy proxy) {\n\t\tthis.proxy = proxy;\n\t}",
"public void setProxyHost(java.lang.String ne... | [
"0.7251816",
"0.7221039",
"0.7142096",
"0.70636666",
"0.6853375",
"0.6769172",
"0.6766359",
"0.6718576",
"0.67178184",
"0.66542464",
"0.6648983",
"0.6565342",
"0.6547425",
"0.65199876",
"0.64890647",
"0.6433156",
"0.64257073",
"0.63596004",
"0.6352448",
"0.6348069",
"0.632912... | 0.7533088 | 0 |
Check Whether keyPayRunTimestamp exist between Leave Calendar Year Start and end date | private boolean isKeypayPayRunDateExist(Timestamp keyPayRunTimestamp,
Long companyId,
EmployeeLeaveSchemeTypeHistory employeeLeaveSchemeTypeHistory) {
if ((keyPayRunTimestamp.after(employeeLeaveSchemeTypeHistory
.getStartDate()) && keyPayRunTimestamp
.before(employeeLeaveSchemeTypeHistory.getEndDate()))
|| (keyPayRunTimestamp.equals(employeeLeaveSchemeTypeHistory
.getStartDate()))
|| (keyPayRunTimestamp.equals(employeeLeaveSchemeTypeHistory
.getEndDate()))) {
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasEndDate();",
"protected boolean isInYearEndLowerBound(Date runDate, String yearEndPeriodLowerBound, String lastDayOfFiscalYear) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"MMdd\");\n String today = sdf.format(runDate);\n return today.compareTo(yearEndPeriodLowerBound) >= 0 &... | [
"0.6017166",
"0.59919643",
"0.5773958",
"0.5615457",
"0.5533699",
"0.5530841",
"0.5470009",
"0.5433626",
"0.5415589",
"0.54083586",
"0.5401858",
"0.536838",
"0.5364489",
"0.53635544",
"0.53421307",
"0.53386736",
"0.52862954",
"0.52832824",
"0.52772063",
"0.5272007",
"0.525619... | 0.6641709 | 0 |
Create Start and End Date | private void setEmpHistoryStartAndEndDate(Long companyId,
EmployeeLeaveSchemeTypeHistory employeeLeaveSchemeTypeHistory) {
LeavePreference leavePreferenceVO = leavePreferenceDAO
.findByCompanyId(companyId);
SimpleDateFormat sdf = new SimpleDateFormat(
PayAsiaConstants.DEFAULT_DATE_FORMAT);
// Get Current Date
Calendar currentDateCal = Calendar.getInstance();
Date currentDate = currentDateCal.getTime();
int startMonth = 0;
startMonth = Integer.parseInt(String.valueOf(leavePreferenceVO
.getStartMonth().getMonthId())) - 1;
Calendar cal = Calendar.getInstance();
int year = cal.get(Calendar.YEAR);
Calendar startCalendar = new GregorianCalendar(cal.get(Calendar.YEAR),
startMonth, 1, 0, 0, 0);
Date calStartDate = startCalendar.getTime();
if (currentDate.before(calStartDate)) {
year = year - 1;
}
startCalendar = new GregorianCalendar(year, startMonth, 1, 0, 0, 0);
Calendar endCalendar = new GregorianCalendar(year + 1, startMonth, 1,
0, 0, 0);
endCalendar.add(Calendar.DAY_OF_MONTH, -1);
String startDate = sdf.format(startCalendar.getTime());
String endDate = sdf.format(endCalendar.getTime());
employeeLeaveSchemeTypeHistory.setStartDate(DateUtils
.stringToTimestamp(startDate,
PayAsiaConstants.DEFAULT_DATE_FORMAT));
employeeLeaveSchemeTypeHistory.setEndDate(DateUtils.stringToTimestamp(
endDate, PayAsiaConstants.DEFAULT_DATE_FORMAT));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Date getStartDate();",
"Date getStartDate();",
"Date getStartDate();",
"long getStartDate();",
"private void getDateStartEnd(BudgetRecyclerView budget) {\n String viewByDate = budget.getDate();\n String[] dateArray = viewByDate.split(\"-\");\n for (int i = 0; i < dateArray.length; i++)... | [
"0.65632445",
"0.65632445",
"0.65632445",
"0.63741523",
"0.6343518",
"0.6337937",
"0.6337937",
"0.6319236",
"0.6318973",
"0.6318973",
"0.6176896",
"0.61569506",
"0.61569506",
"0.61555856",
"0.6147664",
"0.61109823",
"0.61074466",
"0.61074466",
"0.60974365",
"0.6090763",
"0.60... | 0.0 | -1 |
TODO Autogenerated method stub | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doGet(request, response);
} | {
"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 |
Create a new TFreightConfigDao without any configuration | public TFreightConfigDao() {
super(T_FREIGHT_CONFIG, TFreightConfig.class);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Autowired\n public TFreightConfigDao(Configuration configuration) {\n super(T_FREIGHT_CONFIG, TFreightConfig.class, configuration);\n }",
"public StructureTownHallConfigDao() {\n\t\tsuper(StructureTownHallConfig.STRUCTURE_TOWN_HALL_CONFIG, StructureTownHallConfigPojo.class);\n\t}",
"@Test(expecte... | [
"0.64716834",
"0.6119527",
"0.608685",
"0.6052547",
"0.59125787",
"0.590132",
"0.58422196",
"0.5745954",
"0.573368",
"0.572392",
"0.56990516",
"0.5688875",
"0.5682419",
"0.5645765",
"0.5641063",
"0.5587845",
"0.5585981",
"0.55813",
"0.556835",
"0.55503553",
"0.5539973",
"0.... | 0.7844669 | 0 |
Create a new TFreightConfigDao with an attached configuration | @Autowired
public TFreightConfigDao(Configuration configuration) {
super(T_FREIGHT_CONFIG, TFreightConfig.class, configuration);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public TFreightConfigDao() {\n super(T_FREIGHT_CONFIG, TFreightConfig.class);\n }",
"protected ETLLogDAOImpl(Configuration config) {\r\n config.addClass(ETLLog.class);\r\n factory = config.buildSessionFactory();\r\n }",
"private static SessionFactory buildSessionFactory() {\n\n ... | [
"0.75662196",
"0.59358346",
"0.5909627",
"0.5815076",
"0.5777238",
"0.5767506",
"0.56834644",
"0.5594286",
"0.5585051",
"0.55256414",
"0.5395415",
"0.5352785",
"0.53020895",
"0.5291551",
"0.52795345",
"0.52526456",
"0.52459365",
"0.52416664",
"0.52339536",
"0.51833236",
"0.51... | 0.6930507 | 1 |
Fetch records that have id IN (values) | public List<TFreightConfig> fetchById(Long... values) {
return fetch(T_FREIGHT_CONFIG.ID, values);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Condition in(QueryParameter parameter, Object... values);",
"public List<Produto> findByIdIn(Integer... ids);",
"@GetMapping(\"/listInByIds\")\n public R<List<User>> listInByIds(@RequestParam(value = \"ids\") List<String> ids) {\n return R.ok(userService.selectBatchIds(ids));\n }",
"List<EssayQu... | [
"0.6118371",
"0.6085298",
"0.5983984",
"0.5887595",
"0.58625734",
"0.5854982",
"0.58316135",
"0.5824877",
"0.58105785",
"0.576251",
"0.57519555",
"0.56913364",
"0.5683802",
"0.5664325",
"0.56571996",
"0.562483",
"0.5618595",
"0.5589928",
"0.5541375",
"0.55104876",
"0.54454976... | 0.0 | -1 |
go back to previous state if no enemy in range | public void chase() throws GameActionException {
RobotInfo closestEnemy = dc.getClosestEnemy();
if (closestEnemy == null) {
currState = RobotState.RUSH;
return;
}
// attack closest enemy
mi.setObjective(closestEnemy.location);
mi.setChargeMode();
mi.attackMove();
// send dead enemy archon IDs
sendDeadEnemyArchonIDs();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void endTurn() {\n battle.setState(new EnemyTurn(battle));\n battle.continueBattle();\n }",
"public static void checkTurnEnd(){\n\t\tboolean end = true;\n\t\tfor (int i = 0; i < heroList.length && end; i++) {\n\t\t\t\n\t\t\tif (heroList[i].isAlive()){\n\t\t\t\tif (heroList[... | [
"0.6439438",
"0.6221652",
"0.61587083",
"0.6143459",
"0.612515",
"0.611534",
"0.6115296",
"0.6092968",
"0.60900694",
"0.603871",
"0.6004857",
"0.5975717",
"0.5974246",
"0.59327364",
"0.5922594",
"0.5916707",
"0.59125453",
"0.5907317",
"0.58858067",
"0.5882682",
"0.58607394",
... | 0.0 | -1 |
Convert the given object to string with each line indented by 4 spaces (except the first line). | private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPA... | [
"0.78847593",
"0.75493765",
"0.74971926",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0.746168",
"0... | 0.0 | -1 |
Table cells are lazily created | private void addText(Context context,Global global,String text)
{
if(_currentTableRow!=null && _currentTableCell==null) {
closeParagraph(context,global);
_currentTableCell=new TableSection.Cell();
int width=_cellWidths.get(_currentTableRow.getCells().size());
_currentTableRow.getCells().add(_currentTableCell);
_currentParagraphList=_currentTableCell.getContent();
_currentTableCell.setWidth(width/20.0);
}
if(_currentParagraph==null)
newParagraph(context,global);
if(_currentSection==null||!(_currentSection instanceof TextSection))
{
_currentSection=new TextSection();
_currentParagraph.getSections().add(_currentSection);
TextSection ts=(TextSection)_currentSection;
ts.setStyle(context.getTextStyle().clone());
}
TextSection ts=(TextSection)_currentSection;
if(!ts.getStyle().equals(context.getTextStyle()))
{
_currentSection=new TextSection();
_currentParagraph.getSections().add(_currentSection);
ts=(TextSection)_currentSection;
ts.setStyle(context.getTextStyle().clone());
}
int listId=context.getListId();
if(listId!=0)
{
int level=context.getLevel()+1;
int id=global.getListOverrides().get(listId);
NumberedList nl=global.getNumberedListWithPred(id,level);
ParagraphStyle st=global.getLists().get(id).get(level-1);
context.getParagraphStyle().setBulletStyle(st.getBulletStyle());
if(st.getBulletStyle()!=ParagraphStyle.BulletStyle.BULLET)
{
context.getParagraphStyle().setBulletTextStyle(context.getTextStyle());
context.getParagraphStyle().setBulletText(st.getBulletText());
}
context.getParagraphStyle().setList(nl);
}
ts.setText(ts.getText()+text);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void initializeTableContents() {\n\t\t\r\n\t}",
"@Override\n public void tableRows_()\n {\n }",
"public TableRow() {\n\t\tthis.cells = new ArrayList<TableCell>();\n\t}",
"public void prepareTable() {\n \tthis.table = new Tape(this.height,this.width,2,this.map);\n }",
"p... | [
"0.6704464",
"0.6693635",
"0.66594285",
"0.6605964",
"0.6576745",
"0.65402806",
"0.64808244",
"0.6458814",
"0.64220047",
"0.6387155",
"0.6358633",
"0.6355619",
"0.6347315",
"0.6336122",
"0.63355845",
"0.63002515",
"0.628723",
"0.627242",
"0.62560296",
"0.6250885",
"0.6211648"... | 0.0 | -1 |
Initialize the contents of the frame. | public void initialize(JsonObject inputMsg, ClientGameRoom cgr) {
gameRoom = cgr;
roomNumber = format(inputMsg.get("RoomNumber").toString());
frame = new JFrame("Game Board");
ImageIcon img = new ImageIcon("background/Gameboardbg.jpg");
JLabel imgLabel = new JLabel(img);
frame.getLayeredPane().add(imgLabel, new Integer(Integer.MIN_VALUE));
imgLabel.setBounds(0, 0, img.getIconWidth(), img.getIconHeight());
Container cp = frame.getContentPane();
cp.setFont(new Font("Lucida Grande", Font.BOLD, 15));
cp.setLayout(null);
((JPanel) cp).setOpaque(false);
frame.setBounds(100, 100, img.getIconWidth(), img.getIconHeight() + 20);
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
JLabel lblScoreBoard = new JLabel("Score board");
lblScoreBoard.setForeground(Color.WHITE);
lblScoreBoard.setFont(new Font("Lucida Grande", Font.BOLD, 20));
lblScoreBoard.setBounds(898, 13, 162, 31);
cp.add(lblScoreBoard);
JLabel lblChatArea = new JLabel("Chat Area");
lblChatArea.setForeground(Color.WHITE);
lblChatArea.setFont(new Font("Lucida Grande", Font.BOLD, 20));
lblChatArea.setBounds(896, 397, 154, 31);
cp.add(lblChatArea);
textArea = new JTextArea();
textArea.setFont(new Font("Lucida Grande", Font.PLAIN, 15));
textArea.setLineWrap(true);
textArea.setEditable(false);
JScrollPane jsp = new JScrollPane(textArea);
cp.add(jsp);
jsp.setBounds(750, 432, 424, 291);
textField = new JTextField();
textField.setFont(new Font("Lucida Grande", Font.PLAIN, 15));
textField.setBounds(750, 736, 344, 39);
cp.add(textField);
textField.setColumns(10);
JButton submitButton = new JButton("");
submitButton.setIcon(new ImageIcon("buttonICON/chat.jpg"));
submitButton.setFont(new Font("Lucida Grande", Font.PLAIN, 15));
// Player input chat content
submitButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String chatContent = textField.getText();
message = new JsonObject();
message.addProperty("Direction", "ClientToServer");
message.addProperty("Function", "InGame");
message.addProperty("RoomNumber", roomNumber);
message.addProperty("Operation", "Chat");
message.addProperty("Speaker", currentPlayer.getText());
message.addProperty("ChatContent", chatContent);
jsonString = message.toString();
try {
writer.write(jsonString + "\n");
writer.flush();
} catch (IOException e1) {
JOptionPane.showMessageDialog(null, "Fail to connect Server", "Error",
JOptionPane.ERROR_MESSAGE);
System.exit(0);
}
textField.setText("");
}
});
submitButton.setBounds(1124, 735, 44, 40);
cp.add(submitButton);
passButton = new JButton("");
passButton.setIcon(new ImageIcon("buttonICON/pass.jpg"));
passButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
for (int i = 0; i < ROW; i++) {
for (int j = 0; j < COLUME; j++) {
if (board[i][j].isEditable()) {
System.out.println(i + "\t" + j);
board[i][j].setText("");
board[i][j].setEditable(false);
}
}
}
message = new JsonObject();
message.addProperty("Direction", "ClientToServer");
message.addProperty("Function", "InGame");
message.addProperty("RoomNumber", roomNumber);
message.addProperty("PassPlayer", currentPlayer.getText());
message.addProperty("Operation", "Pass");
jsonString = message.toString();
try {
writer.write(jsonString + "\n");
writer.flush();
} catch (IOException e1) {
JOptionPane.showMessageDialog(null, "Fail to connect Server", "Error",
JOptionPane.ERROR_MESSAGE);
System.exit(0);
}
confirmButton.setEnabled(false);
passButton.setEnabled(false);
}
});
passButton.setFont(new Font("Lucida Grande", Font.BOLD, 15));
passButton.setBounds(396, 703, 60, 60);
passButton.setEnabled(false);
cp.add(passButton);
confirmButton = new JButton("");
confirmButton.setIcon(new ImageIcon("buttonICON/comfirm.jpg"));
confirmButton.setFont(new Font("Lucida Grande", Font.BOLD, 15));
// Player set a letter
confirmButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
try {
int change = 0;
for (int i = 0; i < ROW; i++) {
for (int j = 0; j < COLUME; j++) {
if (!board[i][j].getText().equals("") && board[i][j].isEditable()) {
change++;
temprow = i;
tempcol = j;
}
}
}
// Players are only allowed to set one letter at a time
if (change == 1
&& Pattern.matches("^[a-zA-Z]$", board[temprow][tempcol].getText())) {
message = new JsonObject();
message.addProperty("Direction", "ClientToServer");
message.addProperty("Function", "InGame");
message.addProperty("RoomNumber", roomNumber);
message.addProperty("Operation", "ForVote");
message.addProperty("Row", temprow + "");
message.addProperty("Column", tempcol + "");
message.addProperty("Letter", board[temprow][tempcol].getText());
jsonString = message.toString();
writer.write(jsonString + "\n");
writer.flush();
for (int i = 0; i < ROW; i++) {
for (int j = 0; j < COLUME; j++) {
board[i][j].setEditable(false);
}
}
confirmButton.setEnabled(false);
passButton.setEnabled(false);
} else {
JOptionPane.showMessageDialog(null, "You should only input 1 letter",
"Input ERROR", JOptionPane.INFORMATION_MESSAGE);
}
} catch (IOException e) {
JOptionPane.showMessageDialog(null, "Fail to connect Server", "Error",
JOptionPane.ERROR_MESSAGE);
System.exit(0);
}
}
});
confirmButton.setBounds(166, 703, 60, 60);
confirmButton.setEnabled(false);
cp.add(confirmButton);
JLabel lblPlayer = new JLabel("Player : ");
lblPlayer.setForeground(Color.WHITE);
lblPlayer.setFont(new Font("Lucida Grande", Font.BOLD, 20));
lblPlayer.setBounds(12, 13, 97, 31);
cp.add(lblPlayer);
currentPlayer = new JTextField();
currentPlayer.setEditable(false);
currentPlayer.setFont(new Font("Lucida Grande", Font.BOLD, 15));
currentPlayer.setBounds(119, 13, 176, 31);
cp.add(currentPlayer);
currentPlayer.setColumns(10);
// Initialize the crossword form
for (int i = 0; i < ROW; i++) {
for (int j = 0; j < COLUME; j++) {
board[i][j] = new JTextField();
board[i][j].setBounds(31 * j + 60, 31 * i + 60, 30, 30);
cp.add(board[i][j]);
board[i][j].setColumns(10);
board[i][j].setText("");
board[i][j].setEditable(false);
}
}
// Initialize the scoreboard
for (int i = 0; i < scoreBoard.length; i++) {
scoreBoard[i] = new JTextField();
scoreBoard[i].setBounds(800, 100 + 50 * i, 300, 40);
cp.add(scoreBoard[i]);
scoreBoard[i].setEditable(false);
scoreBoard[i].setColumns(10);
}
playerList = new ArrayList<>(); // Initialize the player list
for (int i = 0; i < inputMsg.getAsJsonArray("PlayerList").size(); i++) {
gamePlayer = new GamePlayer();
gamePlayer.setPlayerName(format(inputMsg.getAsJsonArray("PlayerList").get(i)
.getAsJsonObject().get("PlayerName").toString()));
gamePlayer.setPlayerScore(0);
playerList.add(gamePlayer);
scoreBoard[i].setText("");
scoreBoard[i].setText("Player: " + gamePlayer.getPlayerName() + "\t" + "Score: "
+ gamePlayer.getPlayerScore());
}
currentPlayer.setText(format(inputMsg.get("Destination").toString()));
lblComfirm = new JLabel("comfirm=>");
lblComfirm.setForeground(Color.WHITE);
lblComfirm.setFont(new Font("Lucida Grande", Font.BOLD, 20));
lblComfirm.setBounds(31, 712, 123, 39);
cp.add(lblComfirm);
lblPass = new JLabel("pass=>");
lblPass.setForeground(Color.WHITE);
lblPass.setFont(new Font("Lucida Grande", Font.BOLD, 20));
lblPass.setBounds(271, 712, 123, 39);
cp.add(lblPass);
// Respond to close button events
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
try {
message = new JsonObject();
message.addProperty("Direction", "ClientToServer");
message.addProperty("Function", "QuitRequest");
message.addProperty("Layer", "Board");
message.addProperty("RoomNumber", roomNumber);
message.addProperty("QuitPlayer", currentPlayer.getText());
jsonString = message.toString();
writer.write(jsonString + "\n");
writer.flush();
} catch (IOException e1) {
JOptionPane.showMessageDialog(null, "Fail to connect Server", "Error",
JOptionPane.ERROR_MESSAGE);
System.exit(0);
}
}
});
frame.setVisible(true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BreukFrame() {\n super();\n initialize();\n }",
"public MainFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}",
"private void initialize() {\n\t\tthis.setSize(211, 449);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setTitle(\"JFrame\");\n\t}",
"public SiscobanFrame() {\r\n\t\tsuper();\r... | [
"0.77704835",
"0.75652915",
"0.7442664",
"0.7369101",
"0.7366378",
"0.7358479",
"0.73146075",
"0.73096764",
"0.72987294",
"0.72978777",
"0.7278321",
"0.72729623",
"0.7269468",
"0.7269468",
"0.7215727",
"0.7180792",
"0.71682984",
"0.7140954",
"0.7140953",
"0.7126852",
"0.71079... | 0.0 | -1 |
Activate the crossword form to the player's turn | public void setLetter() {
confirmButton.setEnabled(true);
passButton.setEnabled(true);
for (int i = 0; i < ROW; i++) {
for (int j = 0; j < COLUME; j++) {
if (board[i][j].getText().equals("")) {
board[i][j].setEditable(true);
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void crossPressed() {\n\t\tif (!talkmode) {\n\t\t\tif (checkLoot() || checkNearbyVillagers() || checkDoors(doors, player.direction) || checkSigns()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\tif (question) {\n\t\t\t\texitQuestionDialog();\n\t\t\t}\n\n\t\t\tLoot g = dialog.getGift();\n\t\t\tif (g != n... | [
"0.61975396",
"0.6087584",
"0.6001584",
"0.59202856",
"0.58948797",
"0.5822647",
"0.5806921",
"0.575466",
"0.57217354",
"0.5716189",
"0.57140493",
"0.57108206",
"0.5695814",
"0.5692058",
"0.56887066",
"0.56769377",
"0.56769377",
"0.56673473",
"0.56646496",
"0.56450856",
"0.56... | 0.0 | -1 |
Get the word to be voted | public JsonArray getGameWord(int r, int c) {
JsonObject wordr = new JsonObject();
JsonObject wordc = new JsonObject();
String word[] = new String[2]; // word[0]: Words consisting of consecutive letters in the
// same row;
// word[1]: Words consisting of consecutive
// letters in the same column
word[0] = board[r][c].getText();
word[1] = board[r][c].getText();
// Stitch letters and form words
for (int i = 1; r + i < board.length; i++) {
if (board[r + i][c].getText().equals("")) {
break;
}
word[0] = word[0] + board[r + i][c].getText();
}
for (int i = 1; r - i >= 0; i++) {
if (board[r - i][c].getText().equals("")) {
break;
}
word[0] = board[r - i][c].getText() + word[0];
}
for (int i = 1; c + i < board.length; i++) {
if (board[r][c + i].getText().equals("")) {
break;
}
word[1] = word[1] + board[r][c + i].getText();
}
for (int i = 1; c - i >= 0; i++) {
if (board[r][c - i].getText().equals("")) {
break;
}
word[1] = board[r][c - i].getText() + word[1];
}
// Only pass the vertical word when there is only one letter
if (word[0].length() + word[1].length() != 2) {
wordr.addProperty("Word", word[0]);
wordr.addProperty("Score", word[0].length());
}
wordc.addProperty("Word", word[1]);
wordc.addProperty("Score", word[1].length());
gameWord = new JsonArray();
gameWord.add(wordr);
gameWord.add(wordc);
return gameWord;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getWord();",
"public String getVoteString() {\n\t\treturn voted ? Arrays.toString(topIdeas) : \"n/a\";\n\t}",
"public void getWord() {\n\t\t\n\t}",
"public String getWord(){\r\n\t\t return word;\r\n\t }",
"public String getWord(){\n return this.word;\n }",
"@Override\n publi... | [
"0.668407",
"0.6319308",
"0.61842227",
"0.6113685",
"0.60902107",
"0.607901",
"0.6070644",
"0.6059186",
"0.60163707",
"0.60133535",
"0.60101026",
"0.5989124",
"0.5977574",
"0.5959842",
"0.5911185",
"0.58980286",
"0.5859634",
"0.58582914",
"0.58355856",
"0.58343863",
"0.577164... | 0.0 | -1 |
Display the letter filled in by a player | public void updateBoard(JsonObject inputMsg) {
board[Integer.parseInt(format(inputMsg.get("Row").toString()))][Integer
.parseInt(format(inputMsg.get("Column").toString()))]
.setText(format(inputMsg.get("Letter").toString()));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void displayCharacter() {\n System.out.println(\"**************************\");\n System.out.println(p.showDetails());\n System.out.println(\"**************************\"+\"\\n\");\n\n }",
"public void printNextChar()\n\t{\n\t\tif(line < linesSize)\n\t\t{\n\t\t\tString nextChar = C... | [
"0.7108082",
"0.67209405",
"0.6697358",
"0.6673227",
"0.66508543",
"0.6517593",
"0.6505286",
"0.6405947",
"0.63194853",
"0.6306049",
"0.63009983",
"0.6293965",
"0.627591",
"0.62750524",
"0.6239783",
"0.62341547",
"0.62237835",
"0.6221901",
"0.6219161",
"0.6214026",
"0.6203206... | 0.0 | -1 |
Vote on all words formed | public void vote(JsonObject inputMsg) {
message = new JsonObject();
message.addProperty("Direction", "ClientToServer");
message.addProperty("Function", "InGame");
message.addProperty("Operation", "VoteResult");
message.addProperty("RoomNumber", roomNumber);
message.addProperty("ScoredPlayer", format(inputMsg.get("ScoredPlayer").toString()));
int r = Integer.parseInt(format(inputMsg.get("Row").toString()));
int c = Integer.parseInt(format(inputMsg.get("Column").toString()));
ArrayList<String> voteWord = new ArrayList<String>();
String word[] = new String[2];
board[r][c].setText(format(inputMsg.get("Letter").toString()));
word[0] = board[r][c].getText();
word[1] = board[r][c].getText();
board[r][c].setBackground(Color.YELLOW);
// Connect letters into a word
for (int i = 1; r + i < board.length; i++) {
if (board[r + i][c].getText().equals("")) {
break;
}
word[0] = word[0] + board[r + i][c].getText();
board[r + i][c].setBackground(Color.YELLOW);
}
for (int i = 1; r - i >= 0; i++) {
if (board[r - i][c].getText().equals("")) {
break;
}
word[0] = board[r - i][c].getText() + word[0];
board[r - i][c].setBackground(Color.YELLOW);
}
for (int i = 1; c + i < board.length; i++) {
if (board[r][c + i].getText().equals("")) {
break;
}
word[1] = word[1] + board[r][c + i].getText();
board[r][c + i].setBackground(Color.YELLOW);
}
for (int i = 1; c - i >= 0; i++) {
if (board[r][c - i].getText().equals("")) {
break;
}
word[1] = board[r][c - i].getText() + word[1];
board[r][c - i].setBackground(Color.YELLOW);
}
if (word[0].length() + word[1].length() == 2) {
voteWord.add(word[0]);
} else {
voteWord.add(word[0]);
voteWord.add(word[1]);
}
voteWord(voteWord);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setVersesWithWord(Word word);",
"public void voteWord(ArrayList<String> voteWord) {\n\n\t\tJsonArray voteword = new JsonArray();\n\t\tJsonObject tmp = new JsonObject();\n\n\t\tfor (String s : voteWord) {\n\t\t\ttmp = new JsonObject();\n\t\t\ttmp.addProperty(\"Word\", s);\n\t\t\tint isAccept = JOptionPane.sh... | [
"0.6731989",
"0.6584595",
"0.60255635",
"0.5784816",
"0.566908",
"0.56301224",
"0.55369306",
"0.55352616",
"0.5523395",
"0.55160683",
"0.5440458",
"0.54139024",
"0.54079944",
"0.5396506",
"0.5395945",
"0.5375099",
"0.537068",
"0.53680015",
"0.53666216",
"0.53647643",
"0.53578... | 0.50093913 | 81 |
Initiate a vote on every word | public void voteWord(ArrayList<String> voteWord) {
JsonArray voteword = new JsonArray();
JsonObject tmp = new JsonObject();
for (String s : voteWord) {
tmp = new JsonObject();
tmp.addProperty("Word", s);
int isAccept = JOptionPane.showConfirmDialog(null, "Is " + "\"" + s + "\"" + " a word?",
"Vote", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if (isAccept == JOptionPane.YES_OPTION) {
tmp.addProperty("IsAWord", "Yes");
} else {
tmp.addProperty("IsAWord", "No");
}
voteword.add(tmp);
}
message.add("VoteWord", voteword);
jsonString = message.toString();
try {
writer.write(jsonString + "\n");
writer.flush();
} catch (IOException e) {
JOptionPane.showMessageDialog(null, "Fail to connect Server", "Error",
JOptionPane.ERROR_MESSAGE);
System.exit(0);
}
for (int i = 0; i < ROW; i++) {
for (int j = 0; j < COLUME; j++) {
board[i][j].setBackground(Color.WHITE);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void doVote() {\n }",
"void setVersesWithWord(Word word);",
"public void addVote() {\n this.votes++;\n }",
"public void addVote(String token);",
"public static void doVoteAndComment() {\n }",
"@Test\n public void vote() {\n System.out.println(client.makeVotes(client.comp... | [
"0.6472416",
"0.61951524",
"0.614618",
"0.60081875",
"0.5826787",
"0.5813039",
"0.5770618",
"0.5728342",
"0.5687384",
"0.5595832",
"0.5512185",
"0.54997206",
"0.54965025",
"0.5496108",
"0.545544",
"0.54484874",
"0.54363656",
"0.5404249",
"0.5392828",
"0.53586894",
"0.5356545"... | 0.62526715 | 1 |
Update the score of the corresponding player | public void updateScore(JsonObject inputMsg) {
String name = format(inputMsg.get("ScoredPlayer").toString());
for (int i = 0; i < playerList.size(); i++) {
if (playerList.get(i).getPlayerName().equals(name)) {
playerList.get(i).setPlayerScore(playerList.get(i).getPlayerScore()
+ Integer.parseInt(format(inputMsg.get("Score").toString())));
scoreBoard[i].setText("Player: " + playerList.get(i).getPlayerName() + "\t"
+ "Score: " + playerList.get(i).getPlayerScore());
break;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updatePlayerScore()\n\t{\n\t\tthis.score = (int)(getBalance() - 500) - (getNumberOfLoans()*500); \n\t}",
"public void updateScore(int playerScore){\n\t\tscore += playerScore;\n\t\tscoreTotalLabel.setText(\"\" + score);\n\t}",
"public void updateScore(int score){ bot.updateScore(score); }",
"@Over... | [
"0.8308343",
"0.8172754",
"0.7983402",
"0.7961641",
"0.78724575",
"0.7843844",
"0.7769609",
"0.7724232",
"0.76606214",
"0.7621761",
"0.7616943",
"0.7602626",
"0.7573516",
"0.7438336",
"0.7419414",
"0.7418708",
"0.7398243",
"0.73858845",
"0.73264915",
"0.72606",
"0.71931076",
... | 0.7217586 | 20 |
Display the chat message | public void displayChatMessage(JsonObject inputMsg) {
textArea.append(format(inputMsg.get("Speaker").toString()) + " said: "
+ format(inputMsg.get("ChatContent").toString()) + "\n");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void showMessage() throws IOException {\n String msg = fromServer.readUTF();\n chatArea.append(msg + \"\\n\");\n // set the chat area always keep focus at bottom\n chatArea.setCaretPosition(chatArea.getDocument().getLength());\n }",
"private void displayMsg(String msg) {\n ... | [
"0.7883767",
"0.767305",
"0.7605813",
"0.7582188",
"0.7480947",
"0.74031043",
"0.73919725",
"0.7149336",
"0.6975865",
"0.69509333",
"0.69473314",
"0.6930127",
"0.6883134",
"0.6882473",
"0.68638766",
"0.6825371",
"0.6814109",
"0.6811334",
"0.68101335",
"0.68004143",
"0.6781366... | 0.76824987 | 1 |
Display the game result | public void gameOver() {
gameResult = new GameResult(writer);
String winnersName = "";
String resultList = "";
GamePlayer[] tempList = new GamePlayer[playerList.size()];
for (int i = 0; i < tempList.length; i++) {
tempList[i] = playerList.get(i);
}
Arrays.sort(tempList); // Sort the players according to the scores
int max = tempList[tempList.length - 1].getPlayerScore();
int position = 0;
for (int i = tempList.length - 1; i >= 0; i--) {
if (max == tempList[i].getPlayerScore()) {
winnersName += tempList[i].getPlayerName() + "\t";
}
resultList += "No." + (++position) + "\t" + tempList[i].getPlayerName() + "\t"
+ tempList[i].getPlayerScore() + "\n";
}
gameResult.initialize(winnersName, resultList, roomNumber, gameRoom);
frame.dispose();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void showResult() {\n int i = 0;\n matchList.forEach(match -> match.proceed());\n for (Match match : matchList) {\n setTextInlabels(match.showTeamWithResult(), i);\n i++;\n }\n }",
"public void showGameResult(GameMenu myGameMenu){\n //Anropa met... | [
"0.7259567",
"0.72308373",
"0.7099402",
"0.7087306",
"0.70593417",
"0.70295316",
"0.70066094",
"0.697751",
"0.6971532",
"0.69033414",
"0.68911266",
"0.68775046",
"0.6861605",
"0.6832558",
"0.6821268",
"0.68182015",
"0.6779447",
"0.67793405",
"0.67783636",
"0.67600596",
"0.670... | 0.63409555 | 60 |
Created by Nico on 11/02/2016. | public interface IUserService {
User save (User user);
Iterable<User> findAll();
User findByLogin(String login);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpubl... | [
"0.6104755",
"0.5963934",
"0.59463215",
"0.59414685",
"0.59019184",
"0.58523923",
"0.58523923",
"0.58348185",
"0.581228",
"0.58099526",
"0.57616735",
"0.5734913",
"0.5704342",
"0.5702936",
"0.5697137",
"0.56671464",
"0.5650316",
"0.5641788",
"0.56331015",
"0.56310946",
"0.562... | 0.0 | -1 |
Get the set of error classes (and optionally) error messages that occur in the application and should be ignored from being reported as errors. | Set<IgnoreErrorConfig> getIgnoreErrors(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<String> getErrorMessages();",
"public List<String> getErrorMessages() {\n logger.info(Thread.currentThread().getStackTrace()[1].getMethodName());\n logger.debug(\"Getting All Error Messages -> \"+errMessages);\n return errMessages;\n }",
"public ImmutableList<ErrorCase> getA... | [
"0.66252726",
"0.64478314",
"0.63686156",
"0.63465923",
"0.62378496",
"0.61437106",
"0.6102418",
"0.6030065",
"0.5988601",
"0.59422517",
"0.58902955",
"0.5888375",
"0.5878868",
"0.581451",
"0.5814069",
"0.5811893",
"0.5800646",
"0.579931",
"0.57900506",
"0.5786915",
"0.573580... | 0.6325255 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.