__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/13598305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void cancelSubProcesses(long processId) {
Query q = jbpmContext.getSession().getNamedQuery(
"GraphSession.findSubProcessInstances");
q.setLong("instanceId", processId);
Iterator iter = q.list().iterator();
while (iter.hasNext()) {
ProcessInstance pi = (ProcessInstance) iter.next();
log.info("cancel sub process instance #" + pi.getId());
cancelProcess(pi.getId());
}
}
COM: <s> cancel all sub processes of the process with the given id calls </s>
|
funcom_train/45422138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetMaxRank() throws SQLException {
int queryId = 1000;
int maxRank = 0;
int computeRank = evaluator.getMaxRank(queryId);
assertEquals(maxRank, computeRank);
queryId = 1;
maxRank = 10;
computeRank = evaluator.getMaxRank(queryId);
assertEquals(maxRank, computeRank);
}
COM: <s> get max rank </s>
|
funcom_train/16498630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadPreferences() {
DefaultListModel m = (DefaultListModel) exclusionList.getModel();
m.removeAllElements();
// Sort the exclusions by putting them in a tree set.
for ( Iterator i=new TreeSet( exclusions).iterator(); i.hasNext(); ) {
m.addElement( i.next());
}
}
COM: <s> initializes the content of the jlist with the words from the exclusion set </s>
|
funcom_train/19887191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetId() {
System.out.println("setId");
String id = GUID.generate();
////Payment pmt = null;
pmt.setId(id);
// TODO review the generated test code and remove the default call to fail.
//fail("The test case is a prototype.");
}
COM: <s> test of set id method of class edu </s>
|
funcom_train/1807260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeCommands() {
CampField campField = (CampField) getFieldModel();
setFlagCommand = new CampSetFlagCommand(campField);
setGrassCommand = new CampSetGrassCommand(campField);
setTentCommand = new CampSetTentCommand(campField);
setTreeCommand = new CampSetTreeCommand(campField);
}
COM: <s> initialize the commands which are used to change the field state </s>
|
funcom_train/32057638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPaintPorts() {
System.out.println("testPaintPorts");
// Add your test code below by replacing the default call to fail.
Graphics g = null;
PortView[] p = null;
BasicGraphUI x = new BasicGraphUI();
x.paintPorts(g, p);
}
COM: <s> test of paint ports method of class basic graph ui </s>
|
funcom_train/20474268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawChar( Graphics g, char character, int x, int y, int anchor ){
int clipX = g.getClipX();
int clipY = g.getClipY();
int clipW = g.getClipWidth();
int clipH = g.getClipHeight();
drawCharInternal( g, character, x, y, anchor );
g.setClip( clipX, clipY, clipW, clipH );
}
COM: <s> paints the specified character at the specified coordinates </s>
|
funcom_train/3820998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(String fieldName, Boolean value) {
Field field = ctype.getField(fieldName);
if ((field != null) && (field.getType().equals(Field.BOOLEAN_TYPE))) {
this.attributes.put(fieldName, value.toString());
}
}
COM: <s> sets a boolean field to a given content </s>
|
funcom_train/45771132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void appendDeclarations(LaTeXDocumentPortion pack, LaTeXDocumentPortion decl) {
if (bContainsEndnotes) { pack.append("\\usepackage{endnotes}").nl(); }
if (bContainsFootnotes) palette.getNoteCc().convertFootnotesConfiguration(decl);
if (bContainsEndnotes) palette.getNoteCc().convertEndnotesConfiguration(decl);
}
COM: <s> p append declarations needed by the code note converter code to </s>
|
funcom_train/3409303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
int retval = 0;
try {
byte[] entryData = this.getEncoded();
for (int i = 1; i < entryData.length; i++)
retval += entryData[i] * i;
} catch (CRLException ce) {
return(retval);
}
return(retval);
}
COM: <s> returns a hashcode value for this crl entry from its </s>
|
funcom_train/34673951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addError(String context, FacesMessage.Severity severity, String summary, String detail) {
FacesContext ctx=FacesContext.getCurrentInstance();
FacesMessage message=new FacesMessage(severity, summary, detail);
ctx.addMessage(context, message);
}
COM: <s> add a validation error to the page context </s>
|
funcom_train/31729154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Person next() {
Person p = (Person)S.pop();
S.push(null);
parents.push(p);
if(!stopAt.contains(p)) {
Collection c = getChildren(p);
ArrayList l = new ArrayList(c);
for (int i = l.size() - 1; i >= 0; i--) {
S.push(l.get(i));
}
}
while(S.size()!=0 && S.peek()==null) {
parents.pop();
S.pop();
}
System.out.println(p);
return p;
}
COM: <s> return the next person </s>
|
funcom_train/19308076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testXml003() throws FOrayException {
final FoDocumentReader reader = FoDocumentReader.getInstance();
try {
reader.buildFoTree("fo/invalid-xml-003.fo");
fail("Expected FOrayException indicating invalid XML content.");
} catch (final FOrayException e) {
/* Do nothing. This is the expected case. */
}
}
COM: <s> test of fo invalid xml 003 </s>
|
funcom_train/3786944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int lookupIdxByRspot(int rNbr)
{ /* lookupIdxByRspot */
if(rspotsNbrs==null || rNbr<0)
return(-1);
for(int i=0;i<totRspots;i++)
if(rspotsNbrs[i]==rNbr)
return(i);
return(-1);
} /* lookupIdxByRspot */
COM: <s> lookup idx by rspot lookup index of rspot number in rsl </s>
|
funcom_train/9101184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addResults(long token, ArrayList batchResults, String source, int theoreticalAvailableResults, Map facetQueryCounts) {
if (resultsets.containsKey(new Long(token))) {
((SearchResultSet) resultsets.get(new Long(token))).addResults(batchResults, source, theoreticalAvailableResults, facetQueryCounts);
}
}
COM: <s> add results to the resultset specified by this token </s>
|
funcom_train/44450379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void _destroy(SymbolTableEntry f_entry) {
if (f_entry == null) {
return;
}
// get the entry which replaces us now:
SymbolTableEntry repl_entry = f_entry.getNextByName();
SymbolTableIdentifier ident = f_entry.getIdentifier();
ident.setEntry(repl_entry);
_destroy(f_entry.getNextByDepth());
}
COM: <s> recursive helper method </s>
|
funcom_train/38726282 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Type subType(int beginIndex){
if (beginIndex < 0 || beginIndex >= len) {
throw new RuntimeException(indexOutOfBounds() + beginIndex);
}
Type result = new Type(label);
for(int i=beginIndex; i<len; i++){
result.addSample(sampleList.get(i));
}
return result;
}
COM: <s> return a sub type object including samples from begin index to end </s>
|
funcom_train/19050927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer text = new StringBuffer();
if(m_multiParagraph) {
text.append(m_plainText);
}
else {
int i;
for(i=0;i<clipText.size();i++) {
text.append((String) clipText.elementAt(i));
}
}
return text.toString();
}
COM: <s> get a string containing all chunks of text contained in this object </s>
|
funcom_train/5077948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void reorderChild(EditPart child, int index) {
// Save the constraint of the child so that it does not
// get lost during the remove and re-add.
IFigure childFigure = ((GraphicalEditPart) child).getFigure();
LayoutManager layout = getContentPane().getLayoutManager();
Object constraint = null;
if (layout != null)
constraint = layout.getConstraint(childFigure);
super.reorderChild(child, index);
setLayoutConstraint(child, childFigure, constraint);
}
COM: <s> this method is extended to preserve a layout manager constraint if one exists </s>
|
funcom_train/51604791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanelList() {
if (jPanelList == null) {
jPanelList = new JPanel();
jPanelList.setLayout(new BorderLayout());
jPanelList.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
jPanelList.add(getJPanelListEdit(), BorderLayout.EAST);
jPanelList.add(new JScrollPane(getJList()), BorderLayout.CENTER);
}
return jPanelList;
}
COM: <s> this method initializes j panel list </s>
|
funcom_train/22404050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStyleName(int row, int column, String styleName) {
prepareCell(row, column);
Element elem = getCellElement(bodyElem, row, column);
// IE uses attribute "className", FireFox uses attribute "class", so
// avoiding the problem by using properties instead.
DOM.setElementProperty(elem, "className", styleName);
}
COM: <s> sets the style name associated with the specified cell </s>
|
funcom_train/28295158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setReorderChildren(boolean iReorder) {
if (_Debug) {
System.out.println(" :: SeqActivity --> BEGIN - " +
"setReorderChildren");
System.out.println(" ::--> " + iReorder);
}
mReorder = iReorder;
if (_Debug) {
System.out.println(" :: SeqActivity --> END - " +
"setReorderChildren");
}
}
COM: <s> sets the value of the randomization control </s>
|
funcom_train/39320708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void SaveActionPerformed(java.awt.event.ActionEvent evt) {
//if (center.madeChanges()){
if (filename.compareTo("null") != 0)
saveFast();
else
save();
//}
/*
if(center.madeChanges() && filename.compareTo("null") != 0 )
saveFast();
else if (!center.madeChanges() && filename.compareTo("null") != 0 ) {}
else
save();
*/
//center.noChanges();
}
COM: <s> this function allows you to save the painting that you have created </s>
|
funcom_train/1533074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Fraction divide(Fraction fraction) {
if (fraction == null) {
throw MathRuntimeException.createIllegalArgumentException(NULL_FRACTION);
}
if (fraction.numerator == 0) {
throw MathRuntimeException.createArithmeticException(
"the fraction to divide by must not be zero: {0}/{1}",
fraction.numerator, fraction.denominator);
}
return multiply(fraction.reciprocal());
}
COM: <s> p divide the value of this fraction by another </s>
|
funcom_train/10794563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSelect(String sql) {
Iterator i = selectWordSet.iterator();
String cur;
while (i.hasNext()) {
cur = (String) i.next();
if (sql.length() >= cur.length()
&& sql.substring(0, cur.length()).equalsIgnoreCase(cur)) {
return true;
}
}
return false;
}
COM: <s> determine whether the provided code sql code may be treated as a </s>
|
funcom_train/27940398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Iterator locationIterator(){
ArrayList locationList = new ArrayList();
for(int y = 0; y < 25; y++){
for(int x = 0; x < 24; x++){
locationList.add(board[y][x]);
}
}
return locationList.iterator();
}
COM: <s> returns an iterator that goes through the whole board returning locations </s>
|
funcom_train/31739124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() {
AdminInterfaceImpl.getAdminInterfaceImpl()
.registerConfigurable("HTTP", new HttpConfigurable(this));
db = Database.getDatabase();
if (running) {
startServer();
}
try {
KosiRMI.exportObject(this);
} catch (RemoteException e) {
e.printStackTrace();
db.getServer().internalShutdown(0, -1);
}
}
COM: <s> initialize the http server interface impl </s>
|
funcom_train/49469178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PageCounter countPortalDomains(Filter filter) throws Exception {
_logger.info("soapPortalReferentiel - countPortalDomains: "+filter);
Db db = dbRO();
try {
return DbPortalReferentiel.getListOfDomainsCounter(db, filter);
} catch (Exception e) {
store(e);
throw e;
} finally {
db.safeClose();
}
}
COM: <s> count portal domains </s>
|
funcom_train/39533728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean shouldBeConverted(Element element){
//getting the tag name of the node
String tagName=element.getNodeName();
return tagName.equals(lineTagName) ||
tagName.equals(polygonTagName) ||
tagName.equals(polylineTagName) ||
tagName.equals(circleTagName);
}
COM: <s> returns whether the provided element should be converted </s>
|
funcom_train/44945893 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long checksum() {
byte[] bytes;
try {
bytes = toStringRepresentation().getBytes(CHARSET);
} catch (java.io.UnsupportedEncodingException e) {
bytes = toStringRepresentation().getBytes();
}
CRC32 checksummer = new CRC32();
checksummer.update(bytes);
return checksummer.getValue();
}
COM: <s> returns a checksum of the ontology </s>
|
funcom_train/11073974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testClassLoadSuccessWithContextClassLoader() {
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
ClassLoader cl = new TestClassLoader(getClass().getClassLoader());
executeTestMethodUnderClassLoader(cl, "callExampleMessageMethodAndAssertSuccess");
}
COM: <s> tests that jxpath can dynamically load a class which is not visible to </s>
|
funcom_train/7620449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public E get(int key, E valueIfKeyNotFound) {
int i = binarySearch(mKeys, 0, mSize, key);
if (i < 0 || mValues[i] == DELETED) {
return valueIfKeyNotFound;
} else {
return (E) mValues[i];
}
}
COM: <s> gets the object mapped from the specified key or the specified object </s>
|
funcom_train/5260745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addComponentOfThePlanForPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Strategy_componentOfThePlanFor_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Strategy_componentOfThePlanFor_feature", "_UI_Strategy_type"),
BmmPackage.Literals.STRATEGY__COMPONENT_OF_THE_PLAN_FOR,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the component of the plan for feature </s>
|
funcom_train/33665708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validate(Condition cond) throws XacmlException{
if (cond != null &&
!BooleanAttribute.class.isAssignableFrom(
cond.getExpression().getReturnDataType(getExpressionEvaluator().getFnFactory()))) {
throw new ExpressionEvalIndeterminateException("non boolean function in condition"
, XacmlException.ERR_CODE_SYNTAX_CONDITION_NON_BOOLEAN);
}
}
COM: <s> this method validates syntax of a condition </s>
|
funcom_train/22639551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private XmlvmResource loadResource(String fullName) {
if (preloadedResources.containsKey(fullName)) {
return preloadedResources.get(fullName);
} else {
Log.debug(TAG, "Loading JDK class: " + fullName);
LibraryLoader loader = new LibraryLoader(arguments);
XmlvmResource resource = loader.load(fullName);
return resource;
}
}
COM: <s> check if the resource was already loaded through the pipeline before the </s>
|
funcom_train/44586472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void append(char[] text) {
if (!isReadOnly()) {
if (text == null || text.length == 0) {
return;
}
int length = getLength();
synchronized(this.lock) {
if (this.contents == null) return;
moveAndResizeGap(length, text.length);
System.arraycopy(text, 0, this.contents, length, text.length);
this.gapStart += text.length;
this.flags |= F_HAS_UNSAVED_CHANGES;
}
notifyChanged(new BufferChangedEvent(this, length, 0, new String(text)));
}
}
COM: <s> append the code text code to the actual content the gap is moved </s>
|
funcom_train/14363589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void walk(AST ast) {
if (ast == null) {
return;
}
if (listeners.containsKey(ast.getType())) {
listeners.get(ast.getType()).process(ast);
}
walk(ast.getFirstChild());
walk(ast.getNextSibling());
}
COM: <s> walk all the leaves on the supplied ast depth first </s>
|
funcom_train/33839212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processFormField(FileItem item, PrintWriter out) throws IOException {
String fieldName = item.getFieldName();
String fieldValue = item.getString();
if((item.getFieldName()).equals("survey")) {
this.survey = item.getString();
}
if((item.getFieldName()).equals("description")) {
this.description = item.getString();
}
}
COM: <s> extract any necessary form fields from the upload form </s>
|
funcom_train/45483451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object execute(ExecutionEvent event) throws ExecutionException {
logger.debug("entering execute");
try {
SingletonHolder.getContentProvider().addTable();
} catch (Exception e) {
String msg = "Failed to add a new element";
MessageDialog.showUnexpectedErrorMessage(msg, logger, e);
throw new ExecutionException(msg, e);
}
SingletonHolder.getView().selectEntry();
logger.debug("exiting execute");
return null;
}
COM: <s> adds a new pwtable to our pwlist </s>
|
funcom_train/16939125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void cleanUp(File folder){
Map<String,String> files = crcService.getCrcInfo(folder);
for(String file:files.keySet()){
File toDelete = new File(folder, file+"-missing");
if(toDelete.exists()){
toDelete.delete();
}
}
// TODO find better way to select these files (regex?)
File[] indicatorFiles = folder.listFiles(new ProgressMissingFileFilter());
if(files != null){
for (File curFile : indicatorFiles) {
curFile.delete();
}
}
}
COM: <s> removes missing and </s>
|
funcom_train/39024187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testResetCriteriaDefinitions() {
System.out.println("resetCriteriaDefinitions");
CRITERIA_RANGE range = null;
BasicSearchCriteria instance = new BasicSearchCriteria();
instance.resetCriteriaDefinitions(range);
// TODO review the generated test code and remove the default call to fail.
//fail("The test case is a prototype.");
}
COM: <s> test of reset criteria definitions method of class basic search criteria </s>
|
funcom_train/1722952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onDataViewChanged() {
mCacheListAdapter.setGeocacheList(null); //Clears the list
mListTaskRunner.abort();
mListTaskRunner.runTask(new CacheListTask(this,
mSearchCenter, mSortCenter, mCurrentLatitude, mCurrentLongitude, true));
}
COM: <s> clear the list and do a new calculation </s>
|
funcom_train/11687771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getBytesReceived() {
if (endpoint.getChildren() != null) {
long bytesReceived = 0;
for (Endpoint e : endpoint.getChildren()) {
if (e.getMetricsMBean() != null) {
bytesReceived += e.getMetricsMBean().getBytesReceived();
}
}
return bytesReceived;
} else {
return bytesReceived;
}
}
COM: <s> number of bytes received receiving replies </s>
|
funcom_train/37596626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override public Void visit(ContinueStatement node) {
print("l."+node.getSourceInfo().getStartLine()+" ContinueStatement {");
print("label:");
indent();
print(node.getLabel());
unindent();
displayProperties(node);
print("}");
return null;
}
COM: <s> visits a continue statement </s>
|
funcom_train/3875565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toClipboard(String data) {
/*
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
try {
sm.checkSystemClipboardAccess();
}
catch (Exception e) {
e.printStackTrace();
}
}
*/
StringSelection st = new StringSelection(data);
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(st, this);
}
COM: <s> thats the function that copies the information in the system clipboard </s>
|
funcom_train/45628316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillOpenWithMenu(IMenuManager menu, IStructuredSelection selection) {
// Only supported if exactly one file is selected.
if (selection.size() != 1) {
return;
}
Object element = selection.getFirstElement();
if (!(element instanceof IFile)) {
return;
}
MenuManager submenu = new MenuManager(ResourceNavigatorMessages.ResourceNavigator_openWith, OPEN_WITH_ID);
submenu.add(new OpenWithMenu(site.getPage(), (IFile) element));
menu.add(submenu);
}
COM: <s> adds the open with submenu to the context menu </s>
|
funcom_train/21619763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetFName() {
System.out.println("setFName");
assertEquals(false, emp.isDirty());
String name = "bob";
emp.setFName(name);
assertEquals(name, emp.getFName());
assertEquals(true, emp.isDirty());
}
COM: <s> test of set fname method of class edu </s>
|
funcom_train/856043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateIsoView() {
jsplitpIso.removeAll();
JDisplay jdIso = iso.getDisplay();
if (jdIso != null) {
jdIso.setPreferredSize(new Dimension(400, 600));
jsplitpIso.add(jdIso);
// Add the MouseListener
iso.addMouseCursorListener(toolPanel);
toolPanel.setIsoEngine(iso);
} else {
jsplitpIso.add(new JPanel());
}
}
COM: <s> updates the iso view </s>
|
funcom_train/4584275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String findBaseURI(Element root) throws MalformedURLException {
String ret = null;
if (findAtomLink(root, "self") != null) {
ret = findAtomLink(root, "self");
if (".".equals(ret) || "./".equals(ret))
ret = "";
if (ret.indexOf("/") != -1)
ret = ret.substring(0, ret.lastIndexOf("/"));
ret = resolveURI(null, root, ret);
}
return ret;
}
COM: <s> find base uri of feed considering relative uris </s>
|
funcom_train/37508303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void displayPreviousImage() {
if (m_indexFocus <= 0
|| m_imagePopup == null) {
return;
}
m_imagePopup.setSize(m_imgSize.width, m_imgSize.height);
m_imagePopup.load(((ImageComponent)getComponents()[m_indexFocus-1])
.getFullImageName());
changeFocus(KeyEvent.VK_LEFT);
}
COM: <s> displays the previous image on the fullscreen popup </s>
|
funcom_train/23053895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
while(active) { //Accept the input connections
Socket client = server.accept();
client.setSoTimeout(timeout);
new ServerThread(this,client,dispatcher).start();
}
}
catch( Exception e ) {
if(logger.isLoggable(Level.WARNING))
logger.warning("HTTP Server closed on port "+port);
}
}
COM: <s> entry point for the master server thread </s>
|
funcom_train/33371481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ProgramNode makeRandomNode() {
double p = Math.random();
if(p > constantRatio) {
int index = (int)(Math.random() * allowedOperators.length);
Operator node = (Operator)allowedOperators[index].duplicate();
int arity = node.getArity();
for(int i=0; i<arity; i++) {
node.setOperand(i, makeRandomNode());
}
return node;
}
else {
Real real = new Real();
real.setValue(2*Math.random() -1);
return real;
}
}
COM: <s> builds a full node randomly </s>
|
funcom_train/7628145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSignalStrengthDbm() {
if ((mWants & NOTIF_SIGNAL) == 0) {
throw new RuntimeException
("client must call notifySignalStrength(int)");
}
int dBm = -1;
if (mAsu != -1) {
dBm = -113 + 2*mAsu;
}
return dBm;
}
COM: <s> return current signal strength in d bm ranging from 113 51d bm </s>
|
funcom_train/15522550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void commit(Transaction transaction) throws BusinessException {
try {
transaction.commit();
} catch (StaleObjectStateException sose) {
logger.info("[ smartweb ] optimistical locking collision");
throw new BusinessException("persistence.locking.collision", sose);
} catch (HibernateException he) {
logger.error("[ smartweb ] failed to commit transaction");
throw new BusinessException("persistence.error.commit", he);
}
}
COM: <s> commits the specified transaction applying all the changes happened since </s>
|
funcom_train/48704816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTreeAsString() {
StringBuffer sb = new StringBuffer();
Enumeration<GroupTreeNode> e = preorderEnumeration();
GroupTreeNode cursor;
while (e.hasMoreElements()) {
cursor = e.nextElement();
sb.append(cursor.getLevel()).append(" ").append(cursor.getGroup().toString()).append("\n");
}
return sb.toString();
}
COM: <s> returns a textual representation of this node and its children </s>
|
funcom_train/36720423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IToken doEvaluate(ICharacterScanner scanner, boolean resume) {
if (resume) {
if (endSequenceDetected(scanner))
return fToken;
} else {
int c= scanner.read();
if (charEqualIgnoreCase((char)c,fStartSequence[0])) {
if (sequenceDetected(scanner, fStartSequence, false)) {
if (endSequenceDetected(scanner))
return fToken;
}
}
}
scanner.unread();
return Token.UNDEFINED;
}
COM: <s> evaluates this rules without considering any column constraints </s>
|
funcom_train/3444239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireTableDataChanged(int firstRow, int lastRow, int type) {
if (! hasTableModelListener()) return;
tmpEvent.setValues(firstRow,
lastRow,
TableModelEvent.ALL_COLUMNS,
type);
fireTableChanged(tmpEvent);
}
COM: <s> notifies all listeners that all cell values in the tables </s>
|
funcom_train/3097980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void configure(TaskInfo ti) {
this.tInfo = ti;
setProject(ti.getProject());
if (isReference()) {
SubDataType sdt = (SubDataType) getCheckedRef(SubDataType.class,
"antlion type");
sdt.configure(getTaskInfo());
}
}
COM: <s> configure this subtask with the task info </s>
|
funcom_train/4831269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Message addMessage(String topic, String body ){
//Message tMsg = new Message(topic, body, null, this);
Message tMsg = new Message(topic, body, null, this);
// _forum.getPrimaryMessages().add(tMsg);
TBClogger.DebuggingMessages("logged user", "big error");
return tMsg;
}
COM: <s> add a new message to tbcforum </s>
|
funcom_train/16755551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean contains(URI location, ProvisioningSession session) {
// This is a fallback implementation in the absence of a repository manager
// that would know what to do.
URI[] knownRepositories = getKnownRepositories(session);
for (int i = 0; i < knownRepositories.length; i++) {
if (URIUtil.sameURI(knownRepositories[i], location)) {
return true;
}
}
return false;
}
COM: <s> return a boolean indicating whether this tracker already contains the specified </s>
|
funcom_train/25528681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Decision suggestCategory(String sFilename) {
// Load file
DocumentNGramGraph dDoc = new DocumentNGramSymWinGraph();
try {
dDoc.loadDataStringFromFile(sFilename);
} catch (IOException ex) {
Logger.getLogger(Decider.class.getName()).log(Level.SEVERE, null, ex);
return null;
}
// Suggest
return suggestCategory(dDoc);
}
COM: <s> suggests a category for a given file </s>
|
funcom_train/28471730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetAuthor() {
News testNews = new News();
User testUser1 = new User();
User testUser2 = new User();
testNews.setAuthor(testUser1);
assertTrue(testNews.getAuthor() == testUser1);
testNews.setAuthor(testUser2);
assertTrue(testNews.getAuthor() == testUser2);
}
COM: <s> tries to get and to set an author into news </s>
|
funcom_train/44712918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DataAssociationCursor getRelatedCategories(String relation) {
Assert.assertTrue(relation == CHILD || relation == RELATED,
" invalid relation {" + relation + "}");
DataAssociationCursor cursor =
((DataAssociation) get(RELATED_CATEGORIES)).cursor();
cursor.addEqualsFilter("link.relationType", relation);
return cursor;
}
COM: <s> this returns the cursor for the related categories so that </s>
|
funcom_train/27866388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean engineCanResolve(Attr uri, String baseUri) {
String href = uri.getNodeValue();
if (href.startsWith("cid:")) {
for (int i=0 ; i<docs.length ; i++) {
if (docs[i].uri != null && docs[i].uri.equals(href)) {
return true;
}
}
}
return false;
}
COM: <s> sees whether the resolver can resolve the document specified by </s>
|
funcom_train/26492122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getStringPath(int id) {
String path="";
int ppid = id;
while(ppid != 0){
ObjectCategory parentCategory = getCategory(ppid);
// Quick hack: don't display top in the path...
if(parentCategory != null && parentCategory.getId() != 1 ){
ppid = parentCategory.getPid();
if (path.equals(""))
path=parentCategory.getName();
else path=parentCategory.getName()+" > "+path;
}
else {
ppid = 0;
}
}
return path;
}
COM: <s> return the path of the category with the category id id </s>
|
funcom_train/33281871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String jsxGet_innerHTML() {
final StringBuilder buf = new StringBuilder();
// we can't rely on DomNode.asXml because it adds indentation and new lines
printChildren(buf, getDomNodeOrDie(), !"SCRIPT".equals(jsxGet_tagName()));
return buf.toString();
}
COM: <s> gets the inner html attribute </s>
|
funcom_train/19536186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWaitStates(Collection<WaitState> theStates) {
Map<String, WaitState> old = waitStates;
waitStates = new HashMap<String, WaitState>();
for (WaitState state : theStates) waitStates.put(state.getName(), state);
pcs.firePropertyChange(WAIT_STATE_PROP_NAME, old, waitStates);
}
COM: <s> set all of the wait states </s>
|
funcom_train/44166085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getLeftColumns(int y) {
int leftColumns = leftSpace / tileWidth + 1;
if ((y % 2) == 0) {
if ((leftSpace % tileWidth) > 32) {
leftColumns++;
}
} else {
if ((leftSpace % tileWidth) == 0) {
leftColumns--;
}
}
return leftColumns;
}
COM: <s> returns the amount of columns that are to the left of the tile </s>
|
funcom_train/28344474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double gammaFinal(IProbe probe) {
// Get probe parameters at initial energy
double Er = probe.getSpeciesRestEnergy();
double Wi = probe.getKineticEnergy();
double dW = this.energyGain(probe);
double Wf = Wi + dW;
double gamma = RelativisticParameterConverter.computeGammaFromEnergies(Wf, Er);
return gamma;
}
COM: <s> compute and return the final relativistic gamma function for the </s>
|
funcom_train/28108112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean askReallyQuit() {
int result = JOptionPane.showConfirmDialog(null, "Do you really want to quit the eHome-Configurator?", "Exit Program", JOptionPane.YES_NO_OPTION);
if (result == JOptionPane.YES_OPTION) {
optionalSave();
return true;
} else {
return false;
}
}
COM: <s> asks the user if he wants to quit offers possibility of saving </s>
|
funcom_train/7720066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExecuteUpdate2() throws Exception {
java.sql.Statement stmt = con.createStatement();
stmt.executeUpdate("CREATE TABLE foo (TestCol VARCHAR(10));");
int count = stmt.executeUpdate("INSERT INTO foo (TestCol) VALUES (\"WHEE\");");
assertEquals(count, 1);
}
COM: <s> a series of sql statements to create a table in a database and </s>
|
funcom_train/4517703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Day checkDayOfAppointment(Appointment appointment, Day day) {
if (day.getDayDate().compareDateTo(appointment.getRealBegin()) == 0) {
return day;
}
day.remInterval(appointment);
Day newDay = getDay(appointment.getRealBegin());
newDay.addInterval(appointment);
return newDay;
}
COM: <s> check and possibly correct the day for an appointment </s>
|
funcom_train/28662161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeOutSpecialToken() {
try {
out.write(BOM_VALUE);
} catch (Exception e) {
LogUtil.logError(XorPlugin.PLUGIN_ID, "Exception while writing to the output stream", e, false); //$NON-NLS-1$
}
}
COM: <s> writes out the special token for little endian </s>
|
funcom_train/49333792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MenuInflater getMenuInflater() {
if (DEBUG) Log.d(TAG, "[getMenuInflater]");
// Make sure that action views can get an appropriate theme.
if (mMenuInflater == null) {
if (getActionBar() != null) {
mMenuInflater = new MenuInflater(getThemedContext());
} else {
mMenuInflater = new MenuInflater(mActivity);
}
}
return mMenuInflater;
}
COM: <s> get a menu inflater instance which supports the newer menu attributes </s>
|
funcom_train/45115561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMethodJavaDoc(String className, String methodName) throws Exception {
processSource(className);
JavaClass cls = docBuilder.getClassByName(className);
if(cls == null){
return null;
}
JavaMethod[] methods = cls.getMethods();
for(JavaMethod method: methods){
if(method.getName().equals(methodName)){
return method.getComment();
}
}
return null;
}
COM: <s> get the method javadoc </s>
|
funcom_train/43421643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isToday(Day day) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(day.getDate());
String thisID = getDayID(calendar);
calendar.setTime(new Date());
String todayID = getDayID(calendar);
return todayID.equals(thisID);
}
COM: <s> checks if given day represents today </s>
|
funcom_train/22232870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void compile() {
if (isLive()) {
throw new RestrictedAccessException(J3dI18N.getString("SharedGroup0"));
}
if (isCompiled() == false) {
// will throw SceneGraphCycleException if there is a cycle
// in the scene graph
checkForCycle();
((SharedGroupRetained)this.retained).compile();
}
}
COM: <s> compiles the source shared group associated with this object and </s>
|
funcom_train/22276330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateRelationMaps(OneToOne<T, S> relation) {
fromMap.put(relation.getFrom(), new Pair<S>(relation.getTo(), relation));
toMap.put(relation.getTo(), new Pair<T>(relation.getFrom(), relation));
}
COM: <s> updates from and to maps with relevant portions of this relation </s>
|
funcom_train/17631652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ViewResults adhoc(AdHocView view) {
CouchResponse resp = session.post(name+"/_temp_view", view.getFunction());
if (resp.isOk()) {
ViewResults results = new ViewResults(view,resp.getBodyAsJSON());
results.setDatabase(this);
return results;
} else {
log.warn("Error executing view - "+resp.getErrorId()+" "+resp.getErrorReason());
}
return null;
}
COM: <s> runs an ad hoc view from an ad hoc view object </s>
|
funcom_train/36910189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean consumeAnyButEOF() {
int c = input.LA(1);
if(c==CharStream.EOF)
return false;
if(log.isTraceEnabled())
log.trace("Lexer consumes '{}' while consumeButEOF",
Character.toString((char)c));
// consume character
input.consume();
return true;
}
COM: <s> consumes arbitrary character but eof </s>
|
funcom_train/46163585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void computeByteArray(OSCJavaToByteArrayConverter stream) {
stream.write("#bundle");
computeTimeTagByteArray(stream);
Enumeration enum2 = packets.elements();
OSCPacket nextElement;
byte[] packetBytes;
while (enum2.hasMoreElements()) {
nextElement = (OSCPacket) enum2.nextElement();
packetBytes = nextElement.getByteArray();
stream.write(packetBytes.length);
stream.write(packetBytes);
}
byteArray = stream.toByteArray();
}
COM: <s> compute the osc byte stream representation of the bundle </s>
|
funcom_train/34451355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addQueryExpressionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_MQueryAction_queryExpression_feature"),
getString("_UI_PropertyDescriptor_description",
"_UI_MQueryAction_queryExpression_feature",
"_UI_MQueryAction_type"),
M3ActionsPackage.Literals.MQUERY_ACTION__QUERY_EXPRESSION,
true, true, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null, null));
}
COM: <s> this adds a property descriptor for the query expression feature </s>
|
funcom_train/33579031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeAllWorkBenches() {
List< WorkBench > workbenches_copy;
lock.lock();
try {
// Make a copy of the workbench list, as it will be modified when workbenches are closed
workbenches_copy = new LinkedList< WorkBench >( workbenches );
} finally {
lock.unlock();
}
for ( WorkBench workbench : workbenches_copy ) {
workbench.close();
}
}
COM: <s> tells all work benches to close down </s>
|
funcom_train/4299606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWhereSelectCollidingWithAliases() throws SQLException {
// Yes, this is a nonsensical query
String sql =
"select a.val from colors a where a.id in (select b.id from trees b where b.fruit_id = 3) order by a.val";
String[] expected = new String[] {
"indigo", "orange"
};
compareResults(sql, expected, jdbcConnection);
}
COM: <s> as above with aliases </s>
|
funcom_train/10599251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void linkNodes() throws Exception {
// Get the views category node
this.viewsNode = CategoryNodeBuilder.getCategoryNode(this, "views");
// Resolve links
Iterator iter = this.linkedBuilders.iterator();
while (iter.hasNext()) {
((LinkedProcessingNodeBuilder) iter.next()).linkNode();
}
}
COM: <s> resolve links call code link node code on all </s>
|
funcom_train/15620466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getC() throws M4CompilerError {
Value v = (Value) this.getSingleParameter("C", this.getCurrentLoopNumber());
if (v == null)
{ throw new M4CompilerError("MissingValuesWithRegressionSVM: Parameter C not found in loop " +
this.getCurrentLoopNumber()); }
return v.getValue();
}
COM: <s> gets the c </s>
|
funcom_train/48076346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addSuperClassesAndInterfaces(Class c) {
Class mother = c.getSuperclass();
for (Class member : c.getInterfaces()) {
String name = member.getName();
interfaces.add(name);
if( log.isDebugEnabled()) {
log.debug("Interface: " + name);
}
}
if (mother != null) {
String name = mother.getName();
superClasses.add(name);
if( log.isDebugEnabled() ) {
log.debug("Superclass: " + name);
}
addSuperClassesAndInterfaces(mother);
}
}
COM: <s> adds all superclasses and interfaces from code c code </s>
|
funcom_train/28749548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLabel(String newVal) {
if ((newVal != null && this.label != null && (newVal.compareTo(this.label) == 0)) ||
(newVal == null && this.label == null && label_is_initialized)) {
return;
}
this.label = newVal;
label_is_modified = true;
label_is_initialized = true;
}
COM: <s> setter method for label </s>
|
funcom_train/16318887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void store(SAXParseException ex, String type) {
// build error text
String errorString= type + " at line number, " + ex.getLineNumber()
+ ": " + ex.getMessage();
// adds it to the error list
errorNodes.add(errorString);
}
COM: <s> stores an error </s>
|
funcom_train/51827159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTree getJTree1() {
if (jTree1 == null) {
jTree1 = new JTree(root);
jTree1.setBorder(BorderFactory.createMatteBorder(5, 5, 5, 5,java.awt.Color.white));
jTree1.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() {
public void valueChanged(javax.swing.event.TreeSelectionEvent e) {
setRegisterTableContent();
}
});
}
return jTree1;
}
COM: <s> this method initializes j tree1 </s>
|
funcom_train/22122288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void playMusic(String path) {
// Play default music, from "music" folder,
// if path flagged to default
if (path.equals(MUSIC_DEFAULT)) {
path = chooseScenarioMusic();
}
// Stop music from main music player.
if (musicPlayer != null) {
musicPlayer.requestStop();
}
// Unless path flag set to no music, will play
// from the given path.
if (!path.equals(MUSIC_NONE)) {
musicPlayer = null;
musicPlayer = new MusicPlayer();
musicPlayer.setPath(path);
musicPlayer.start();
}
}
COM: <s> plays mp3 music from the given path </s>
|
funcom_train/31907109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bind(Element element, GraphicsNode node) {
if (elementNodeMap == null) {
elementNodeMap = new HashMap();
nodeElementMap = new HashMap();
}
elementNodeMap.put(element, node);
nodeElementMap.put(node, element);
}
COM: <s> binds the specified graphics node to the specified element </s>
|
funcom_train/13275706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected HomeFurnitureGroup createHomeFurnitureGroup(List<HomePieceOfFurniture> furniture) {
String furnitureGroupName = this.preferences.getLocalizedString(
FurnitureController.class, "groupName", getFurnitureGroupCount(this.home.getFurniture()) + 1);
final HomeFurnitureGroup furnitureGroup = new HomeFurnitureGroup(furniture, furnitureGroupName);
return furnitureGroup;
}
COM: <s> returns a new furniture group for the given furniture list </s>
|
funcom_train/644442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void switchToOptionColor(DialogOptions dialogOptions) {
this.dialogOptions = dialogOptions;
CardLayout cl = (CardLayout) (dialogOptions.getPanelOptions().getLayout());
cl.show(dialogOptions.getPanelOptions(), PersistenceManager.Values.CARD_COLOR.name());
dialogOptions.setSelectedOption(PersistenceManager.Values.CARD_COLOR.name());
}
COM: <s> switches to the color category in the option dialog </s>
|
funcom_train/4219708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBug43714() throws Exception {
Connection c_IS = null;
try {
c_IS = getConnectionWithProps("useInformationSchema=true");
DatabaseMetaData dbmd = c_IS.getMetaData();
rs = dbmd.getExportedKeys("x", "y", "z");
} finally {
try {
c_IS.close();
} catch (SQLException ex) {}
closeMemberJDBCResources();
}
}
COM: <s> bug 43714 use information schema with database meta data </s>
|
funcom_train/29921881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void populateNode(String tagName, String textToAdd, SOAPElement Element){
SOAPElement soapEle;
try {
soapEle = Element.addChildElement(tagName);
soapEle.addTextNode(textToAdd);
}
catch (SOAPException ex) {
System.out.println("Exception thrown: " + ex);
ex.printStackTrace();
}
}
COM: <s> populate soap message with the specificed string to a node </s>
|
funcom_train/7368437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public static void vibrate(final int millis) {
//#ifdef DLOGGING
Logger logger = Logger.getLogger("GameApp");
logger.finest("vibrate millis,GameApp.usVibrate=" + millis + "," + GameApp.usVibrate);
//#endif
if (GameApp.usVibrate) {
//#ifdef DMIDP20
BaseApp.display.vibrate(millis);
//#endif
}
}
COM: <s> vibrate the handset </s>
|
funcom_train/43245040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetMaximumConnections() {
System.out.println("getMaximumConnections");
ConnectionManager instance = new ConnectionManager();
int expResult = 0;
int result = instance.getMaximumConnections();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get maximum connections method of class org </s>
|
funcom_train/28355335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void monitorSamplePeriod() {
try {
BUSY_LOCK.lock();
_isReady = false;
if ( _samplePeriodMonitor == null ) {
_samplePeriodMonitor = _samplePeriodChannel.addMonitorValue( new SamplePeriodListener(), Monitor.VALUE );
}
updateElementTimes();
_isReady = true;
}
catch( ConnectionException exception ) {
System.err.println( exception );
}
catch( MonitorException exception ) {
System.err.println( exception );
}
finally {
BUSY_LOCK.unlock();
}
}
COM: <s> monitor the sample period channel </s>
|
funcom_train/22310011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void cancelTranslate() {
if (DevelopmentConstants.DEBUG_ENABLED) System.out.println("[DEBUG] Translate cancelled!");
frame.removeInternalFrameListener(this);
Component[] cc = frame.getContentPane().getComponents();
for (int i = 0; i < cc.length; i++) {
cc[i].removeMouseListener(this);
cc[i].removeMouseMotionListener(this);
}
synchronized (this) {
notify();
}
}
COM: <s> cancels the translate tool </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.