__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/33512280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeReset() {
outBuffer = new ByteArrayOutputStream();
//if bitOffset is not equal 0, reads the last incomplete byte
if (bitOffset != 0) {
isLastByteIncomplete = true;
try {
byteOffset = file.length() - 1;
file.seek(byteOffset);
buffer = file.readByte();
} catch(IOException ioe) {
System.err.println("Input/output exception while reading file. Stack trace follows.");
ioe.printStackTrace();
System.exit(1);
}
} else {
isLastByteIncomplete = false;
buffer = 0;
}
}
COM: <s> prepares for writing to the file unary or gamma encoded integers </s>
|
funcom_train/266285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void caretUpdate(CaretEvent event) {
String text = getText().trim();
String emptyMask = maskPattern.replace('#', placeholder);
if (text.length() == 0 || text.equals(emptyMask)) {
setForeground(Color.BLACK);
return;
}
try {
Date date = dateFormatter.parse(getText());
if (dateUtil.checkDate(date)) {
setForeground(darkGreen);
} else {
setForeground(Color.RED);
}
} catch (Exception e) {
setForeground(Color.RED);
}
}
COM: <s> after any user input the value of the textfield is proofed </s>
|
funcom_train/32746269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean mouseMove(Event evt, int x, int y) {
// get item the mouse is over
int over = isOver(y);
// if it's a new item -> un-select the old one
// and then select the new
if(over != mouseOver_) {
drawHighLight(mouseOver_, false);
drawHighLight(over, true);
mouseOver_ = over;
}
return false;
}
COM: <s> handles mouse movement over the menutree </s>
|
funcom_train/8284253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WireFeedParser getParserFor(Document document) {
List parsers = getPlugins();
WireFeedParser parser = null;
for (int i=0;parser==null && i<parsers.size();i++) {
parser = (WireFeedParser) parsers.get(i);
if (!parser.isMyType(document)) {
parser = null;
}
}
return parser;
}
COM: <s> finds the real parser type for the given document feed </s>
|
funcom_train/12155535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMoveOriginatorMessageId() {
logger.debug("Entering getMoveOriginatorMessageId().");
int moveOriginatorMessageId = Integer.parseInt(moveOriginatorMessageIdTextField.getText());
if (logger.isDebugEnabled()) {
logger.debug("Exiting getMoveOriginatorMessageId(); RV = [" + moveOriginatorMessageId + "].");
}
return moveOriginatorMessageId;
}
COM: <s> get the quot move originator enabled quot text field value in </s>
|
funcom_train/4754647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInitialMainStateJacobian() {
final double[][] dYdY0 = new double[stateDim][stateDim];
for (int i = 0; i < stateDim; ++i) {
dYdY0[i][i] = 1.0;
}
setInitialMainStateJacobian(dYdY0);
}
COM: <s> set the default initial value of the jacobian matrix with respect to state </s>
|
funcom_train/24162689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getValue(String key) {
String result = values.get(key);
if (logs != null) {
if (result == null) {
logs.configGet(key, null, false);
} else {
logs.configGet(key, result, true);
}
}
return result;
}
COM: <s> get a value from the config </s>
|
funcom_train/25342452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLocalData(List<ExtendedPlaylistData> dataList) {
this.localData.clear();
for (ExtendedPlaylistData data : dataList) {
Playlist playlist = this.getPlaylist(data.getId());
if (playlist != null) {
playlist.setLocalData(data);
}
this.localData.put(data.getId(), data);
}
}
COM: <s> overwrites the current local data with the given data </s>
|
funcom_train/44656407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringBuilder getFieldsDetails(StringBuilder builder, FormModel formModel) {
builder.append("[FIELDS " + formModel.getId() + "] ");
Set<String> fieldNames = formModel.getFieldNames();
for (String fieldName : fieldNames) {
builder.append(fieldName).append(" = ");
builder.append(formModel.getValueModel(fieldName).getValue());
builder.append(", ");
}
builder.append("\n");
return builder;
}
COM: <s> print all the values from the value models in the form model </s>
|
funcom_train/12895931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GenericValue getReport(long reportId) {
GenericValue g = null;
try {
g = getDelegator().findByPrimaryKey(PROJECT_REPORT_ENTITY, UtilMisc.toMap("id",
String.valueOf(reportId)));
} catch (Exception e) {
_log.error("Error loading report", e);
}
return g;
}
COM: <s> returns a report </s>
|
funcom_train/22950202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double choose(double n, double k) {
n = Math.floor(n + 0.5);
k = Math.floor(k + 0.5);
double lchoose = GammaFunction.lnGamma(n + 1.0) - GammaFunction.lnGamma(k + 1.0) - GammaFunction.lnGamma(n - k + 1.0);
return Math.floor(Math.exp(lchoose) + 0.5);
}
COM: <s> binomial coefficient n choose k </s>
|
funcom_train/2724250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startWorldbankCountryLoading() {
try {
List<CountryElement> countryList;
countryList = worldbankApi.getCountries();
final Map<String, String> currentSaved = importService
.getWorldBankCountryMap();
for (final CountryElement countryElement : countryList) {
if (!currentSaved.containsKey(countryElement.getIso2Code())) {
sendMessage(countryElementWorkdestination,
countryElement);
}
}
} catch (final Exception e1) {
LOGGER.warn("jms", e1);
}
}
COM: <s> start worldbank country loading </s>
|
funcom_train/38388335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void versioncolumns(PyObject qualifier, PyObject owner, PyObject table) {
clear();
String q = getMetaDataName(qualifier);
String o = getMetaDataName(owner);
String t = getMetaDataName(table);
try {
this.fetch.add(getMetaData().getVersionColumns(q, o, t));
} catch (SQLException e) {
throw zxJDBC.newError(e);
}
}
COM: <s> gets a description of a tables columns that are automatically </s>
|
funcom_train/46402524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateUserRoleAssoc(UserRole ur) {
if (ur.getRoleId() == null)
throw new IllegalArgumentException("roleId is null");
if (ur.getServiceId() == null)
throw new IllegalArgumentException("domainId object is null");
if (ur.getUserId() == null)
throw new IllegalArgumentException("userId object is null");
userRoleDao.update(ur);
}
COM: <s> updates the attributes in the user role object </s>
|
funcom_train/12367339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSplitPane getJSplitPane2() {
if (jSplitPane2 == null) {
jSplitPane2 = new JSplitPane();
jSplitPane2.setResizeWeight(0.5D);
jSplitPane2.setLastDividerLocation(238);
jSplitPane2.setDividerLocation(300);
jSplitPane2.setOneTouchExpandable(true);
jSplitPane2.setTopComponent(getJTabbedPaneMiddle());
jSplitPane2.setBottomComponent(getJTabbedPaneBottom());
jSplitPane2.setOrientation(JSplitPane.VERTICAL_SPLIT);
}
return jSplitPane2;
}
COM: <s> this method initializes j split pane2 </s>
|
funcom_train/8012854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(int row, Object deleteBean, Method deleteMethod) throws DataStoreException {
try {
Collection beans = new Vector();
beans.add(getBean(row));
Object[] deleteParams = {beans};
if (deleteMethod != null) {
if (!isInserted(row))
deleteMethod.invoke(deleteBean, deleteParams);
deleteRow(row);
}
} catch (Exception e) {
throw new DataStoreException("Unable to delete bean in physical storage.", e);
}
}
COM: <s> delete the specified datastore row in physical storage </s>
|
funcom_train/19259379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getAttrPos(String attrFile) {
// Is this a totally new attribute file?
boolean found = false;
int i=0;
for (; i < numAttrFiles; ++i) {
if (attrFiles[i].equals(attrFile)) {
found = true;
break;
}
}
if (!found && !attrFile.startsWith("PC")) {
Toolkit.getDefaultToolkit().beep();
System.err.println("Possible error with attribute files...");
attrFiles[i] = attrFile;
++numAttrFiles;
}
return i;
}
COM: <s> identifies the index into the attribute array that </s>
|
funcom_train/15406111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean findAndRemovePlaceHolders() {
placeHolderWhere = removePlaceHolder($_WHERE);
placeHolderAndWhere = removePlaceHolder($_AND_WHERE);
placeHolderHaving = removePlaceHolder($_HAVING);
placeHolderAndHaving = removePlaceHolder($_AND_HAVING);
return hasPlaceHolders();
}
COM: <s> find and remove the known place holders such as where </s>
|
funcom_train/18398211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int findWebflowIndex(String webflowName) {
int webflowIndex = -1;
for (int i = webflowStack.size() - 1; (i >= 0) && (webflowIndex < 0); i--) {
Webflow webflow = (Webflow) webflowStack.elementAt(i);
if (webflow.getName().equals(webflowName)) {
webflowIndex = i;
}
}
return webflowIndex;
}
COM: <s> find the index of a named webflow </s>
|
funcom_train/1910075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialiseThreshold()
{ for(MemoryPoolMXBean pool : ManagementFactory.getMemoryPoolMXBeans())
if(pool.getType() == MemoryType.HEAP
&& pool.isUsageThresholdSupported() == true)
pool.setUsageThreshold
( (long)(pool.getUsage().getMax() * memoryThreshold)
);
}
COM: <s> set up threshold notifications on all heaps that support it to </s>
|
funcom_train/5769827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toUrl() {
StringBuffer buffer = new StringBuffer(256);
for (int i = names.size() - 1; i >= 0; i--) {
LdapRdn n = (LdapRdn) names.get(i);
buffer.append(n.encodeUrl());
if (i > 0) {
buffer.append(",");
}
}
return buffer.toString();
}
COM: <s> builds a complete ldap path ldap and url encoded </s>
|
funcom_train/44837241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkSecurity() throws Exception {
// Check if the user needs to be logged in for this request
if (this.loggedInUserRequired()) {
checkForUserLogin();
}
// Check if the user needs to apply for this enrollment
// for this request - for public or closed group
if (!this.isForPublicAccess()) {
// Not for public, the user need an access list
checkForAccessList();
}
}
COM: <s> check the security </s>
|
funcom_train/35731495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TreeNode fillMenus(TreeNode parent, LineBreakpointTemplate template, int level) {
// loop to length - 1 because the last node will be the template, not
// the last menu
for (int i = level; i < template.getMenuNames().length - 1; i++) {
TreeNode node = new TreeNode(template.getMenuNames()[i]);
addToParent(parent, node);
parent = node;
}
return parent;
}
COM: <s> creates the appropriate menus starting at the provided code level code </s>
|
funcom_train/42718507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawProductName(Graphics2D g2D) {
int xPosition = originX;
int yPosition = originY + firstLineY;
if (logoExists)
xPosition += 80;
column1StartX = xPosition;
int end = column1StartX + titleFontMetrics.stringWidth(productName);
g2D.setColor(Color.black);
g2D.setFont(titleFont);
g2D.drawString(productName, xPosition, yPosition);
}
COM: <s> draws the product name to the right top side of the logo </s>
|
funcom_train/4135807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String serializeRuntime( IRuntime r ){
StringBuffer buffer = new StringBuffer();
buffer.append( "<" );
buffer.append( TAG_RUNTIME );
buffer.append( " " );
buffer.append( ATTR_NAME );
buffer.append("=\"");
buffer.append( r.getName() );
buffer.append( "\" ");
buffer.append( ATTR_ID );
buffer.append("=\"");
buffer.append( r.getId() );
buffer.append( "\" />");
return buffer.toString();
}
COM: <s> this method is used to serialized an iruntime into xml for </s>
|
funcom_train/23867395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRequestUrlWithoutSessionId() {
final HttpServletRequest servletRequest = JsfRequestUtil.getRequest();
final StringBuffer requestUrl = servletRequest.getRequestURL();
if (requestUrl.indexOf(";") != -1) {
requestUrl.delete(requestUrl.indexOf(";"), requestUrl.length());
}
return requestUrl.toString();
}
COM: <s> gets the request url without the optional jsessionid </s>
|
funcom_train/22579191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startDeviceThreads () throws GLTMonitorDatabaseException {
devices = DbDevice.dbGetMonitoredDevices(dbConn);
if (devices == null)
throw new GLTMonitorDatabaseException("No Devices found in database.");
devThreads = new Vector(devices.size());
for (int i=0; i<devices.size(); i++) {
devThreads.add(i, new DeviceThread((Device)devices.elementAt(i),this,config));
new Thread((DeviceThread)devThreads.elementAt(i)).start();
}
}
COM: <s> fire up the threads to control the polling of each monitored device </s>
|
funcom_train/22383863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public ZZModule getModule(String name) {
ZZModule m;
if((m= (ZZModule)mods.get(name)) == null) {
try {
Class clazz = Class.forName("org.gzigzag.module."+name);
m =
(ZZModule)clazz.getField("module").get(null);
} catch(Exception e) {
ZZLogger.exc(e);
ZZLogger.log("Error while loading module '"+name+"'");
return null;
}
mods.put(name, m);
}
return m;
}
COM: <s> obtain the zzmodule object corresponding to the given string </s>
|
funcom_train/33375607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRecentAfterClose() throws IOException, MessagingException {
helper.doExternalDelivery(inbox);
assertEquals(2, inbox.getNewMessageCount());
inbox.open(Folder.READ_WRITE);
assertEquals(2, inbox.getNewMessageCount());
inbox.close(true);
assertEquals(0, inbox.getNewMessageCount());
}
COM: <s> make sure that messages added while the folder is closed are recorded </s>
|
funcom_train/37508558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void browseForSourceDir() {
JFileChooser fc = new JFileChooser();
fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
if (fc.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
getTextSourceDir().setText(fc.getSelectedFile().getAbsolutePath());
}
}
COM: <s> lets the user select the html source directory </s>
|
funcom_train/1735713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cell getCell(CellPosition position) {
if(position.getX() == -1 && position.getY() == -1) {
return new Cell(false, 0, 0);
}
return this.cells[position.getY()][position.getX()];
}
COM: <s> returns the cell at the given position </s>
|
funcom_train/42273303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addVertex( int vertexNumber ){
m_graph.addVertex(vertexNumber);
m_layout.initialize();
Relaxer relaxer = new VisRunner((IterativeContext)m_layout);
relaxer.stop();
relaxer.prerelax();
StaticLayout<Number,Number> staticLayout = new StaticLayout<Number,Number>(m_graph, m_layout);
LayoutTransition<Number,Number> lt = new LayoutTransition<Number,Number>(m_viewer, m_viewer.getGraphLayout(), staticLayout);
Animator animator = new Animator(lt);
animator.start();
m_viewer.repaint();
}
COM: <s> add a vertex by its number </s>
|
funcom_train/39379251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean onCancel() {
// Set a flash cancel message
getContext().setFlashAttribute("message", "You have cancelled the "
+ "client creation process.");
// Set page state to stateless which removes the page from
// the session
getWizardPage().setStateful(false);
getWizardPage().setRedirect(WizardPage.class);
return false;
}
COM: <s> the on cancel action </s>
|
funcom_train/27755255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setClass(String url, String classN) throws ClassNotFoundException
{
className = classN;
c = sslCL.getClassFromURL(url, className);
try
{
cla = c.newInstance();
}
catch(Exception e)
{
e.printStackTrace();
}
}
COM: <s> loads the class through http https </s>
|
funcom_train/26490474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int removeFromGuestBook(String msgid){
//Check that the Message id of the Message to delete is not null
if(msgid==null){
return -1;
}
/** Log the Event : Delete an item from my Guestbook*/
fireUserEvent("cfGuestBookDelete");
return fdo.removeFromGuestBook(msgid);
}
COM: <s> method used to remove a message in the guestbook </s>
|
funcom_train/47868179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected DefaultGraphCell createVertex(Table table, Point2D position) {
AttributeMap attributes = new AttributeMap(createCellAttributes(new Point2D.Double(0, 0), table));
GraphConstants.setBounds(attributes, new Rectangle2D.Double(position
.getX(), position.getY(), 40, 20));
DefaultGraphCell cell = new DefaultGraphCell(table, attributes);
// Add a Port
cell.addPort();
return cell;
}
COM: <s> method hook to create custom vertices </s>
|
funcom_train/51099847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bind(final JDialog dialog, int initialWidth, int initialHeight) {
updateSize(dialog, initialWidth, initialHeight);
dialog.addComponentListener(new ComponentAdapter() {
public void componentResized(ComponentEvent e) {
setWidth(new Integer(dialog.getWidth()));
setHeight(new Integer(dialog.getHeight()));
}
});
}
COM: <s> binds this preference object to synchronize its state with a given component </s>
|
funcom_train/37822507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void incFontSize(double s) {
showPanelFont = new Font(GUIConstants.SHOW_PANEL_FONT.getName(),
GUIConstants.SHOW_PANEL_FONT.getStyle(),
(int) (GUIConstants.SHOW_PANEL_FONT.getSize() * s));
}
COM: <s> increments the font size in comparison to the constans font </s>
|
funcom_train/46159054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SegmentStyle getEndSegmentStyle() {
synchronized(segmentStyles) {
if (segmentStyles.isEmpty()) {
//No SegmentStyle available.
return null;
}
else {
//If any SegmentStyle exists always use the last SegmentStyle.
return segmentStyles.get(segmentStyles.size() - 1);
}
}
}
COM: <s> get the end segment style for this path style </s>
|
funcom_train/8096423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRetainAllFull() {
Trie retain = buildTrie(m_Data);
Trie clone = (Trie) m_Trie.clone();
m_Trie.retainAll(retain);
assertEquals("Retaining all strings", clone.size(), m_Trie.size());
}
COM: <s> tests the retain all method retains all elements </s>
|
funcom_train/40768894 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deleteProductionFolder(int when) {
String s = "";
if (when == 0) {
s = "Previous";
}
File dir = new File(tempBuildFolderFullPath);
System.out.println("Deleting " + s + " production directory contents: "
+ tempBuildFolderFullPath);
// delete the production folder contents
try {
deleteDir(dir);
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> delete the previous production folder </s>
|
funcom_train/26279605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MetaObject getOwnerObject() {
if(ownerObject==null) {
if(parent instanceof MetaObject) {
ownerObject=((MetaObject)parent);
}
else ownerObject=((MetaPropGroup)parent).getOwnerObject();
}
if(ownerObject instanceof MetaObjectImplementation)
return ownerObject.getThis();
else return ownerObject;
}
COM: <s> gets the object which owns this property group </s>
|
funcom_train/51730217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clickKey(int keyCode) {
FocusManager.readyForInput(ac.getFocusListener());
Component target = ac.getKeyListener();
pressTime = System.currentTimeMillis();
for (KeyEvent ke : createKeyClick(target, keyCode))
target.dispatchEvent(ke);
}
COM: <s> this can be called from scripts and sends a key to the applet </s>
|
funcom_train/7646312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void schedule(TimerTask task, Date when) {
if (when.getTime() < 0) {
throw new IllegalArgumentException();
}
long delay = when.getTime() - System.currentTimeMillis();
scheduleImpl(task, delay < 0 ? 0 : delay, -1, false);
}
COM: <s> schedule a task for single execution </s>
|
funcom_train/10521839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private QName getArrayItemTypeFromSequence(Element sequenceElement, WsdlTypes wsdlTypes) {
Element element = DomUtils.getChildElementByName(sequenceElement, "element");
if (element == null) {
return null;
}
if (!isArray(element)) {
return null;
}
return wsdlTypes.getTypeQName(element.getAttribute("type"));
}
COM: <s> get an array items xml type from a sequence element </s>
|
funcom_train/1589874 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DateTimeFormatter withPivotYear(Integer pivotYear) {
if (iPivotYear == pivotYear || (iPivotYear != null && iPivotYear.equals(pivotYear))) {
return this;
}
return new DateTimeFormatter(iPrinter, iParser, iLocale,
iOffsetParsed, iChrono, iZone, pivotYear);
}
COM: <s> returns a new formatter that will use the specified pivot year for two </s>
|
funcom_train/25290253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void compile() {
if (isLive()) {
throw new RestrictedAccessException(Ding3dI18N.getString("SharedGroup0"));
}
if (isCompiled() == false) {
// will throw SceneGraphCycleException if there is a cycle
// in the scene graph
checkForCycle();
((SharedGroupRetained)this.retained).compile();
}
}
COM: <s> compiles the source shared group associated with this object and </s>
|
funcom_train/8803946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int writeTo(java.io.OutputStream out) throws java.io.IOException {
int total = 0;
byte[] iobuf = new byte[COPY];
int count;
while(0 < (count = this.read(iobuf,0,COPY))){
out.write(iobuf,0,count);
total += count;
}
return total;
}
COM: <s> write the buffer contents to the stream </s>
|
funcom_train/6288953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int compare(MessageHeader messageHeader1, MessageHeader messageHeader2) {
final String firstSubject = removeREsAndFWDs( messageHeader1.getSubject().toLowerCase() );
final String secondSubject = removeREsAndFWDs( messageHeader2.getSubject().toLowerCase() );
return firstSubject.compareTo( secondSubject );
}
COM: <s> compares subjects in messages case insensitively </s>
|
funcom_train/22362087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRegion(Region r) {
if(r != getRegion()) {
if(this.region != null) {
this.region.removeUnit(this.getID());
}
// pavkovic 2002.09.30: dont add to region
// this unit shall not exist in Region.units()
// if (r != null)
// r.addUnit(this);
this.region = r;
}
}
COM: <s> sets the region of this unit </s>
|
funcom_train/12923171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int writeBytes(final byte[] bytes) throws IOException {
if (index + bytes.length < buffer.length) {
System.arraycopy(bytes, 0, buffer, index, bytes.length);
index += bytes.length;
} else {
flush();
stream.write(bytes, 0, bytes.length);
pos += bytes.length;
}
return bytes.length;
}
COM: <s> write an array of bytes </s>
|
funcom_train/43327403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void makeRaw() {
int i,j,k;
// allocate arrays for sampling
raw = new IVector[20][20][15];
for (k=0; k<15; k++) {
int ns = (int)((maxDistance.data[k] - minDistance.data[k]) /
intervalSize.data[k]);
for (i=0; i<20; i++)
for (j=0; j<20; j++)
raw[i][j][k] = new IVector(ns);
}
}
COM: <s> allocate new raw arrays based on distance vectors </s>
|
funcom_train/48498239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object mapRow(ResultSet rs, int rowNumber) throws SQLException {
IssueAttachementDTO attachement = new IssueAttachementDTO();
attachement.setIssue(rs.getInt("issue"));
attachement.setDescription(rs.getString("description"));
attachement.setFilename(rs.getString("filename"));
SimpleDateFormat formatter = new SimpleDateFormat(
"yyyy-MM-dd HH:mm:ss");
attachement.setDate(formatter.format(rs.getTimestamp("date")));
attachement.setUser(rs.getString("user"));
attachement.setSize(rs.getInt("size"));
return attachement;
}
COM: <s> map the resulted row to a issue attachement dto object </s>
|
funcom_train/48103101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String reverse(String str) {
logger.info("Receiveing string: " + str);
char[] chars = str.toCharArray();
StringBuffer buf = new StringBuffer();
for (int i = chars.length - 1, x = 0; i >= 0; i--, x++) {
buf.append(chars[i]);
}
String reveresed = buf.toString();
logger.info("Returning string: " + reveresed);
return reveresed;
}
COM: <s> will reverse the order of the string passed </s>
|
funcom_train/44075373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IModel newTicketOptionModel() {
Model model = new Model() {
private TicketOption ticketOption = null;
@Override
public Object getObject(Component component) {
if (ticketOption == null) {
Activity activity = (Activity) ActivityDetailsPage.this
.getModelObject();
ticketOption = new TicketOption();
ticketOption.setStart(new Date());
ticketOption.setUntil((Date) activity.getActivityDate()
.clone());
}
return ticketOption;
}
};
return model;
}
COM: <s> create a new ticket option object </s>
|
funcom_train/2911349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isContainsNew() {
if (user.isAnonymous())
throw new IllegalStateException("isHasNewArticles may be called only if user is logged in");
if (board.getArtCount().intValue() == 0)
return false;
Date userLastRead = board.getUserLastRead(user.getUserId());
if (userLastRead == null)
return true;
return (board.getLastPosted().after(userLastRead));
}
COM: <s> this method checks if there are any unread articles on this board </s>
|
funcom_train/44872721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParamName(String name) {
if (name != null && !name.equals("")) {
paramName = name;
if (tMin != null) {
tMin.setName(paramName + "Min");
}
if (tMax != null) {
tMax.setName(paramName + "Max");
}
if (tIntervals != null) {
tIntervals.setName(paramName + "Intervals");
}
}
}
COM: <s> set the name of the parameter variable </s>
|
funcom_train/2929197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkContraintsForAllElementsWithEvent (MetaEnvironment e, boolean secondTime) {
checkContraintsForAllElements (e, secondTime);
List<DesignErrorDescription> errors = Checks.getErrors ();
Checks.fireConstraintsCheckedEvent (new ConstraintsCheckedEvent (e, ConstraintsCheckedEvent.ALL_ELEMENTS_CONSTRAINTS_CHECKED, errors));
}
COM: <s> sends event after all elements are checked </s>
|
funcom_train/23998664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean increaseHoneyProductionRate() {
int needhoney = checkIncreaseHoneyProductionRate();
if ( needhoney < 0 )
return false;
PlayerProfile prof = Storage.get().getActiveProfile();
if ( needhoney > prof.amountHoney )
return false;
prof.honeyProductionRate++;
prof.amountHoney -= needhoney;
Storage.get().saveProfiles();
return true;
}
COM: <s> increase the honey production rate attribute if possible </s>
|
funcom_train/11784849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String read(String separator) {
undoposition = position;
if (isEmpty()) return null;
final int n = buffer.indexOf(separator, position);
if (n < 0) {
final String result = buffer.substring(position);
position = size;
return result;
} else {
final String result = buffer.substring(position, n);
position = n + separator.length();
return result;
}
}
COM: <s> reads substring terminated by either separator or buffers end </s>
|
funcom_train/21637340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setElementValueByXPath(String xPath, String value) {
if (doc != null) {
try {
Element element = (Element) XPath.selectSingleNode(doc, xPath);
if (element != null) {
element.setText(value);
}
} catch (JDOMException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
COM: <s> sets element value by x path </s>
|
funcom_train/32763152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return "grow behavior: " + growBehavior + ", strut behavior: " + strutBehavior +
", top strut: " + topStrut + ", left strut: " + leftStrut +
", bottom strut: " + bottomStrut + ", right strut: " + rightStrut;
}
COM: <s> implement to string to print summary of constraint </s>
|
funcom_train/49009338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton8() {
if (jButton8 == null) {
jButton8 = new JButton();
jButton8.setText("消除细线");
jButton8.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
Filter filter = new DropThinFilter();
doFilter(filter, true);
}
});
}
return jButton8;
}
COM: <s> this method initializes j button8 </s>
|
funcom_train/3275870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals (Object o) {
if (o == this) return true;
if ((o == null) || (o.getClass() != this.getClass()))
return false;
ChessMove m = (ChessMove) o;
return (orig.equals(m.orig) && dest.equals(m.dest));
}
COM: <s> compares the coordinate data which is still valid </s>
|
funcom_train/27763046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean matches(Object o) {
if (this == o) return true;
if (!(o instanceof Rate)) return false;
final Rate rate = (Rate) o;
if (this.name == rate.getName()) return true;
if (burstNum != rate.burstNum) return false;
if (rateNum != rate.rateNum) return false;
if (!rateUnit.equals(rate.rateUnit)) return false;
return true;
}
COM: <s> p indicates whether some other rate object is matched to this one </s>
|
funcom_train/38527667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Connection getConnection() throws SQLException {
if (transactionManager == null || connectionPool == null) {
throw new SQLException(Messages.EINITDS);
}
try {
return getCachedFactory().getConnection();
} catch (SQLException e) {
throw e;
} catch (Exception ex) {
throw (SQLException) new SQLException(Messages.EOPENCONN)
.initCause(ex);
}
}
COM: <s> obtains a sql connection from the datasource enlisting the connection to </s>
|
funcom_train/1127170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void disconnect() {
boolean disconnected = isConnectedToParameterMap();
String fullyQualifiedName = getFullyQualifiedName();
if (log.isDebugEnabled()) {
log.debug("[disconnect] " + fullyQualifiedName);
}
removeParents();
if (disconnected) {
fireParameterDisconnectedEvent(fullyQualifiedName, new Stack());
}
}
COM: <s> when it is replaced strategy definition parameter </s>
|
funcom_train/20656247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getCmdNew() {
if (cmdNew == null) {
cmdNew = new JButton();
// cmdNew.setText("New"); // Generated
cmdNew.setIcon(new ImageIcon(Config.iconPath + "new.png"));
cmdNew.setToolTipText("New");
cmdNew.setSize(40, 25);
cmdNew.addActionListener(ApplicationManager.application);
}
return cmdNew;
}
COM: <s> this method initializes cmd new </s>
|
funcom_train/27767109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bombPlanetList(Vector np) {
Vector t = ParseReport.getPlanetList();
for (int a = 0; a < t.size(); a++) {
Planet p = (Planet) t.elementAt(a);
if (bombPlanetList.contains(p.getName()) && !np.contains(p)) {
np.addElement(p);
}
}
}
COM: <s> look for bombing runs based on planet names </s>
|
funcom_train/10615280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Permission permission) {
if (isReadOnly()) {
throw new SecurityException(Messages.getString("security.15")); //$NON-NLS-1$
}
if (!(permission instanceof AllPermission)) {
throw new IllegalArgumentException(Messages.getString("security.16", //$NON-NLS-1$
permission));
}
all = permission;
}
COM: <s> adds an all permission to the collection </s>
|
funcom_train/2582954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getKeys() {
List result = Collections.EMPTY_LIST;
if (this.source != null) {
if (this.extract == TableOrder.BY_ROW) {
result = this.source.getColumnKeys();
}
else if (this.extract == TableOrder.BY_COLUMN) {
result = this.source.getRowKeys();
}
}
return result;
}
COM: <s> returns the keys for the dataset </s>
|
funcom_train/8013132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(JPanel c) {
Component comp[] = c.getComponents();
if (comp != null) {
for (int i = 0; i < comp.length; i++) {
if (comp[i] instanceof AbstractButton)
add((AbstractButton) comp[i]);
}
}
}
COM: <s> adds all the buttons in the panel to the group </s>
|
funcom_train/18879367 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DocumentAdapter parse(IDocument pDocument) {
try {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder parser = dbf.newDocumentBuilder();
Document document = parser.parse(new DocumentInputStream(pDocument));
Log.debug("created w3c dom object");
return new DocumentAdapter(document);
} catch (ParserConfigurationException e) {
Log.debug(e);
return null;
} catch (SAXException e) {
Log.debug(e);
return null;
} catch (IOException e) {
Log.debug(e);
return null;
}
}
COM: <s> parses the xml content of the eclipse </s>
|
funcom_train/25295058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File installSoftwareImage(SoftwarePackage swPack, File emuDir) throws IOException {
File softImg;
// Temporarily store the zip file
File tmpDir = FileUtilities.GenerateUniqueDir(new File(props.getProperty("system.tmpdir")));
softImg = downloader.getSoftwareImage(swPack.getId(), tmpDir);
// Unpack the zip into the emulation directory
List<File> unzips = FileUtilities.unZip(softImg, emuDir);
return unzips.get(0);
}
COM: <s> download a software image from the software archive and install it in the </s>
|
funcom_train/8059942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shift(int position, int shiftAmount) {
int start = range.getStart();
if (start >= position) {
start += shiftAmount;
}
int end = range.getEnd();
if (end >= position) {
end += shiftAmount;
}
range = new Range(start, end);
}
COM: <s> shifts this annotation by </s>
|
funcom_train/16796815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void show() {
img = ip.createImage();
ImageCanvas ic = new PlotsCanvas(this);
win = new ImageWindow(this, ic);
IJ.showStatus("");
if (ic.getMagnification()==1.0)
return;
while(ic.getMagnification()<1.0)
ic.zoomIn(0,0);
Point loc = win.getLocation();
int w = getWidth()+20;
int h = getHeight()+30;
Dimension screen = IJ.getScreenSize();
if (loc.x+w>screen.width)
w = screen.width-loc.x-20;
if (loc.y+h>screen.height)
h = screen.height-loc.y-30;
win.setSize(w, h);
win.validate();
repaintWindow();
}
COM: <s> overrides image plus </s>
|
funcom_train/16451293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillTranslationsVector() {
translations = new Vector();
TreeMap translationsMap = bibleStudy.getBibleInformation().getBibleNamesToURLCodes();
Set keySet = translationsMap.keySet();
Iterator iter = keySet.iterator();
while(iter.hasNext()) {
String translation = (String)iter.next();
translations.add(translation);
}
}
COM: <s> this function fills the translations vector </s>
|
funcom_train/47978974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String createNewFileName( String fileName ) {
StringBuilder sb = new StringBuilder();
int pointIndex = fileName.lastIndexOf( "." );
int strLength = fileName.length();
sb.append( fileName.subSequence( 0, pointIndex ) ).append( "_" )
.append( System.currentTimeMillis() )
.append( fileName.substring( pointIndex, strLength ) );
return sb.toString();
}
COM: <s> creates a new file name </s>
|
funcom_train/42039323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Transactional resolveAnnotation(final MethodInvocation methodInvocation) {
Transactional annotation = null;
final Method method = methodInvocation.getMethod();
final Class<?> targetClass = methodInvocation.getThis().getClass().getSuperclass();
if (method.isAnnotationPresent(Transactional.class)) {
annotation = method.getAnnotation(Transactional.class);
} else if (targetClass.isAnnotationPresent(Transactional.class)) {
annotation = targetClass.getAnnotation(Transactional.class);
}
return annotation;
}
COM: <s> returns the transactional annotation if it exists and null if it does not </s>
|
funcom_train/3915239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUp() throws Exception {
// See if we have a testdata dir set from an Ant script
pathTestData = ScormPlayerTestSupport.getTestDataPath();
// Set Properties file to test properties
System.setProperty("scormplayer.properties.file", "uk.ac.reload.scormplayer.testproperties.rb");
}
COM: <s> set some paths to properties file and test folder for testing </s>
|
funcom_train/21438136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLinkagePositions(char[] link_poss, char[] second_p_poss, char second_c_pos) {
bonds = new Vector<Bond>(0,1);
// add second bond
bonds.add(new Bond(second_p_poss,second_c_pos));
// add glycosidic bond
char c_pos = (child==null) ?'?' :child.getAnomericCarbon();
bonds.add(new Bond(link_poss,c_pos));
}
COM: <s> set the positions for the chemical bonds forming this linkage </s>
|
funcom_train/49760345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getJCheckBoxFreeSource() {
if (jCheckBoxFreeSource == null) {
jCheckBoxFreeSource = new JCheckBox();
jCheckBoxFreeSource.setBounds(new Rectangle(15, 100, 161, 21));
jCheckBoxFreeSource.setSelected(true);
jCheckBoxFreeSource.setText("Open Source");
}
return jCheckBoxFreeSource;
}
COM: <s> this method initializes j check box free source </s>
|
funcom_train/3395567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ClassDoc exception() {
ClassDocImpl exceptionClass;
if (!(holder instanceof ExecutableMemberDoc)) {
exceptionClass = null;
} else {
ExecutableMemberDocImpl emd = (ExecutableMemberDocImpl)holder;
ClassDocImpl con = (ClassDocImpl)emd.containingClass();
exceptionClass = (ClassDocImpl)con.findClass(exceptionName);
}
return exceptionClass;
}
COM: <s> return the exception as a class doc impl </s>
|
funcom_train/39282199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int prime(String classname) throws ClassNotFoundException {
log.finer("** priming class rewriter starting with: " + classname);
String[] list = getAllClassReferencesRecursively(classname);
for (int i = 0; i < list.length; i++) {
Class c = loadClass(list[i], false);
// fire the static initializer (side-effect)
try {
c.getDeclaredField(Rewriter.STATIC_TRIGGER).get(null);
} catch (Exception ex) {
throw new RewriterException("invoking static triggers", ex);
}
}
clearLookupCache();
return list.length;
}
COM: <s> prime the rewriter doing a breadth first search loading </s>
|
funcom_train/12758879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void cancelChanges(boolean callRefresh) {
if (!changes.isEmpty()) {
int answer = JOptionPane.showConfirmDialog(this,
"You have changes, are you sure you wish to cancel ?",
"Confirm Cancel", JOptionPane.YES_NO_OPTION);
if (answer == JOptionPane.YES_OPTION) {
clearChanges(callRefresh);
}
} else {
clearChanges(callRefresh);
}
}
COM: <s> cancel the current changes </s>
|
funcom_train/26273212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInterfaceClass(String interfaceNames ) {
if ( interfaceClassList == null )
interfaceClassList = new ArrayList(3);
String values[] = StringUtils.splice( interfaceNames );
for ( int k=0; k<values.length; ++k ) {
if ( !interfaceClassList.contains( values[k]) )
interfaceClassList.add( interfaceNames );
}
}
COM: <s> creates a fresh interface list collection with the supplied </s>
|
funcom_train/8334049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setHasInstances(boolean hasInstances) {
// System.out.println("has instances set to " + hasInstances);
boolean oldHasInstances = this.hasInstances;
this.hasInstances = hasInstances;
propertyChangeSupport.firePropertyChange(PROP_HASINSTANCES, oldHasInstances, hasInstances);
}
COM: <s> set the value of has instances </s>
|
funcom_train/20894684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private State getStateForFake(String name) {
String[] splits = name.split("XX");
if (splits.length<2)
throw new RuntimeException("\""+name+"\" has improper format");
Set states = fsm.getStates();
Iterator it = states.iterator();
while (it.hasNext()) {
State st = (State)it.next();
if (st.toString().matches(splits[1]+".*")) {
return st;
}
}
return null;
}
COM: <s> get the code state code of the real state of the given </s>
|
funcom_train/867776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void storeLocalVar( int varIndex ) {
Operation op;
switch( varIndex ) {
case 0: op = OP_setlocal0; break;
case 1: op = OP_setlocal1; break;
case 2: op = OP_setlocal2; break;
case 3: op = OP_setlocal3; break;
default:
instructions.append( OP_setlocal, varIndex );
return;
}
instructions.append( op );
}
COM: <s> pop the stack and store into a local variable </s>
|
funcom_train/44869390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private WCMExpressionFunctionBean getVolume() {
if (volume == null) {
volume = new WCMExpressionFunctionBean();
volume
.setDefinition("abs(pi*numInt(t,a,b,(((f(t)>axis & g(t)>axis)|(f(t)<axis & g(t)<axis))?(abs((f(t)-axis)^2-(g(t)-axis)^2)):((abs(f(t))>abs(g(t)))?((f(t))^2):((g(t))^2)))))");
volume.setParser(getParser());
volume.setVariable(getXVar());
}
return volume;
}
COM: <s> this method initializes volume </s>
|
funcom_train/47270927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mousePressed(MouseEvent me) {
// process events only from this components
if(me.getSource() == this && this.isEnabled() && this.isRepeatEnabled()) {
this.pressed = true;
if(!this.timer.isRunning()) {
this.modifiers = me.getModifiers();
this.timer.setInitialDelay(this.initialDelay);
this.timer.start();
}
}
}
COM: <s> handle mouse pressed events </s>
|
funcom_train/3090131 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String stripName(String str, String bounder, String bounder2) {
println("stripName l:" + bounder + ",r:" + bounder2 + ", p:" + str, Config.OUTPUT_LEVEL_MAX);
return str.substring(str.indexOf(bounder) + 1, str.lastIndexOf(bounder2));
}
COM: <s> get substring from string that is embraced by </s>
|
funcom_train/51605213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonFeaturesStatistics() {
if (jButtonFeaturesStatistics == null) {
jButtonFeaturesStatistics = new JButton();
jButtonFeaturesStatistics.setText(Messages.getMessage(Messages.plantationStatistics));
jButtonFeaturesStatistics.setIcon(new ImageIcon(getClass()
.getResource("/net/sf/cannagrower/images/klipper_dock_16.png")));
jButtonFeaturesStatistics
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
statisticsOpen();
}
});
}
return jButtonFeaturesStatistics;
}
COM: <s> this method initializes j button features statistics </s>
|
funcom_train/27779234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processFullMail(InputStream msgIn) throws MessagingException{
setMessage(new MimeMessage(currentSession, msgIn));
//setRawMessage(new String(fullMessage));
//if ((getRawMessage() != null) && (getMessage() != null)){
FilterManager manager = new FilterManager(getRawMessage(), getMessage());
manager.start();
//}
}
COM: <s> processes the full mail including the headers </s>
|
funcom_train/4530960 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sync() throws IOException {
if (sync != null && lastSyncPos != out.getPos()) {
out.writeInt(SYNC_ESCAPE); // mark the start of the sync
out.write(sync); // write sync
lastSyncPos = out.getPos(); // update lastSyncPos
}
}
COM: <s> create a sync point </s>
|
funcom_train/9266758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void restoreState() {
Lib.debug(dbgThread, "Running thread: " + currentThread.toString());
Lib.assertTrue(Machine.interrupt().disabled());
Lib.assertTrue(this == currentThread);
Lib.assertTrue(tcb == TCB.currentTCB());
Machine.autoGrader().runningThread(this);
status = statusRunning;
if (toBeDestroyed != null) {
toBeDestroyed.tcb.destroy();
toBeDestroyed.tcb = null;
toBeDestroyed = null;
}
}
COM: <s> prepare this thread to be run </s>
|
funcom_train/23286330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toStringVisibles(){
String result = "";
for(Card c : cards){
if(c.isVisible() && c.isValid()) result += c.toShortString() + " ";
}
return result.length() < 2 ? "" : result.substring(0,result.length() - 1);
}
COM: <s> returns a string describing every visible card </s>
|
funcom_train/20043381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _getStateAsProperty() {
boolean res = true;
PropertyState propState = oObj.getStateAsProperty();
if (propState == null) {
log.println("the returned PropertyState is null -> FALSE");
res = false;
}
tRes.tested("getStateAsProperty()", res);
}
COM: <s> test is ok if code get state as property code returns </s>
|
funcom_train/3033554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String copyNew(String ostr, String nstr) {
if ((nstr == null) && (ostr != null))
udebug.dprintln("losing date: " + ostr + ", this=" +
GdbiIndi.toString(this));
assert ((nstr != null) || (ostr == null));
return (nstr == null) ? ostr : nstr;
}
COM: <s> we sometimes lose birth death info instead of adding it </s>
|
funcom_train/49159235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Match getMatch(int row) {
if (SchedulerEvents[row] instanceof GameDayMatchesEvent) {
GameDayMatchesEvent gameDay = (GameDayMatchesEvent) SchedulerEvents[row];
Match match = gameDay.getMatch(team);
if (match != null) {
return match;
} else {
return null;
}
} else {
return null;
}
}
COM: <s> returns the match of a event </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.