__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/35671642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeFavUploader(String uploader) {
for(int i=0 ;i< favUploaders_name.size() ; i++) {
if(favUploaders_name.get(i).equals(uploader)) {
if(favUploaders_num.get(i)==1) {
favUploaders_num.remove(i);
favUploaders_name.remove(i);
}
else favUploaders_num.set(i,favUploaders_num.get(i)-1);
return;
}
}
}
COM: <s> remove the uploaders num 1 </s>
|
funcom_train/5080701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paintClientArea(Graphics graphics) {
if (isStyle(STYLE_BUTTON) && (getModel().isArmed() || getModel().isSelected())) {
graphics.translate(1, 1);
graphics.pushState();
super.paintClientArea(graphics);
graphics.popState();
graphics.translate(-1, -1);
} else
super.paintClientArea(graphics);
}
COM: <s> paints the area of this figure excluded by the borders </s>
|
funcom_train/26533678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String hashValue(String value) {
if (!StringUtils.hasValue(value))
return value;
byte[] bytes;
try {
bytes = value.getBytes("UTF-8");
} catch (UnsupportedEncodingException e) {
// can't happen
return null;
}
hashBytes(bytes);
return Base64.encodeBytes(bytes);
}
COM: <s> encode a hashed value </s>
|
funcom_train/29712549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasTargComp() {
for (Mounted m: getMisc()) {
if (m.getType() instanceof MiscType && m.getType().hasFlag(MiscType.F_TARGCOMP)) {
return !(m.isDestroyed() || m.isMissing() || m.isBreached());
}
}
return false;
}
COM: <s> returns wether or not this entity has a targeting computer </s>
|
funcom_train/50340886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NamedIcon getIcon(String status, int state) {
log.debug("getIcon: status= "+status+", state= "+state);
Hashtable<Integer, NamedIcon> map = _iconMaps.get(status);
if (map==null) { return null; }
return map.get(Integer.valueOf(state));
}
COM: <s> get clear icon by its localized bean state name </s>
|
funcom_train/7647400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contentEquals(StringBuffer strbuf) {
synchronized (strbuf) {
int size = strbuf.length();
if (count != size) {
return false;
}
return regionMatches(0, new String(0, size, strbuf.getValue()), 0,
size);
}
}
COM: <s> returns whether the characters in the string buffer </s>
|
funcom_train/11380332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(final GridmixJob job) throws InterruptedException {
final boolean addToQueue = !shutdown;
if (addToQueue) {
final SubmitTask task = new SubmitTask(job);
sem.acquire();
try {
sched.execute(task);
} catch (RejectedExecutionException e) {
sem.release();
}
}
}
COM: <s> enqueue the job to be submitted per the deadline associated with it </s>
|
funcom_train/36817437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sortdata(int[] a, int[] b){
int k = a.length;
for(int i=0; i<k-1; i++){
for(int j=k-1; j>=i+1; j--)
if(a[j]<a[j-1]) {
//do x values
int t = a[j];
a[j] = a[j-1];
a[j-1] = t;
//do y values
int u = b[j];
b[j]=b[j-1];
b[j-1]=u;
}
}
}
COM: <s> sorts the data based on the x values </s>
|
funcom_train/36466426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document loadPage(String queryId, int pageNum) {
GetMethod method = new GetMethod(urlGenerator.constructLink(pageNum, queryId));
try {
client.executeMethod(method);
Document page = htmlParser.parse(method.getResponseBodyAsStream(), method.getURI().toString(),
method.getRequestCharSet());
method.releaseConnection();
return page;
}
catch(Exception e) {
e.printStackTrace();
return null;
}
}
COM: <s> loads a search result page </s>
|
funcom_train/1719088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLongitudeString(boolean useNegativeValues) {
if (mWest) {
if(useNegativeValues) {
return "-" + mLongitude;
} else {
return mLongitude + "W";
}
} else {
if(useNegativeValues) {
return new Integer(mLongitude).toString();
} else {
return mLongitude + "E";
}
}
}
COM: <s> returns the current longitude as a string to account for negative zero </s>
|
funcom_train/1540676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Group createTopLevelGroup(Group specifiedGroup) {
SequentialGroup group = createSequentialGroup();
if (getAutocreateContainerGaps()) {
group.addSpring(new ContainerAutopaddingSpring());
group.add(specifiedGroup);
group.addSpring(new ContainerAutopaddingSpring());
} else {
group.add(specifiedGroup);
}
return group;
}
COM: <s> wraps the user specified group in a sequential group </s>
|
funcom_train/29018008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getItemCount () {
checkWidget ();
if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
int /*long*/ hwnd = parent.handle;
int /*long*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle);
if (hItem == 0) return 0;
return parent.getItemCount (hItem);
}
COM: <s> returns the number of items contained in the receiver </s>
|
funcom_train/16785512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel14() {
if (jPanel14 == null) {
jLabel12 = new JLabel();
jLabel12.setText("queuename: ");
jLabel12.setForeground(Color.GRAY);
jPanel14 = new JPanel();
jPanel14.setLayout(new BorderLayout());
jPanel14.add(jLabel12, BorderLayout.WEST);
jPanel14.add(getJTextField7(), BorderLayout.CENTER);
getJTextField7().setEnabled(false);
}
return jPanel14;
}
COM: <s> this method initializes j panel14 </s>
|
funcom_train/45716281 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getChanged() {
if (super.getChanged()) {
return true;
} else {
for (int i = 0; i < cells.size(); i++) {
if (((CellOJ) cells.get(i)).getChanged()) {
return true;
}
}
}
return false;
}
COM: <s> scans all cells to check if one has changed </s>
|
funcom_train/18726197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addExtension() {
if (getSelectedImport() == null) {
return;
}
final String extension = getSelectedImport().getFileExtension();
final String fileName = chooseFileName.getText();
final String newFileName = JaxoIO.withExtension(fileName.trim(), extension);
if (!newFileName.equals(fileName)) {
chooseFileName.setText(newFileName);
}
}
COM: <s> add extension of current import to file name unless already there </s>
|
funcom_train/37213957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String createInteractionRequest(String metadata, FileItem data) {
synchronized (statusMap) {
InteractionState state = InteractionState.createInteractionState(
repository, data, metadata);
if (state != null) {
String jobID = state.getID();
statusMap.put(jobID, state);
sendEmail(state);
log.debug("Returning state ID '" + jobID + "'");
return jobID;
} else {
log.error("State was null");
return null;
}
}
}
COM: <s> create a new interaction request </s>
|
funcom_train/12193038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getContentsAsMutableSet() {
// Create this lazily as it will never be needed for immutable
// objects and it does not need to be synchronized as mutable objects
// are not thread safe.
if (mutableContents == null) {
mutableContents = new ImmutableGeneratingTypedSet(contents, MetaDataValue.class);
}
return mutableContents;
}
COM: <s> get a mutable set of </s>
|
funcom_train/36911384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addResultToTransaction(Transaction transaction, String result){
if(_htTransactionResultsTable.containsKey(transaction)){
ArrayList<String> lstTransactionResult = _htTransactionResultsTable.get(transaction);
if(lstTransactionResult != null){
lstTransactionResult.add(result);
}
}else{
ArrayList<String> lstTransactionResult = new ArrayList<String>();
lstTransactionResult.add(result);
_htTransactionResultsTable.put(transaction, lstTransactionResult);
}
}
COM: <s> adds result to transaction </s>
|
funcom_train/51525104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected FormField getFieldForUpdate() {
FormField field4Update;
Form form = source.getForm();
Form rootForm = getRootForm();
switch (eventDef.getViewUpdateType()) {
case EventConst.SELF:
field4Update = source;
break;
case EventConst.PARENT_FORM:
field4Update = form;
break;
case EventConst.FOREPARENT_FORM:
if (form.getParentForm() == null) {
field4Update = form;
} else {
field4Update = form.getParentForm();
}
break;
case EventConst.ROOT_FORM:
field4Update = rootForm;
break;
default:
field4Update = form;
}
return field4Update;
}
COM: <s> the root field for update </s>
|
funcom_train/45519215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createXmlElement(Element element, String type, String name, String value, String description) {
Element settingElement = ToolsXML.appendElement(element, "SETTING");
ToolsXML.appendElement(settingElement, "NAME", name);
ToolsXML.appendElement(settingElement, "VALUE", value);
ToolsXML.appendElement(settingElement, "DESCRIPTION", description);
ToolsXML.appendElement(settingElement, "TYPE", type);
}
COM: <s> creates the xml element </s>
|
funcom_train/19771594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSimpleInt() {
try {
Object value = bean.get("intProperty");
assertNotNull("Got a value", value);
assertTrue("Got correct type", (value instanceof Integer));
assertEquals("Got correct value",
((Integer) value).intValue(),
(int) 123);
} catch (Throwable t) {
fail("Exception: " + t);
}
}
COM: <s> test get simple property on a int property </s>
|
funcom_train/21879073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Resource getResourceOr(Resource r, Property p, Resource def) {
if (r.hasProperty(p)) {
RDFNode node = r.getProperty(p).getObject();
if (node.canAs(Resource.class)) {
return (Resource) node.as(Resource.class);
}
}
return def;
}
COM: <s> return a resource object of the statement or the default resource </s>
|
funcom_train/51717145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void store(int step, int value,String txt,boolean isin){
if (isin){
cumul=cumul+value;
}else{
cumul=cumul-value;
}
p_Chartplus2.addval(step,System.currentTimeMillis(),cumul,""+txt);
}
COM: <s> store value in the courbs </s>
|
funcom_train/27952262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createPool() {
log(INFO,"Requested poolsize: "+ poolsize);
for(int i=0;i<poolsize;i++) {
Handler w = new Handler(i);
w.start();
poolstack.push(w);
log(DEBUG,"handler " + i + " created and pushed back");
}
log(INFO,"threadpool creation finished");
}
COM: <s> create a number of handlers equal to the poolsize </s>
|
funcom_train/18250482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateDuration() {
EntryType entryType = entries.getCurrentSelected();
if (entryType != null) {
Calendar startTime = entryType.getStartTime();
Date time = startTime.getTime();
long longTime = time.getTime();
long duration = System.currentTimeMillis() - longTime;
duration = duration / UPDATE_INTERVAL;
entryType.setDuration(duration);
entries.setChanged();
entries.notifyObservers();
}
}
COM: <s> updates the duration field </s>
|
funcom_train/50434119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(int pos, int len) {
debug.assert(pos >= 0, "pos must be nonnegative");
debug.assert(len >= 0, "len must be nonnegative");
System.arraycopy(databuf, pos + len, databuf, pos,
databuf.length - pos - len);
datalen -= len;
} // of remove
COM: <s> remove len number of bytes at position pos </s>
|
funcom_train/25648297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean mapOutgatesAndInGates(OutGate gate, Map<InGate, OutGate> gateStack) {
boolean result = false;
if (gate.getCallTransition() != null && gate.getCallTransition().getImmediateTargetState() instanceof InGate) {
gateStack.put((InGate) gate.getCallTransition().getImmediateTargetState(), gate);
result = true;
}
return result;
}
COM: <s> this creates pair from ingate and outgate </s>
|
funcom_train/45541823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected LazyJSCCompletionProposal createRequiredTypeCompletionProposal(CompletionProposal completionProposal, JSCContentAssistInvocationContext invocationContext) {
if (PreferenceConstants.getPreferenceStore().getBoolean(PreferenceConstants.CODEASSIST_FILL_ARGUMENT_NAMES))
return (LazyJSCCompletionProposal)new FillArgumentNamesCompletionProposalCollector(invocationContext).createJSCCompletionProposal(completionProposal);
else
return new LazyJSCTypeCompletionProposal(completionProposal, invocationContext);
}
COM: <s> creates the required type proposal </s>
|
funcom_train/41594082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addValignPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_StrucDocTr_valign_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_StrucDocTr_valign_feature", "_UI_StrucDocTr_type"),
V3Package.eINSTANCE.getStrucDocTr_Valign(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the valign feature </s>
|
funcom_train/45253276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void releaseView(IViewReference viewRef) {
String key = getKey(viewRef);
IViewReference ref = (IViewReference) counter.get(key);
if (ref == null) {
return;
}
int count = counter.removeRef(key);
if (count <= 0) {
getWorkbenchPage().partRemoved((ViewReference)ref);
}
}
COM: <s> releases an instance of a view </s>
|
funcom_train/23028966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane getSklepScrool() {
if (sklepScrool == null) {
try {
sklepScrool = new JScrollPane();
sklepScrool.setBounds(new Rectangle(5, 1, 596, 464));
sklepScrool.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
sklepScrool.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
sklepScrool.setViewportView(getSklepView());
} catch (java.lang.Throwable e) {
// TODO: Something
}
}
return sklepScrool;
}
COM: <s> this method initializes sklep scrool </s>
|
funcom_train/45809759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Object obj1, Object obj2) {
//! return subcomparator.compare(grabber.grab(obj1), grabber.grab(obj2));
return subcomparator.compare(((TypedIF)obj1).getType(), ((TypedIF)obj2).getType());
}
COM: <s> internal compares the given typed if objects using the </s>
|
funcom_train/46008184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Long storeLoginInformationGetTrailID(String schema) {
UserTrail ut = new UserTrail();
ut.setUser_id(this.user_id);
ut.setLoggedInDate(new java.util.Date());
ut.setEndSessionDate(ut.getLoggedInDate());
MultiSchemaHibernateUtil.beginTransaction(schema);
MultiSchemaHibernateUtil.getSession(schema).saveOrUpdate(ut);
// Get the id of this user trail, to use for updating with heartbeats.
this.trail_id = ut.getId();
MultiSchemaHibernateUtil.commitAndCloseTransaction(schema);
return this.trail_id;
}
COM: <s> persists the information in this logged in ticket to a user trail object </s>
|
funcom_train/29298497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadTest(final String testName) {
// TODO
logger.debug("Called loadTest()");
List<TestPair> exam = SimpleVerbExamCreator.getTestByName(testName, verbs.getVerbArray());
Examiner examiner = new SimpleExaminer();
examiner.setExam(exam);
testWidget.setExaminer(examiner);
}
COM: <s> load a selected test </s>
|
funcom_train/10510111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireTaskStarted(Task task) {
// register this as the current task on the current thread.
registerThreadTask(Thread.currentThread(), task);
BuildEvent event = new BuildEvent(task);
BuildListener[] currListeners = listeners;
for (int i = 0; i < currListeners.length; i++) {
currListeners[i].taskStarted(event);
}
}
COM: <s> send a quot task started quot event to the build listeners </s>
|
funcom_train/50297523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean nullsAreSortedAtEnd() throws SQLException {
// in Firebird 1.5.x NULLs are always sorted at the end
// in Firebird 2.0.x NULLs are sorted low
if (getDatabaseMajorVersion() == 1) {
return true;
} else
if (getDatabaseMajorVersion() == 2) {
return false;
} else
throw new FBDriverNotCapableException();
}
COM: <s> are null values sorted at the end regardless of sort order </s>
|
funcom_train/35281742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resize(int width, int height, boolean fixAspect) {
this.width = width;
this.height = height;
onViewPortChange();
if (fixAspect /*&& !parallelProjection*/) {
frustumRight = frustumTop * ((float) width / height);
frustumLeft = -frustumRight;
onFrustumChange();
}
}
COM: <s> resizes this cameras view with the given width and height </s>
|
funcom_train/36189211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(Object value) {
if (m_property == null) {
throw new UnsupportedOperationException("Cannot set the value of a non 'living' property");
} else {
PSSConfigurationHandler handler = (PSSConfigurationHandler) m_property.getHandler();
handler.reconfigureProperty(m_property, value);
}
}
COM: <s> sets the property value </s>
|
funcom_train/24503713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeBand(File freqFile, int band) {
try {
FileWriter writer = new FileWriter(freqFile);
for (int i = 0; i < 256; i++)
writer.write(Long.toString(colourBins[band][i]) + "\r\n");
writer.flush();
writer.close();
} catch (java.io.IOException e) {
System.err.println(e);
}
}
COM: <s> write the given histogram band to a code file writer code </s>
|
funcom_train/22024376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAxisAngle(float angle, Vector3 axis){
float sin_a = (float)Math.sin( angle / 2 );
float cos_a = (float)Math.cos( angle / 2 );
m[0]= cos_a;
m[1]= axis.m[0] * sin_a;
m[2]= axis.m[1] * sin_a;
m[3]= axis.m[2] * sin_a;
normalize();
}
COM: <s> sets this quaternion to be an axis with angle rotation </s>
|
funcom_train/82653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String buildPreformattedSqlerrmc(SQLException se) {
if (se == null)
return "";
StringBuffer sb = new StringBuffer();
// String buffer to build up message
do {
sb.append(se.getLocalizedMessage());
se = se.getNextException();
if (se != null)
sb.append(SQLERRMC_PREFORMATTED_MESSAGE_DELIMITER +
"SQLSTATE: " + se.getSQLState());
} while (se != null);
return sb.toString();
}
COM: <s> build preformatted sqlexception text </s>
|
funcom_train/3701367 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toDebugString() {
return (
format(val) + " " + toString() +
" (NONE: " + format(probabilities[0]) +
" LOW: " + format(probabilities[1]) +
" MED: " + format(probabilities[2]) +
" HIGH: " + format(probabilities[3]) + ")"
);
} // of method
COM: <s> print out a debugging string </s>
|
funcom_train/45692504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSyncPatternsOnMoveEnabledPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_EsxFile_syncPatternsOnMoveEnabled_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_EsxFile_syncPatternsOnMoveEnabled_feature", "_UI_EsxFile_type"),
EsxPackage.Literals.ESX_FILE__SYNC_PATTERNS_ON_MOVE_ENABLED,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the sync patterns on move enabled feature </s>
|
funcom_train/23379682 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void keyTyped(KeyEvent event) {
if(event.getKeyCode() == KeyEvent.VK_DELETE) {
removeItem(cItemList.getSelectedIndex());
return;
}
currentPressedKeys += event.getKeyChar();
int itemIndex = listModel.searchFor(currentPressedKeys);
if(itemIndex < 0)
currentPressedKeys = "";
else
cItemList.setSelectedIndex(itemIndex);
}
COM: <s> the keylistener key typed function </s>
|
funcom_train/16909696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void markHeldNoteAtCurrentTranspositionContext(Note note) {
// Only record if transposing
if (context.getTranspose()) {
Hashtable <Integer, TranspositionContext> internal2 = heldNotesTranspositionContext.get(index);
if (internal2 == null) {
internal2 = new Hashtable <Integer, TranspositionContext>();
heldNotesTranspositionContext.put(index, internal2);
}
internal2.put(note.getPitch(), context.getTranspositionContext(index));
}
}
COM: <s> mark a held note as being played at the current transposition context </s>
|
funcom_train/24933046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateAutoConform(Context ctx) {
Collection<MAssociation> coll = (Collection<MAssociation>)ctx.model().associations();
for (MAssociation assoc : coll) {
if (!assoc.parents().isEmpty()) {
try {
updateAutoConform(assoc, assoc.parents());
} catch (MInvalidModelException e) {
//this is bad solution - error will point to the model and not to a place
//where the error happened
ctx.reportError(fName, "Auto conform error: " + e);
}
}
}
}
COM: <s> connects association ends by conform in all associations that inherit one form another </s>
|
funcom_train/3926366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BoundingBox getBoundingBox() {
BoundingBox result = new BoundingBox();
int numberEntities = getNumberEntities();
float[] fresult = new float[ unitSize ];
for ( int i = 0; i < numberEntities; i++ ) {
getLocation( i, fresult );
result.setXYZ( fresult );
}
return( result );
}
COM: <s> get the bounding box for this set </s>
|
funcom_train/32778682 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(double n) {
incrementObservations(1); // use the method from the Reportable class
this._value += n; // update current value
if (this._value < _min) {
_min = this._value; // update min
}
if (this._value > _max) {
_max = this._value; // update max
}
traceUpdate(); // leave a message in the trace
}
COM: <s> increments the value of this code aggregate code object by the value </s>
|
funcom_train/17291445 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTryReadLockFailsWhenUpdateLocked() throws Exception {
final Latch latch = latchFactory.newReadWriteUpdateLatch();
latch.updateLock();
testfailed = false;
Thread t = new Thread(new Runnable() {
public void run() {
if (!latch.trySharedLock()) {
testfailed = true;
}
else {
latch.unlockShared();
}
}
});
t.start();
t.join();
latch.unlockUpdate();
assertFalse(testfailed);
}
COM: <s> try read lock succeeds when update locked </s>
|
funcom_train/826300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int locateTask(Task task) {
int taskIndex = 0;
boolean favouritesHasTask = false;
while (taskIndex < listModel.size() && !favouritesHasTask) {
favouritesHasTask = task.equals(listModel.get(taskIndex));
if (!favouritesHasTask) {
taskIndex++;
}
}
if (!favouritesHasTask) {
taskIndex = -1;
}
return taskIndex;
}
COM: <s> locates task in a favourites list and returns its index </s>
|
funcom_train/2380716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setupTree() {
/*
* Default Sorter
*/
setSorter(new ViewerSorter());
// Content Provider
setContentProvider(new ActivitiesGroupTreeViewer.ActivitiesGroupViewContentProvider());
// Label Provider
setLabelProvider(new ActivitiesGroupTreeViewer.ActivitiesGroupViewerLabelProvider());
// Set Data Model Domain
setInput(PlexDataModel.getInstance().getActivitiesGroup());
}
COM: <s> set up the tree </s>
|
funcom_train/41725112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadXMLDocument(File file, ExpresserModel model) throws ExpresserModelXMLException {
try {
loadXMLDocument(XMLUtilities.createDocument(file), model);
} catch (ParserConfigurationException e) {
e.printStackTrace();
} catch (SAXException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
COM: <s> loads the xml in the new format generated by expresser model xmlconverter </s>
|
funcom_train/27859581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double unitToPixel(double number, int unit){
//System.out.print("converting " + number + " " + units[unit] + " to " );
switch(unit){
case INCH:
number *= last_dpi;
break;
case PIXEL:
break;
case CM:
number = number / CM_PER_INCH * last_dpi;
break;
case MM:
number = number / MM_PER_INCH * last_dpi;
break;
}
//System.out.println(number + " pixels");
return number;
}
COM: <s> converts the given unit into pixels </s>
|
funcom_train/16593371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getPActionButtons() {
if (pActionButtons == null) {
FlowLayout flowLayout = new FlowLayout();
flowLayout.setAlignment(FlowLayout.RIGHT);
pActionButtons = new JPanel();
pActionButtons.setLayout(flowLayout);
pActionButtons.setName("pActionButtons");
pActionButtons.add(getBotSave(), null);
pActionButtons.add(getBotDiscard(), null);
pActionButtons.add(getBotDontExit(), null);
}
return pActionButtons;
}
COM: <s> this method initializes p action buttons </s>
|
funcom_train/39102325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateUI() {
if (isCreated()) {
super.updateUI();
((JCheckBox)getJComponent()).setSelected(getModel().getBoolean());
if (getModel().isGray() || getModel().getFlag(ModelFlag.NOT_EDITABLE)) {
getCheckBox().setEnabled(false);
} else {
getCheckBox().setEnabled(true);
}
}
}
COM: <s> this method is called when the boolean model has changed </s>
|
funcom_train/19139082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(int offset, double[] values, int valOffset, int length) {
if (offset < 0 || offset + length >= _pos) {
throw new ArrayIndexOutOfBoundsException(offset);
}
System.arraycopy(_data, offset, values, valOffset, length);
}
COM: <s> replace the values in the list starting at tt offset tt with </s>
|
funcom_train/48697738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createPartControl(Composite parent) {
// viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
// viewer.setContentProvider(new ViewContentProvider());
// viewer.setLabelProvider(new ViewLabelProvider());
// viewer.setSorter(new NameSorter());
// viewer.setInput(getViewSite());
panel = new RegExprPanel(parent, SWT.NONE);
makeActions();
// hookContextMenu();
// hookDoubleClickAction();
contributeToActionBars();
}
COM: <s> this is a callback that will allow us </s>
|
funcom_train/33282560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Selection jsxFunction_getSelection() {
// return null if the window is in a frame that is not displayed
if (webWindow_ instanceof FrameWindow) {
final FrameWindow frameWindow = (FrameWindow) webWindow_;
if (!frameWindow.getFrameElement().isDisplayed()) {
return null;
}
}
return getSelection();
}
COM: <s> returns the current selection </s>
|
funcom_train/40516683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void executeCommand(Command c) {
if (c.getValue() == RELAY_OFF) {
relay.set(Relay.Value.kOff);
} else if(c.getValue() == RELAY_FORWARD) {
relay.set(Relay.Value.kForward);
} else if(c.getValue() == RELAY_REVERSE) {
relay.set(Relay.Value.kReverse);
}
}
COM: <s> sends command to relay </s>
|
funcom_train/15571271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerType(DataModelType _type) throws NException {
// if (typeMap.containsKey(_type.getName()))
// throw new NException(StorageException.ALREADY_PRESENT,this.getClass(),"registerType",domain);
typeMap.put(_type.getName(),_type);
if (fallBack!=null)
fallBack.registerType(_type);
}
COM: <s> registers a type in the domain </s>
|
funcom_train/1011757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toBezier(Knotvector knots, CArrayOfFloats ctlarray, int ncoords) {
// DONE
Splinespec spline = new Splinespec(1);
spline.kspecinit(knots);
spline.select();
spline.layout(ncoords);
spline.setupquilt(this);
spline.copy(ctlarray);
spline.transform();
}
COM: <s> converts nurbs curve to list of bezier curves </s>
|
funcom_train/32970385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton54() {
if (jButton54 == null) {
jButton54 = new JButton();
jButton54.setRolloverIcon(new ImageIcon(getClass().getResource("/orders/sel/control2.gif")));
jButton54.setPressedIcon(new ImageIcon(getClass().getResource("/orders/push/control3.gif")));
jButton54.setIcon(new ImageIcon(getClass().getResource("/orders/norm/control1.gif")));
jButton54.setDoubleBuffered(true);
jButton54.setBounds(new java.awt.Rectangle(876,70,34,34));
jButton54.setBorderPainted(false);
}
return jButton54;
}
COM: <s> this method initializes j button54 </s>
|
funcom_train/5246109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyListeners(String s) {
if (perceptListeners != null) {
for (PerceptListener l: perceptListeners) {
// NB. We also inform the scheduler as well as any listener associated with the agent.
if (l.getListenerName().equals(s) || l.getListenerName().equals("scheduler")) {
l.perceptChanged(s);
}
}
}
}
COM: <s> notify the listents that a particular agents perceptions have changed </s>
|
funcom_train/25772570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getAlertclean_cancelCommand() {
if (alertclean_cancelCommand == null) {//GEN-END:|98-getter|0|98-preInit
// write pre-init user code here
alertclean_cancelCommand = new Command("Cancel", Command.CANCEL, 0);//GEN-LINE:|98-getter|1|98-postInit
// write post-init user code here
}//GEN-BEGIN:|98-getter|2|
return alertclean_cancelCommand;
}
COM: <s> returns an initiliazed instance of alertclean cancel command component </s>
|
funcom_train/41761444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load() {
minUsageInterval = loadIntOption(Constants.PROP_MIN_USAGE_INTERVAL, 300); // 5 minutes
ignoreSystemDevelopers = loadBooleanOption(Constants.PROP_IGNORE_SYSTEM_DEVS, false);
locationAttributeTypeId = loadIntOption(Constants.PROP_LOCATION_ATTRIBUTE_TYPE_ID, 7);
autoDeleteDays = loadIntOption(Constants.PROP_AUTO_DELETE_DAYS, 14); // 2 weeks
}
COM: <s> loads the configuration from global properties </s>
|
funcom_train/51538755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void nextCapsMode() {
log("[A.nextCapsMode]");
capsModePointer++;
if (capsModePointer == CAPS_MODES.length) {
capsModePointer = 0;
}
if (CAPS_MODES[capsModePointer] == CAPS_OFF) {
keyMap = lowerKeyMap;
} else {
keyMap = upperKeyMap;
}
mediator.subInputModeChanged();
}
COM: <s> set the next capital mode for this input method </s>
|
funcom_train/21883949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateProperties() {
if (null == getContext()) {
return;
}
try {
new RunCommandDialog(new UpdatePropertiesAction(this, projectFactory, getContext()),
getContext(), "Update-Properties").prompt();
} catch (Exception e) {
ErrorDialog.newDialog(this, "Command error", e);
}
}
COM: <s> callback handler for the action method of button refresh props butt </s>
|
funcom_train/13493575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String colorToHexString(Color c) {
String red = fitToDigits(Integer.toHexString(c.getRed()), 2);
String green = fitToDigits(Integer.toHexString(c.getGreen()), 2);
String blue = fitToDigits(Integer.toHexString(c.getBlue()), 2);
return red + green + blue;
}
COM: <s> converts color object to hex representation as used in html </s>
|
funcom_train/16941343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void simulate(){
System.out.println(" #\n # Running simulation...");
for (int i = 0; i < Align.generations; i++){
runGeneration();
//System.out.println(" # Generation done: " + (i+1));
if (i % 10 == 0) {
System.out.println(" # Generation " + i + " done.");
}
}
System.out.println(" # Done.");
System.out.println("Aligned Sequences:");
printLinedSequences();
}
COM: <s> run the evolutionary algorithm </s>
|
funcom_train/4154324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draw( final Graphics graphicsContext ) {
graphicsContext.setColor( COLOR );
final int positionX = (int) position.x, positionY = (int) position.y;
graphicsContext.drawLine( positionX, positionY, positionX + ( doubleSized ? 1 : 0 ), positionY );
if ( doubleSized )
graphicsContext.drawLine( positionX, positionY + 1, positionX + 1, positionY + 1 );
}
COM: <s> draws the bullet </s>
|
funcom_train/10801001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void backupAndDelete(Collection files) {
File file;
for (Iterator itr = files.iterator(); itr.hasNext();) {
file = (File) itr.next();
if (Files.backup(file, false) != null)
AccessController
.doPrivileged(J2DoPrivHelper.deleteAction(file));
}
}
COM: <s> backup and delete the source files for the given metadatas </s>
|
funcom_train/8107579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void increment(JFMCropData indata){
double wgt=1.0; // each year gets a weight of 1
for ( Map.Entry<JFMCDatum, DataValue> entry:indata.data.entrySet()){
JFMCDatum key=entry.getKey();
DataValue val=entry.getValue();
if ( key.isIntensive){
data.get(key).add(val.avValue(),wgt);
} else {
data.get(key).add(val.sumValue(),wgt);
}
}
}
COM: <s> add a crop data object to this time average </s>
|
funcom_train/2380835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createNewResource() {
// Use root parent group for now
NewResourceWizard wizard = new NewResourceWizard();
// Fill in some fields
wizard.setName(getPartName());
wizard.setLocation(_browser.getUrl());
WizardDialog dialog = new WizardDialog(getViewSite().getShell(), wizard);
int code = dialog.open();
if(code == Window.OK) {
ViewManager.showViewPart(ResourcesView.ID);
}
}
COM: <s> create a new resource from the current browser page </s>
|
funcom_train/4924998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_extension_MultipleMatch() {
this.addServicer("FilterOne", "*.extension", null);
this.addServicer("FilterTwo", "*.extension", null);
this.record_init("FilterOne", "FilterTwo");
this.record_doFilter("FilterOne", "FilterTwo");
this.doFilter("/resource.extension", null, MappingType.REQUEST,
"Servlet");
}
COM: <s> ensure exact have multiple match on extension </s>
|
funcom_train/7901368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startAnimation(boolean realMode) {
updateCalc();
setEnabledSwingComponents(false);
MovingBall b = new MovingBall(animPanel, this, calc);
if (realMode == false) {
b.setIsRealMode(false);
trajectoryDrawn = true;
} else {
b.setIsRealMode(true);
trajectoryDrawn = false;
}
SwingUtilities.invokeLater(b);
// new Thread(b).start();
}
COM: <s> starts animation and updates calculation members </s>
|
funcom_train/11426159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof EndpointPermission)) {
return false;
}
EndpointPermission ep = (EndpointPermission) obj;
return (action_mask == ep.action_mask)
&& getName().equals(ep.getName())
&& ((endpoint == ep.endpoint) || ((endpoint != null)
&& (ep.endpoint != null) && endpoint
.equals(ep.endpoint)));
}
COM: <s> determines the equality of two endpoint permission objects </s>
|
funcom_train/39234661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void process(Activity activity, ProcessInstance instance) {
log(activity);
BPELProcess process = instance.getProcess();
ProcessContext ctx = instance.getContext();
Event event = ctx.getEvent(activity);
if (event == null) {
event = new Event(activity);
ctx.addEvent(event);
}
}
COM: <s> process method for all unimplemented activities </s>
|
funcom_train/35834248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu getJmn_Menu() {
if (jmn_Menu == null) {
jmn_Menu = new JMenu();
jmn_Menu.setText("Menu");
jmn_Menu.add(getJmnt_Clientes());
jmn_Menu.add(getJmnt_Produtos());
jmn_Menu.add(getJmnt_Vendas());
jmn_Menu.add(getJSeparator());
jmn_Menu.add(getJmnt_ProdutoFalta());
jmn_Menu.add(getJSeparator1());
jmn_Menu.add(getJmnt_Sair());
}
return jmn_Menu;
}
COM: <s> this method initializes jmn menu </s>
|
funcom_train/4919866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCanApply() {
this.recordReturn(this.one, this.one.canApply(), true);
this.recordReturn(this.two, this.two.canApply(), true);
this.replayMockObjects();
assertTrue("Should be able to apply if all changes can apply",
this.aggregate.canApply());
this.verifyMockObjects();
}
COM: <s> ensure able to apply </s>
|
funcom_train/19537569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object setTokenValue(Token token, Object value) throws ParserException {
Object ret = setValue(token, value);
MapTool.serverCommand().putToken(MapTool.getFrame().getCurrentZoneRenderer().getZone().getId(), token);
return ret;
}
COM: <s> external call to set the token value </s>
|
funcom_train/35146899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getFinalGold() {
NationEconomy ne = getNationEconomy();
return getTaxRevenue() + getMarketProfits() + getGoldProduction() - ne.getTotalMaintenance() - getOrdersCost() + ne.getReserve() - computeLostGoldRevenue() - computeLostTaxRevenue();
}
COM: <s> computes the final gold for the nation </s>
|
funcom_train/9644954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double computeConnectionStrengthTo(SGGraphNode node) {
if (isCausalParent(node)) {
return CausalSGAnalyzer.calculateChiSquareValue(this.getSubgroup(),
node.getSubgroup(), this.getSubgroup().getPopulation());
} else if (isApproxEqualParent(node)) {
return 0.1;
} else if (isCCAssociatedNode(node)) {
return 0.1;
}
return 0;
}
COM: <s> compute connection strength to </s>
|
funcom_train/8088623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetOptions() {
m_support = 0.33;
m_minImprovement = 0.01; // 1%
m_maxBranchingFactor = 2;
m_minimize = false;
m_debug = false;
setTarget("last");
setTargetIndex("first");
m_errorMessage = null;
}
COM: <s> reset options to their defaults </s>
|
funcom_train/50585610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newTestSeries(String qualifiedName) {
if (ScenarioContentProvider.getMarkedForReference() == null) {
throw new IllegalArgumentException("please mark Scenario first");
}
TestSeries testSeries = new TestSeries();
Identity id = new Identity();
// id.setPath("");
// id.setName(fileName);
// testSeries.setID(id);
testSeries.setQualifiedName(qualifiedName);
Scenario scenario = ScenarioContentProvider.getMarkedForReference();
testSeries.add(scenario);
persistenceManager.createTestSeries(testSeries);
refreshTree();
}
COM: <s> this method creates a new test series includes the marked scenario </s>
|
funcom_train/47983259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void requestSingleLogin(final Credential credential) {
Log.d(TAG, "Using credential for login: " + credential.toString());
if (testAndSetRunning()) {
String network = credential.getNetworkName();
if (!snms.isAuthenticated(network)) {
getLoginPart(network).requestLogin(credential, true);
}
}
}
COM: <s> requests a single login outside an automatic login loop for a given credential </s>
|
funcom_train/25646539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNodeDescription() {
try {
return descriptionDocument.getText(0, descriptionDocument.getLength());
} catch (BadLocationException ex) {
Logger.getLogger(ModelDesignPerspectiveModel.class.getName()).log(Level.SEVERE, null, ex);
return "";
}
}
COM: <s> get the description of the currently selected graph object </s>
|
funcom_train/37568567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setXmlFileName(java.lang.String xmlFName) {
String path = cm.getProperty("base_path","/tmp");
if ( xmlFName.startsWith("/") && xmlFName.length() > 1 ) {
xmlFName = xmlFName.substring(1);
}
xmlFileName = path + xmlFName;
}
COM: <s> setter for property xml file name </s>
|
funcom_train/964726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String columnPut(String key, String value) {
String resolvedKey = resolveColumnKey(key);
if (value == null) {
throw new NullPointerException("The column expression value must not be null.");
}
columnMapCache.clear();
return (String) columnMap.put(
resolvedKey,
value.toLowerCase(Locale.ENGLISH));
}
COM: <s> associates the specified column string with the specified key </s>
|
funcom_train/26397043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getEndTimeString(final PauseBuilder builder) {
final Calendar cal = Calendar.getInstance();
cal.set(Calendar.HOUR_OF_DAY, builder.getEndTime() / 100);
cal.set(Calendar.MINUTE, builder.getEndTime() % 100);
cal.add(Calendar.MINUTE, 1);
return timeFormatter.format(cal.getTime());
}
COM: <s> returns a string representing the time following the end time of the given </s>
|
funcom_train/40222651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int countEmptyExcept (Column from, Column target) {
int numEmpty = 0;
for (int i = 0; i < rows.length; i++) {
if (rows[i] == target) continue; // SKIP target column.
if (rows[i] == from) continue; // SKIP from column.
if (rows[i].empty()) numEmpty++;
}
return numEmpty;
}
COM: <s> return the number of empty beleaguered rows except for given from target </s>
|
funcom_train/13726549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testVariableClash() throws ParserException, RuleUnsafeException {
String program =
"p(?x, ?y) :- ?x > ?y." +
"?- 2 + ?y = ?x, p(2, ?x).";
Parser parser = new Parser();
parser.parse(program);
IQuery query = parser.getQueries().get(0);
IRule rule = parser.getRules().get(0);
Map<IVariable, ITerm> map = TopDownHelper.getVariableMapForVariableRenaming(rule, query);
System.out.println(map);
assertEquals(false, map.isEmpty());
}
COM: <s> tests if variables get substituted correctly when the same variable appears </s>
|
funcom_train/20032363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadStyles(MTApplication app, InputSource source) {
List<CSSStyle> styles= new ArrayList<CSSStyle>();
cssh = new CSSHandler(app, styles);
pa = new Parser();
pa.setDocumentHandler(cssh);
try {
pa.parseStyleSheet(source);
} catch (CSSException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
COM: <s> load styles from input source </s>
|
funcom_train/26368624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TreePath findResourceChildPath(Resource resource, int childIndex) {
TreePath resourcePath = findPath(resource);
Object[] resourcePathNodes = resourcePath.getPath();
Object resourceNode = resourcePathNodes[resourcePathNodes.length - 1];
TreeNode childNode = (TreeNode)getChild(resourceNode, childIndex);
return new TreePath(getPathToRoot(childNode));
}
COM: <s> find the tree path to a specified child of a resource </s>
|
funcom_train/9031847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void dispatchOnBeforeSetList( List list ){
ArrayList<DataListListener> listeners;
synchronized (this) {
listeners = (ArrayList<DataListListener>) dataListListeners.clone();
}
DataListEvent event = new DataListEvent(this);
for (Iterator iterator = listeners.iterator(); iterator.hasNext();) {
DataListListener dataListListener = (DataListListener) iterator.next();
dataListListener.onBeforeSetList(event, list);
}
}
COM: <s> dispara o on before set list dos listeners do datalist </s>
|
funcom_train/14462334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRowNumber(int n){
if(DEBUGLEVEL > 3)Logger.logInfo("Updating Row Number: " + this.getRowNumber() + " to: " + n);
rw = n;
byte[] rwb = ByteTools.shortToLEBytes((short) rw);
System.arraycopy(rwb, 0, this.getData(), 0, 2);
}
COM: <s> set the position of the row on the worksheet </s>
|
funcom_train/5672013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private GridBagConstraints createConstraints(int x, int y) {
GridBagConstraints constraints = new GridBagConstraints();
constraints.gridx = x;
constraints.gridy = y;
constraints.gridwidth = 1;
constraints.gridheight = 1;
constraints.anchor = GridBagConstraints.CENTER;
constraints.weightx = 0.0;
constraints.weighty = 0.0;
return constraints;
}
COM: <s> creates and returns a grid bag constraint with the specified x and y </s>
|
funcom_train/24920286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updatePlayersFamilyRequestStatus(int playerVnum, String status) {
try {
this.updatePlayersFamilyRequestStatus.setString(1, status);
this.updatePlayersFamilyRequestStatus.setInt(2, playerVnum);
this.updatePlayersFamilyRequestStatus.execute();
if (status.equals(FamilyRequest.DENY)) {
deletePlayerByVnum(playerVnum);
}
this.updatePlayersFamilyRequestStatus.clearParameters();
} catch (SQLException e) {
e.printStackTrace();
}
}
COM: <s> updates the players family request status to the given status message </s>
|
funcom_train/5343923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getNeedsPush() throws BadPacketException {
parseResults();
switch (_pushFlag) {
case UNDEFINED:
throw new BadPacketException();
case TRUE:
return true;
case FALSE:
return false;
default:
Assert.that(false, "Bad value for push flag: "+_pushFlag);
return false;
}
}
COM: <s> returns true if thiss push flag is set i </s>
|
funcom_train/1116583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getClosebutton1() {
if (closebutton1 == null) {
closebutton1 = new JButton();
closebutton1.setIcon(new ImageIcon(getClass().getResource(
"/resource/greenlight.gif")));
closebutton1.setText(Resource.getPlainResourceString("Close"));
closebutton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
closeActionPerformed(e);
}
});
}
return closebutton1;
}
COM: <s> this method initializes closebutton1 </s>
|
funcom_train/10382032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void replicate(boolean complete) {
Iterator<Map.Entry<?,?>> i = super.entrySet().iterator();
while (i.hasNext()) {
Map.Entry<?,?> e = i.next();
replicate(e.getKey(), complete);
} //while
}
COM: <s> this can be invoked by a periodic thread to replicate out any changes </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.