__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/15607986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public byte convertValidationSettingFromStringToByte(String setting) {
byte returnVal = NO_VALIDATION;
if (setting.equals(DO_NOT_VALIDATE))
returnVal = NO_VALIDATION;
else if (setting.equals(VALIDATE_WITH_DTD))
returnVal = DTD_VALIDATION;
else if (setting.equals(VALIDATE_WITH_XML_SCHEMA))
returnVal = XML_SCHEMA_VALIDATION;
return returnVal;
} // Ene method
COM: <s> convert validation setting from menu item into byte code suitable for storage </s>
|
funcom_train/35713038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer count(List<String> expressions) {
try {
logger.debug("Query count of XPath expressions");
if (expressions == null)
throw new ApplicationException("Expressions parameter is null",
new IllegalArgumentException());
Criteria hcriteria = new XPathCriteria(expressions, getSession())
.getCriteria();
hcriteria.setProjection(Projections.rowCount());
return ((Long) hcriteria.list().get(0)).intValue();
} catch (HibernateException he) {
throw new InfrastructureException(he.getMessage(), he.getCause());
}
}
COM: <s> query count of xpath expressions </s>
|
funcom_train/18782166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateTable() {
// Get the list of tracks
Track[] tracks = trackDatabase.getTracks();
listOfTracks = new Vector(tracks.length);
for (int i = 0; i < tracks.length; i++) {
Track track = tracks[i];
if (shouldDisplayTrack(track))
listOfTracks.add(track);
}
sort();
}
COM: <s> reads the table from the track database sorts it and displays it </s>
|
funcom_train/2579939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer result = new StringBuffer();
for (int i = 0; i < this.labels.size(); i++) {
result.append(getPieLabelRecord(i).toString()).append("\n");
}
return result.toString();
}
COM: <s> returns a string containing a description of the object for </s>
|
funcom_train/27673938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BoundingBox getBoundingBox(Element context) {
Element elBb = context.getChild("BoundingBox");
// for now we suppose that the BoundingBox coordinates are in degrees...
int minx = Integer.parseInt(elBb.getAttributeValue("minx"));
int miny = Integer.parseInt(elBb.getAttributeValue("miny"));
int maxx = Integer.parseInt(elBb.getAttributeValue("maxx"));
int maxy = Integer.parseInt(elBb.getAttributeValue("maxy"));
return new BoundingBox(maxx, minx, maxx, minx);
}
COM: <s> returns the bounding box defined in the context </s>
|
funcom_train/25270516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void buildNode(TreeNode node, List<Hierarchy> hierarchiesParent, List<Hierarchy> hierarchies) {
for (Hierarchy hierarchy : hierarchiesParent) {
TreeNode nodeChildren = new TreeNode();
nodeChildren = createNode(hierarchy.getName(), hierarchy.getId());
node.getChildren().add(nodeChildren);
List<Hierarchy> hierarchiesChildren = new ArrayList<Hierarchy>(findChildrenByParentId(hierarchy.getId(),
hierarchies));
buildNode(nodeChildren, hierarchiesChildren, hierarchies);
}
}
COM: <s> todo nastena 11 </s>
|
funcom_train/37745288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect() throws IOException {
int iPort = _url.getPort();
if ( iPort == -1 ) iPort = 80;
socket = new Socket(_url.getHost(), iPort);
socket.setSoTimeout(120000);
_out = new DataOutputStream(socket.getOutputStream());
_in = new BufferedInputStream(socket.getInputStream());
}
COM: <s> creates socket connection with server </s>
|
funcom_train/1715516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAttrStartTable(int page, String[] attrStartTable) {
for (int i = 0; i < attrStartTable.length; i++) {
if (attrStartTable[i] != null) {
Object idx = new int[] {page, i + 5};
this.attrStartTable.put(attrStartTable[i], idx);
}
}
}
COM: <s> sets the attribute start table for a given page </s>
|
funcom_train/12175082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRegionContent(RegionContent content) {
DOMOutputBuffer buffer = (DOMOutputBuffer) getCurrentBuffer();
Element element = buffer.addElement(REGION_CONTENT_ELEMENT);
element.setAnnotation(content);
regionContentCount += 1;
if (logger.isDebugEnabled()) {
logger.debug("Added content " + content + " to " + this +
" at " + index);
}
}
COM: <s> add the specified content to the list </s>
|
funcom_train/14421881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Event createMouseEvent(int x, int y, int button, int stateMask, int count) {
Event event = new Event();
event.time = (int) System.currentTimeMillis();
event.widget = widget;
event.display = display;
event.x = x;
event.y = y;
event.button = button;
event.stateMask = stateMask;
event.count = count;
return event;
}
COM: <s> create a mouse event </s>
|
funcom_train/41556348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TableItem getTableItem() {
if (tableItem == null) {//GEN-END:|36-getter|0|36-preInit
// write pre-init user code here
tableItem = new TableItem(getDisplay(), "tableItem");//GEN-LINE:|36-getter|1|36-postInit
// write post-init user code here
}//GEN-BEGIN:|36-getter|2|
return tableItem;
}
COM: <s> returns an initiliazed instance of table item component </s>
|
funcom_train/2027737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDepth() throws Exception {
assertEquals(0, this.rootNode.getDepth());
Node a = this.rootNode.addNode("a");
assertEquals(1, a.getDepth());
Property p = a.setProperty("p", 0);
assertEquals(2, p.getDepth());
}
COM: <s> tests retrieval of item depth </s>
|
funcom_train/7639335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetInstallationFor(IProject project) {
synchronized (mInstallList) {
for (int i = 0 ; i < mInstallList.size() ;) {
ApkInstall install = mInstallList.get(i);
if (install.project == project) {
mInstallList.remove(i);
} else {
i++;
}
}
}
}
COM: <s> resets registered installations for a specific </s>
|
funcom_train/43468311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFileName() {
if (fullInfo == null)
return NA;
if (fileName == null) {
int iend = fullInfo.lastIndexOf(':');
if (iend == -1)
fileName = NA;
else {
int ibegin = fullInfo.lastIndexOf('(', iend - 1);
fileName = this.fullInfo.substring(ibegin + 1, iend);
}
}
return fileName;
}
COM: <s> return the file name of the caller </s>
|
funcom_train/10601986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RCMLEntry getLatestEntry(short type) throws RevisionControlException {
Vector entries = getEntries();
for (Iterator i = entries.iterator(); i.hasNext();) {
RCMLEntry entry = (RCMLEntry) i.next();
if (entry.getType() == type) {
return entry;
}
}
return null;
}
COM: <s> get the latest entry a check out or check in </s>
|
funcom_train/28316937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deleteFeedbacks(String jsonString) throws Exception {
JSONArray jsonArray = JsonUtil.getJsonArray(jsonString);
// loop through - get from json and update
for (int i = 0; i < jsonArray.length(); i++) {
JSONObject jsonObject = jsonArray.getJSONObject(i);
String id = jsonObject.getString("id");
feedbackService.archiveFeedback(new Long(id));
}
}
COM: <s> client click delete account in here </s>
|
funcom_train/14273736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int insertTypes(MemoRecord rec) {
record = rec;
int col = 0;
col = super.insertTypes(this.record);
for (int i = 0; i < typelist.length; i++) {
setElementAt(new JSCSVCell(typelist[i]), DATATYPE_ROW, col++);
}
return col;
} // end-method
COM: <s> insert column types from input memo record for csv conversion and output </s>
|
funcom_train/19226937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void layoutAndValidateNewMap() {
layoutAll(INIT_LAYOUT);
// final Collection<LWComponent> all = getAllDescendents(); // todo: probably should do as order-depth
// layoutAll(all, INIT_LAYOUT); // will be auto-validated due to initial layout trigger
// //validateAll(all);
}
COM: <s> to be called on maps that are manually created e </s>
|
funcom_train/36737284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
int hashCodeReturn = 0;
try {
hashCodeReturn = this.getUnderlyingPool().hashCode();
}
catch (SQLException e) {
if (getLog().isErrorEnabled())
getLog()
.error(
"Could not retrieve underlying pool for hashcode. Hashcode is 0",
e);
}
return hashCodeReturn;
}
COM: <s> this is taken as being the underlying pools hashcode </s>
|
funcom_train/37246319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getVolume(String title) {
Object o = null;
int volume = 0;
try {
o = getObjectByTitle(title);
}
catch (Exception e) {
handleException(e);
}
if (o instanceof Score) {
Score s = (Score) o;
volume = s.getVolume();
}
else if (o instanceof Part) {
Part p = (Part) o;
volume = p.getVolume();
}
else if (o instanceof Phrase) {
Phrase ph = (Phrase) o;
volume = ph.getVolume();
}
return volume;
}
COM: <s> get the volume for a score part or phrase </s>
|
funcom_train/13491517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getTermType(Term t) {
if (t instanceof org.mandarax.kernel.VariableTerm) return GenericDriver.VARIABLE_TERM;
if (t instanceof org.mandarax.kernel.ConstantTerm) return GenericDriver.CONSTANT_TERM;
if (t instanceof org.mandarax.kernel.ComplexTerm) return GenericDriver.COMPLEX_TERM;
return null;
}
COM: <s> get the type of the term e </s>
|
funcom_train/14080332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIndexing() {
// a VEvent for more interesting data..
Component component = (Component) calendar.getComponents(Component.VEVENT).iterator().next();
IndexedPropertyList list = new IndexedPropertyList(component.getProperties(), Parameter.CUTYPE);
LOG.info(list.getProperties(CuType.INDIVIDUAL.getValue()).size() + " individual attendees.");
}
COM: <s> indexing with indexed property list </s>
|
funcom_train/16570548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTabbedPane getTabPrincipal() {
if (tabPrincipal == null) {
tabPrincipal = new JTabbedPane();
tabPrincipal.addTab(PluginServices.getText(this,"general"), null, getPPrincipal(), null);
tabPrincipal.addTab(PluginServices.getText(this,"advanced"), null, getPAdvanced(), null);
}
return tabPrincipal;
}
COM: <s> this method initializes tab principal </s>
|
funcom_train/7302665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void seek(long pos, int mode) {
if (mode == 1)
this.pos = (int)pos + this.pos;
else if (mode == 2)
this.pos = (int)pos + count;
else
this.pos = Math.max(0, (int)pos);
}
COM: <s> position the file pointer to the position in the </s>
|
funcom_train/43876338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void get( final String url ) {
if ( url.startsWith( "http://" ) ) {
webDriver.get( url );
} else {
webDriver.get( getServerUrl() + url );
}
webDriverWait.until( new VisibilityOfElementLocated( By.tagName( "body" ) ) );
ZkElement.tryLogin();
}
COM: <s> load a new web page in the current browser window </s>
|
funcom_train/38316486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTask(JobDetail jobDetail, AbstractJLCPJob newTask, Trigger trigger) {
try {
sched.scheduleJob(jobDetail, trigger);
} catch (SchedulerException e) {
log.error("[Quartz] Unable to schedule task " + newTask.getName());
log.fatal(e);
}
}
COM: <s> schedule a new task to the quartz scheduler </s>
|
funcom_train/17544847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(String sessionId) {
Widget sessionWidget = findWidget(sessionId);
removeNode(sessionId);
Set<String> sessionContinues = continueWidgetsBySession.get(sessionId);
continueWidgetsBySession.remove(sessionId);
if (sessionContinues != null) {
for (String widget : sessionContinues) {
removeNode(widget);
continueWidgets.remove(widget);
}
}
validate();
}
COM: <s> removes a session </s>
|
funcom_train/19399724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public boolean evict() {
// The cache must not be empty.
if( count <= 0 ) return false;
final T ref = refs[tail]; // LRU reference.
refs[tail] = null; // drop reference.
count--; // update #of references.
tail = (tail + 1) % capacity; // update tail.
// report eviction notice to listener.
listener.evicted(this, ref);
return true;
}
COM: <s> evict the lru reference </s>
|
funcom_train/26483829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Field findField(final Object id) {
final Field listOfOne[] = new Field[1];
listOfOne[0] = null;
withSectionsDo(new SectionWalker() {
public void step(Section s) {
Field f = s.findField(id);
if (f != null) listOfOne[0] = f;
}
});
return listOfOne[0];
}
COM: <s> given an id returns the field that has that id </s>
|
funcom_train/10660128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNameSpecialCharsFromEncoding_RFC1779() throws Exception {
byte[] mess = { 0x30, 0x0D, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55,
0x04, 0x03, 0x0C, 0x02, 0x3B, 0x2C };
X500Principal principal = new X500Principal(mess);
String s = principal.getName(X500Principal.RFC1779);
assertEquals("CN=\";,\"", s);
}
COM: <s> inits x500 principal with byte array where there are special characters </s>
|
funcom_train/37733738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WebAppDD read() throws IOException {
WebAppDD webApp = (WebAppDD) readInternal();
if(webApp == null && create) {
webApp = new WebAppDD();
webApp.setDisplayName("Portal Application");
webApp.setDescription("Auto Generated Portal Application Wrapper");
}
return webApp;
}
COM: <s> read the web application deployment descriptor </s>
|
funcom_train/44011410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetAddress() {
System.out.println("setAddress");
String address = "";
StoreBO instance = new StoreBO();
instance.setAddress(address);
// 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 address method of class edu </s>
|
funcom_train/12274136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream getDownloadFile(String name, String ticket, String filename) throws IOException {
if (events != null)
events.debug("Downloading application file " + filename);
try {
ApplicationFileChannel channel = new ApplicationFileChannel(name, ticket, filename);
agent.getConnection().openChannel(channel);
return channel.getInputStream();
} catch (ChannelOpenException e) {
throw new IOException(e.getMessage());
}
}
COM: <s> get download file </s>
|
funcom_train/2428194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOperationType(OperationType type) {
synchronized (getDataLock()) {
setIntProperty(OPERATION_TYPE_ID, type.getId());
// If the type is set we store it explicitly as well as in the properties.
// This is to make testing easier - getOperationType fails if it has to convert the
// type ID unless the OperationType configuration data has been loaded.
this.type = type;
}
}
COM: <s> sets the operation type </s>
|
funcom_train/12177810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getAncestorRelationship(String deviceName) {
InternalDevice device = getDevice();
if (device.getName().equals(deviceName)) {
return MarinerRequestContext.IS_DEVICE;
}
device = device.getFallbackDevice();
while (device != null) {
if (device.getName().equals(deviceName)) {
return MarinerRequestContext.IS_ANCESTOR;
}
device = device.getFallbackDevice();
}
return MarinerRequestContext.IS_UNRELATED;
}
COM: <s> get the relationship between device name and the </s>
|
funcom_train/25190804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HTMLLusStatusGenerator (File path, String file) {
outputPath = path;
outputFile = file;
formatter = new SimpleDateFormat ("EEE MMM d yyyy 'at' HH:mm:ss z ");
try {
Class[] klasses = {ServiceRegistrar.class};
lookupCache = new DirectoryService (klasses, this);
} catch (Exception e) {
e.printStackTrace ();
}
publish ();
}
COM: <s> instantiates a new htmllus status generator </s>
|
funcom_train/20943855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void moveCaretLeft() {
int len = buffer.length();
if (--insertionPoint < 2) {
insertionPoint++;
beep();
} else if (format == SURROGATE_PAIR && insertionPoint == 7) {
insertionPoint = 8;
beep();
}
context.dispatchInputMethodEvent(
InputMethodEvent.CARET_POSITION_CHANGED,
null, 0,
TextHitInfo.leading(insertionPoint), null);
}
COM: <s> move the insertion point one position to the left in the composed text </s>
|
funcom_train/10598246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void service(ServiceManager manager) throws ServiceException {
this.manager = manager;
if (this.manager.hasService(org.apache.excalibur.source.SourceResolver.ROLE + "/Cocoon")) {
this.customResolver = (org.apache.excalibur.source.SourceResolver)
this.manager.lookup(org.apache.excalibur.source.SourceResolver.ROLE + "/Cocoon");
}
}
COM: <s> obtain a reference to the source resolver with cocoon hint </s>
|
funcom_train/28996220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection findUserNames() {
try {
IGroupBroker myBroker = (IGroupBroker) getBroker();
return myBroker.findUserNamesForGroup(this);
} catch (BrokerNotDefinedException e) {
PortalSystem.getTrace().log(
TraceCapable.EXCEPTION,
"Group>>#findUserNames - Exception occured ");
PortalSystem.handle(e);
}
return new Vector(0);
}
COM: <s> answer all user names for a specified group </s>
|
funcom_train/35541617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testValueSPACE() {
CobolDataItem dataItem = new CobolDataItem("COBOL-NAME");
dataItem.setValue("SPACE");
emitAnnotationAndCheck(dataItem,
"<cb:cobolElement cobolName=\"COBOL-NAME\""
+ " levelNumber=\"1\"" + " value=\" \""
+ " type=\"GROUP_ITEM\"" + "/>");
}
COM: <s> test an item with value space </s>
|
funcom_train/46737793 | /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(SETTINGLOGS_INSERTDT), oldinsertDt, insertDt);
}
}
COM: <s> date the setting was created </s>
|
funcom_train/39291112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCurrentZoomManager(ZoomManager zoomManager) {
if (currentZoomManager != null) {
currentZoomManager.removeZoomListener(this);
}
currentZoomManager = zoomManager;
if (currentZoomManager != null) {
currentZoomManager.addZoomListener(this);
zoomChanged(currentZoomManager.getZoom());
}
}
COM: <s> sets the zoom manager all work should be delegated to </s>
|
funcom_train/38734997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String filterProyectItem(String projectName, int itemType, String name) {
FilteredWMProject pr = projects.get(projectName.toUpperCase());
String dbCode = "NULL";
if (pr != null) {
dbCode = pr.filterItem(itemType, name.toUpperCase());
}
return dbCode;
}
COM: <s> checks wheter the name of a given information element corresponds to a </s>
|
funcom_train/4255706 | /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<OSCPacket> en = packets.elements();
OSCPacket nextElement;
byte[] packetBytes;
while (en.hasMoreElements()) {
nextElement = en.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/48580086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getJComboBoxCsaladiAllapota() {
if (jComboBoxCsaladiAllapota == null) {
jComboBoxCsaladiAllapota = new JComboBox();
jComboBoxCsaladiAllapota.addItem("hajadon, nőtlen");
jComboBoxCsaladiAllapota.addItem("házas");
jComboBoxCsaladiAllapota.addItem("elvállt, özvegy");
jComboBoxCsaladiAllapota.setBounds(new Rectangle(140, 209, 150, 20));
}
return jComboBoxCsaladiAllapota;
}
COM: <s> this method initializes j combo box </s>
|
funcom_train/14515869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createAllKeyRecover() throws Exception {
if (usekeyrecovery) {
log.trace(">createAllKeyRecover");
String iMsg = intres.getLocalizedMessage("batch.generatingallstatus", "KEYRECOVER");
log.info(iMsg);
createAllWithStatus(UserDataConstants.STATUS_KEYRECOVERY);
log.trace("<createAllKeyRecover");
}
} // createAllKeyRecover
COM: <s> creates p12 files for all users with status keyrecover in the local database </s>
|
funcom_train/15883181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void internalize(byte [] optionsArray) {
/* Assume options valid and correct */
int pos = 4; // ignore vendor magic cookie
byte code, length;
byte value[];
while (optionsArray[pos] != (byte) 255) { // until end option
code = optionsArray[pos++];
length = optionsArray[pos++];
value = getArrayOption(length, pos, optionsArray);
setOption(code, value);
pos += length; // increment position pointer
}
}
COM: <s> converts an options byte array to a linked list </s>
|
funcom_train/40412537 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected MenuItem createConfigurePortletMenuItem(final Portlet portlet) {
MenuItem mi = new MenuItem("Configure...", new Command() {
public void execute() {
portlet.configure();
}
});
mi.setTitle("Configure " + portlet.getWidgetName());
return mi;
}
COM: <s> create a menu item to configure the portlet </s>
|
funcom_train/31667653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TreeMapNode buildBranch(final String label, final TreeMapNode parent) {
final TreeMapNode node = new TreeMapNode(label);
if (parent != null) {
parent.add(node);
} else if (this.root == null) {
this.root = node;
}
return node;
}
COM: <s> add a branch to the tree </s>
|
funcom_train/43903346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void multiply(final Complex c1, final Complex c2) {
final double x1 = c1.real;
final double y1 = c1.imag;
final double x2 = c2.real;
final double y2 = c2.imag;
real = (x1 * x2) - (y1 * y2);
imag = (y1 * x2) + (x1 * y2);
}
COM: <s> multplies two complex numbers </s>
|
funcom_train/32112091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCoreStateRecursive() {
// set the bone to the initial skeleton state
translation = coreBone.getTranslation();
rotation = coreBone.getRotation();
// set the appropriate weights
accumulatedWeightAbsolute = 1.0f;
accumulatedWeight = 1.0f ;
for(Integer i : coreBone.getListChildId()) {
skeleton.getBone(i).setCoreStateRecursive();
}
calculateState() ;
}
COM: <s> resets the bone and children to core states </s>
|
funcom_train/46511099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateLabel () {
String s = "Dates on: ";
s = s + remind.getCurrentDate().get(Calendar.YEAR) + "/";
s = s + remind.getCurrentDate().get(Calendar.DAY_OF_MONTH) + "/";
s = s + (remind.getCurrentDate().get(Calendar.MONTH)+1);
headerLabel.setText(s);
}
COM: <s> updates the label header label with the new date </s>
|
funcom_train/8690459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setupCommandLine(Execute exe, String[] command) {
//On VMS platform, we need to create a special java options file
//containing the arguments and classpath for the java command.
//The special file is supported by the "-V" switch on the VMS JVM.
if (Os.isFamily("openvms")) {
setupCommandLineForVMS(exe, command);
} else {
exe.setCommandline(command);
}
}
COM: <s> set the command line for the exe </s>
|
funcom_train/21656025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtMenu() {
if (btMenu == null) {
btMenu = new JButton();
btMenu.setBounds(new Rectangle(450, 390, 140, 25));
btMenu.setMnemonic('v');
btMenu.setText("Volver al Menu");
btMenu.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
ControladorPrincipal.mostrarRegistroLitologico();
}
});
}
return btMenu;
}
COM: <s> this method initializes bt volver menu </s>
|
funcom_train/5857709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handle(ServerCommande cmdp) throws ServerException {
cmdp.setCommandHandler(this);
MotuSecurityManager.getInstance().grantAccess(cmdp);
if (tr==null) {
if (cmdp instanceof Undoable) {
throw new ServerException("Command("+cmdp.toString()+")has to be executed within a tranaction !");
}
try {
cmdp.execute();
} catch (Exception e) {
e.printStackTrace();
throw new ServerException(e.toString());
}
} else {
tr.handle(cmdp);
}
}
COM: <s> we continue the chain of resp pattern send delegates </s>
|
funcom_train/46105266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGraph(Network network) {
((PrefuseObviousVisualization) vis).clearVisualization();
((PrefuseObviousVisualization) vis).setVisualizationData(network);
prefuse.Visualization realPrefVis = (prefuse.Visualization)
vis.getUnderlyingImpl(prefuse.Visualization.class);
realPrefVis.run("color");
realPrefVis.run("layout");
}
COM: <s> sets the graph </s>
|
funcom_train/17415966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doAfterUploadProcess() {
JSObject jso = (JSObject) this.configHolder.getObject("global.jso");
try {
jso.call("JUP_eventhandler", new String[]{"gofolder", targetID});
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> when user clicks continue button we should redirect user to somewhere </s>
|
funcom_train/2862010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getLabelName(Element el){
String tmp = getValue(el, "MANTIS:label");
if(tmp!=null && !tmp.trim().equals(""))
return(tmp);
else
return(el.getTagName().toString());
}//getLabelName
COM: <s> get the display label for an element </s>
|
funcom_train/5721481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetMimeTypeByName() {
assertEquals(WebDAVConstants.MIMETYPE_TEXT, MimeType.getMimeTypeByName("a.txt"));
assertEquals(WebDAVConstants.MIMETYPE_HTML, MimeType.getMimeTypeByName("b.txt.html"));
assertEquals(WebDAVConstants.MIMETYPE_DEFAULT, MimeType.getMimeTypeByName("does.not.exist"));
assertEquals(WebDAVConstants.MIMETYPE_DEFAULT, MimeType.getMimeTypeByName(null));
}
COM: <s> test of the helper method </s>
|
funcom_train/37503224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetAnswer() {
Alternative a1 = new Alternative();
a1.setAnswer("a1");
assertEquals("a1 equals", "a1", a1.getAnswer());
a1.setAnswer("a2");
assertEquals("a2 equals", "a2", a1.getAnswer());
}
COM: <s> test of set answer method of class saga </s>
|
funcom_train/2586039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDayCount30ISDA() {
final SerialDate d1 = SerialDate.createInstance(1, MonthConstants.APRIL, 2002);
final SerialDate d2 = SerialDate.createInstance(2, MonthConstants.APRIL, 2002);
final int count = SerialDateUtilities.dayCount30ISDA(d1, d2);
assertEquals(1, count);
}
COM: <s> problem 30 360 isda day count </s>
|
funcom_train/43672654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JFrame makeWindow() {
final JFrame f = new JFrame("[" + rootNode.getServer().getName()
+ "] tree for " + rootNode.toString());
final Container cp = f.getContentPane();
f.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
f.addWindowListener(new WindowAdapter() {
public void windowClosed(WindowEvent e) {
dispose();
}
});
cp.setLayout(new BorderLayout());
cp.add(this, BorderLayout.CENTER);
f.pack();
f.setVisible(true);
f.toFront();
return f;
}
COM: <s> creates a window containing this panel </s>
|
funcom_train/41266344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Mngmcnsn entity) {
EntityManagerHelper.log("saving Mngmcnsn instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved mngmcnsn entity </s>
|
funcom_train/5509310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dump(PrintWriter out, int depth, boolean verbose) {
// String indent = DebugUtils.getIndent(depth);
String indent1 = DebugUtils.getIndent(depth + 1);
dumpRegistry(out, indent1, "Source Protocols", m_sourceProtocolMap);
dumpRegistry(out, indent1, "Destination Protocols",
m_destinationProtocolMap);
}
COM: <s> show the contents of this protocol manager </s>
|
funcom_train/35960708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void runClass(String name, String key) {
try {
ClassLoader loader = new CryptoClassLoader(Integer.parseInt(key));
Class c = loader.loadClass(name);
String[] args = new String[] {};
Method m = c.getMethod("main", args.getClass());
m.invoke(null, (Object) args);
} catch (Throwable e) {
JOptionPane.showMessageDialog(this, e);
}
}
COM: <s> runs the main method of a given class </s>
|
funcom_train/38414585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addPlayer(String primaryKey, Player player) {
ChatRoom chatRoom = (ChatRoom) chatRooms.get(primaryKey);
if(chatRoom==null) {
Debug.signal( Debug.ERROR, this, "No chatRoom "+primaryKey+" found. Can't add player.");
return false;
}
return chatRoom.addPlayer(player);
}
COM: <s> to add a player to a chat room </s>
|
funcom_train/40866391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int compare(Address a1, Address a2) {
if(a1.isDefaultAddress() || a2.isDefaultAddress()) {
return a1.isDefaultAddress() ? -1 : 1;
}
// if neither is default, just pick based on id
return a1.getId().compareTo(a2.getId());
}
COM: <s> compares the given addresses sorting a default address to the front </s>
|
funcom_train/33392397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(int typecode, int capacity, String value) {
Map<Integer, String> map = weighted.get(new Integer(typecode));
if (map == null) {// add new ordered map
map = new TreeMap<Integer, String>();
weighted.put(new Integer(typecode), map);
}
map.put(new Integer(capacity), value);
}
COM: <s> set a type name for specified type key and capacity </s>
|
funcom_train/18275560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onSetPreferredOuterSize(Dimension d) {
assert isSwingThread();
if (containerWin!=null) {
containerWin.setPreferredSize(d);
} else {
//usually can't resize, so ignore by default
log.debug("ignored onSetOuterPreferredSize in mozpanel"); //$NON-NLS-1$
}
}
COM: <s> request to set preferred size the browser window </s>
|
funcom_train/37615683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendReplyMsg(int msgType) {
if(state != State.R_REQUESTED) {
throw new MultipiException(ErrorType.PART_FSA_INVALID_STATE_1);
}
currentReceiver.sendReplyMsg(msgType);
if(msgType == MsgType.I_SUCCEED) {
state = State.R_FINISHED;
}
}
COM: <s> p creates a message to be sent back to the actors bid process </s>
|
funcom_train/39488288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getRemainingTime (int currentTime) {
//Verify.beginAtomic();
int remainingTime = stoppingTime - currentTime;
//System.out.println("Thread used: " + (currentTime - startingTime));
// Assert: timeOut implies remainingTime = 0
//assert (!timeOut || remainingTime == 0);
//Verify.endAtomic();
return remainingTime;
}
COM: <s> to get the remaining time </s>
|
funcom_train/47358570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PermissionSetFromAnnotations withoutStateInfo() {
List<PermissionFromAnnotation> newPs =
new ArrayList<PermissionFromAnnotation>(permissions.size());
for(PermissionFromAnnotation p : permissions) {
newPs.add(p.forgetStateInfo());
}
List<PermissionFromAnnotation> newFramePs =
new ArrayList<PermissionFromAnnotation>(framePermissions.size());
for(PermissionFromAnnotation p : framePermissions) {
newFramePs.add(p.forgetStateInfo());
}
return createPermissions(newPs, newFramePs, constraints);
}
COM: <s> returns the permissions in this set with all state information except marker </s>
|
funcom_train/22527149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleCopyAction() {
ISelection selection = getViewer().getSelection();
if(selection != null && !selection.isEmpty()) {
LocalSelectionTransfer transfer = LocalSelectionTransfer.getTransfer();
transfer.setSelection(selection);
fClipboard.setContents(new ISelection[] { selection }, new Transfer[] { transfer } );
}
}
COM: <s> copy event happened </s>
|
funcom_train/38525203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String toReturn = "[";
for(Iterator it = classList.values().iterator(); it.hasNext();) {
toReturn += ("," + ((DepClass)it.next()).getName());
}
return toReturn + "]";
}
COM: <s> return a string value describing the list </s>
|
funcom_train/7442093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Response handle(Request request) {
Response response = new Response(request);
Uniform next = getNext();
if (next != null) {
// Effectively handle the call
handle(request, response, null, 0, next);
// Update the last received response.
setResponse(response);
} else {
getLogger()
.warning(
"Unable to process the call for a client resource. No next Restlet has been provided.");
}
return response;
}
COM: <s> handles the call by invoking the next handler </s>
|
funcom_train/45805835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearTopic(TopicIF aTopic) {
if (!aTopic.getOccurrences().isEmpty()) {
Iterator it = new ArrayList(aTopic.getOccurrences()).iterator();
while (it.hasNext()) {
OccurrenceIF occur = (OccurrenceIF) it.next();
occur.remove();
}
}
}
COM: <s> clear the start topic if it was set </s>
|
funcom_train/49320019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendEvent(String eventKey, Object evt) {
Object[] localListeners = fListeners;
if (localListeners == null) {
return;
}
for (Object target : localListeners) {
fireEvent(eventKey, target, evt); // call to abstract which knows more specifics about classes of listener and event
}
}
COM: <s> sends the event to all listeners </s>
|
funcom_train/43817122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object get(TrieNode node, String keyString, int index) {
Object value = null;
if (index == keyString.length()) {
value = node.getValue();
}
else if (keyString.equals(""+node.getValue())){
value = node.getValue();
}
else if (keyString.length()>index){
Character c = new Character(keyString.charAt(index));
CharTrieNode childNode = (CharTrieNode) node.getSubTrie().get(c);
value = get(childNode, keyString, index + 1);
}
return value;
}
COM: <s> recursive searching method </s>
|
funcom_train/11729187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRestoreNode() throws RepositoryException, NotExecutableException {
// create child node with OPV-ABORT behaviour
addChildNode(OPVAction);
testRootNode.save();
try {
versionableNode.checkin();
fail("On checkin of N which has a child node with OnParentVersion ABORT defined, an UnsupportedRepositoryOperationException must be thrown.");
} catch (VersionException e) {
// success
}
}
COM: <s> test the restore of a on parent version abort node </s>
|
funcom_train/48339836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void print(Command cmd, Shell shell) {
String args = cmd.getArguments();
if ("".equals(args)) {
shell.print(cmd.getName());
} else {
shell.print(cmd.getName() + " " + args);
}
shell.print(" " + cmd.getDescription());
}
COM: <s> print a description for the specified command to the specified </s>
|
funcom_train/7471199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetSource() {
System.out.println("setSource");
String source = "cnet";
NewsItem instance = new NewsItem("Not_cnet");
instance.setSource(source);
String expResult = instance.getSource();
assertEquals(expResult, source);
}
COM: <s> test of set source method of class news item </s>
|
funcom_train/2918065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IntSet subtract(IntSet other) {
// assume the whole unicode range here for the complement
// because it doesn't matter. Anything beyond the max of this' set
// will be ignored since we are doing this & ~other. The intersection
// will be empty. The only problem would be when this' set max value
// goes beyond MAX_CHAR_VALUE, but hopefully the constant MAX_CHAR_VALUE
// will prevent this.
return this.and(((IntervalSet)other).complement(0,Label.MAX_CHAR_VALUE));
}
COM: <s> compute this other via this other </s>
|
funcom_train/31301030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GeneralizableElement getGeneralization(Object object) {
if ((object == null) || !(object instanceof GeneralizableElement)) {
return null;
}
GeneralizableElement element = (GeneralizableElement) object;
Iterator i = element.getGeneralization().iterator();
if (i.hasNext()) {
Generalization generalization = (Generalization) i.next();
return generalization.getParent();
}
return null;
}
COM: <s> returns the generalization superclass for the given model generalizable </s>
|
funcom_train/21888455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getPane() {
if (pane == null) {
pane = new JPanel();
pane.setLayout(new BoxLayout(getPane(), BoxLayout.Y_AXIS));
pane.add(labelURI, null);
pane.add(textURI, null);
pane.add(label1, null);
pane.add(textRole, null);
pane.add(labelDesc, null);
pane.add(text, null);
}
return pane;
}
COM: <s> this method initializes pane </s>
|
funcom_train/47547317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawPolyline(int[] pointArray) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (pointArray == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
int /*long*/ cairo = data.cairo;
if (cairo != 0) {
drawPolyline(cairo, pointArray, false);
Cairo.cairo_stroke(cairo);
return;
}
OS.gdk_draw_lines(data.drawable, handle, pointArray, pointArray.length / 2);
}
COM: <s> draws the polyline which is defined by the specified array </s>
|
funcom_train/28545240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setUpHighlighterChangeListener() {
JTextComponent c = editorComponent.getAsJTextComponent();
assert (c != null);
c.addPropertyChangeListener("highlighter",
new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
Object oldVal = evt.getOldValue();
assert (oldVal == null || oldVal instanceof Highlighter);
Highlighter oldHighlighter = (Highlighter) oldVal;
EventQueue.invokeLater(new TargetHighlightRemover(
oldHighlighter));
refreshModel();
}
});
}
COM: <s> make sure that if the editor component changes highlighter that 1 </s>
|
funcom_train/33796793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SystemVariable create(SystemVariable systemVariable) throws ServiceBeanException {
log.debug("Entering :: SystemVariableServiceImpl:create()");
try{
// Create the entry in database.
systemVariable = systemVariableDao.create(systemVariable);
log.info("The new SystemVariable created with ID : "+systemVariable.getId());
log.debug("Exiting :: SystemVariableServiceImpl:create()");
return systemVariable;
}
catch(DAOException ex){
log.error(ErrorMessages.SYSTEMVARIABLE_CREATE_EXCEPTION, ex);
throw new EJBException(ex);
}
}
COM: <s> this service creates the system variable entry in the database after performing </s>
|
funcom_train/8249882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onRequest() {
boolean isPageVersioned = true;
try {
isPageVersioned = getComponent().getPage().isVersioned();
getComponent().getPage().setVersioned(false);
//AjaxRequestTarget target = new AjaxRequestTarget();
AjaxRequestTarget target = null;
RequestCycle.get().setRequestTarget(target);
respond(target);
} finally {
getComponent().getPage().setVersioned(isPageVersioned);
}
}
COM: <s> sets up the request target </s>
|
funcom_train/42158269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void update() {
//call the preupdate callback
if (preupdateGlobalCallback != null)
preupdateGlobalCallback.event(null);
//go through all the loaded feeds and fetch new entries
synchronized(feeds) {
Iterator ite = feeds.keySet().iterator();
String xml;
while (ite.hasNext()) {
//get the next xml
xml = (String)ite.next();
//update the feed
updateFeed(xml);
}
}
//call the postupdate callback
if (postupdateGlobalCallback != null)
postupdateGlobalCallback.event(null);
}
COM: <s> fetches the new entries from the loaded feeds </s>
|
funcom_train/5445167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNameAndType_Descriptor(int Index) {
if ((Index < 1) || (Index >= ItemType.length) || (ItemType[Index] != CONSTANT_NAME_AND_TYPE))
throw new ClassFormatError("Constant pool item does not exist");
return getUtf8(((Integer)ItemValue2[Index]).intValue());
}
COM: <s> get the descriptor from a name and type constant </s>
|
funcom_train/12764746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean pageHasConflicts(boolean ignoreTextData, boolean ignoreRevision) {
boolean conflict = false;
for (IResourceWaypointDescriptor d : getDescriptors()) {
conflict |= doTagsConflict(d);
if (!conflict) {
Set<String> attrs =findConflictingAttributes(d, ignoreTextData, ignoreRevision);
conflict |= (attrs != null && attrs.size() > 0);
}
if (conflict)
break;
}
return conflict;
}
COM: <s> returns true if the page has conflicts with the waypoints in the workspace </s>
|
funcom_train/50289397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addOverrides() throws Exception {
expander.setOverride("org.gloin.launch.dir", canonLaunchDir);
expander.setOverride("org.gloin.launch.path", canonLaunchPath);
expander.setOverride("org.gloin.launch.local.host.name",
InetAddress.getLocalHost().getHostName());
expander.setOverride("org.gloin.launch.local.host.address",
InetAddress.getLocalHost().getHostAddress());
}
COM: <s> setup some well known override properties to be used by </s>
|
funcom_train/4375003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getPrefixes() {
if (cachedPrefix == null) {
return Collections.EMPTY_LIST;
} else if (prefixList == null) {
return Collections.singletonList(cachedPrefix);
} else {
List result = new ArrayList(prefixList.size() + 1);
for (int i = 0; i < prefixList.size(); i += 2) {
result.add(prefixList.get(i));
}
result.add(cachedPrefix);
return result;
}
}
COM: <s> returns a list of all prefixes which are currently declared </s>
|
funcom_train/34627825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void push(final E item) {
// what if size would be where to put the next item?
if (size >= capacity) {
capacity *= GROWTH_FACTOR;
Object[] newStack = new Object[capacity];
System.arraycopy(stack, 0, newStack, 0, stack.length);
stack = newStack;
}
stack[size] = item;
size++;
}
COM: <s> pushes an item to the top of the stack </s>
|
funcom_train/1148505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand9() {
if (okCommand9 == null) {//GEN-END:|192-getter|0|192-preInit
// write pre-init user code here
okCommand9 = new Command("Ok", Command.OK, 0);//GEN-LINE:|192-getter|1|192-postInit
// write post-init user code here
}//GEN-BEGIN:|192-getter|2|
return okCommand9;
}
COM: <s> returns an initiliazed instance of ok command9 component </s>
|
funcom_train/32955843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUserStyleName(String styleName) {
StyleRecord sr = _workbook.getStyleRecord(_index);
if(sr == null) {
sr = _workbook.createStyleRecord(_index);
}
if(sr.isBuiltin()) {
throw new IllegalArgumentException("Unable to set user specified style names for built in styles!");
}
sr.setName(styleName);
}
COM: <s> sets the name of the user defined style </s>
|
funcom_train/26311335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void terminateHost() {
try {
if (!m_guestList.isEmpty()) {
endParty();
}
DFService.deregister( this );
m_frame.dispose();
doDelete();
}
catch (Exception e) {
System.err.println( "Saw FIPAException while terminating: " + e );
e.printStackTrace();
}
}
COM: <s> shut down the host agent including removing the ui and deregistering </s>
|
funcom_train/41837320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showBusStop(String stopCode, String busLineNumber) {
if (this.dialog != null) {
this.dialog.dismiss();
}
Intent intent = new Intent(this.context, BusStopInfo.class);
intent.putExtra(BusStopInfo.EXTRA_STOP_CODE, stopCode);
intent.putExtra(BusStopInfo.EXTRA_STOP_LINE_NUMBER, busLineNumber);
this.context.startActivity(intent);
}
COM: <s> show the bus stop </s>
|
funcom_train/17211955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT:
public boolean drawImage(Image img,int x,int y,Color bgcolor,ImageObserver obs)
{return drawImage(img,x,y,img.getWidth(obs),img.getHeight(obs),bgcolor,obs);}
/**
* <p>Draw's an image onto the page, with a backing colour.</p>
*
* @param img The java.awt.Image
COM: <s> p draws an image onto the page with a backing colour </s>
|
funcom_train/3701814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
int code = 0, i = 1;
Iterator iter = m_items.iterator();
while ( iter.hasNext() ) {
Result r = (Result)iter.next();
code += (i++) * r.hashCode();
}
return code;
} //
COM: <s> returns a hash code for this object </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.