__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/5881735 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMode(String name) throws InterruptedException {
if ("popup".equals(name)) doPopup();
else if ("overlapped".equals(name)) doOverlapped();
else if ("embedded".equals(name)) doEmbedded();
else if ("modal".equals(name)) doModal();
else throw new WrongValueException("Uknown mode: "+name);
}
COM: <s> sets the mode to overlapped popup modal or embedded </s>
|
funcom_train/36231913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean add(T element) {
final int insertPos = findInsertionPosition(elementList,
elementComparator, element);
if (insertPos < elementList.size()) {
elementList.add(insertPos, element);
return true;
} else {
// Handle insertion into an empty list or at the end of the list.
return elementList.add(element);
}
}
COM: <s> fixme update doc appends the specified element to the end of this list </s>
|
funcom_train/23279265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLaunchApplicationFile(LaunchApplication la, LaunchFile file){
if(!validateClass(la)) throw new ARISException("Invalid Launch Application");
updateFile(file);
la = getLaunchApplication(la.getId());
la.getFiles().add(file);
getHibernateTemplate().update(la);
}
COM: <s> adds the launch file to the database and updates the launch application </s>
|
funcom_train/26508703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void receiveEvent(PortalEvent ev, String uid) {
ForumSessionData session = getSessionData(uid);
switch (ev.getEventNumber()) {
case PortalEvent.ABOUT_BUTTON_EVENT:
session.mode = ABOUT_MODE;
default:
LogService.instance().log(LogService.WARN, "Unknown event: " + ev.getEventName());
}
}
COM: <s> process layout level events coming from the portal </s>
|
funcom_train/28756832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSupsetid(Long newVal) {
if ((newVal != null && this.supsetid != null && (newVal.compareTo(this.supsetid) == 0)) ||
(newVal == null && this.supsetid == null && supsetid_is_initialized)) {
return;
}
this.supsetid = newVal;
supsetid_is_modified = true;
supsetid_is_initialized = true;
}
COM: <s> setter method for supsetid </s>
|
funcom_train/43043049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCounterpart(String bracket) {
for (west.twouse.language.owl2fs.resource.owl2fs.IOwl2fsBracketPair bracketPair : bracketPairs) {
if (bracket.equals(bracketPair.getOpeningBracket())) {
return bracketPair.getClosingBracket();
}
if (bracket.equals(bracketPair.getClosingBracket())) {
return bracketPair.getOpeningBracket();
}
}
return null;
}
COM: <s> returns the counter part of a bracket </s>
|
funcom_train/43424734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double calculateFraction(double value) {
if(lowEnd == highEnd) return 0;
// weird values on the edges if(value < lowEnd) return -1;
//if(value > highEnd) return -1;
return higherIsBetter?(value-lowEnd)/(highEnd-lowEnd):(highEnd-value)/(highEnd-lowEnd);
//ta hänsyn till higherIsBetter?
}
COM: <s> calculates a double between 0 and 1 representing the values position on </s>
|
funcom_train/31679124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(Object value) {
final FastComparator valueComp = this.getValueComparator();
for (Record r = head(), end = tail(); (r = r.getNext()) != end;) {
checkCanceled();
if (valueComp.areEqual(value, valueOf(r)))
return true;
}
return false;
}
COM: <s> indicates if this collection contains the specified value </s>
|
funcom_train/12188643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPopEnvironmentInteractionEmptyStack() throws Exception {
tracker = new SimpleEnvironmentInteractionTracker();
IllegalStateException ise = null;
try {
tracker.popEnvironmentInteraction();
} catch (IllegalStateException e) {
ise = e;
}
assertNotNull("pop should throw an IllegalStateException if stack " +
"is empty", ise);
}
COM: <s> tests the pop environment interaction method when no </s>
|
funcom_train/42766364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OWLIndividual getInstanceWithName(String name) {
Iterator<Instance> instances = ontology.getInstances().iterator();
while (instances.hasNext()) {
Instance current = instances.next();
if (current instanceof OWLIndividual) {
OWLIndividual instance = (OWLIndividual)current;
String instanceName = instance.getName();
if (instanceName.equals(name))
return instance;
}
}
return null;
}
COM: <s> gets the owl individual with the given name </s>
|
funcom_train/44824823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private NamedStringValueArrayPanel getPropertiesPanel() {
if (propertiesPanel == null) {
propertiesPanel = new NamedStringValueArrayPanel();
propertiesPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Job Properties", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
propertiesPanel.setPropertyName("jobProperties");
}
return propertiesPanel;
}
COM: <s> this method initializes properties panel </s>
|
funcom_train/20913414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector listMethodsForHandler(String handler) {
Vector result = new Vector();
Object handlerImpl = _callManager.getHandlers().get(handler);
Method[] methods = handlerImpl.getClass().getMethods();
for (int x = 0 ; x < methods.length; x++) {
if ((handlerImpl instanceof GuardHandler)
&& !((GuardHandler)handlerImpl).methodIsExposed(methods[x].getName()))
continue;
result.addElement(methods[x].getName());
}
return result;
}
COM: <s> provides a mechanism by which all the methods of a specific </s>
|
funcom_train/2802164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLogError() throws Exception {
Log4jProxy log = new Log4jProxy();
log.setConfigurableManager(new ConfigurableManager());
log.configureParameters();
log.setPropertyFileName("raccoon.tibco.tibrv.log.log");
log.setLoggerName("testTibAppender");
log.load();
Throwable throwable = new Throwable("aaahhhh");
log.error("Hello world", throwable);
}
COM: <s> checks if the tib appender fires correctly an error message </s>
|
funcom_train/2025918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
//initialize test logging for this test session
String workingDirectory = Activator.getWorkingDir();
String defaultLoggingDir = workingDirectory + "/Logging";
File logDir = new File(defaultLoggingDir);
if (!logDir.exists()) {
logDir.mkdir();
}
// initialize the TestLogger
TestLogger.init(defaultLoggingDir);
new TestSession(list, serverMode);
//shutdown test logging
TestLogger.shutdown();
}
COM: <s> start the global tester thread </s>
|
funcom_train/17769141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void move() {
Graphics g = panel.getGraphics();
Polygon p = new Polygon();
if (!paused) {
set_X( (get_X() + get_X_velocity()));
set_Y( (get_Y() + get_Y_velocity()));
}
showBullet(g, Color.BLACK);
}
COM: <s> coordinates the bullets movement </s>
|
funcom_train/4299681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDefaultWebPage(String file) {
checkRunning(false);
printWithThread("setDefaultWebPage(" + file + ")");
if (serverProtocol != ServerConstants.SC_PROTOCOL_HTTP) {
return;
}
serverProperties.setProperty(ServerConstants.SC_KEY_WEB_DEFAULT_PAGE,
file);
}
COM: <s> sets the name of the web page served when no page is specified </s>
|
funcom_train/44721215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document applyXsltToDocument(String xslFile) {
Document doc;
try {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
boolean retval = _publisher.applyXslt(_document, xslFile, outputStream);
_document.reset();
byte[] byteDocument = outputStream.toByteArray();
InputStream is = new ByteArrayInputStream(byteDocument);
doc = DOMLiaisonFactory.getDOMLiaison().parseXMLStream(is);
} catch (Exception e) {
doc = null;
_publisher.addError("exception(applyXsltToDocument):"+e);
}
return doc;
}
COM: <s> apply to current document </s>
|
funcom_train/3403938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int classify(char c0) {
switch(Character.getType(c0)) {
case Character.UPPERCASE_LETTER: return UPPER_LETTER;
case Character.LOWERCASE_LETTER: return LOWER_LETTER;
case Character.TITLECASE_LETTER:
case Character.MODIFIER_LETTER:
case Character.OTHER_LETTER: return OTHER_LETTER;
case Character.DECIMAL_DIGIT_NUMBER: return DIGIT;
default: return OTHER;
}
}
COM: <s> classify a character into 5 categories that determine the word break </s>
|
funcom_train/29671778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JMXConnector getJMXConnector (JMXServiceURL url) throws IOException {
log.info("Connecting to JBI Container at: " + url);
String[] credentials = new String[] { username, password };
Map environment = new HashMap();
environment.put(JMXConnector.CREDENTIALS, credentials);
return JMXConnectorFactory.connect(url, environment);
}
COM: <s> get a jmxconnector from a url </s>
|
funcom_train/47674679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Pattern getPatternFromCache(String p_string) {
Pattern pattern = regexCache.get(p_string);
if (pattern == null) {
//create a pattern and put it into the cache
pattern = Pattern.compile(p_string);
regexCache.put(p_string, pattern);
}
return pattern;
}
COM: <s> try to get a pattern from the cache </s>
|
funcom_train/2750229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(HttpServletRequest request) {
try {
super.init(request);
this.dataComposer = (IDataComposer) super.getBeanFactory().getBean(HDIVUtil.getDataComposerName());
request.setAttribute("dataComposer", this.dataComposer);
} catch (Exception e) {
String errorMessage = HDIVUtil.getMessage("helper.init");
throw new HDIVException(errorMessage, e);
}
}
COM: <s> initialization of the objects needed for the validation process </s>
|
funcom_train/11730372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDouble() throws RepositoryException {
Value val = PropertyUtil.getValue(prop);
double d = val.getDouble();
long mili = val.getDate().getTimeInMillis();
assertEquals("Conversion from a Date value to a Double value " +
"returns a different number of miliseconds.", mili, (long) d);
}
COM: <s> tests conversion from date type to double type </s>
|
funcom_train/3834383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void announceGeometryColumnNames(String[] geoColumns) {
if ( this.geoColumns == null ) {
this.geoColumns.put( "ASTEXT(GEOM)", "ASTEXT(GEOM)" );
} else {
for (int i = 0; i < geoColumns.length; i++) {
this.geoColumns.put( geoColumns[i].toUpperCase(), geoColumns[i] );
}
}
}
COM: <s> announces the names of the columns that shall be treated as geometries </s>
|
funcom_train/5679669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FadaServiceMatches getServices() throws FadaException {
FadaServiceMatches fsm = null;
try {
fsm = stub.getServices();
} catch (Exception e) {
throw (FadaException) new FadaException("Unable to get services: "
+ e.getMessage()).fillInStackTrace();
}
return fsm;
}
COM: <s> gets the complete list of services registered in a fada node </s>
|
funcom_train/4193731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init()
{ count=0;
// init the first block
block=new byte[64];
block_offset=0;
// load magic initialization constants
state=new int[4];
state[0]=0x67452301;
state[1]=0xefcdab89;
state[2]=0x98badcfe;
state[3]=0x10325476;
message_digest=null;
}
COM: <s> inits the md5 </s>
|
funcom_train/8528705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handlePushLevel() {
Element navNode = createNCXNode("navPoint");
Element parent = openLevels.peek();
parent.appendChild(navNode);
openLevels.push(navNode);
// rd 20080401: update the depth
// we store the depth holder to be able to update the depth when an
// empty navPoint is removed
int curDepth = openLevels.size() - 1;
if (curDepth > depth) {
depth = curDepth;
depthHolder = navNode;
}
}
COM: <s> creates a new nav point element </s>
|
funcom_train/28425729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refresh(IFtpConfig ftpConfig) {
fconfig = ftpConfig;
int tabCount = tabbedPane.getTabCount();
for(int i=tabCount; --i>=0; ) {
Component tabComp = tabbedPane.getComponentAt(i);
if ( (tabComp != null) && (tabComp != defaultComp) ) {
((SpyPanel)tabComp).closePane();
}
}
}
COM: <s> refresh the ftp configuration </s>
|
funcom_train/37211734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showMessageDialog(Component component, Object message, String title, int messageType) {
toolkit.beep();
if(component == null) component = desktop;
if(component instanceof JInternalFrame) JOptionPane.showInternalMessageDialog(component, message.toString(), title, messageType);
else JOptionPane.showMessageDialog(component, message.toString(), title, messageType);
}
COM: <s> this method calls either javax </s>
|
funcom_train/16411984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setAccessibilityMenuItemSize(JComponent menuItem, String text){
FontMetrics metrics = menuItem.getFontMetrics(menuItem.getFont());
int width = metrics.stringWidth(text) + 15;
int height = metrics.getHeight() + 5;
menuItem.setPreferredSize(new Dimension(width < 205 ? 205 : width, height < 26 ? 26 : height));
}
COM: <s> set preferred size for accessibility menu item based on text size </s>
|
funcom_train/27869884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DefaultMutableTreeNode getGroupNode(NewsGroup aGroup) {
if (null == aGroup) {
return null;
}
Enumeration aEnumeration = itsRootNode.children();
while (aEnumeration.hasMoreElements()) {
DefaultMutableTreeNode aGroupNode =
(DefaultMutableTreeNode) aEnumeration.nextElement();
if (((NewsGroup) aGroupNode.getUserObject()).equals(aGroup)) {
return aGroupNode;
}
}
return null;
}
COM: <s> returns the group node of a specific newsgroup </s>
|
funcom_train/51652372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Font (Device device, String name, int height, int style) {
if (device == null) device = Device.getDevice();
if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (name == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
init(device, new FontData[]{new FontData(name, height, style)});
if (device.tracking) device.new_Object(this);
}
COM: <s> constructs a new font given a device a font name </s>
|
funcom_train/18597093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void deleteDb(Dbms dbms, String table, String id) throws Exception {
// TODO: Ultimately we want to remove any xlinks in this document
// that aren't already in use from the xlink cache. For now we
// rely on the admin clearing cache and reindexing regularly
String query = "DELETE FROM " + table + " WHERE id=?";
dbms.execute(query, new Integer(id));
}
COM: <s> deletes an xml element given its id </s>
|
funcom_train/15917590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static protected AbstractWSClassGen getFinishFrameOfAsyncFrame(AbstractWSClassGen directParentFrame){
AbstractWSClassGen parentFrame = directParentFrame;
while(parentFrame != null){
if(parentFrame instanceof WSFinishStmtClassGen){
return parentFrame;
}
parentFrame = parentFrame.getUpFrame();
}
return null; //not found, return null;
}
COM: <s> looking for an async frames finish frame as parent frame </s>
|
funcom_train/4230956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialCoords(JGraphFacade facade, JGraphHierarchyModel model) {
calculateWidestRank(facade, model);
// Sweep up and down from the widest rank
for (int i = widestRank; i >= 0; i--) {
if (i < model.maxRank) {
rankCoordinates(i, facade, model);
}
}
for (int i = widestRank + 1; i <= model.maxRank; i++) {
if (i > 0) {
rankCoordinates(i, facade, model);
}
}
}
COM: <s> sets up the layout in an initial positioning </s>
|
funcom_train/46327784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor fetchAllOrdered() {
// Set selections, selectionArgs, groupBy, having, to null to fetch all rows.
return database.query(DATABASE_TABLE, KEYS, null, null, null, null, KEY_EVENTNAME + " ASC");
}
COM: <s> get all registered events in the database with the event names alphabetically ordered </s>
|
funcom_train/18087149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setImage(BufferedImage img) {
// don't re-notify loaded if no change.
if (image == img) {
return;
}
image = img;
firePropertyChangeOnEDT("image", null, image);
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("image has changed for tile: " + getKey());
}
}
COM: <s> sets the image associated with this tile </s>
|
funcom_train/4900205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void penLevelEvent(PLevelEvent ev) {
isMovementEvent = ev.isMovement();
if (penLevelEventMethod != null) {
try {
penLevelEventMethod.invoke(parent, new Object[] { this });
} catch (Exception e) {
System.err.println("error, disabling penLevelEvent()");
e.printStackTrace();
penLevelEventMethod = null;
}
}
}
COM: <s> invokes pen level event method in the processing applet if exists when a </s>
|
funcom_train/7618444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawBitmap(Bitmap bitmap, Rect src, RectF dst, Paint paint) {
if (dst == null) {
throw new NullPointerException();
}
throwIfRecycled(bitmap);
native_drawBitmap(mNativeCanvas, bitmap.ni(), src, dst,
paint != null ? paint.mNativePaint : 0);
}
COM: <s> draw the specified bitmap scaling translating automatically to fill </s>
|
funcom_train/28298464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setZoom(int zoom) {
if (mainMap!=null && tbmbar!=null) {
TransBaseMenuZoom zM=tbmbar.getZoomMenu();
if (zM!=null) {
zM.onZoomView(zoom);
//zM.setZoom(zoom);
} else mainMap.setZoom(zoom);
}
}
COM: <s> sets the given zoom if there is a map </s>
|
funcom_train/23998617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int checkIncreaseSpeed() {
PlayerProfile prof = Storage.get().getActiveProfile();
int speed = prof.getSpeed();
int needhoney = 0;
switch ( speed ) {
case 0:
needhoney = 50;
break;
case 1:
needhoney = 100;
break;
case 2:
needhoney = 150;
break;
case 3:
needhoney = 250;
break;
case 4:
needhoney = 350;
break;
default:
needhoney = -1;
}
return needhoney;
}
COM: <s> get amount of needed honey to increase the speed attribute </s>
|
funcom_train/3764862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File bootstrap() {
File aFile = null;
aFile = this.macBootstrap();
if ((aFile != null) && (aFile.exists()))
return aFile;
aFile = this.winBootstrap();
if ((aFile != null) && (aFile.exists()))
return aFile;
aFile = this.otherBootstrap();
if ((aFile != null) && (aFile.exists()))
return aFile;
return null;
}
COM: <s> method bootstrap returns the bootstrap </s>
|
funcom_train/20042567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toUnicode(String str) {
char[] chars = str.toCharArray() ;
String res = "" ;
for (int i = 0; i < chars.length; i++) {
if (i != 0) res += "," ;
res += Integer.toHexString(chars[i]) ;
}
return res ;
}
COM: <s> transforms string to unicode hex codes </s>
|
funcom_train/40233873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAttribute(String attribName, Object newVal) {
XmlObject xobj = new XmlObject(new QName(Constants.PARTNER_SOBJECT_NS,
attribName), newVal);
// Log this as a change
modifiedMsgElements.put(attribName, xobj);
// Update the original mapping to, so that getters are working correctly
msgElementCache.put(attribName, xobj);
}
COM: <s> an all in one setter for sobject </s>
|
funcom_train/12566411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getService(String name) throws ConsoleServiceException {
Object service;
try {
service = getBean(name);
} catch (BeansException be) {
_logger.error("Failed to get Spring Bean: " + name, be);
throw new ConsoleServiceException("Failded to created service: " +
name, be);
}
return service;
}
COM: <s> returns the spring bean as a service in express </s>
|
funcom_train/48910479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getTxfTipoC() {
if (txfTipoC == null) {
txfTipoC = new JTextField();
txfTipoC.setBounds(new Rectangle(225, 20, 42, 20));
txfTipoC.setEditable(false);
try {
String string = BD.getTipoCambio(Date.valueOf(calendario.getFecha())).getMonto()+"";
txfTipoC.setText(string);
} catch (Exception e) {
txfTipoC.setText("0.0");
}
}
return txfTipoC;
}
COM: <s> this method initializes txf tipo c </s>
|
funcom_train/17786671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void increaseQualityLayer() {
int layer = imageData.getLayers() + 1;
if ( (layer < 0 ) || (layer > imageData.getMaxLayers()) ) return;
((Viewer)parent).getImage(imageData.getComponents(), imageData.getResolutionLevel(), roff, rsiz, layer, imageData.getQuality());
}
COM: <s> gets a new quality layer to improve the quality of the recovered image </s>
|
funcom_train/23030826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setContentDisposition(String contentDisposition) {
if (!CONTENT_DISPOSITION_ATTACHMENT.equals(contentDisposition) && !CONTENT_DISPOSITION_INLINE.equals(contentDisposition)) {
throw new IllegalArgumentException("Content disposition can only be one of: " + CONTENT_DISPOSITION_ATTACHMENT + ", " + CONTENT_DISPOSITION_INLINE);
}
this.contentDisposition = contentDisposition;
}
COM: <s> specifies how the user agent will handle the response </s>
|
funcom_train/11102413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void beforePhase(PhaseEvent event) {
if (beforePhase == null) {
return;
}
try {
beforePhase.invoke(instance, event);
} catch (InvocationTargetException e) {
throw new FacesException(e.getTargetException());
} catch (Exception e) {
throw new FacesException(e);
}
}
COM: <s> p process a before phase event </s>
|
funcom_train/46458703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insert(String imageName, int index) throws IOException {
Image[] imageArray = loadImages(imageName,
true, // ask user for confirmation
true); // allow sequences, if any
if (imageArray.length > 0) {
insert(imageArray, index);
}
}
COM: <s> inserts the named image or image sequence at the specified index </s>
|
funcom_train/49960222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FilterableRow getRowAt(int rowIndex) {
if (filtering && visibleIndex != null) {
int index = visibleIndex.get(rowIndex).intValue();
if (index < rows.size()) {
FilterableRow filterableRow = rows.get(index);
return filterableRow;
} else {
return null;
}
} else {
if (rowIndex < rows.size()) {
FilterableRow filterableRow = rows.get(rowIndex);
return filterableRow;
} else {
return null;
}
}
}
COM: <s> returns the row at the given index </s>
|
funcom_train/978036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEntrarDois() {
System.out.println("entrarDois");
Calculadora instance = new Calculadora();
String expResult = "2.0";
String result = instance.entrarDois();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
}
COM: <s> test of entrar dois method of class calculadora </s>
|
funcom_train/5165509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rightButtonPressed() {
int[] indices = m_list.getSelectedIndices();
for (int i = 0; i < indices.length; i++) {
String removed = (String) m_listModel.remove(indices[0]);
m_outListModel.addElement(removed);
}
}
COM: <s> move selected items from list to the output list </s>
|
funcom_train/46722476 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillLangNamesArray() {
langNames = db.getSupportedLanguages();
for (int i = 0; i < langNames.length; i++) {
langNames[i] = langNames[i] + " - "
+ msg.getString("Preferences.Language." + langNames[i]);
}
currentLang = db.getCurrentLanguage();
currentLang = currentLang + " - "
+ msg.getString("Preferences.Language." + currentLang);
}
COM: <s> fill language name array from database all supported languages will </s>
|
funcom_train/40460245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel5() {
if (jPanel5 == null) {
GridLayout gridLayout2 = new GridLayout();
gridLayout2.setRows(1);
gridLayout2.setHgap(1);
gridLayout2.setColumns(1);
jPanel5 = new JPanel();
jPanel5.setLayout(gridLayout2);
jPanel5.add(getJPanel6(), null);
jPanel5.add(getJPanel7(), null);
}
return jPanel5;
}
COM: <s> this method initializes j panel5 </s>
|
funcom_train/9140478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void selectDirectory() {
JFileChooser fc = new JFileChooser();
fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
int returnVal = fc.showDialog(this, "Select folder");
if (returnVal == JFileChooser.APPROVE_OPTION) {
File file = fc.getSelectedFile();
if (file.isDirectory())
{
try{
workingFolders.add(file.getCanonicalPath());
}catch (IOException ioe) {
logger.error("IOException when adding folder : "+ioe.getMessage(),ioe);
}
renderFolders();
}
}
}
COM: <s> selects a file using the component jfile chooser </s>
|
funcom_train/2897283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCloseMethod() throws Exception {
WebRequest request = new GetMethodWebRequest(services
+ "SoapDBC?method=close");
WebResponse response=makeErrorRequest(request);
String body = response.getText();
assertTrue(body.indexOf("<?xml") ==0);
assertTrue(body.indexOf("<soapenv:Fault>")>0);
assertTrue(body.indexOf("java.lang.NullPointerException")>0 || body.indexOf("java.lang.IllegalArgumentException")>0);
}
COM: <s> test close call </s>
|
funcom_train/9889180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initCollections() {
points = new ArrayList<Collection<PointEnum>>();
opponentPoints = new ArrayList<Collection<PointEnum>>();
p1 = new ArrayList<PointEnum>();
p2 = new ArrayList<PointEnum>();
p3 = new ArrayList<PointEnum>();
ot1 = new ArrayList<PointEnum>();
ot2 = new ArrayList<PointEnum>();
op1 = new ArrayList<PointEnum>();
op2 = new ArrayList<PointEnum>();
op3 = new ArrayList<PointEnum>();
oot1 = new ArrayList<PointEnum>();
oot2 = new ArrayList<PointEnum>();
}
COM: <s> initialize the point collections </s>
|
funcom_train/33758313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getCancelButton() {
if (cancelButton == null) {
cancelButton = new JButton();
cancelButton.setBounds(new Rectangle(221, 170, 95, 26));
cancelButton.setText("Cancel");
cancelButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
System.exit(0);
}
});
}
return cancelButton;
}
COM: <s> this method initializes cancel button </s>
|
funcom_train/14099071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getCutoffViaHistographThreshold(ImageProcessor bp) {
if (bp == null) {
return 0;
}
ImageStatistics stats=imp.getStatistics();
// assume the image is flat, select a small (dark) cutoff
int cutoff = (int) (stats.mean - stats.stdDev);
// if the image is from a reducing focal lens...
if (stats.stdDev > stats.mean) {
cutoff = (int)(stats.mean/4);
}
return cutoff;
}
COM: <s> analyzes the histograph for the most common colors </s>
|
funcom_train/38309236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Connection getConnection() throws SQLException {
try {
Class.forName(driver);
} catch (ClassNotFoundException e) {
throw new SQLException("The driver class '" + driver + "' could not be found in the class path.");
}
return DriverManager.getConnection(url, user, passwd);
}
COM: <s> gets the jdbc connection </s>
|
funcom_train/37227920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Message readReservationsMessage() throws IOException, XmlPullParserException {
// Create the message and initialize its members
ReservationsMessage message = new ReservationsMessage();
// Now read the Reservations
Reservation reservation;
while ((reservation = readReservation()) != null) {
message.addReservation(reservation);
}
// Make sure that the last tag is </message>
parser.require(XmlPullParser.END_TAG, MSG_NS, "message");
return message;
}
COM: <s> reads a reservations message </s>
|
funcom_train/43014738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLevel(int v) {
if (Header_Type.featOkTst && ((Header_Type) jcasType).casFeat_Level == null) {
jcasType.jcas.throwFeatMissing("Level", "org.apache.uima.mediawiki.types.Header");
}
jcasType.ll_cas.ll_setIntValue(addr, ((Header_Type) jcasType).casFeatCode_Level, v);
}
COM: <s> setter for level sets the header level 1 is the highest main title </s>
|
funcom_train/28473800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // private JTextField getInitBinSizeWeightTextField() {
// if (initBinSizeWeightTextField == null) {
// initBinSizeWeightTextField = new NumberTextField(DEFAULT_INIT_BIN_SIZE_WEIGHT, 6, true);
// initBinSizeWeightTextField.setPreferredSize(new Dimension(60, 20));
// }
// return initBinSizeWeightTextField;
// }
COM: <s> this method initializes init bin size weight text field </s>
|
funcom_train/32014113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDirectory(File d) {
// Directory must exits, be a valid directory, and be readable to be added
if (!(d.exists() && d.isDirectory() && d.canRead())) {
System.err.println("Error reading directory: " + d.getAbsolutePath());
return;
}
if (!directoryList.contains(d)) {
directoryList.add(d);
}
}
COM: <s> add a directory to the queue of directories to process </s>
|
funcom_train/3024733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isRenamingTarget(FileSummary summary) {
if (targetFile == null) {
File current = base;
StringTokenizer tok = new StringTokenizer(packageName, ".");
while (tok.hasMoreTokens()) {
current = new File(current, tok.nextToken());
}
targetFile = new File(current, oldClassName + ".java");
}
return checkFiles(targetFile, summary.getFile());
}
COM: <s> checks to see if this is the target </s>
|
funcom_train/1571216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Exception commit() {
if (this.adChannel == null) {/* not considered an error, nothing happened */
log.warn("called commit w/o an open channel");
return null;
}
Exception error = this.adChannel.commit();
this.releaseChannel();
return error;
}
COM: <s> commits a database transaction </s>
|
funcom_train/25892618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void logToFile(String file) throws IOException {
FileHandler ch = new FileHandler(file);
SimpleFormatter sf = new SimpleFormatter();
ch.setFormatter(sf);
log.addHandler(ch);
ch.setLevel(Level.FINEST);
log.setLevel(Level.FINEST);
}
COM: <s> log debug message to file stuntlog </s>
|
funcom_train/35021156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void runMonitors(BreakpointEvent event) {
// We are not expecting multiple threads to modify this list,
// but if it does happen, an exception will be thrown.
for (Monitor monitor : monitorList) {
try {
monitor.perform(event);
} catch (Exception e) {
fireError(e);
}
}
getBreakpointGroup().runMonitors(event);
}
COM: <s> run the monitors associated with this breakpoint and its group </s>
|
funcom_train/17003307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeBrokerConnection() throws ServiceException {
unsubscribe();
clientService.closeBrokerConnection();
clientService.terminateServices();
stopClientTransmissionTracker();
try {
/** Make sure that the transmission tracker is shutdown gracefully. */
Thread.sleep(100);
} catch (InterruptedException e) {
System.out.println(moduleName
+ "Problems sleeping while waiting for transfer completion");
}
}
COM: <s> closes the connection to the broker </s>
|
funcom_train/36190061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String computeRelativePath(String absolutePath) {
String root = m_dir.getAbsolutePath();
String path = absolutePath.substring(root.length() + 1);
return path.replace('\\', '/'); // To support Windows systems, the \ are replaced by /
//return path.replace('/', File.separatorChar);
}
COM: <s> computes a relative path for the given absolute path </s>
|
funcom_train/1939071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createCombo() {
comboClient = new Combo(getShell(), SWT.NONE);
comboClient.setBounds(new org.eclipse.swt.graphics.Rectangle(102,391,351,21));
comboClient.addFocusListener(new org.eclipse.swt.events.FocusAdapter() {
public void focusGained(org.eclipse.swt.events.FocusEvent e) {
comboContract.removeAll();
}
public void focusLost(org.eclipse.swt.events.FocusEvent e) {
updateProjects();
}
});
}
COM: <s> this method initializes combo </s>
|
funcom_train/2036977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addOrUpdateChildForSensorLinker(String childName, Map<String, String> attrMap) {
LinkerChild child = new LinkerChild(childName);
child.setAttributes(attrMap);
if (linkerChildren.contains(child)) {
linkerChildren.remove(child);
}
linkerChildren.add(child);
}
COM: <s> add or update the sensor property whose name is b child name b </s>
|
funcom_train/34339707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getCuidad() {
if (Cuidad == null) {//GEN-END:|25-getter|0|25-preInit
// write pre-init user code here
Cuidad = new TextField("Cuidad", null, 32, TextField.ANY);//GEN-LINE:|25-getter|1|25-postInit
// write post-init user code here
}//GEN-BEGIN:|25-getter|2|
return Cuidad;
}
COM: <s> returns an initiliazed instance of cuidad component </s>
|
funcom_train/32156060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSpinner getMinNbAgents() {
if (minNbAgents == null) {
minNbAgents = new JSpinner(new SpinnerNumberModel(16, 3, 50, 1));
minNbAgents.setBounds(new Rectangle(235, 215, 60, 24));
nbAgentLabel = new JLabel();
nbAgentLabel.setBounds(new Rectangle(80, 215, 130, 22));
nbAgentLabel.setText(NumberOfAgents);
nbAgentLabel.setHorizontalAlignment(JLabel.RIGHT);
}
return minNbAgents;
}
COM: <s> this method initializes min nb agents </s>
|
funcom_train/8232018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBackCommand4() {
if (backCommand4 == null) {//GEN-END:|98-getter|0|98-preInit
// write pre-init user code here
backCommand4 = new Command("Ver detalles", Command.BACK, 0);//GEN-LINE:|98-getter|1|98-postInit
// write post-init user code here
}//GEN-BEGIN:|98-getter|2|
return backCommand4;
}
COM: <s> returns an initiliazed instance of back command4 component </s>
|
funcom_train/311050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showScene() {
scene.compile();
uni.addBranchGraph(scene);
// This will move the ViewPlatform back a bit so the
// objects in the scene can be viewed.
uni.getViewingPlatform().setNominalViewingTransform();
uni.getViewer().getView().setFieldOfView(1.2);
uni.getViewer().getView().setFrontClipDistance(0.01);
}
COM: <s> actually shows the scene with the sphere </s>
|
funcom_train/15487665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void toogleApplyPartialButton() {
// here might be the applyPartialRegEx method to dynamically apply the selection
//model.applypartialRegEx(jRegExTextArea.getSelectionStart(), jRegExTextArea.getSelectionEnd());
model.isValid(jRegExTextArea.getSelectionStart(), jRegExTextArea.getSelectionEnd());
}
COM: <s> toogle apply partial button </s>
|
funcom_train/1817185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
if (hashcode == -1) {
hashcode = 0;
for (int i = 0; i < keys.length; i++) {
hashcode += (keys[i] == null ? 0 : keys[i].hashCode()) ^
(values[i] == null ? 0 : values[i].hashCode());
}
}
return hashcode;
}
COM: <s> computes the hashcode from the keys and values </s>
|
funcom_train/37818336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void call(final int m, final int r) {
if (values.isEmpty()) {
LinkedList<Integer> a = new LinkedList<Integer>();
a.add(m);
a.add(r);
RuntimeStackEntry n = new RuntimeStackEntry(a, true);
values.add(n);
return;
}
RuntimeStackEntry l = values.get(values.size() - 1);
if (l.isClosed()) {
LinkedList<Integer> a = new LinkedList<Integer>();
a.add(m);
a.add(r);
RuntimeStackEntry n = new RuntimeStackEntry(a, true);
values.add(n);
} else {
l.add(m);
l.add(r);
l.setClosed();
}
}
COM: <s> call new values to the runtime stack </s>
|
funcom_train/5774397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getInCountry() {
if (inCountry == null) {
inCountry = new JTextField();
inCountry.setBounds(new java.awt.Rectangle(92,43,181,25));
inCountry.setEditable(true);
}
return inCountry;
}
COM: <s> this method initializes in country </s>
|
funcom_train/8607214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cancelAllTasks() {
for (Future<?> task : tasks.values()) {
if (task != null) {
task.cancel(true);
}
}
// FIXME: This can fill error logs with NPE if left null. Should never happen...
tasks = new FastMap<Integer, Future<?>>().shared();
}
COM: <s> cancel all tasks associated with this controller </s>
|
funcom_train/5395088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image getFDImage() {
URL imgURL = SenderSimulation.class.getClassLoader().getResource("MOVESLogo.gif");
if (imgURL != null) {
return new ImageIcon(imgURL).getImage();
} else {
System.err.println("Unable to find icon");
return null;
}
} // end getFDImage()
COM: <s> returns an image or null </s>
|
funcom_train/33071748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setChildTagName(TagInfo tagInfo,DTDItem[] items){
for(int i=0;i<items.length;i++){
if(items[i] instanceof DTDName){
DTDName dtdName = (DTDName)items[i];
tagInfo.addChildTagName(dtdName.getValue());
} else if(items[i] instanceof DTDChoice){
DTDChoice dtdChoise = (DTDChoice)items[i];
setChildTagName(tagInfo,dtdChoise.getItem());
}
}
}
COM: <s> sets a child tag name to code tag info code </s>
|
funcom_train/43282799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Image getIconFromProgram(Program program) {
ImageData imageData = program.getImageData();
if (imageData != null) {
System.out.println("Image for program found: " + program);
return new Image(Display.getDefault(), imageData, imageData
.getTransparencyMask());
} else {
System.out.println("Could not find image for program: " + program);
}
return null;
}
COM: <s> gets an image for a file associated with a given program </s>
|
funcom_train/49937729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getTablaPanel() {
if (tablaPanel == null) {
GridBagConstraints gridBagConstraints = new GridBagConstraints();
gridBagConstraints.fill = GridBagConstraints.BOTH;
gridBagConstraints.weighty = 1.0;
gridBagConstraints.weightx = 1.0;
tablaPanel = new JPanel();
tablaPanel.setLayout(new GridBagLayout());
tablaPanel.add(getTablaScrollPane(), gridBagConstraints);
}
return tablaPanel;
}
COM: <s> this method initializes tabla panel </s>
|
funcom_train/23778753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void _selectionChanged() {
if (getSelectionProvider() == null) return;
if (outlinePage != null) {
try {
IEslinkCodeElement ce = _computeHighlightRangeSourceReference();
if (ce != null) outlinePage.select(ce);
} catch (EslinkModelException eme) {
// ignore result
}
}
}
COM: <s> react to changed selection </s>
|
funcom_train/32740017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addMDD2MDDRelation(String fromFile, String toFile, String fromField) {
Dictionary<String, Object> relationOrigin = new Hashtable<String, Object>();
relationOrigin.put("field", fromField);
rc.addRelation(fromFile, toFile, "mdd2mdd", relationOrigin);
}
COM: <s> adds a mdd mdd relation </s>
|
funcom_train/19054802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getM_btnOpenTypeface() {
if (m_btnOpenTypeface == null) {
m_btnOpenTypeface = new JButton();
m_btnOpenTypeface.setText("Open Typeface...");
m_btnOpenTypeface.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
openTypeface();
}
});
}
return m_btnOpenTypeface;
}
COM: <s> this method initializes m btn open typeface </s>
|
funcom_train/17539980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize() {
// start the threads for the state machines
modeQueue.clear();
modeThread = new ConnectionRunner();
modeThread.start();
sensorCallback.addSensor(systemURN, connectionSensor);
// and then set the first mode which will itself set the state
if (systemURN != null) {
setConnection(ConnectionEnum.DISCONNECTED);
}
}
COM: <s> initialize the connection state machine and make the connection state </s>
|
funcom_train/40655804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void moveShadowWidgetAndCompact(Position newPosition) {
Position oldPosition = findWidget(shadowWidget);
// if there's no move to be done, short circuit and quit
if (oldPosition.equals(newPosition)) {
return;
}
// first, move panel into the new position
moveWidget(shadowWidget, oldPosition, newPosition);
// compact the table
compactWidgets();
}
COM: <s> moves the shadow widget into a position and compacts the table </s>
|
funcom_train/30081941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("condorCollector".equals(portName)) {
setcondorCollectorEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/40222182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void push(Stack s) {
if (s == null) return; // nothing to do.
int size = s.count();
if (size == 0) return; // nothing to do.
// must add stack from the bottom up...
for (int i = 0; i < size; i++) {
add (s.peek (i));
}
hasChanged(); // we have changed state...
}
COM: <s> push stack onto existing stack the stack parameter object is unchanged </s>
|
funcom_train/10299451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createLinkButton() {
LookAndFeel.installBorder(this, buttonPropertyPrefix + "border");
setBorderPainted(true);
setFocusPainted(true);
setAlignmentY(Container.CENTER_ALIGNMENT);
setContentAreaFilled(true);
setBackground(UIManager.getColor(buttonPropertyPrefix + "background"));
if (textAttribs != null &&
textAttribs.isDefined(StyleConstants.Foreground)) {
setForeground((Color)textAttribs.getAttribute(StyleConstants.Foreground));
} else {
setForeground(UIManager.getColor(buttonPropertyPrefix + "foreground"));
}
invalidate();
}
COM: <s> creates a link button </s>
|
funcom_train/12558460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List findFile(String name) {
if (rootNode == null) {
return null;
}
if (nameToNodeListTable == null) {
nameToNodeListTable = new Hashtable();
try {
buildNameToNodeListTable(rootNode);
} catch (IOException e) {
e.printStackTrace();
return null;
}
}
return (List) nameToNodeListTable.get(name);
}
COM: <s> queries the directory tree for a file or directory name </s>
|
funcom_train/19797711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ModelAndView doView(HttpServletRequest req, HttpServletResponse resp){
//logger.fine("do=view");
getCommonModel(req);
req.setAttribute(config.getContentUrlAttribute(), config.getContentViewTemplate());
req.setAttribute(config.getContentDataAttribute(), service.getAllShortCms());
return new ModelAndView(config.getTemplateUrl());
}
COM: <s> must show items associated with this table </s>
|
funcom_train/15679267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createContainerContentAnnotations() {
String source = "ContainerContent";
addAnnotation
(getTable_Rows(),
source,
new String[] {
});
addAnnotation
(getTableRow_Cells(),
source,
new String[] {
});
addAnnotation
(getTableCell_Children(),
source,
new String[] {
});
addAnnotation
(getDiv_Renderables(),
source,
new String[] {
});
}
COM: <s> initializes the annotations for b container content b </s>
|
funcom_train/28888282 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setTestMethodName() {
Exception ex = new Exception();
ex.fillInStackTrace();
StackTraceElement[] ste = ex.getStackTrace();
Assert.assertTrue("APITest.methodName was called incorrectly",
ste.length > 2);
setTestMethod(this.getClass().getName() + "." + ste[2].getMethodName());
}
COM: <s> create a fully quallified class name for the test method </s>
|
funcom_train/1691495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeTab(BComponent tab) {
int idx = indexOfTab(tab);
if (idx != -1) {
removeTab(idx);
} else {
Log.log.warning("Requested to remove non-added tab " +
"[pane=" + this + ", tab=" + tab + "].");
}
}
COM: <s> removes the specified tab </s>
|
funcom_train/3273888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clear() {
OrderedMap newmap = new ListOrderedMap();
for (MapIterator i = this.terms.mapIterator();i.hasNext();) {
//reinitialize the map using the old order, but with null values, because
//no terms have been found so far
newmap.put(i.next(), new Integer(0));
}
this.terms = newmap;
}
COM: <s> clears the term list for a new document </s>
|
funcom_train/39911029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetUsername() {
System.out.println("setUsername");
String username = "";
employee_client instance = new employee_client();
instance.setUsername(username);
// 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 username method of class buissness </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.