__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/39314383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetItalics() {
System.out.println("testGetItalics");
Frame f=new Frame("hello");
Text myText=new Text(f, true, 10, 10);
assertEquals(myText.getItalics(),"italics");
System.out.println(myText.getItalics());
}
COM: <s> test of get italics method of class text </s>
|
funcom_train/2516467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getColumnCount() {
int retVal = 0;
Enumeration<MetaTable> eTables = vTables.elements();
while (eTables.hasMoreElements()) {
MetaTable crntTable = eTables.nextElement();
retVal += crntTable.getTotalColumns();
}
return retVal;
}
COM: <s> returns total columns of all tables within this meta model </s>
|
funcom_train/40388806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ConfigurationException withPartialValue(Object partialValue) {
checkState(this.partialValue == null,
"Can't clobber existing partial value %s with %s", this.partialValue, partialValue);
ConfigurationException result = new ConfigurationException(messages);
result.partialValue = partialValue;
return result;
}
COM: <s> returns a copy of this configuration exception with the specified partial value </s>
|
funcom_train/1566422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String pop() {
List<Object[]> stack = stackHolder.get();
if (stack.isEmpty()) {
return null;
} else {
Object[] o = stack.remove(stack.size() - 1);
if ( o != null && o.length > 0 ) {
return (String) o[0];
}
return null;
}
}
COM: <s> remove a node name from the stack on the current thread </s>
|
funcom_train/33770701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Panel createPlaylistTable(){
mediaTable = new FlexTable();
mediaTable.addStyleName("main_text");
mediaTable.setWidth("100%");
mediaTable.addTableListener(new TableListener() {
public void onCellClicked(SourcesTableEvents sender, int row, int cell) {
if(cell == 1){
home.getLoggedPerson().getPersonPlaylist().remove(row);
mediaTable.removeRow(row);
}
}
});
ScrollPanel scroll = new ScrollPanel(mediaTable);
scroll.setSize("100%","100px");
return scroll;
}
COM: <s> create the playlist table </s>
|
funcom_train/7756299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void log (Object msg, PrintWriter pw) {
logdate.setTime (System.currentTimeMillis () );
pw.println ("[" + logdateFmt.format (logdate) + "] " + msg);
if (msg instanceof Throwable) {
Throwable exc = (Throwable) msg;
pw.print (" --> ");
exc.printStackTrace (pw);
}
pw.flush ();
}
COM: <s> logs a message to the print writer specified </s>
|
funcom_train/25615322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean contentsExcluded(TokenizedPath path) {
for (int i = 0; i < excludePatterns.length; i++) {
if (excludePatterns[i].endsWith(SelectorUtils.DEEP_TREE_MATCH)
&& excludePatterns[i].withoutLastToken()
.matchPath(path, isCaseSensitive())) {
return true;
}
}
return false;
}
COM: <s> test whether all contents of the specified directory must be excluded </s>
|
funcom_train/279724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleChangedResources() {
if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) {
editingDomain.getCommandStack().flush();
for (Iterator i = changedResources.iterator(); i.hasNext(); ) {
Resource resource = (Resource)i.next();
if (resource.isLoaded()) {
resource.unload();
try {
resource.load(Collections.EMPTY_MAP);
}
catch (IOException exception) {
UML2EditorPlugin.INSTANCE.log(exception);
}
}
}
}
}
COM: <s> handles what to do with changed resources on activation </s>
|
funcom_train/21701274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deleteCatalogSubtree(CatalogEntry ce, List secGroupsToBeDeleted) {
DB db = DBFactory.getInstance();
List children = getChildrenOf(ce);
Iterator iter = children.iterator();
while (iter.hasNext()) {
CatalogEntry nextCe = (CatalogEntry) iter.next();
deleteCatalogSubtree(nextCe,secGroupsToBeDeleted);
}
ce = (CatalogEntry) db.loadObject(ce);
//mark owner group for deletion.
SecurityGroup owner = ce.getOwnerGroup();
if (owner != null) secGroupsToBeDeleted.add(owner);
db.deleteObject(ce);
}
COM: <s> recursively delete the structure starting from the catalog entry </s>
|
funcom_train/38345516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void archiveRule(Rule r) {
String path = this.ruleArchiveDir.getPath() + FILE_SEPARATOR +
r.getName().getWref() + "." + r.getVersion();
File archive = new File(path);
this.writeRule(archive, r);
}
COM: <s> when a rule is updated we first archive the old version </s>
|
funcom_train/24536517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Command createAddCommand(EditPart childEditPart, Object constraint) {
if (constraint == null || !(constraint instanceof String)) return UnexecutableCommand.INSTANCE;
if (fLayoutPolicyHelper.isRegionAvailable((String)constraint)) {
return fLayoutPolicyHelper.getAddChildrenCommand(Collections.singletonList(childEditPart.getModel()), Collections.singletonList(constraint), null).getCommand();
} else
return UnexecutableCommand.INSTANCE;
}
COM: <s> create add command </s>
|
funcom_train/46019111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Domain createDomain(final String host) {
final Domain domain = new Domain();
String name = host;
if (host.startsWith(DEFAULT_HOST_PREFIX)) {
name = host.substring(DEFAULT_HOST_PREFIX_LENGTH);
domain.setServerHost(DEFAULT_HOST);
}
domain.setName(name);
if (!host.equals("localhost")) {
domain.setType(Domain.TYPE_SUBDOMAIN);
} else {
domain.setType(Domain.TYPE_SUBDIRECTORY);
}
UsernameConfiguration uc = new UsernameConfiguration();
domain.setUsernameConfiguration(uc);
uc.setRegex("[a-z]{1,16}");
uc.setReservedRegex("root|admin|administrator");
String s = "member|news|jos|mail|smtp|pop3|pop|.*fuck.*";
uc.setUnallowableRegex(s);
return domain;
}
COM: <s> create a new domain according to the host </s>
|
funcom_train/13647153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Properties getDefaultJNDIProperties(String mqHost, String jndiPort) {
Properties properties = new Properties();
properties.setProperty("java.naming.factory.initial",
"fr.dyade.aaa.jndi2.client.NamingContextFactory");
properties.setProperty("java.naming.factory.host", mqHost);
properties.setProperty("java.naming.factory.port", jndiPort);
return (properties);
}
COM: <s> sets the directory service properties the server will not start up without them </s>
|
funcom_train/46458473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int read(String name) {
status = STATUS_OK;
// modified by Doug Brown 2007-10-17
try {
in = new BufferedInputStream(ResourceLoader.openInputStream(name));
status = read(in);
}
catch (Exception e) {
status = STATUS_OPEN_ERROR;
}
return status;
}
COM: <s> reads gif file from specified file url source </s>
|
funcom_train/27912822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setExpectedJavaScriptConfirm(String message, boolean action) {
try {
getTestingEngine().setExpectedJavaScriptConfirm(
new JavascriptConfirm[] { new JavascriptConfirm(message,
action) });
} catch (ExpectedJavascriptConfirmException e) {
fail("You previously tell that confirm with message ["
+ e.getConfirmMessage()
+ "] was expected, but nothing appeared.");
}
}
COM: <s> tell that the given confirm boxe is expected </s>
|
funcom_train/7797327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLeftHandSide(VariableBase leftHandSide) {
if (leftHandSide == null) {
throw new IllegalArgumentException();
}
// an Assignment may occur inside a Expression - must check cycles
ASTNode oldChild = this.leftHandSide;
preReplaceChild(oldChild, leftHandSide, LEFT_HAND_SIDE_PROPERTY);
this.leftHandSide = leftHandSide;
postReplaceChild(oldChild, leftHandSide, LEFT_HAND_SIDE_PROPERTY);
}
COM: <s> sets the left hand side of this assignment expression </s>
|
funcom_train/42478343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getMessageID(Message msg) {
// A very naive implementation with instanceof.
// In the real world, we most probably will use something more
// flexible like an enum or some register scheme.
if (msg instanceof ChatMessage) {
return new Byte("1");
} else {
// Drop an error in case we passed an unknown type.
throw new InvalidParameterException("invalid message type!");
}
}
COM: <s> gets the id for a message </s>
|
funcom_train/25810274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean sameDate(long startDateTime, long endDateTime) {
Calendar cal = GregorianCalendar.getInstance();
cal.setTimeInMillis(startDateTime);
int startYear = cal.get(Calendar.YEAR);
int startMonth = cal.get(Calendar.MONTH);
int startDay = cal.get(Calendar.DAY_OF_MONTH);
cal.setTimeInMillis(endDateTime);
return startYear == cal.get(Calendar.YEAR)
&& startMonth == cal.get(Calendar.MONTH)
&& startDay == cal.get(Calendar.DAY_OF_MONTH);
}
COM: <s> true if the two times is on the same date </s>
|
funcom_train/33968110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void disconnect() throws Exception {
try {
inboxFolder.close(true);
} catch (Exception e) {
throw new Exception("Unable to close the POP3 Folder. " + e.toString());
}
try {
store.close();
} catch (Exception e) {
throw new Exception("Unable to disconnect from POP3 server. " + e.toString());
}
}
COM: <s> disconnect from the pop3 server </s>
|
funcom_train/6332085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isCleanShutdown() {
File file = new File(getServer().getPath() + Env.DATA_DIR);
String[] fileList = file.list();
for (int i = 0; i < fileList.length; i++) {
if (fileList[i].endsWith(POSTFIX_TEMP)) {
return false;
}
}
return true;
}
COM: <s> check if the cluster store was cleanly shutted down </s>
|
funcom_train/31968045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canGetWidth() {
return edge[LEFT].relativeId == null && edge[RIGHT].relativeId == null &&
edge[LEFT].value != null && edge[RIGHT].value != null &&
(edge[LEFT].value.floatValue() <= edge[RIGHT].value.floatValue());
}
COM: <s> do we know enough to calculate the width of this frame </s>
|
funcom_train/3863403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseDragged(MouseEvent e) {
// miniMap Events
if (e.getComponent() == miniMap) {
if (leftMouseDown) {
miniMap.dragViewport(e.getX(), e.getY());
hexBoard.setScrollPosition(miniMap.getViewOffsetX(), miniMap.getViewOffsetY());
// give focus back to hexboard
hexBoard.requestFocus();
}
}
}
COM: <s> processes mouse dragged events </s>
|
funcom_train/18357802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void testLMC() {
Collection miss = null;
try {
miss = lmc.getMissionList();
} catch (Exception e) {
e.printStackTrace();
return;
}
Iterator it = miss.iterator();
while (it.hasNext() == true) {
Mission aMission = (Mission )it.next();
String missIDs = new Long(aMission.getMissionId()).toString();
System.out.println("Mission found: " + missIDs);
testMission(aMission);
}
ann.stopMonitoring();
}
COM: <s> test lmc by doing </s>
|
funcom_train/39527873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MDCDocument readString(String mdc, File file) throws MDCSyntaxError {
try {
ByteArrayOutputStream out = new ByteArrayOutputStream();
OutputStreamWriter w = new OutputStreamWriter(out, "UTF-8");
w.write(mdc);
w.close();
ByteArrayInputStream in = new ByteArrayInputStream(out
.toByteArray());
return readStream(in, file);
} catch (IOException e) {
throw new RuntimeException(e); // Should not happen.
}
}
COM: <s> create a new document from a string containing standard jsesh text </s>
|
funcom_train/2501374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getRequestURI() {
HttpServletRequest servletRequest = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
if (servletRequest.getRequestURI().endsWith("/")) {
return servletRequest.getRequestURI();
} else {
return servletRequest.getRequestURI().substring(0, servletRequest.getRequestURI().lastIndexOf("."));
}
}
COM: <s> provide the uri of request </s>
|
funcom_train/44875778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVersion(String theVersion) {
if ( theVersion == null )
throw new IllegalArgumentException("Version cannot be null");
if ( !theVersion.equals(VERSION_4_X) &&
!theVersion.equals(VERSION_5_X))
throw new IllegalArgumentException(theVersion + " is not a supported version");
version = theVersion;
}
COM: <s> sets the tomcat version </s>
|
funcom_train/19815412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Resolution intercept(ExecutionContext interceptContext) throws Exception {
Resolution resolution = interceptContext.proceed();
if (isLoggedIn(interceptContext.getActionBeanContext())) {
return resolution;
}
else if (interceptContext.getActionBean().getClass().equals(LoginActionBean.class)) {
return resolution;
}
else {
return new RedirectResolution("/login.jsp");
}
}
COM: <s> method that runs when user accesses a page </s>
|
funcom_train/31477201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean keyEvent(java.awt.event.KeyEvent e, int type) {
for (int i = 0; i < keyListeners.size(); i++) {
KeyListener listener = (KeyListener)keyListeners.getCurrent();
if (listener.keyEvent(e, type)) return true;
keyListeners.next();
}
return false;
}
COM: <s> delegates the event to the children </s>
|
funcom_train/20364009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPointsIn( String skill ) {
int ret=0;
if ( skillDataMap.containsKey( skill ) ) {
ret = skillDataMap.get( skill ).points;
} else {
String parent = findParent( skill );
ret=ret+ skillDataMap.get( GeneralSkill.getForName(parent) ).getPoints();
ret=ret+ skillDataMap.get( GeneralSkill.getForName(parent) ).getChildPoints( skill );
}
return ret;
}
COM: <s> returns the number of points for a skill </s>
|
funcom_train/4935252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Void doInBackground() throws Exception {
progressFrame = InferenceProgressFrame.makeProgressFrame(n3, this);
if( projectGUI != null ) {
this.projectGUI.getResultManagement().insertStringAtPaneEnd(
this.projectGUI,
"# Action [" + actionName + " - "
+ n3.showShortName()
+ "] performed! ");
}
return null;
}
COM: <s> does nothing serious just pops up a progress frame made for overriding </s>
|
funcom_train/37492568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected MentalEntity obtainConversationalMentalEntity(RuntimeConversation conv, String id) {
Enumeration enumeration = conv.getCurrentContentElements();
boolean found = false;
MentalEntity me = null;
while (enumeration.hasMoreElements() && !found) {
me = (MentalEntity) enumeration.nextElement();
found = me.getId().equalsIgnoreCase(id);
}
if (found) {
return me;
} else {
return null;
}
}
COM: <s> it obtains a mental entity stored inside of a conversation object </s>
|
funcom_train/40853765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getItemCompras() {
if (itemCompras == null) {//GEN-END:|73-getter|0|73-preInit
// write pre-init user code here
itemCompras = new Command("Lista de Compras", Command.ITEM, 0);//GEN-LINE:|73-getter|1|73-postInit
// write post-init user code here
}//GEN-BEGIN:|73-getter|2|
return itemCompras;
}
COM: <s> returns an initiliazed instance of item compras component </s>
|
funcom_train/38309332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pushItem(BaseDocumentTag item) {
String tagBody = item.getContent();
if ((tagBody != null) && (tagBody.length() > 0)) {
templateContext.setProperty("body", tagBody);
}
documentStack.add(item);
registerTopDocumentElement(item);
}
COM: <s> pushes an item on the document stack </s>
|
funcom_train/34258513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasYellowTasks() {
for(int i = 0; this.getWorkTaskLinkList().size() > i; i++) {
WorkTaskLink lPD = (WorkTaskLink) getWorkTaskLinkList().get(i);
if (lPD.isYellow()) {
return true;
}
}
return false;
}
COM: <s> this is different than is yellow </s>
|
funcom_train/28763324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProcessMgrName(java.lang.String value) throws com.intersys.objects.CacheException {
com.intersys.cache.Dataholder dh = new com.intersys.cache.Dataholder (value);
mInternal.setProperty(ii_ProcessMgrName, jj_ProcessMgrName,kk_ProcessMgrName, com.intersys.objects.Database.RET_PRIM, "ProcessMgrName", dh);
return;
}
COM: <s> sets new value for code process mgr name code </s>
|
funcom_train/43014756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Header getTitle() {
if (Section_Type.featOkTst && ((Section_Type) jcasType).casFeat_title == null) {
jcasType.jcas.throwFeatMissing("title", "org.apache.uima.mediawiki.types.Section");
}
return (Header) jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Section_Type) jcasType).casFeatCode_title));
}
COM: <s> getter for title gets the title of this section if any </s>
|
funcom_train/27933909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void calcZero() {
int numObj = rel.getRowCount();
newExtent.clearSet();
outerSet.copy(allAttrSet);
for (int i = numObj; --i >= 0;) {
if (outerSet.isSubsetOf(rel.getSet(i))) {
newExtent.put(i);
}
}
}
COM: <s> calculates zero element of conexp lattice object set is in new extent </s>
|
funcom_train/48581442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ServiceBinding getServiceBinding(String resource) {
SOAPServlet servlet = this.servlets.get(resource);
if (host!=null && servlet==null) { //the host is set, so we can create a servlet
servlet = new SOAPServlet();
ServletWrapper sw = new ServletWrapper();
sw.setServlet(servlet);
sw.setUrlpattern(resource + "/*");
host.addServletMapping(sw.getUrlpattern(),sw);
this.servlets.put(resource, servlet);
}
XFireServiceBinding xfsb = new XFireServiceBinding();
xfsb.setServlet(servlet);
return xfsb;
}
COM: <s> get a binding object from a specific servlet root </s>
|
funcom_train/45237417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JDialog getJDialogModoExecucaoPerfil() {
if (jDialogModoExecucaoPerfil == null) {
jDialogModoExecucaoPerfil = new JDialog(this);
jDialogModoExecucaoPerfil.setSize(new Dimension(297, 202));
jDialogModoExecucaoPerfil.setTitle("Executar Perfil");
jDialogModoExecucaoPerfil.setResizable(false);
jDialogModoExecucaoPerfil.setContentPane(getJContentPane2());
}
return jDialogModoExecucaoPerfil;
}
COM: <s> this method initializes j dialog modo execucao automatico </s>
|
funcom_train/24943490 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ProcessTracker getTracker(Module module) {
if (module == null) {
throw new IllegalArgumentException(
"Cannot request tracker for null module");
}
if (deleted.contains(module)) {
throw new IllegalArgumentException(
"Cannot request tracker after deleting module tracker");
}
// If it already has been requested, then return the cached version
if (trackers.containsKey(module)) {
return trackers.get(module);
}
final ProcessTracker tracker = new ProcessTracker(processes);
trackers.put(module, tracker);
return tracker;
}
COM: <s> retrieves the process tracker object that has been allocated to track </s>
|
funcom_train/3881777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Long getMaxLength() {
// Are we a simple type?
XSDSimpleTypeDefinition simpleType = _attDecl.getTypeDefinition();
if (simpleType != null) {
XSDMaxLengthFacet lenFac = simpleType.getMaxLengthFacet();
if (lenFac != null)
return new Long(lenFac.getValue());
}
return null;
}
COM: <s> get the max length of this attribute </s>
|
funcom_train/36422427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public char getNumber(IceTag.WordClass wClass, int index) {
char numLetter;
if( wClass == IceTag.WordClass.wcAdj )
{
if( index <= 11 || index >= 24 )
numLetter = IceTag.cSingular;
else
numLetter = IceTag.cPlural;
}
else
{
if( index <= 7 )
numLetter = IceTag.cSingular;
else
numLetter = IceTag.cPlural;
}
return numLetter;
}
COM: <s> returns the number singular or plural corresponding to the i th search string </s>
|
funcom_train/24135082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addUser(String channel, UserNEW user) {
channel = channel.toLowerCase();
synchronized (_channels) {
Hashtable users = (Hashtable) _channels.get(channel);
if (users == null) {
users = new Hashtable();
_channels.put(channel, users);
}
users.put(user, user);
}
}
COM: <s> add a user to the specified channel in our memory </s>
|
funcom_train/46458930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setImageWidth(double w) {
// don't allow widths smaller than the video
if (video != null) {
BufferedImage vidImage = video.getImage();
if (vidImage != null) w = Math.max(w, vidImage.getWidth());
}
imageWidth = w;
}
COM: <s> sets the image width in image units </s>
|
funcom_train/43588471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object createAdministrationForm(Plugin plugin, String id) throws CreateClassInstanceException {
Class<?> classToCreate = plugin.getAdministratorFormClass();
if (classToCreate == null) {
return null;
}
return ClassUtil.newInstance(classToCreate, new Class<?>[] { String.class }, new Object[] { id });
}
COM: <s> create instance of plugin administration panel </s>
|
funcom_train/38488425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DifferenceEngineContract getDifferenceEngine() {
if (differenceEngine == null) {
if (
XMLUnit.getIgnoreAttributeOrder()
&&
(!usesUnknownElementQualifier()
|| XMLUnit.getCompareUnmatched())
) {
return new NewDifferenceEngine(this, matchTrackerDelegate);
}
return new DifferenceEngine(this, matchTrackerDelegate);
}
return differenceEngine;
}
COM: <s> lazily initializes the difference engine if it hasnt been set </s>
|
funcom_train/44386404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void renameLocationY(String oldLocationY, String newLocationY) {
int promptIndex = myLocationY.indexOf(oldLocationY);
if (promptIndex >= 0) {
myLocationY.removeElementAt(promptIndex);
myLocationY.insertElementAt(newLocationY, promptIndex);
}
}
COM: <s> rename an location y with a given name if the location y exists </s>
|
funcom_train/42637130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Number Tn(int n, Number x, Number T1, Number T2) {
if (n == 0) return Number.createNumber(x, 1);
x = transform(x);
if (n == 1) return x.copy();
// 2*x*Tn(n-1,x)-Tn(n-2,x)
return x.copy().mult(2).mult(T1).minus(T2);
// return x.copy().mult(2).mult(Tn(n - 1, x)).minus(Tn(n - 2, x));
// return getCos().calc(getAcos().calc(x).mult(n));
}
COM: <s> returns the value of n th chebyshev polynomial at x </s>
|
funcom_train/20364005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WeightedChildSkill getWeightedChildSkill(String name) {
for ( WeightedChildSkill wcs : childSkills ) {
if ( StringUtils.equalsIgnoreCase( wcs.getSkillName(), name ) ) {
return wcs;
}
}
for ( ChildSkillGroup group : childGroups ){
if ( group.hasSkill(name) ) {
return group.getWeightedChildSkill(name);
}
}
return null;
}
COM: <s> return the named weighted child skill searching in groups if not found </s>
|
funcom_train/47509503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Funcao entity) {
EntityManagerHelper.log("saving Funcao 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 funcao entity </s>
|
funcom_train/35497960 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doNext() {
for (int i = 0; i < listQuestions.size(); i++) {
QuestionView question = listQuestions.get(i);
if (Long.toString(question.getId()).equals(this.questionID)) {
if (i == (listQuestions.size() - 1)) {
return;
} else {
this.questionID = Long.toString(listQuestions.get(i + 1).getId());
}
break;
}
}
}
COM: <s> process to go to the next question </s>
|
funcom_train/8079037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Instance meanInstance(Instances instances) {
double [] meanVector;
if (instances.numInstances() !=0 && instances.firstInstance() instanceof SparseInstance)
meanVector = meanVectorSparse(instances);
else
meanVector = meanVectorFull(instances);
// global centroid is generally dense
Instance meanInstance = new Instance(1.0, meanVector);
meanInstance.setDataset(instances);
return meanInstance;
}
COM: <s> compute a mean instance for all the instances in a set </s>
|
funcom_train/6262686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isOK() {
if (super.isOK()) {
Iterator iterator = _elements.iterator();
while (iterator.hasNext()) {
if (!((Element) iterator.next()).isOK()) {
return false;
}
}
return true;
} else {
return false;
}
}
COM: <s> returns true if the form and its elements dont have errors </s>
|
funcom_train/51616297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOptionValues( Vector<ConfigOption> optionValues ) {
Vector<String> optionNames = getOptionNames(); //abc order
for( int i=0; i<optionNames.size(); i++ ) {
optionValues.get(i).setName( optionNames.get(i) );
options.put( optionNames.get(i), optionValues.get(i) );
}
}
COM: <s> sets the configuration values from a vector which holds the configuration option values </s>
|
funcom_train/9278699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTooLittleDataNoCombine() {
ArrayList list = new ArrayList(1);
list.add(new byte[5]);
try {
combiner = new ByteArrayCombinerStream(list, 10);
fail("An IllegalArgumentException singalling too little data " +
"should have been thrown");
} catch (IllegalArgumentException iae) {
// This should happen, continue.
}
}
COM: <s> make sure an exception is thrown if there is less data available than </s>
|
funcom_train/14093036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCalculateEast() {
MyTestClass myClass = new MyTestClass();
myClass.setPosition(EAST);
Point l = myClass.calculatePoint(new Rectangle(0, 0, 7, 7));
Point v = new Point(7, 3);
assertEquals("Nort:", v, l);
}
COM: <s> test calculation of east position </s>
|
funcom_train/1552693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double getDegreeOfFreedom(double v1, double v2, double n1, double n2, boolean pooled) {
if(pooled)
return n1 + n2 - 2;
else
return (((v1 / n1) + (v2 / n2)) * ((v1 / n1) + (v2 / n2))) /
((v1 * v1) / (n1 * n1 * (n1 - 1d)) + (v2 * v2) /
(n2 * n2 * (n2 - 1d)));
}
COM: <s> computes approximate degrees of freedom for 2 sample t estimate </s>
|
funcom_train/49633516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addOrderByAliasProperties(String alias, String ... propertyNames) {
Map<String, List<String> > m = getOrderByAliases();
List<String> l = m.get(alias);
if (null == l) {
l = new ArrayList<String>();
m.put(alias, l);
}
for (String prop: propertyNames) {
// Remove existing first:
l.remove(prop);
// Add new:
l.add(prop);
}
}
COM: <s> add multiple order by alias mappings </s>
|
funcom_train/3075860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IWizardPage getNextPage() {
// BuildersProjectData is complete - set data
int i = this.vcsType.getSelectionIndex();
if (i >= 0) buildData(i);
if (this.vcsData == null || this.vcsData.size() == 0) return null;
return super.getNextPage();
}
COM: <s> create builders project data and return next page </s>
|
funcom_train/19971106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintColorChooser(Graphics2D g,Color c){
//if this color is currently selected
if(c==color) paintSelectedColorChooser(g);
else {//paint the color chooser using the current graphic settings
g.setColor(color);
g.fill(r);
g.setColor(Color.WHITE);
g.drawString(name,r.x,r.y+r.height*4/5);
}
}
COM: <s> paints the color chooser using the existing settings </s>
|
funcom_train/18740840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean addRelated(HostNode startImage, HostNode endImage) {
switch (this.direction) {
case FORWARD:
return this.result.add(createResult(startImage, endImage));
default:
return this.result.add(createResult(endImage, startImage));
}
}
COM: <s> adds a related pair to the result relation with given pre and </s>
|
funcom_train/41718623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComponent createTopPanel() {
JPanel resultPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
JButton refreshButton = createRefreshButton();
resultPanel.add(refreshButton);
taskSelectorBox = createTaskSelectionComboBox();
if (taskSelectorBox != null) {
resultPanel.add(new JLabel("Task:"));
resultPanel.add(taskSelectorBox);
}
JPanel timeSelectionPanel = createTimeSelectionPanel();
if (timeSelectionPanel != null) {
resultPanel.add(timeSelectionPanel);
}
return resultPanel;
}
COM: <s> create the top panel with the task selection combobox and other components </s>
|
funcom_train/49156555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getFloat() throws EOFException, IOException, NumberFormatException {
String s = get();
if (s == null) {
return 0;
}
if (!trim) {
s = s.trim();
}
if (s.length() == 0) {
return 0;
}
return Float.parseFloat(s);
}
COM: <s> read one float field from the csv file </s>
|
funcom_train/16911437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String debugString() {
String ret = new String();
ret += ("Group with " + this.getNeuronList().size() + " neuron(s),");
ret += (" " + this.getSynapseList().size() + " synapse(s).");
return ret;
}
COM: <s> returns a debug string </s>
|
funcom_train/3087269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void _addRolloverSupport(ComponentStyle style, Color rolloverForeground, Color rolloverBackground) {
if (rolloverForeground != null) {
style.addPseudoAttribute("hover", "color", ComponentStyle.getColorHexValue(rolloverForeground));
}
if (rolloverBackground != null) {
style.addPseudoAttribute("hover", "background-color", ComponentStyle.getColorHexValue(rolloverBackground));
}
}
COM: <s> adds rollover colors if the values are non null </s>
|
funcom_train/38990973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected LayoutManager createLayoutManager() {
if (JTattooUtilities.getJavaVersion() >= 1.4) {
if (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT) {
return new TabbedPaneScrollLayout();
}
}
/* WRAP_TAB_LAYOUT */
return new TabbedPaneLayout();
}
COM: <s> invoked by code install ui code to create </s>
|
funcom_train/18600069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public User findUserByUuid(String uuid) {
String queryTemplate = "from org.geonetwork.gaap.domain.user.User where uuid = ?";
List<User> users = this.getHibernateTemplate().find(queryTemplate, uuid);
if (!users.isEmpty()) {
return users.get(0);
} else {
return null;
}
}
COM: <s> find a user by uuid </s>
|
funcom_train/45622806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addErrorReportPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CscType_errorReport_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CscType_errorReport_feature", "_UI_CscType_type"),
MSBPackage.eINSTANCE.getCscType_ErrorReport(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the error report feature </s>
|
funcom_train/14070486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
try {
if (groupDAO != null) {
groupDAO.close();
}
if (roomDAO != null) {
roomDAO.close();
}
if (triggerDAO != null) {
triggerDAO.close();
}
}
catch (DatabaseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
closed = true;
}
COM: <s> closes all access </s>
|
funcom_train/1307583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void displayResources() {
GanttResourceItem resourceItem;
if (this.resources != null) {
for (Resource resource : this.resources) {
resourceItem = new GanttResourceItem();
resourceItem.setHeight(GanttConstants.DRAGGABLEGANTTITEM_HEIGHT + "px");
resourceItem.setTaskId(((Task) getBean()).getId());
resourceItem.setResource(resource);
this.resourcesPanel.add(resourceItem);
this.resourceDragController.makeDraggable(resourceItem, resourceItem.getHandle());
}
}
}
COM: <s> this method displays resources associated with the gantt task item </s>
|
funcom_train/4389990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String loadFile(File file) throws IOException {
// empty code file.. no worries, might be getting filled up later
if (file.length() == 0)
return "";
InputStreamReader isr = new InputStreamReader(new FileInputStream(file));
BufferedReader reader = new BufferedReader(isr);
StringBuffer buffer = new StringBuffer();
String line = null;
while ((line = reader.readLine()) != null) {
buffer.append(line);
buffer.append('\n');
}
reader.close();
return buffer.toString();
}
COM: <s> grab the contents of a file as a string </s>
|
funcom_train/6464478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUp() throws AILibException {
Configuration.loadDefaultConfig();
g = new BinaryString1DGenome(10);
g.setComparator(new NoComparator());
g.setEvaluator(new NoEvaluator());
g.setInitialiser(new NoInitialiser());
g.setMutator(new NoMutator());
}
COM: <s> initialises any data before a test case is executed </s>
|
funcom_train/32813640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected File decodeFileName(File file) throws IOException {
File orig = file.getAbsoluteFile();
if (orig.equals(this.directoryRoot)) {
return orig;
} else {
return new File(this.decodeFileName(orig.getParentFile()), this.decodeFileName(orig.getParentFile(), orig.getName()));
}
}
COM: <s> reads the companion file to decode the hashed name </s>
|
funcom_train/10510862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isJdkCompiler(String compilerImpl) {
return MODERN.equals(compilerImpl)
|| CLASSIC.equals(compilerImpl)
|| JAVAC17.equals(compilerImpl)
|| JAVAC16.equals(compilerImpl)
|| JAVAC15.equals(compilerImpl)
|| JAVAC14.equals(compilerImpl)
|| JAVAC13.equals(compilerImpl)
|| JAVAC12.equals(compilerImpl)
|| JAVAC11.equals(compilerImpl);
}
COM: <s> is the compiler implementation a jdk compiler </s>
|
funcom_train/46154834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fromSubset(SampleSubset subset) {
// Just loop through and manually set each element
sampleList.setSize(subset.firstSample + subset.numberSamples);
for (int index = 0; index < subset.numberSamples; index++) {
sampleList.set(index + subset.firstSample, subset.sampleSubset.get(index));
}
}
COM: <s> takes a subset of the samples and updates this trace with those samples </s>
|
funcom_train/6329266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set keySet() {
if (keys == null) {
// need to do this via a proxy, cause keySet() is not an update
// method, but _org_ozoneDB_keySet() is
return ((BaseTreeMap) self())._org_ozoneDB_keySet();
}
return keys;
}
COM: <s> returns a set view of this tree maps keys </s>
|
funcom_train/12156442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private FileInputStream getFileInputStream(File f) {
FileInputStream fis = null;
if (f != null && f.exists() && f.canRead()) {
try {
fis = new FileInputStream(f);
} catch (FileNotFoundException e) {
logger.info("location-not-file-path", f.getPath());
}
}
return fis;
}
COM: <s> utility method which returns a file input stream for the supplied file </s>
|
funcom_train/8024087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFirst(String keyword) {
String result = ConfigManager.getString(languageCode + "/key/" + keyword.replace('.', '/'));
if (result==null) {
String msgSkel = Util.getLocalMessage("msg.noLanguageKeyword", this.getClass());
String message = MessageFormatter.format(msgSkel, languageCode, "key."+keyword);
throw new TranslationException(message);
}
return result;
}
COM: <s> translate from keyword to travian localised string </s>
|
funcom_train/1831630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean equalsString(String s1, String s2) {
if( (s1 == null || s1.length() == 0) && (s2 == null || s2.length() == 0) ) {
return true;
}
return s1 != null && s2 != null && s1.equals(s2);
}
COM: <s> compares two string </s>
|
funcom_train/25637474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMemberDescription(SerialFieldTag serialFieldTag, Content contentTree) {
String serialFieldTagDesc = serialFieldTag.description().trim();
if (!serialFieldTagDesc.isEmpty()) {
Content serialFieldContent = new RawHtml(serialFieldTagDesc);
Content div = HtmlTree.DIV(HtmlStyle.block, serialFieldContent);
contentTree.addContent(div);
}
}
COM: <s> add the description text for this member represented by the tag </s>
|
funcom_train/47531397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int checkLink(String src, String dest){
int linkType = 3; //0same, 1east, 2west, 3no link
Iterator<LinkDirection> it = linkDirs.iterator();
while(it.hasNext()){
LinkDirection link = it.next();
if(link.src.equalsIgnoreCase(src) &&
link.dest.equalsIgnoreCase(dest) )
return link.direction;
}
return linkType;
}
COM: <s> check the direction of the link between two cities </s>
|
funcom_train/20797975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createDescriptionLabel(final Composite composite, final Font labelFont) {
final Label descLbl = new Label(composite,SWT.LEFT);
descLbl.setText(TaggerMessages.TagDialog_Label_Description);
descLbl.setFont(labelFont);
descLbl.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
}
COM: <s> used to create the description label </s>
|
funcom_train/31702761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setYScaleModus(int scaleModusY) {
this.scaleModusY = scaleModusY;
switch (scaleModusY) {
case SCALE_AUTO :
scaleToleranceY = 0.2;
break;
case SCALE_BALLOON :
scaleToleranceY = 0.5;
break;
case SCALE_HEART_BEAT :
scaleToleranceY = 0.5;
break;
case SCALE_NONE :
default :
this.scaleToleranceY = 0.0;
}
}
COM: <s> sets the scale modus for the y axis </s>
|
funcom_train/18861703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getActionMappingPattern(IFile configurationFile) {
if (configurationFile == null) {
return "*.do";
}
IProject project = configurationFile.getProject();
WebArtifactEdit artifactEdit = null;
try {
artifactEdit = WebArtifactEdit.getWebArtifactEditForRead(project);
if (artifactEdit != null) {
ServletMapping mapping = StrutsUtility
.getServletMappingForActionServlet(artifactEdit
.getWebApp());
String pattern = mapping.getUrlPattern();
return pattern;
}
} finally {
if (artifactEdit != null) {
artifactEdit.dispose();
}
}
return "*.do";
}
COM: <s> returns the url pattern configured for the controller servlet </s>
|
funcom_train/37228999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setErrorCode( CWEElement cweErrorCode ) {
cweErrorCode.setName( "ERR.3" );
try {
setField( cweErrorCode, 3 );
}
catch( ArrayIndexOutOfBoundsException ae ) {
ae.printStackTrace();
}
catch( MalformedSegmentException mfe ) {
mfe.printStackTrace();
}
}
COM: <s> set the coded error code </s>
|
funcom_train/1062751 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLabel(LayoutManager layoutManager,RelationEndDisplayEditPart theStringEditPart){
layoutManager.setConstraint(theStringEditPart.getFigure(),new RelationEndpointLocator(
(AssociationFigure)this.getFigure(),
theStringEditPart.isAtEnd(),
theStringEditPart.getGraphNode().getPosition()));
}
COM: <s> to display a label at the end of the link </s>
|
funcom_train/50428650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getEvidenceNodes() {
HashSet nodes = new HashSet();
for (Iterator i = getNodes().iterator(); i.hasNext(); )
{
BBNNode n = (BBNNode) i.next();
if (n.isEvidence()) nodes.add(n);
}
return nodes;
}
COM: <s> return the set of evidence nodes </s>
|
funcom_train/39269325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getSourceFromFile(String path, String fileName) {
StringBuffer sb = new StringBuffer();
Reader r = MiscIo.openInputFile(path + fileName);
if (r.getClass() == BufferedReader.class) {
try {
String line = ((BufferedReader)r).readLine();
while (line != null) {
sb.append(line).append("\n");
line = ((BufferedReader)r).readLine();
}
} catch (IOException e) {
e.printStackTrace();
}
}
MiscIo.closeInputFile(r);
//println(sb);
return sb.toString();
}
COM: <s> get the contents of a file </s>
|
funcom_train/47209901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void formWindowActivated(java.awt.event.WindowEvent evt) {
listener.setGUI(this);
if (clearedData) {
clearData();
}
if (listener.is2GScale()) {
//twoGRadioButton.setSelected(true);
} else {
//sixGRadioButton.setSelected(true);
}
}
COM: <s> performs startup actions when the window is first created </s>
|
funcom_train/51102991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResultIterator performIteratedQuery(Query query) throws CayenneException {
// note that for now DataChannel API does not support cursors (aka
// ResultIterator), so we have to go directly to the DataDomain.
IteratedSelectObserver observer = new IteratedSelectObserver();
getParentDataDomain().performQueries(Collections.singletonList(query), observer);
return observer.getResultIterator();
}
COM: <s> performs a single database select query returning result as a result iterator </s>
|
funcom_train/1006007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setToRotation(double theta) {
double sin = Math.sin(theta);
double cos;
if (sin == 1.0 || sin == -1.0) {
cos = 0.0;
state = APPLY_SHEAR;
type = TYPE_QUADRANT_ROTATION;
} else {
cos = Math.cos(theta);
if (cos == -1.0) {
sin = 0.0;
state = APPLY_SCALE;
type = TYPE_QUADRANT_ROTATION;
} else if (cos == 1.0) {
sin = 0.0;
state = APPLY_IDENTITY;
type = TYPE_IDENTITY;
} else {
state = APPLY_SHEAR | APPLY_SCALE;
type = TYPE_GENERAL_ROTATION;
}
}
m00 = cos;
m10 = sin;
m01 = -sin;
m11 = cos;
m02 = 0.0;
m12 = 0.0;
}
COM: <s> sets this transform to a rotation transformation </s>
|
funcom_train/31801681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConcat() {
String[] a = new String[] { "a", "a"};
String[] b = new String[] { "b", "b"};
String[] c = Util.concat(a, b);
assertTrue(Arrays.equals(new String[] {"a", "a", "b", "b"}, c));
}
COM: <s> test the concat method </s>
|
funcom_train/9026364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refresh() {
if (controlsCreated) {
for (int i = 0; i < sections.length; i++) {
final ISection section = sections[i];
ISafeRunnable runnable = new ISafeRunnable() {
public void run() throws Exception {
section.refresh();
}
public void handleException(Throwable throwable) {
throwable.printStackTrace();
}
};
SafeRunner.run(runnable);
}
}
}
COM: <s> if controls have been created refresh all sections on the page </s>
|
funcom_train/16269395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void send(String h, ByteBuffer b) {
InetAddress a = null;
try {
a = InetAddress.getByName(h);
DatagramPacket p = new DatagramPacket(b.array(), b.position(), a,
this.IAX2SOC);
// packetDump(b.array(), b.position(), a, this.IAX2SOC, false);
this._lsoc.send(p);
}
catch (Exception ex1) {
ex1.printStackTrace();
}
}/**
COM: <s> sends a frame as bytes to a specified address </s>
|
funcom_train/1171254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Card_Color determineColor() {
if (this.isImmutable()) {
return new Card_Color(this);
}
Card_Color colors = null;
ArrayList<Card_Color> globalChanges = AllZone.getGameInfo().getColorChanges();
colors = determineColor(globalChanges);
colors.fixColorless();
return colors;
}
COM: <s> p determine color </s>
|
funcom_train/802774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPathToFilePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SourceFileType_pathToFile_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SourceFileType_pathToFile_feature", "_UI_SourceFileType_type"),
MzdataPackage.Literals.SOURCE_FILE_TYPE__PATH_TO_FILE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the path to file feature </s>
|
funcom_train/25787670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Link getLink(Relation rel) {
Link result = null;
Link current = null;
for (final Iterator<Link> iter = getLinks().iterator(); (result == null)
&& iter.hasNext();) {
current = iter.next();
if (current.getRel() == rel) {
result = current;
}
}
return result;
}
COM: <s> returns the first available link with a given relation type </s>
|
funcom_train/47434140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getOutlineText() {
StringBuffer buffer = new StringBuffer(""); //$NON-NLS-1$
String type = this.type;
int dot = type.lastIndexOf("."); //$NON-NLS-1$
dot = dot > -1 ? type.substring(0, dot).lastIndexOf(".") : -1; //$NON-NLS-1$
if (dot > -1) {
type = type.substring(dot + 1);
}
buffer.append(type);
buffer.append(" : "); //$NON-NLS-1$
buffer.append(name);
return buffer.toString();
}
COM: <s> returns the text to put in an outline view </s>
|
funcom_train/46293767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Analyzer getAnalyzer() {
Map<String,Analyzer> fa = new HashMap<String,Analyzer>();
for (Map.Entry<String,OceanField> entry : this) {
if (entry.getValue().analyzer != null) {
fa.put(entry.getKey(), entry.getValue().analyzer);
}
}
return new OceanAnalyzer(fa);
}
COM: <s> get the analyzer for the ocean object </s>
|
funcom_train/13314706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visit(NadicRelationDisjointUnion n, A argu) {
n.nodeToken.accept(this, argu);
n.nodeOptional.accept(this, argu);
n.nodeToken1.accept(this, argu);
n.relationExpCommalist.accept(this, argu);
n.nodeToken2.accept(this, argu);
}
COM: <s> node token d union </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.