__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/3393095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Type typeForPool(Object o) {
if (o instanceof Integer) return syms.intType;
if (o instanceof Float) return syms.floatType;
if (o instanceof String) return syms.stringType;
if (o instanceof Long) return syms.longType;
if (o instanceof Double) return syms.doubleType;
if (o instanceof ClassSymbol) return syms.classType;
if (o instanceof Type.ArrayType) return syms.classType;
throw new AssertionError(o);
}
COM: <s> the type of a constant pool entry </s>
|
funcom_train/4901240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void safeSetReadyState(final ReadyState state) {
if (!SwingUtilities.isEventDispatchThread()) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
AsyncHttpRequest.this.setReadyState(state);
}
});
} else {
AsyncHttpRequest.this.setReadyState(state);
}
}
COM: <s> helper method which allows me to set the ready state on </s>
|
funcom_train/609313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFilter(ILogFilter filter) {
if (! filterMap.containsKey(filter.getFilterKey())) {
if (lastFilter != null) {
filter.setParent(lastFilter);
}
else
filter.setParent(rootReader);
filterMap.put(filter.getFilterKey(), filter);
lastFilter = filter;
fireFilterAdded(filter);
}
}
COM: <s> adds a filter to the log parser that will parse all log files </s>
|
funcom_train/10274867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element createElement(String type, String value) throws NullPointerException, DOMException{
ParamUtils.checkNotNull(getClass().getName() +".createElement(String, String): type ", type);
ParamUtils.checkNotNull(getClass().getName() +".createElement(String, String): value ", value);
Element elem = mDoc.createElement(type);
elem.appendChild(mDoc.createTextNode(value));
return elem;
}
COM: <s> effects returns new element with </s>
|
funcom_train/29389556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetIntProperty() {
TestTask tt = new TestTask(null, "Custom", testTask.getDefinition(), null) ;
assertEquals(99, tt.getIntProperty("intTest", -1)) ;
assertEquals(-1, tt.getIntProperty("dummy", -1)) ;
}
COM: <s> test method for get int property java </s>
|
funcom_train/12156865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLotsaSpaces() {
doCharsetParserTest(" A ; q = 0.3 , B ; q = 0.2 , C ; q = 0.1 ",
new String[]{"ISO-8859-1", "A", "B", "C"});
}
COM: <s> test various charsets and qvalues 1 with spaces in between </s>
|
funcom_train/8088569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isContainedBy(Instance instance) {
for (int i=0; i < instance.numAttributes(); i++) {
if (m_Events[i] > -1) {
if (instance.isMissing(i)) {
return false;
}
if (m_Events[i] != (int) instance.value(i)) {
return false;
}
}
}
return true;
}
COM: <s> checks if an element is contained by a given instance </s>
|
funcom_train/9125132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test() {
JdbcTemplate template = new JdbcTemplate(dataSource);
MySqlAppointmentDao dao = new MySqlAppointmentDao();
dao.setJdbcTemplate(template);
Doctor doc = Doctor.CreateNewDoctor(1);
List<Appointment> appointments = dao.findAppointmentsAssignedToMedic(doc, new Date());
assertNotNull(appointments);
assertFalse(appointments.isEmpty());
assertTrue(appointments.size() == 1);
assertTrue(appointments.get(0).getDoctor().getId() == doc.getId());
}
COM: <s> test method for </s>
|
funcom_train/4232808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeAndKeep () throws Exception {
try {
log.debug ("Closing turbine " + serverName + " with cache and archive.");
this.source.Detach();
} catch (Exception e) {
log.error ("Error closing turbine: " + e);
throw e;
}
} // close ()
COM: <s> close the data turbine caching and archiving data submitted from this </s>
|
funcom_train/12075355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String rollKO(int modifier) {
StringBuffer sbuf = new StringBuffer();
sbuf.append(this.getName() + " rolls for knockout with modifier " + modifier);
int result = DieRoller.rolld10(getKnockdown() + modifier, 7);
if (result < 1) {
sbuf.append(" and is knocked out!");
addCondition(new Defeated());
}
else {
sbuf.append(" and passed!");
}
return sbuf.toString();
}
COM: <s> make this combatant roll for knock out </s>
|
funcom_train/3095979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int size() {
if (empty)
return 0;
else if (this.headpointer == this.tailpointer)
return this.size + 1;
else if (this.headpointer > this.tailpointer) {
return this.headpointer - this.tailpointer;
}
else {
return this.headpointer + this.size + 1 - this.tailpointer;
}
}
COM: <s> returns the actual amount of elements stored in the buffer </s>
|
funcom_train/3721800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parse(Type datatypeObject, Element datatypeElement) throws DataTypeException {
if (datatypeObject instanceof Varies) {
parseVaries((Varies) datatypeObject, datatypeElement);
}
else if (datatypeObject instanceof Primitive) {
parsePrimitive((Primitive) datatypeObject, datatypeElement);
}
else if (datatypeObject instanceof Composite) {
parseComposite((Composite) datatypeObject, datatypeElement);
}
}
COM: <s> populates the given type object with data from the given xml element </s>
|
funcom_train/50053918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createTreeIfNeeded(float x, float y, float z, float angle) {
if (y < 2 || y > 14 || angle < 50) {
return;
}
Random random = MathUtils.getRandom();
if (random.nextInt(1000) < 2 && treeInstances.size() < 5) {
ReferenceMeshObject tree = new ReferenceMeshObject(treeMeshes.get(0));
tree.setTranslate(x, y, z);
treeInstances.add(tree);
}
}
COM: <s> creates a tree at the given position if applicable </s>
|
funcom_train/34907949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNavazaneSpojePropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_Vyrok_navazaneSpoje_feature"),
getString("_UI_Vyrok_navazaneSpoje_description"),
GebzPackage.Literals.VYROK__NAVAZANE_SPOJE, true, false, true,
null, getString("_UI_SpojePropertyCategory"), null));
}
COM: <s> this adds a property descriptor for the navazane spoje feature </s>
|
funcom_train/12147787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeDoc(){
if(format.equals(Literals.GXL)){
printGXL();
} else if(format.equals(Literals.RDF)){
printRDF();
}
Iterator iter = responses.keySet().iterator();
while(iter.hasNext()){
String key = iter.next().toString();
Collection props = (Collection)responses.get(key);
if(props==null)
props = new Vector();
Collection errprops = (Collection)errresponses.get(key);
if(errprops==null)
errprops = new Vector();
printDAVResponse(key, props.iterator(), errprops.iterator());
}
resultWriter.write(FOOTER);
//Clear all old results
nodes = new HashMap();
nodeIds = new HashMap();
edges = new Vector();
responses = new HashMap();
}
COM: <s> close the response document </s>
|
funcom_train/4917291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemoveLast() {
Entry first = new Entry();
Entry middle = new Entry();
Entry last = new Entry();
this.assertNotLast(this.linkedList.removeEntry(last));
this.validateList(first, middle);
// Ensure state of entry is reset
assertNull("Entry next should be cleared", last.getNext());
assertNull("Entry prev should be cleared", last.getPrev());
}
COM: <s> ensure remove last entry of many entries </s>
|
funcom_train/12860785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateDocuments() {
documents.clear();
choosenDocuments.clear();
// check if the path is valid
if (!documentPath.isValidPath(documentPath.toOSString())) {
return;
}
// read the files in the directory
File dir = new File(documentPath.toOSString());
if (dir.isDirectory()) {
scanFiles(dir);
}
// notifyListeners();
}
COM: <s> refreshes the documents list and notifies the listeners </s>
|
funcom_train/8076341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) {
FontMetrics fm = gfx.getFontMetrics();
int vpad = (box.height - fm.getAscent()) / 2;
String rep = m_ListModel.getSize() + " " + m_ElementClass.getName();
gfx.drawString(rep, 2, fm.getHeight() + vpad);
}
COM: <s> paints a representation of the current classifier </s>
|
funcom_train/37648663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRenderReportCmdNullArg5() throws CommandException {
try {
RenderReportCmd cmd = new RenderReportCmd();
cmd.setProject(null);
cmd.registerRenderer(new HTMLRenderer(new Properties()), null);
cmd.performExecute();
fail();
} catch (UnsetInputPropertiesException e) {
// yes cool
}
}
COM: <s> test robustness 5 </s>
|
funcom_train/15828180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public static final String ARRAY_SRC2 = "package com.example.mypackage;\n\n"
+ "public class MyClass {\n\n" + " public void run() {\n\n"
+ " int[] numbers = new int[5];\n\n"
+ " int[] values = new int[] {1, 2, 3, 4, 5};\n"
+ " numbers[1] = values[3];\n" + " }\n" + "}\n";
COM: <s> the transformed source for the array test </s>
|
funcom_train/26490172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NewsLink getNewsLink() {
NewsLink newsLink = null;
if (bookmarkId!=null) {
NewsHolder newsHolder = NewsHolder.getInstance();
newsLink = (NewsLink) newsHolder.bookmarksHT.get(bookmarkId);
} else {
System.err.println("Bookmark.getNewsLink(): null returned!");
}
return newsLink;
}
COM: <s> returns a news link to the bookmark </s>
|
funcom_train/35682776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConnectAndClose() {
try {
CicsSocket cs = new CicsSocket(getName(), getEndpoint());
cs.connect(HOST_PASSWORD);
cs.close();
} catch (ConnectionException e) {
fail("testConnectAndClose failed=" + e);
} catch (RequestException e) {
fail("testConnectAndClose failed=" + e);
}
}
COM: <s> connect and immediately close </s>
|
funcom_train/32748550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getBeamCurrent(String bcm) {
double current = 20;
for (int i = 0; i < CHANNEL_SNAPSHOTS.length; i++) {
if (CHANNEL_SNAPSHOTS[i].getPV().indexOf(bcm) > -1
&& CHANNEL_SNAPSHOTS[i].getPV().indexOf(":currentMax") > -1) {
current = CHANNEL_SNAPSHOTS[i].getValue()[0];
return current;
}
}
return current;
}
COM: <s> get the beam current in m a use the bcm specified here </s>
|
funcom_train/19036571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LinkNotificationCollection getLinkNotifications(MemberID memberID) {
LinkNotificationCollection lnc = new LinkNotificationCollection();
if(memberID != null) {
StoredMember member = this.getStoredMember(memberID);
if(member != null) {
lnc = member.getLinkNotifications();
}
}
return lnc;
}
COM: <s> returns all the link notifications destined for this member </s>
|
funcom_train/3153008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Dimension arrangeGrid(Container parent, int sizeType) {
synchronized (parent.getTreeLock()) {
Insets parentInsets = parent.getInsets();
return new Dimension(parentInsets.left + parentInsets.right + ProportionLine.arrangeLines(columnLines, columnLineParts, sizeType), parentInsets.bottom + parentInsets.top + ProportionLine.arrangeLines(rowLines, rowLineParts, sizeType));
}
}
COM: <s> arranges the grid for the given container of components and specifies the </s>
|
funcom_train/13563461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initNetwork(ConfigType matsimParameter){
log.info("Setting NetworkConfigGroup to config...");
String networkFile = matsimParameter.getNetwork().getInputFile();
NetworkConfigGroup networkCG = (NetworkConfigGroup) scenario.getConfig().getModule(NetworkConfigGroup.GROUP_NAME);
// set network
networkCG.setInputFile( networkFile );
log.info("NetworkConfigGroup settings:");
log.info("Network: " + networkCG.getInputFile());
log.info("... done!");
}
COM: <s> setting matsim network </s>
|
funcom_train/26441007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String repairString(String s) {
String ret=""; int i=0;
StringTokenizer st = new StringTokenizer(s);
while (st.hasMoreTokens()) {
String tok= st.nextToken();
if(i<1)
ret = ret+tok;
else
ret = ret+"_"+tok;
i++;
}
return ret;
}
COM: <s> build a one word string from a x words string </s>
|
funcom_train/15622959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getStepsWhereThisIsInputRelation() throws M4Exception {
Collection params = this.getParameterReferences();
Vector steps = new Vector();
if (params != null) {
Iterator it = params.iterator();
while (it.hasNext()) {
Parameter p = (Parameter) it.next();
if (p != null && p.getParameterType().equals(Parameter.TYPE_INPUT)) {
steps.add(p.getTheStep());
}
}
}
return steps;
}
COM: <s> returns all steps in the case that use this relation as </s>
|
funcom_train/15861716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(final String f1, final String f2) {
String paramlist = localPStack.getLocals().toString();
paramlist = paramlist.substring(1, paramlist.lastIndexOf(']'));
String pattern = new Formatter().format("%s %s(%s);", f1, f2, "%s").toString();
return new Formatter().format(pattern, dt.getSimpleName(), id, paramlist).toString();
}
COM: <s> returns a string with formatted information about this function </s>
|
funcom_train/22895655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean startExecution() {
if (false == this.isInputRequirementsSatisfied()) {
this.context.getStateTracker().set(STATUS_ARGUMENTS_REQUIRED);
return false; // EARLY RETURN
}
// Copy set of results available at this time, to later see growth
// (intermediate results)
this.resultSetBeforeStart.addAll(this.parser.getInputSymbols().keySet());
this.context.getStateTracker().clear(STATUS_ARGUMENTS_REQUIRED);
this.context.getStateTracker().set(STATUS_RUNNING);
this.parser.setRunningStatus(true);
this.parser.continueExecution();
return true;
}
COM: <s> start the script instance </s>
|
funcom_train/32068768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addEmailRecipients(Collection<EmailRecipient> emailRecipients) {
boolean addOk = getEmailRecipients().addAll(emailRecipients);
if (addOk) {
for(EmailRecipient emailRecipient : emailRecipients) {
emailRecipient.setEmailMessage((EmailMessage)this);
}
} else {
if (logger.isWarnEnabled()) {
logger.warn("add returned false");
}
}
return addOk;
}
COM: <s> add the passed email recipients collection to the email message collection </s>
|
funcom_train/19325626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean traitScoreSpaces(final FObj fobj, final FoContext context) {
final PdScoreSpaces property = (PdScoreSpaces) getProperty(
FoProperty.SCORE_SPACES);
if (property != null) {
return property.getValue(context, fobj);
}
return PdScoreSpaces.getValueNoInstance(context, fobj);
}
COM: <s> returns the score spaces property </s>
|
funcom_train/42538075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String stubMethod(){
return (" /** Static stub method for calling "+methodName()+" */\n"+
" public static "+methodReturn()+" "+stubMethodName()+"(Object o){\n"+
" "+stubMethodBody()+"\n }\n\n");
}
COM: <s> the full static stub method within the generated class </s>
|
funcom_train/48630729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDonnees() {
System.out.println("getDonnees");
Itineraire instance = new Itineraire();
Donnees expResult = null;
Donnees result = instance.getDonnees();
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 donnees method of class itineraire </s>
|
funcom_train/10202929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List loadAllCustomers() throws CustomerException {
try {
return (List) persistency.select(new CpxCustomerPO(), new BasicLifeCycleController() {
public Object afterCompositeSelect(AbstractPersistentObject po) {
((CpxCustomerPO) po).getContact();
return po;
}
});
} catch (OdalPersistencyException e) {
throw new CustomerException(e);
}
}
COM: <s> load all the customers </s>
|
funcom_train/19571742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connectToDatabase() throws SQLException {
try {
properties = bbprop.getBestBooks();
Class.forName(new String(properties.getProperty("driver"))); // com.mysql.jdbc.Driver
con = DriverManager.getConnection(new String(properties
.getProperty("url")), new String(properties
.getProperty("userid")), new String(properties
.getProperty("password")));
stmt = con.createStatement();
} catch (ClassNotFoundException ex) {
ex.printStackTrace();
}
}
COM: <s> connecting to a database obtaining the connection </s>
|
funcom_train/41875202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setXY(double x, double y) {
if (penDown) {
fireDrawShapeEvent(new DrawableLine(position.getX(), position.getY(), x, y, color, penWidth));
// getCanvas().drawShape(new DrawableLine(position.getX(), position.getY(), x, y, color, penWidth));
}
moveXY(x, y);
}
COM: <s> sets x y coordinates of robot </s>
|
funcom_train/31156818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getHealth() {
if (hitPoints > 40) {
return "Excellent";
} else if (hitPoints <= 40 && hitPoints > 30) {
return "Good";
} else if (hitPoints <= 30 && hitPoints > 20) {
return "Normal";
} else if (hitPoints <= 20 && hitPoints > 10) {
return "Struggling";
} else {
return "Dying";
}
}
COM: <s> get the health description </s>
|
funcom_train/8096441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDefaultConstructor() throws Exception {
int upper = 10;
int indexInt = 0;
String indexStr = "" + (indexInt + 1);
SingleIndex index = new SingleIndex();
index.setSingleIndex(indexStr);
index.setUpper(upper);
assertEquals(indexStr, index.getSingleIndex());
assertEquals(indexInt, index.getIndex());
}
COM: <s> test the default constructor </s>
|
funcom_train/22283824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStackText(int index, String text, boolean asHTML) {
if (index >= getWidgetCount())
return;
Element td = DOM.getChild(DOM.getChild(body, index * 2), 0);
if (asHTML)
DOM.setInnerHTML(td, text);
else
DOM.setInnerText(td, text);
}
COM: <s> sets the text associated with a widget by its index </s>
|
funcom_train/3172801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawIndiBox(IndiBox indibox, int x, int y, int gen) {
AffineTransform transform = graphics.getTransform();
transform(x, y, indibox.width, indibox.height);
transpose(indibox);
elements.drawIndiBox(indibox, 0, 0, gen);
transpose(indibox);
graphics.setTransform(transform);
}
COM: <s> outputs a rotated image of an individual box </s>
|
funcom_train/48151555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(Observable o, Object arg) {
if (arg == getValueSetter(1)) {
rate = getValueSetter(1).getValue();
} else if (arg == getValueSetter(0)) {
width = getValueSetter(0).getValue();
scatterPlot.setParameters(0, width, 0, width);
}
setDistribution();
}
COM: <s> this method hankdles the scrollbar events for changing the rate and width </s>
|
funcom_train/36125514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CharArray getNumberChars() throws IOException {
Event event = this.valstate == null ? nextEvent() : null;
if (this.valstate == Event.LONG || this.valstate == Event.NUMBER) {
/**/
} else if (this.valstate == Event.BIGNUMBER) {
continueNumber(this.outputBuffer);
} else {
throw runtimeException("Unexpected " + event);
}
this.valstate = null;
return this.outputBuffer;
}
COM: <s> returns the characters of a json numeric value </s>
|
funcom_train/29916570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IGenCATokenInfo getGenCATokenInfo() throws Exception {
if(genCATokenInfo == null){
Class<?> c = this.getClass().getClassLoader().loadClass(getProperty("gencatokeninfo.impl",true));
genCATokenInfo = (IGenCATokenInfo) c.newInstance();
genCATokenInfo.init(getProps(),console,out);
}
return genCATokenInfo;
}
COM: <s> method that generates catoken info depending on the configured </s>
|
funcom_train/17718163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void delete(){
try {
JobAdvertController.deleteJobAdvert(jobAdvert);
cmd_delete.setVisible(false);
cmd_withdraw.setVisible(false);
cmd_save.setVisible(false);
lbl_result.setText("Delete job successfully!");
}catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
CommonUtility.showDialog(this, "Job Advert Delete Error",e.getMessage());
}
}
COM: <s> this method is to delete the specified job advert from properties file </s>
|
funcom_train/375452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testValidateHttpJBufferPacketHandlerWithGlobalScanner() {
pcap.loop(Pcap.LOOP_INFINATE, new JBufferHandler<Pcap>() {
public void nextPacket(PcapHeader header, JBuffer buffer, Pcap pcap) {
assertNotNull(buffer);
final int id = JRegistry.mapDLTToId(pcap.datalink());
PcapPacket packet = new PcapPacket(header, buffer);
assertNotNull(packet);
JScanner scanner = JScanner.getThreadLocal();
scanner.scan(packet, id);
}
}, pcap);
}
COM: <s> test validate http j buffer packet handler with global scanner </s>
|
funcom_train/47998720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean doAction(long playerID, long originCellID, long targetCellID) {
GameCell originCell = map.getCellByID(originCellID);
if (originCell != null && playerID == originCell.getPlayer())
return doCheckedAction(playerID, originCellID, targetCellID);
else
return false;
}
COM: <s> initiates the handling of an action command from one of the clients </s>
|
funcom_train/47860890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void applyBackground(Component renderer, ComponentAdapter adapter) {
Color color = adapter.isSelected() ? getSelectedBackground() : getBackground();
if (isLegacy() && color != null) {
renderer.setBackground(color);
} else {
renderer.setBackground(blend(renderer.getBackground(), color));
}
}
COM: <s> applies a suitable background for the renderer component within the </s>
|
funcom_train/3561296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void usesTables(Set c) {
String tableName;
try {
tableName = table.getFullTableName();
if (tableName != null)
c.add(table);
else
table.getColumn(index).usesTables(c);
}
catch (DbException e) {
System.out.println("Acc");
}
}
COM: <s> adds to the set the currently indexed table </s>
|
funcom_train/12652437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addDiagnosis(PatientHistory patientHistory, CharacteristicCode location, CharacteristicCode value) {
if ((patientHistory == null) || (location == null) || (value == null))
return;
Diagnosis diagnosis = new Diagnosis();
diagnosis.getValueHistory().setValue(ANATOMIC_SITE, location);
diagnosis.getValueHistory().setValue(STAGE, value);
patientHistory.getDiagnoses().add(diagnosis);
}
COM: <s> add an stage diagnosis to a history </s>
|
funcom_train/39120696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void cleanup(Throwable fromWhere, Throwable whyCleanedUp) {
try {
if ((this.io != null) && !isClosed()) {
realClose(false, false);
} else if (this.io != null) {
this.io.forceClose();
}
} catch (SQLException sqlEx) {
// ignore, we're going away.
;
}
this.isClosed = true;
}
COM: <s> destroys this connection and any underlying resources </s>
|
funcom_train/4467252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDate(Date date) {
if (this.date == null && date != null || this.date != null
&& date == null || this.date != null && !this.date.equals(date)) {
this.date = date;
if (isAttached()) {
setDateOnPicker(DateUtil.getJSDate(date));
}
if (changeListeners != null) {
changeListeners.fireChange(this);
}
}
}
COM: <s> instanciates or replaces the temporal information displayed and editer by the selector </s>
|
funcom_train/8229423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintIcons(Graphics g, int x, int y) {
g.drawImage(thievingIcon, x + 20, y + 20, null);
g.drawImage(blkJIcon, x + 100, y + 20, null);
g.drawImage(coinsIcon, x + 200, y + 20, null);
}
COM: <s> paints the icons in the rect area </s>
|
funcom_train/25706626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getContentPanel() {
if( contentPanel == null ) {
contentPanel = new JPanel();
contentPanel.setLayout(new BorderLayout());
contentPanel.add(getJTabbedPane(), java.awt.BorderLayout.NORTH);
contentPanel.add(getPsearchResult(), java.awt.BorderLayout.CENTER);
}
return contentPanel;
}
COM: <s> this method initializes content panel </s>
|
funcom_train/45209957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parse(InputSource is) throws XPAParseException {
try {
SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser parser = factory.newSAXParser();
parser.parse(is, new SAXHandler());
} catch (Throwable t) {
throw new XPAParseException(t);
}
}
COM: <s> parses a xml from an input source </s>
|
funcom_train/10747861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void overrideMnemonics( final Character addButtonMnemonic, final Character editButtonMnemonic, final Character removeButtonMnemonic ) {
if ( addButtonMnemonic != null )
addButton .setMnemonic( addButtonMnemonic );
if ( editButtonMnemonic != null )
editButton .setMnemonic( editButtonMnemonic );
if ( removeButtonMnemonic != null )
removeButton.setMnemonic( removeButtonMnemonic );
}
COM: <s> overrides default mnemonic keys for the add edit and remove buttons </s>
|
funcom_train/25524905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void repaintListIcons() {
// If this is not the UI thread...
if(!SwingUtilities.isEventDispatchThread()) {
try {
// Run in the UI thread.
SwingUtilities.invokeAndWait(new Runnable() {
/**
* Called when the thread is run.
*/
@Override
public void run() {
repaintListIcons();
}
});
} catch (Exception e) {
// Ignore
}
}
// Otherwise...
else {
// Just run.
getJlFriends().repaint();
getJlGroups().repaint();
}
}
COM: <s> repaint the list icons </s>
|
funcom_train/5508102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void mergeOrShow(int n) {
// if they released on the same tab they pressed, or nothing was being dragged
if (tabBeingDragged == n || tabBeingDragged == -1) {
// select the target tab
showPhysicalTab(n);
}
// otherwise, they were dragging a tab and released on a different tab -- merge them
else {
mergeTabs(n, tabBeingDragged);
}
}
COM: <s> determine if we want to merge a tab or just select one </s>
|
funcom_train/9890313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void registerAction(IEnableAction action) {
m_RegisteredActions.add(action);
// register for key bindings
String cmdId = action.getActionDefinitionId();
if(cmdId != null) {
IHandlerService service = (IHandlerService)getSite().getService(IHandlerService.class);
if(service != null) {
service.activateHandler(cmdId, new ActionWrapperHandler(action));
}
}
}
COM: <s> registers the action to the editor </s>
|
funcom_train/29410697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setActivePart(IAction action, IWorkbenchPart targetPart) {
bflowDiagramEditPart =
BflowDiagramEditPart.getCurrentViewer();
if(bflowDiagramEditPart != null){
IGlobalColorSchema schema = bflowDiagramEditPart.getColorSchema();
if(schema != null){
if(schema.toString().equals(action.getId())){
action.setChecked(true);
}
else{
action.setChecked(false);
}
}
}
}
COM: <s> sets the editability of the action </s>
|
funcom_train/21405315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long insertPhoto(long idRoute, double lat, double lon, double h) {
ContentValues initialValues = new ContentValues();
initialValues.put(ROUTE_ID, idRoute);
initialValues.put(PHOTO_LAT, lat);
initialValues.put(PHOTO_LON, lon);
initialValues.put(PHOTO_H, h);
return db.insert(TABLE_PHOTOS, null, initialValues);
}
COM: <s> inserts a new photo in the table </s>
|
funcom_train/2893344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void goToPage(int nObjectType, int nPage) {
if (nObjectType >= 0 && nObjectType <= DBObjects.NUMBEROFOBJECTS)
if (nPage <= m_ObjectLastPage[nObjectType])
m_ObjectCurrentPage[nObjectType] = nPage;
calculatePageSpread(nObjectType);
}
COM: <s> set the current page for a given object type </s>
|
funcom_train/18655916 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int findURL(URLWithAccessKey[] Array,URL Target){
for(int URLIndex=0;URLIndex<Array.length;URLIndex++){
if(Array[URLIndex].getURL().equals(Target))
return URLIndex;
}
return -1; // nothing found
}
COM: <s> find a url in a array </s>
|
funcom_train/3312889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setQuestion(String q, Graphics g){
quest = q;
stringBounds = (g.getFont()).getStringBounds
(quest, ((Graphics2D)g).getFontRenderContext());
//the new size of the Panel.
size =new Dimension((int)stringBounds.getWidth() + cdox.getWidth()+15,
cdox.getHeight());
updateUI();
}
COM: <s> draws the given string in the comic balloon on the panel </s>
|
funcom_train/38964301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
Hashtable h = RemoteApplication.getCommandMap();
Enumeration keys = h.keys();
int i = 0;
// create a string for each entry in the map
helpTexts_ = new String[h.size()];
while (keys.hasMoreElements()) {
Integer key = (Integer) keys.nextElement();
String value = (String) h.get(key);
helpTexts_[i++] = this.getKeyName(getKeyCode(key.intValue())) +
" -> " +
value;
}
}
COM: <s> the reset method fill the help text with the current key map </s>
|
funcom_train/28343713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getChromDispersionXNoSpaceCharge() {
double W = this.getKineticEnergy();
double Er = this.getSpeciesRestEnergy();
double gamma = RelativisticParameterConverter.computeGammaFromEnergies(W, Er);
double d = this.getResponseMatrixNoSpaceCharge().getElem(PhaseMatrix.IND_X, PhaseMatrix.IND_ZP);
return d/(gamma*gamma);
}
COM: <s> dispersion x without space charge </s>
|
funcom_train/50363824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OID getCommonAncestorOID() {
OID ancestor = null;
for (Iterator i = tree.keySet().iterator(); i.hasNext();) {
OID key = (OID) i.next();
if (ancestor == null)
ancestor = key;
while (!key.startsWith(ancestor)) {
ancestor = ancestor.subOID(0, ancestor.length() - 1);
}
}
return ancestor;
}
COM: <s> gets the common ancestor oid of all the agent objects </s>
|
funcom_train/45865505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCVCRequestABSP() throws Exception {
byte[] bytes = FileHelper.loadFile(new File("./src/test/resources/absp.cvcert"));
CVCertificate cvc = (CVCertificate)CertificateParser.parseCVCObject(bytes);
PublicKey pk = cvc.getCertificateBody().getPublicKey();
bytes = FileHelper.loadFile(new File("./src/test/resources/absp.req"));
CVCAuthenticatedRequest authreq = (CVCAuthenticatedRequest)CertificateParser.parseCVCObject(bytes);
authreq.verify(pk);
}
COM: <s> check oid should have been set to a specific value </s>
|
funcom_train/8660725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void invalidateConnection(Connection conn) throws SQLException {
if (conn instanceof PoolGuardConnectionWrapper) { // normal case
PoolGuardConnectionWrapper pgconn = (PoolGuardConnectionWrapper) conn;
ObjectPool pool = pgconn.pool;
Connection delegate = pgconn.delegate;
try {
pool.invalidateObject(delegate);
}
catch (Exception e) {
}
pgconn.delegate = null;
}
else {
throw new SQLException("Invalid connection class");
}
}
COM: <s> invalidates the given connection </s>
|
funcom_train/48406610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addGuidancePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DescribableElement_guidance_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DescribableElement_guidance_feature", "_UI_DescribableElement_type"),
SpemxtcompletePackage.eINSTANCE.getDescribableElement_Guidance(),
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the guidance feature </s>
|
funcom_train/43187997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public boolean plugInExists(String name, int type) {
Vector cnames = PlugInManager.getPlugInList(null, null, type);
for (int i = 0; i < cnames.size(); i++) {
if (name.equals((String)(cnames.elementAt(i))))
return true;
}
return false;
}
COM: <s> check to see if a particular plugin exists in the registry </s>
|
funcom_train/6493095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
// row name: a=0, b=1 on x-axis, y-axis:1-8, eg: b4)
String j = "abcdefgh";
return "" + j.charAt(this.fromCol) + (this.fromRow + 1)
+ j.charAt(this.toCol) + (this.toRow + 1);
}
COM: <s> output string of move in x n format </s>
|
funcom_train/825134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readAmbientColor(String line) {
String[] strings = line.split(" ");
if (strings.length < 5) {
return;
}
ambientColor = new Color3f(Float.parseFloat(strings[1]), Float.parseFloat(strings[2]), Float.parseFloat(strings[3]));
}
COM: <s> extract the ambient color information from a line of thex and assign </s>
|
funcom_train/10589591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object recalculate() {
Object ret = this.algorithm.calculate(this.getForm(), this.getParent(), this.getDatatype());
needRecaulculate = false;
try {
ret = convert(ret, this.getDatatype());
} catch (Exception e) {
// FIXME : log the conversion error
}
return ret;
}
COM: <s> calls the algorithm to perform a recaulculation </s>
|
funcom_train/48527087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(Object key) {
Object value = normal.remove(key);
if (value != null) {
RedBlackMap o = (RedBlackMap) reverse.get(value);
o.remove(key);
if (o.size() == 0) {
reverse.remove(value);
}
} else {
nulls.remove(key);
}
}
COM: <s> removes any and all mappings with the given key </s>
|
funcom_train/21465917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Instance createExampleFrom(Snapshot snapshot) {
Instance example = new Instance(snapshot.getConditions().size() + 1);
// conditions
loadConditionsTo(snapshot.getConditions(), example);
// behaviour
example.setValue((Attribute) attList.lastElement(), Tools.getTools()
.getXMLRepForBehaviourOn(snapshot));
return example;
}
COM: <s> creates an example instance from a snapshot </s>
|
funcom_train/48553894 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected StatsSession createSession(final StatsKey key) {
StatsConfig config = configManager.getOrCreateConfig(key);
DataRecorder[] dataRecorders = config.getDataRecorderFactory()
.createDataRecorders();
//TODO: How to get StatsManager properly
StatsSession session = config.getSessionFactory()
.createSession(key,
Stats.getManager(),
dataRecorders);
logger.debug("Created StatsSession for key: {}", key);
return session;
}
COM: <s> a factory method for creating a </s>
|
funcom_train/36366425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String chooseSourcePath(int type) {
String pathname;
flexFileChooser.setFiletype(type, false);
int approve = flexFileChooser.showOpenDialog(this);
if (approve == javax.swing.JFileChooser.APPROVE_OPTION) {
pathname = flexFileChooser.getSelectedFile().toString();
return(pathname);
}
else return(null);
}
COM: <s> brings up a file chooser dialog to determine a source file </s>
|
funcom_train/10628480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFlipBitNegativeInside4() {
String as = "-4294967295";
String res = "-4294967296";
int number = 0;
BigInteger aNumber = new BigInteger(as);
BigInteger result = aNumber.flipBit(number);
assertEquals(res, result.toString());
}
COM: <s> flip bit 0 in the negative number of length 1 </s>
|
funcom_train/7264595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeSelector(final Selector selector) {
if(Thread.currentThread() == dispatchThread) {
POLLERS.remove(selector);
OTHER_SELECTORS.remove(selector);
} else {
executeLaterAlways(new Runnable() {
public void run() {
POLLERS.remove(selector);
OTHER_SELECTORS.remove(selector);
}
});
}
}
COM: <s> removes a registered selector </s>
|
funcom_train/45864104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCell(int x, int y, int index) {
if (animtile[index].isAnimated()) {
peer.setCell(x, y, -index - 1);
} else {
peer.setCell(x, y, animtile[index].getTileIndex() + 1);
}
addAnimTile(index); // used by cycle to update the peer, hence adding this twice
if (controller != null) {
controller.addAnimTile(index);
}
}
COM: <s> sets the index of a particular cell </s>
|
funcom_train/18760251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node getNodeByLabel( String strArg ) {
if ( strArg.equals( strGroupLabel ) )
return this;
Node oOut = null;
for ( int iX = 0; vChild != null && iX < vChild.size() && oOut == null; iX++ )
oOut = vChild.get( iX ).getNodeByLabel( strArg );
return oOut;
}
COM: <s> get descendant node by group label string </s>
|
funcom_train/21613393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load(jEDF.EDF.EDFFile edfFile) {
totalDuration = edfFile.getNbRecords() * edfFile.getRecordDuration();
montage.loadEDFFile(this, edfFile);
setEpochDuration(edfFile.getRecordDuration());
navigationSlider.setMinimum(0);
navigationSlider.setValue(0);
navigationSlider.setMaximum(totalDuration - 1);
}
COM: <s> load an edf file displaying all of its signals </s>
|
funcom_train/27711749 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int createComment(int dataIndex) {
// create node
int nodeIndex = createNode(Node.COMMENT_NODE);
int chunk = nodeIndex >> CHUNK_SHIFT;
int index = nodeIndex & CHUNK_MASK;
setChunkIndex(fNodeValue, dataIndex, chunk, index);
// return node index
return nodeIndex;
} // createComment(int):int
COM: <s> creates a comment node in the table </s>
|
funcom_train/19600837 | /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 instanceof PooledConnection) {
return realConnection.hashCode() == (((PooledConnection) obj).realConnection.hashCode());
} else if (obj instanceof Connection) {
return hashCode == obj.hashCode();
} else {
return false;
}
}
COM: <s> allows comparing this connection to another </s>
|
funcom_train/14012013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGroup(ButtonGroup newValue) {
ButtonGroup oldValue = buttonGroup;
buttonGroup = newValue;
if (oldValue != null) {
oldValue.removeButton(this);
}
if (newValue != null) {
newValue.addButton(this);
}
firePropertyChange(BUTTON_GROUP_CHANGED_PROPERTY, oldValue, newValue);
}
COM: <s> sets the code button group code to which this </s>
|
funcom_train/6431089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String readString(InputStream is) throws IOException {
byte data[] = new byte[10000];
int c, pos = 0;
while(pos < data.length &&
(c = is.read(data, pos, data.length - pos)) != -1) {
pos += c;
}
if(pos == 0)
return null;
return new String(data, 0, 0, pos); // for 1.0
}
COM: <s> uses deprecated api for compatibility with web browsers </s>
|
funcom_train/1562177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initGUI() {
JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT));
cbTimeout = new JComboBox(new Integer[] { 5, 10, 20, 30, 60 });
cbTimeout.addActionListener(this);
timeoutLabel = new JLabel();
timeoutLabel.setLabelFor(cbTimeout);
panel.add(timeoutLabel);
panel.add(cbTimeout);
add(panel, BorderLayout.CENTER);
}
COM: <s> initialize the user interface </s>
|
funcom_train/3172885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IndiBox build(Indi indi) {
IndiBox indibox = new IndiBox(indi);
buildTree(indibox, Direction.NONE, 0, 0);
if (!show_spouses)
new NoSpouseFilter().filter(indibox);
if (!display_fambox)
new RemoveFamboxes().filter(indibox);
else
new RemoveFamboxesWhereNoSpouse().filter(indibox);
return indibox;
}
COM: <s> builds the family tree starting with given individual </s>
|
funcom_train/50913874 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processArg(CMLElement element) {
if (this.getParentAttribute() != null) {
String parentAttribute = this.getParentAttribute();
String value = this.getString();
Element parent = (Element) this.getParent();
parent.addAttribute(new Attribute(parentAttribute, value));
this.detach();
}
}
COM: <s> apply arg to element </s>
|
funcom_train/14307886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void collapse(ProjectDirectory dir) {
//Log.log(Log.DEBUG,this,"collapse dir="+dir.getPath());
ProjectFileTreeModel ptm = (ProjectFileTreeModel) folderTree.getModel();
TreePath tp = ptm.pathTo(dir);
//Log.log(Log.DEBUG,this,"tp="+tp);
collapse(tp,folderTree,null);
}
COM: <s> collapse the node in the tree which corresponds to a project directory </s>
|
funcom_train/14433819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isNorthSquareOcean(int column, int row) {
return this.isTerrainTypeInDirectionOfSquare(column, row, BasisMap.OCEAN, CardinalPoint.NORTH)
|| this.isTerrainTypeInDirectionOfSquare(column, row, BasisMap.VOID, CardinalPoint.NORTH);
}
COM: <s> p check is the square in the north direction is of </s>
|
funcom_train/36907049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildInterface() {
frame = new JFrame();
frame.setIconImage(ResourceManager.createImageIcon(ResourceManager.ICONS_PLAIN_16X16 + "data.png", "database").getImage());
frame.setJMenuBar(buildMenuBar());
frame.setContentPane(buildContentPane());
frame.setSize(600, 510);
frame.setResizable(false);
locateOnScreen(frame);
frame.setTitle(TITLE);
frame.addWindowListener(new DashboardWindowListener(this));
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
COM: <s> creates and configures a frame builds the menu bar builds the </s>
|
funcom_train/5309391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyListeners(PlotChangeEvent event) {
Object[] listeners = this.listenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == PlotChangeListener.class) {
((PlotChangeListener) listeners[i + 1]).plotChanged(event);
}
}
}
COM: <s> notifies all registered listeners that the plot has been modified </s>
|
funcom_train/2921179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IntSet complement(IntSet set) {
//System.out.println("complement "+set.toString(this));
//System.out.println("vocabulary "+getTokenTypes().toString(this));
IntSet c = set.complement(getTokenTypes());
//System.out.println("result="+c.toString(this));
return c;
}
COM: <s> for lexer grammars return everything in unicode not in set </s>
|
funcom_train/3373156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void endBlock(int endToken) {
int startToken;
switch (endToken) {
case BRACKET_CLOSE:
startToken = BRACKET_OPEN;
break;
case BRACE_CLOSE:
startToken = BRACE_OPEN;
break;
case PAREN_CLOSE:
startToken = PAREN_OPEN;
break;
default:
// Will never happen.
startToken = -1;
break;
}
if (stackCount > 0 && unitStack[stackCount - 1] == startToken) {
stackCount--;
}
else {
// Invalid state, should do something.
throw new RuntimeException("Unmatched block");
}
}
COM: <s> called when an end block is encountered </s>
|
funcom_train/12648003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
int modifiers = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
if (usesShiftModifier()) {
modifiers |= Event.SHIFT_MASK;
}
return KeyEvent.getKeyModifiersText(modifiers) + "+" +
KeyEvent.getKeyText(key);
}
COM: <s> returns an internationalized description of the menu shortcut </s>
|
funcom_train/10666588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Vector getResults(int res) {
Vector v = new Vector();
if (results == null) {
return v;
}
int size = results.size();
for (int i = 0; i < size; i++) {
Result r = (Result) results.get(i);
if (r.getResult() == res) {
v.add(r);
}
}
return v;
}
COM: <s> returns the rresult objects whose result is equal to b res b </s>
|
funcom_train/46740613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInsertDt(DateTimeModel insertDt) {
if (Converter.isDifferent(this.insertDt, insertDt)) {
DateTimeModel oldinsertDt= DateTimeModel.getNow();
oldinsertDt.copyAllFrom(this.insertDt);
this.insertDt.copyAllFrom(insertDt);
setModified("insertDt");
firePropertyChange(String.valueOf(TRANSLATIONS_INSERTDT), oldinsertDt, insertDt);
}
}
COM: <s> date the translation was created </s>
|
funcom_train/19429275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Transformer createGenTransformer() throws TransformerConfigurationException {
if (_genTemplates == null) {
_genTemplates = _factory.newTemplates(
new StreamSource(this.getClass().getResourceAsStream(
GEN_RESOURCE)));
}
Transformer result = _genTemplates.newTransformer();
result.setURIResolver(_resolver);
return result;
}
COM: <s> the method code get gen templates code </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.