__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/51222403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics2D g) {
Color currentColor = g.getColor();
Stroke currentStroke = g.getStroke();
// paint the white background
g.setColor(Color.WHITE);
g.drawLine(this.x1, this.y1, this.x2, this.y2);
// paint the line
g.setColor(Color.BLACK);
g.setStroke(ConnectionLine.stroke);
g.drawLine(this.x1, this.y1, this.x2, this.y2);
// reset line properties
g.setStroke(currentStroke);
g.setColor(currentColor);
}
COM: <s> paint the connection </s>
|
funcom_train/19130549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSerialNumber() throws CommPortException {
MTCSerialNumberCommand cmd = new MTCSerialNumberCommand();
try {
port.addCommPortEvent(cmd);
port.open();
port.write(cmd.getSendBytes());
} finally {
if (port != null) {
port.removeCommPortEvent();
port.close();
}
}
return cmd.toString();
}
COM: <s> sends the get serial number command </s>
|
funcom_train/37829986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isReachableSlot(final Player player, final RPSlot baseSlot) {
if (!(baseSlot instanceof EntitySlot)) {
return false;
}
EntitySlot slot = (EntitySlot) baseSlot;
slot.clearErrorMessage();
boolean res = slot.isReachableForTakingThingsOutOfBy(player);
if (!res) {
logger.debug("Unreachable slot");
player.sendPrivateText(slot.getErrorMessage());
}
return res;
}
COM: <s> check the reachability of a slot </s>
|
funcom_train/17142695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void matchLines() {
_matchingOH = LetterTaskFactory.matchPolygonToLetterUsingTask(
getPolygon(), _cleanedupPolygon, _rulesArrayForLetterMatching);
if (_matchingOH == null) {
System.out.println("\n\nLetter matched failed for this:\n" + _cleanedupPolygon);
}
showMessage("","Letter match result: " + _matchingOH);
}
COM: <s> this does really not belong in a vectorizer </s>
|
funcom_train/49788986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAction() throws Exception {
// copy model
copyFiles();
IFolder outputFolder = getProject().getFolder("output");
assertNotExists(outputFolder);
// do the action
runAction(new GenerateCodeAction(), targetModel);
// the output folder should now be created
assertExists(outputFolder);
// a sitemap should have been created
IFile sitemap = outputFolder.getFile("sitemap.html");
assertExists(sitemap);
}
COM: <s> test the code generation action </s>
|
funcom_train/13596154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
/*Runnable runnable = new Runnable() {
public void run() {
try {
while (true) {
if (ProjectUtil.getAudioPlayer()
.getNumberOfFilesinQueue() > 0) {
setPlayButtonStatePlaying();
setPlaying(true);
Thread.sleep(500);
} else {
Thread.sleep(500);
setPlayButtonStateStop();
setPlaying(false);
}
// Thread.yield();
}
} catch (InterruptedException e) {
// TODO AjVR: Handle exception properly
}
}
};
thread = new Thread(runnable);
thread.start();*/
}
COM: <s> contains bugfix for bug 1650401 audio playback buttons causing runaway </s>
|
funcom_train/44710827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Page buildDeniedPage() {
Page p = PageFactory.buildPage("admin", new Label(new GlobalizedMessage
("ui.admin.dispatcher.accessDenied", BUNDLE_NAME)));
Label label = new Label(GlobalizationUtil.globalize("ui.admin.access_denied"));
label.setClassAttr("AccessDenied");
p.add(label);
p.lock();
return p;
}
COM: <s> generic access denied page for the admin section </s>
|
funcom_train/3410038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSoLinger() throws SocketException {
if (isClosed())
throw new SocketException("Socket is closed");
Object o = getImpl().getOption(SocketOptions.SO_LINGER);
if (o instanceof Integer) {
return ((Integer) o).intValue();
} else {
return -1;
}
}
COM: <s> returns setting for so linger </s>
|
funcom_train/15605034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean propertyExists(String propertyName, GenomicEntity lastSelection) {
if (lastSelection.getProperty(propertyName)!=null &&
lastSelection.getProperty(propertyName).getInitialValue()!=null &&
!lastSelection.getProperty(propertyName).getInitialValue().equals("")) return true;
else return false;
}
COM: <s> helper method that checks if a property needed to name a bookmark exists </s>
|
funcom_train/46460298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isArrayOrCollectionItem() {
XMLProperty parent = getParentProperty();
if(parent!=null) {
parent = parent.getParentProperty();
return(parent!=null&&"arraycollection".indexOf(parent.getPropertyType())>=0); //$NON-NLS-1$
}
return false;
}
COM: <s> determines if this is the child of an array or collection item </s>
|
funcom_train/22278098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int minWidth() {
Font font;
int width = 0;
if (image != null)
width = image.width();
if (selectedImage != null)
if (selectedImage.width() > width)
width = selectedImage.width();
font = font();
if (font != null)
width += font.fontMetrics().stringWidth(title);
// Beware of magic constant! ALERT!
if (width > 0) {
width += 3;
}
return width;
}
COM: <s> returns the minimum width required to display the list items title </s>
|
funcom_train/18021109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void query(CompletionResultSet resultSet) {
assert (resultSet != null);
assert (SwingUtilities.isEventDispatchThread());
if (component != null) {
doc = component.getDocument();
} else {
doc = null;
}
queryInvoked = true;
synchronized (this) {
performQuery(resultSet);
}
}
COM: <s> called by completion infrastructure in awt thread to populate </s>
|
funcom_train/22429189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextArea getTxtSkipURL() {
if (txtSkipURL == null) {
txtSkipURL = new JTextArea();
txtSkipURL.setFont(new java.awt.Font("Default", java.awt.Font.PLAIN, 11));
txtSkipURL.setSize(new java.awt.Dimension(290,52));
}
return txtSkipURL;
}
COM: <s> this method initializes j text area </s>
|
funcom_train/9506346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(FilterConfig filterConfig) {
this.filterConfig = filterConfig;
LOGIN_PAGE = this.filterConfig.getInitParameter("LOGIN_PAGE");
Enumeration pNames = filterConfig.getInitParameterNames();
while (pNames.hasMoreElements()) {
String key = (String) pNames.nextElement();
params.put(key, this.filterConfig.getInitParameter(key));
}
}
COM: <s> init method for this filter </s>
|
funcom_train/12273301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer str = new StringBuffer();
str.append("[");
str.append(m_name);
if ( hasNameScope()) {
str.append(".");
str.append(m_scope);
}
str.append(":");
str.append(TypeAsString(m_type));
str.append(",");
if ( m_group == true)
str.append("Group,");
else
str.append("Unique,");
if ( getNameNumber() != -1) {
str.append( ",Num=");
str.append( getNameNumber());
}
if ( numberOfAddresses() > 0) {
str.append(",Addrs=");
for (int i = 0; i < numberOfAddresses(); i++) {
str.append(getIPAddressString(i));
str.append("|");
}
}
str.append("]");
return str.toString();
}
COM: <s> return the net bios name as a string </s>
|
funcom_train/32766990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getCurrentMinX() {
if (zoomGridLimitsV.size() == 0) {
if (externalGridLimits == null || externalGridLimits.isSetXmin() == false) {
return getInnerMinX();
} else {
return externalGridLimits.getMinX();
}
} else {
GridLimits gl = (GridLimits) zoomGridLimitsV.lastElement();
if (gl.isSetXmin() == false) {
return getInnerMinX();
}
return gl.getMinX();
}
}
COM: <s> returns the current min x attribute of the function graphs jpanel object </s>
|
funcom_train/34793943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BigInteger getRecordId(String itemid) {
if (checkItemIdentifier(itemid)) {
StringTokenizer token = new StringTokenizer(itemid, ":");
if (token.hasMoreTokens()) {
token.nextToken();
}
if (token.hasMoreTokens()) {
return new BigInteger(token.nextToken());
}
}
return new BigInteger("0");
}
COM: <s> get the recordid from an internal item identifier </s>
|
funcom_train/22551881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUp() {
// explicitly allow all ips to test.
FilterSettings.BLACK_LISTED_IP_ADDRESSES.setValue(new String[] {});
FilterSettings.WHITE_LISTED_IP_ADDRESSES.setValue(new String[] { "*.*" });
HostCatcher.DEBUG = true;
new RouterService(new ActivityCallbackStub());
hc = new HostCatcher();
hc.initialize();
}
COM: <s> returns a new host catcher connected to stubs </s>
|
funcom_train/46384948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel() {
if (jPanel == null) {
jLabel1 = new JLabel();
jLabel1.setText("Fecha de Pago");
jLabel = new JLabel();
jLabel.setText("Monto");
jPanel = new JPanel();
jPanel.setLayout(new BoxLayout(getJPanel(), BoxLayout.Y_AXIS));
jPanel.add(new LabeledComponent(jLabel, getJTextField()));
jPanel.add(new LabeledComponent(jLabel1, getDateButton()));
}
return jPanel;
}
COM: <s> this method initializes j panel </s>
|
funcom_train/18013421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveStateToStream(OutputStream aOutputStream) throws IOException {
boolean zIsPaused=isPausedByPlayer();
setPausedByPlayer(true);
ObjectOutputStream zOOS=new ObjectOutputStream(aOutputStream);
zOOS.writeObject(myConsole);
zOOS.close();
setPausedByPlayer(zIsPaused);
}
COM: <s> save the current game to the stream </s>
|
funcom_train/38866074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int daysInMonth() {
int yr=this.get(Calendar.YEAR);
int mo=this.get(Calendar.MONTH)+1;
int Ndays=31;
if(mo==4 || mo==6 || mo==9 || mo==11) Ndays=30;
if(mo==2) {
if(isLeapYear(yr)) Ndays=29;
else Ndays=28;
}
return Ndays;
}
COM: <s> get the number of days in a month </s>
|
funcom_train/29539073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onShout(final String user, final String message) {
Matcher m = repbot.matcher(message);
if (m.find() && System.currentTimeMillis() > wakeup) {
wakeup = System.currentTimeMillis() + quietTime;
connection.addTimeout(new TimeoutListener() {
public void onTimeout() {
reply(user);
}
}, 2000L);
}
}
COM: <s> checks if a shout is about repbot and outside the quiet period and </s>
|
funcom_train/24474465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addInputs(NameValue param) {
if (localInputs == null) {
localInputs = new NameValue[] {};
}
// update the setting tracker
localInputsTracker = true;
java.util.List list = org.apache.axis2.databinding.utils.ConverterUtil
.toList(localInputs);
list.add(param);
this.localInputs = (NameValue[]) list.toArray(new NameValue[list
.size()]);
}
COM: <s> auto generated add method for the array for convenience </s>
|
funcom_train/16749443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void move(int dx, int dy) {
// to move down right, supply negative values here.
xoff += dx;
yoff += dy;
// check for overflow within tilesize
while (xoff < 0) {
xoff += Tile.SIZE;
tx -= 1;
}
while (xoff > Tile.SIZE) {
xoff -= Tile.SIZE;
tx += 1;
}
while (yoff < 0) {
yoff += Tile.SIZE;
ty -= 1;
}
while (yoff > Tile.SIZE) {
yoff -= Tile.SIZE;
ty += 1;
}
// TODO: check for bounds...
geoFromTiles();
fireChangeListeners();
}
COM: <s> reposition the map window with the given values </s>
|
funcom_train/49806404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void userListPutSafe(jIRCUser user) {
try {
userListMutex.acquire();
userList.put(user.getUsername().toLowerCase(), new jIRCUser(user));
} catch (InterruptedException e) {
Logger.getLogger(jIRCBot.class.getName())
.log(Level.SEVERE, null, e);
e.printStackTrace();
} finally {
userListMutex.release();
}
}
COM: <s> safely adds the passed in user to the user list </s>
|
funcom_train/29771251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetConnection() {
System.out.println("getConnection");
BlueFuseSQLTable instance = null;
Connection expResult = null;
Connection result = instance.getConnection();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get connection method of class sql </s>
|
funcom_train/38855842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initGraphicProperties() {
setFrame(true);
setHeaderVisible(false);
setAutoWidth(true);
setMonitorWindowResize(true);
setLabelAlign(LabelAlign.TOP);
tbxTitle.setFieldLabel(GlobalConstants.text.title());
html.setHeight(235);
html.setFieldLabel(GlobalConstants.text.subject());
}
COM: <s> initialize graphic properties </s>
|
funcom_train/14329371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_serverType() {
String fieldName = "serverType";
String messageKey = Driver.SERVERTYPE;
assertDefaultPropertyByServerType(URL_SQLSERVER, messageKey, fieldName, String.valueOf(Driver.SQLSERVER));
if (!isOnlySqlServerTests()) {
assertDefaultPropertyByServerType(URL_SYBASE, messageKey, fieldName, String.valueOf(Driver.SYBASE));
}
}
COM: <s> test the code server type code property </s>
|
funcom_train/5265068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendDBPacket(P2PConnection connection, PeerID a) {
try {
ByteArrayOutputStream outB = new ByteArrayOutputStream();
outB.write(SEND_DB);
ObjectOutputStream outO = new ObjectOutputStream(outB);
outO.writeObject(a);
synchronized (this) {
outO.writeObject(peers.get(a));
}
outO.flush();
connection.send(outB.toByteArray(), true);
} catch (IOException ex) {
}
}
COM: <s> send the database of a peer </s>
|
funcom_train/7511720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemSurfaceTypes() {
if (jMenuItemSurfaceTypes == null) {
jMenuItemSurfaceTypes = new JMenuItem();
jMenuItemSurfaceTypes.setText(Messages.getString("MainFrame.menu.surfaceType")); //$NON-NLS-1$
registerAction(jMenuItemSurfaceTypes, Actions.SURFACE_TYPES);
}
return jMenuItemSurfaceTypes;
}
COM: <s> this method initializes j menu item surface types </s>
|
funcom_train/12115350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connEtoC11(java.awt.event.ActionEvent arg1) {
try {
// user code begin {1}
// user code end
this.controPartiAggiungiJButton_ActionPerformed(arg1);
// user code begin {2}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {3}
// user code end
handleException(ivjExc);
}
}
COM: <s> conn eto c11 contro parti aggiungi jbutton </s>
|
funcom_train/25369349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getLine(String content, int offset) {
int line = m_RootElement.getElementIndex(offset);
Element lineElement = m_RootElement.getElement(line);
int start = lineElement.getStartOffset();
int end = lineElement.getEndOffset();
return content.substring(start, end - 1);
}
COM: <s> returns the line </s>
|
funcom_train/18801871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateLC(final int rowIndex, final Dimension d0, final Dimension d1) {
this.rowHeights[rowIndex] = Math.max(d0.height, d1.height);
this.totalHeight = this.totalHeight + this.rowHeights[rowIndex];
this.columnWidths[0] = Math.max(this.columnWidths[0], d0.width);
this.columns1to5Width = Math.max(this.columns1to5Width, d1.width);
}
COM: <s> processes a row in lc format </s>
|
funcom_train/21498024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setCorrelationHeaders(MessageContext ctx) {
SOAPHeader header = ctx.getEnvelope().getHeader();
SOAPHeaderBlock correlationBlock = header.addHeaderBlock("correlationID",new OMNamespaceImpl(NS,PREFIX));
correlationBlock.setText(new UID().toString());
SOAPHeaderBlock msgNumberblock = header.addHeaderBlock("nmbOfMessages",new OMNamespaceImpl(NS,PREFIX));
msgNumberblock.setText(String.valueOf(NUMBER_OF_MESSAGES));
}
COM: <s> this method sets the correlation id and the nmb of messages soap headers </s>
|
funcom_train/18190105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void itemStateChanged(ItemEvent e) {
if (selectedLine >= 0) {
if (e.getSource() == jvccbTactics) {
aaTableData[1][selectedLine] = jvccbTactics.getSelectedIndex();
} else if (e.getSource() == jvccbSpeed) {
aaTableData[2][selectedLine] = jvccbSpeed.getSelectedIndex();
}
}
}
COM: <s> invoked when an item has been selected or deselected </s>
|
funcom_train/7618524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBackground(Color c) {
Color oldBkColor;
toolkit.lockAWT();
try {
oldBkColor = backColor;
backColor = c;
} finally {
toolkit.unlockAWT();
}
firePropertyChange("background", oldBkColor, backColor); //$NON-NLS-1$
repaint();
}
COM: <s> sets the background color for the component </s>
|
funcom_train/39466595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String next() {
ths[0]++;
for (int i = 0; i < ths.length; i++) {
if (ths[i] == base) {
ths[i] = ths[i] - base;
if ((i + 1) == ths.length)
ths = Lib.addNewValueAtEnd(1, ths);
else
ths[i + 1] ++;
}
}
String number = "";
for (int i = ths.length - 1; i >= 0; i --)
number += digit[(int) ths[i]];
return number;
}
COM: <s> increases the number with one </s>
|
funcom_train/25637930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Content getNavLinkClass() {
Content linkContent = new RawHtml(getLink(new LinkInfoImpl(
LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc, "",
configuration.getText("doclet.Class"), false)));
Content li = HtmlTree.LI(linkContent);
return li;
}
COM: <s> get class page link </s>
|
funcom_train/49890862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireResponseReceived(final AbstractBody response) {
assertUnlocked();
BOSHMessageEvent event = null;
for (BOSHClientResponseListener listener : responseListeners) {
if (event == null) {
event = BOSHMessageEvent.createResponseReceivedEvent(
this, response);
}
try {
listener.responseReceived(event);
} catch (Exception ex) {
LOG.log(Level.WARNING, UNHANDLED, ex);
}
}
}
COM: <s> notifies all response listeners that the specified response has been </s>
|
funcom_train/18582842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createDB() {
try {
eCat = new EnhancedCatalog("LastSeenPatients.TAPS.DATA",
Catalog.READ_ONLY);
if (eCat.isOpen())
eCat.delete();
eCat = new EnhancedCatalog("LastSeenPatients.TAPS.DATA",
Catalog.CREATE);
if (eCat.isOpen()) {
eCat.addRecord(" ");
//eCat.setRecordPos(0);
}
} catch (Exception e) {
e.printStackTrace();
} finally {
if (eCat != null && eCat.isOpen())
eCat.close();
}
}
COM: <s> this method creates last seen patients database </s>
|
funcom_train/35175459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int AddOptions(String str1, String str2, String str3, String str4, String str5, String str6, String str7, String str8) {
return SetOption(str1, str2, str3, str4, str5, str6, str7, str8);
}
COM: <s> beanshell script does not support using </s>
|
funcom_train/40117780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void simEventOccurred(SimEvent e) {
System.out.println("sim event at " + e.getTime());
timeAchievedListener = new TimeAchievedListener(e.getTime());
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
timeAchievedListener.timeAchieved();
}
});
}
COM: <s> take event delivered by sim exec thread and put it on </s>
|
funcom_train/43244814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetVistAWebService() {
System.out.println("getVistAWebService");
VistAConnection instance = new VistAConnection();
VistAServices expResult = null;
VistAServices result = instance.getVistAWebService();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get vist aweb service method of class org </s>
|
funcom_train/31755816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean getProperty(String key, boolean def) {
boolean result = def;
String str = config.getProperty(key);
if (str != null && !"".equals(str)) {
try {
result = Boolean.parseBoolean(str);
} catch (Exception e) {
logger.error("Wrong boolean property for " + key + " = " + str);
result = def;
}
}
return result;
}
COM: <s> get the listeners boolean property with the given key </s>
|
funcom_train/47193839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Graphics drawMiniMap(Graphics g, float resizeFactor) {
for (Player pl : list) {
g.setColor(pl.color);
g.fillRect((int) (pl.xPos * Config.xRes / 1000 * resizeFactor),
(int) (pl.yPos * Config.yRes / 1000 * resizeFactor), 2, 2);
}
return g;
}
COM: <s> draws the players on the minimap </s>
|
funcom_train/18009935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addMatchScore(Game game, Player player, Font font) {
matchScore.setFont(font);
setMatchScore(game, player);
JPanel panel = getBorderPanel(matchScore);
add(panel, new TableLayoutConstraints(0,1,0,1,TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));
}
COM: <s> p adds the match score to this panel </s>
|
funcom_train/3970690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XsqlFilterResult generateSql(String sourceXsql, Object filters) {
XsqlFilterResult sfr = applyFilters(sourceXsql, filters);
return new XsqlFilterResult(replaceKeyMaskWithString(sfr.getXsql(), sfr.getAcceptedFilters(),"?"),sfr.getAcceptedFilters());
}
COM: <s> source xsql sql key key key value </s>
|
funcom_train/18229406 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isReadAccess() {
if (this == EVENT) {
return javax.swing.SwingUtilities.isEventDispatchThread();
}
Thread t = Thread.currentThread();
ThreadInfo info;
synchronized (LOCK) {
info = getThreadInfo(t);
if (info != null) {
if (info.counts[S] > 0) {
return true;
}
}
}
return false;
}
COM: <s> tests whether this thread has already entered the mutex in read access </s>
|
funcom_train/45395832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void compile () {
try {
log.info("Compiling: " + source);
Class<? extends GroovyObject> sc = gcl.parseClass(source.getInputStream());
this.original = ReflectionUtil.newInstance(sc, new Class[0]);
} catch (CompilationFailedException e) {
log.warn("Could not compile: " + source, e);
} catch (IOException e) {
log.warn("Error accessing source: " + source, e);
}
}
COM: <s> compile the source and store a new instance of it </s>
|
funcom_train/17046369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addInt(int value, int numBits) {
final int result = bidx;
if (locked) return result;
_string = null;
//NOTE: low bits end up with low bit indexes, appearing reversed in output.
for (int bit = 0; bit < numBits; ++bit) {
if (get(value, bit)) {
bits.set(bidx);
}
++bidx;
}
return result;
}
COM: <s> add up to num bits lowest bits of the given integer </s>
|
funcom_train/42263676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateStyle(JComponent c) {
SeaGlassContext context = getContext(this, ENABLED);
SynthStyle oldStyle = style;
style = SeaGlassLookAndFeel.updateSeaglassStyle(context, this);
if (style != oldStyle) {
titleSpacing = style.getInt(context, "InternalFrameTitlePane.titleSpacing", 2);
}
context.dispose();
}
COM: <s> update the synth style </s>
|
funcom_train/18427939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DatasetSelectionState getSelectionState(Dataset dataset) {
Iterator iterator = this.selectionStates.iterator();
while (iterator.hasNext()) {
DatasetAndSelection das = (DatasetAndSelection) iterator.next();
if (das.getDataset() == dataset) {
return das.getSelection();
}
}
// we didn't find a selection state for the dataset...
return null;
}
COM: <s> returns the selection state if any that this source is maintaining </s>
|
funcom_train/13590457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean intersects(final Rect other) {
if ((this.maxX-this.minX) <= 0 || (this.maxY-this.minY) <= 0) {
return false;
}
return (other.maxX > this.minX &&
other.maxY > this.minY &&
other.minX < this.maxX &&
other.minY < this.maxY);
}
COM: <s> tests if the interior of this code rect code </s>
|
funcom_train/49199883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addModuleCategoryPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ModuleCategoryLink_moduleCategory_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ModuleCategoryLink_moduleCategory_feature", "_UI_ModuleCategoryLink_type"),
ExhibitionPackage.Literals.MODULE_CATEGORY_LINK__MODULE_CATEGORY,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the module category feature </s>
|
funcom_train/8615599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveDocument() {
if (null == webForm) {
saveDocumentAs();
return;
}
try {
PrintWriter pw = new PrintWriter(new FileWriter(webForm));
for (int i = 0; i < formComponents.size(); i++) {
pw.println(formComponents.get(i));
}
pw.close();
} catch(IOException e) {
System.out.println("Save Failed! Blame Java!");
}
}
COM: <s> handles saving a new document </s>
|
funcom_train/32959150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DocXML getDocXML( ) throws Exception {
DocBase d = getDoc();
if (d==null) return null;
if (!(d instanceof DocXML)) {
TolvenLogger.info( "Document is not CCR " + d.getId() + " Class: " + d.getClass().getName(), DocAction.class);
return null;
}
return (DocXML) d;
}
COM: <s> type safe method to return the current xml based document if any </s>
|
funcom_train/11412828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object rhinoEvaluate(final String jsExpression) {
return runInsideContext(Object.class, new JSRunnable<Object>() {
public Object run(Context context) {
return rhinoContext.evaluateString(rhinoScope, jsExpression, "<testcase>", 1, null);
}
});
}
COM: <s> evaluate a javascript expression returning the raw rhino object </s>
|
funcom_train/34261216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildOkButton() {
this.getOkButton().addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
// Must end with .jar
if (mustBeAJar() &&
shouldContinueWithExport() &&
directoryExists()) {
ok = true;
getExportDialog().shutdown();}
}
});
}
COM: <s> builds the export button </s>
|
funcom_train/21644731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Component getNextTurnButton() {
if (nextTurnButton == null) {
nextTurnButton = new JButton("Next Turn");
nextTurnButton.setMnemonic('N');
nextTurnButton.setDisplayedMnemonicIndex(0);
nextTurnButton.setHorizontalTextPosition(SwingConstants.CENTER);
nextTurnButton.setVerticalTextPosition(SwingConstants.BOTTOM);
nextTurnButton.addActionListener(eventHandler);
nextTurnButton.setVisible(false);
}
return nextTurnButton;
}
COM: <s> return the next turn button </s>
|
funcom_train/21016078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void shiftPreviousElementsY(double shift) {
for (int i = 0; i < _locationCalculator._currentLocation; i++) {
Geometry.translateRect(_locations[i], 0, shift);
// TODO copied from LocationCalculator.putLocation()
_height = Math
.max(_height, _locations[i].getY()
+ _locations[i].getHeight()
+ _composite.getPaddingBottom());
}
}
COM: <s> shifts all already calculated locations along the y axis </s>
|
funcom_train/48536024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getLowSLOC() {
float lowSLOC = 65534;
float currentSLOC = 65534;
// Recursively look through subfolder's for the lowest SLOC
for (SFolder folder : subFolders) {
currentSLOC = folder.getLowSLOC();
if (currentSLOC < lowSLOC) {
lowSLOC = currentSLOC;
}
}
// Look at all the files for a lower SLOC
for (SFile file : allFiles) {
if (file.getSourceLines() < lowSLOC) {
lowSLOC = file.getSourceLines();
}
}
return lowSLOC;
}
COM: <s> gets the lowest sloc recursively looks at all subfolder and files </s>
|
funcom_train/50487381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double doubleValue(int part) {
//TODO: implement this java.lang.Number abstract method;
//@todo: make sure that BOTH parts of the Complex can be returned
// e.g. by adding a parameter to doubleValue() with one default
// when no par given.
double result;
switch (part) {
case IMAGINARY:
{
result = this.i;
break;
}
case REAL: // default
default:
result = this.r;
}
return result;
}
COM: <s> returns the double value of the strong given strong part of this </s>
|
funcom_train/12768703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String filter(String string) {
if (string == null) return "";
StringBuilder builder = new StringBuilder(string);
for (int i = 0; i < builder.length(); i++) {
char c = builder.charAt(i);
String replacement = getReplacement(c);
if (replacement.equals(""+c)) continue;
builder.replace(i, i+1, replacement);
i = i + replacement.length()-1;
}
return builder.toString();
}
COM: <s> filters the given string for illegal characters and returns the result </s>
|
funcom_train/45450185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuilder result = new StringBuilder("Organization(");
result.append("id=").append(getId()).append(",");
result.append("name=\"").append(name).append("\")");
return result.toString();
}
COM: <s> returns a string representation of this organization </s>
|
funcom_train/19964861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getHelpCommand() {
if (helpCommand == null) {//GEN-END:|22-getter|0|22-preInit
// write pre-init user code here
helpCommand = new Command("Help", Command.HELP, 3);//GEN-LINE:|22-getter|1|22-postInit
// write post-init user code here
}//GEN-BEGIN:|22-getter|2|
return helpCommand;
}
COM: <s> returns an initiliazed instance of help command component </s>
|
funcom_train/18572280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void expireSessions() {
Enumeration<NinanSessionInternal> keys = ninanSessions.keys();
while (keys.hasMoreElements()) {
NinanSessionInternal aSession = keys.nextElement();
if (aSession.getLastActive() + EXPIRE_RMI_SESSION_MS < System.currentTimeMillis()) {
logger.info("Expiring RMI session for " + ninanSessions.get(aSession));
ninanSessions.remove(aSession);
}
}
}
COM: <s> expire rmi sessions that have not seen any action for some time </s>
|
funcom_train/12642909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setZoneStrings(String[][] newZoneStrings) {
String[][] aCopy = new String[newZoneStrings.length][];
for (int i = 0; i < newZoneStrings.length; ++i)
aCopy[i] = duplicate(newZoneStrings[i]);
zoneStrings = aCopy;
}
COM: <s> sets timezone strings </s>
|
funcom_train/18874573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextArea getResultTextArea() {
if (resultTextArea == null) {
resultTextArea = new JTextArea();
resultTextArea.setFont(new Font("Courier New", Font.PLAIN, 12));
resultTextArea.setEditable(false);
resultTextArea.setPreferredSize(new Dimension(800, 600));
}
return resultTextArea;
}
COM: <s> this method initializes result text area </s>
|
funcom_train/45796055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void tick() {
VectorState tmp = prevState;
prevState = state;
state = tmp;
state.setAll(0.0f);
for (Enumeration e = unitList.elements(); e.hasMoreElements();) {
((MappedOperator) (e.nextElement())).tick(prevState, state);
}
}
COM: <s> use the current state as input </s>
|
funcom_train/18349699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CapCommonClass loadClass(Platform platform, String className, List retval) {
logger.info("LucenePlatform loading " + className);
CapCommonClass retclz = null;
try {
// get hold of the CapCommonClass
retclz = CapCommonClass.forName(className);
} catch (Exception e) {
throw new CapServiceException(e);
}
try {
SimpleQuery query = Q.defaultQ(retclz);
execute(query, platform);
} catch(Exception e) {
throw new CapServiceException(e);
}
return retclz;
}
COM: <s> used for loading the classes at the the boot time </s>
|
funcom_train/46040861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HttpResponseBuilder setStrictNoCache() {
headers.put("Cache-Control", Lists.newLinkedList("no-cache"));
headers.put("Pragma", Lists.newLinkedList("no-cache"));
headers.remove("Expires");
return this;
}
COM: <s> sets cache control headers indicating the response is not cacheable </s>
|
funcom_train/48024367 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParams(Map<String, Object> params){
for (Iterator i=params.entrySet().iterator();i.hasNext();){
Entry<String,Object> param = (Entry<String, Object>) i.next();
setParam(param.getKey(), param.getValue());
}
}
COM: <s> sets list of parameters </s>
|
funcom_train/14661846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getReplaceNComboBox() {
if (replaceNComboBox == null) {
replaceNComboBox = new JComboBox();
replaceNComboBox.setPreferredSize(new Dimension(50, 25));
replaceNComboBox.setMinimumSize(new Dimension(50, 25));
replaceNComboBox.setEnabled(false);
}
return replaceNComboBox;
}
COM: <s> this method initializes replace ncombo box </s>
|
funcom_train/3445784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update() {
try {
disableNotify();
clear();
for (int i = 0; i < col.size(); i++) {
if (col.isValueUndefined(i)) {
setValueUndefined(i, true);
} else {
set(i, fn.apply(col.getDoubleAt(i)));
}
}
} finally {
enableNotify();
}
}
COM: <s> recompute the new values when the initial column </s>
|
funcom_train/2854051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Binding (String name, String fieldName) {
super (name);
if (fieldName == null)
throw new NullPointerException("null field name");
if (fieldName.equals(""))
throw new IllegalArgumentException("missing field name");
this.fieldName = fieldName;
}
COM: <s> create a binding between an xml name tag or attribute name </s>
|
funcom_train/4403442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public RangeSensorBelt addBumperBeltSensor(Agent agent) {
// double agentHeight = agent.getHeight();
double agentRadius = agent.getRadius();
RangeSensorBelt bumperBelt = new RangeSensorBelt((float) agentRadius - 0.1f, 0f, 0.2f, 9, RangeSensorBelt.TYPE_BUMPER, 0);
bumperBelt.setUpdatePerSecond(6);
bumperBelt.setName("bumpers");
Vector3d pos = new Vector3d(0, 0, 0.0);
agent.addSensorDevice(bumperBelt, pos, 0);
return bumperBelt;
}
COM: <s> adds a prebuild belt of bumpers sensor to the agent </s>
|
funcom_train/16565303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(int index) {
if (index < 0 || index >= size)
throw new IllegalArgumentException("required: (index >= 0 && index < size) but: (index = " + index + ", size = " + size + ")");
for (int i = index + 1; i < size; i++)
value[i-1] = value[i];
size--;
}
COM: <s> removes the value at the specified index </s>
|
funcom_train/21483935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAPIObjectCompatibility() throws CacheException {
Cache cache = getTest1Cache();
Object objectKey = new Object();
Object objectValue = new Object();
cache.put(objectKey, objectValue);
//Cannot get it back using get
Object retrievedElement = cache.get(objectKey);
assertNotNull(retrievedElement);
//Test that equals works
assertEquals(objectValue, retrievedElement);
}
COM: <s> does the object api work </s>
|
funcom_train/17157577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVisualPrefs() {
this.ui.dayViewTableWidget.horizontalHeader()
.setStretchLastSection(true);
this.ui.weekViewTableWidget.horizontalHeader()
.setResizeMode(QHeaderView.ResizeMode.Interactive);
this.setContextMenuPolicy(ContextMenuPolicy.CustomContextMenu);
this.updateView();
this.updateDayView();
}
COM: <s> adjust view appearence </s>
|
funcom_train/33398698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JPanel getVideoPanel() {
if (videoPanel == null) {
videoPanel = new JPanel();
videoPanel.setLayout(new BorderLayout());
// videoPanel.setLayout(new FlowLayout(FlowLayout.CENTER));
// TitledBorder
// mediaBorder = new TitledBorder(
// BorderConstants.etchedBorder, "Media" );
// videoPanel.setBorder(mediaBorder);
videoPanel.setBackground(SystemColor.controlShadow);
}
return videoPanel;
}
COM: <s> this method initializes video panel </s>
|
funcom_train/3338454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public V getValue() throws SyntaxMultiplicityException {
checkArgumentsSet();
int size = values.size();
if (size == 0) {
return null;
} else if (size == 1) {
return values.get(0);
} else {
throw new SyntaxMultiplicityException(
label + " is bound to " + size + " values");
}
}
COM: <s> get this arguments single bound value </s>
|
funcom_train/22138920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Principal resolvePrincipal(final Credentials credentials) {
final UsernamePasswordCredentials usernamePasswordCredentials = (UsernamePasswordCredentials) credentials;
if (log.isDebugEnabled()) {
log.debug("Creating SimplePrincipal for ["
+ usernamePasswordCredentials.getUsername() + "]");
}
return new SimplePrincipal(usernamePasswordCredentials.getUsername());
}
COM: <s> constructs a simple principal from the username provided in the </s>
|
funcom_train/2389080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getTxtUsername() {
if (txtUsername == null) {
txtUsername = new JTextField();
txtUsername.setBounds(new java.awt.Rectangle(108,19,145,20));
txtUsername.setText("Name");
txtUsername.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
if(txtUsername.getText().equals("Name"))
txtUsername.selectAll();
}
});
}
return txtUsername;
}
COM: <s> this method initializes txt username </s>
|
funcom_train/7531326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public void newMessage(QueryReplyMessage queryReply) {
QueryReplyWaiter waiter = (QueryReplyWaiter)mWaiters.get(queryReply.getGUID());
Log.v("MyMessage", "MessageManager#newMessage: waiter"+waiter);
Log.v("MyMessage", "MessageManager#newMessage: queryReply.getGUID() "+queryReply.getGUID());
waiter.newQueryReply(queryReply);
}
COM: <s> invoked when a new query reply message was received </s>
|
funcom_train/34673235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CommandArg invokeService(String commandName, CommandArg arguments) throws BaseException {
AbstractCommand command=newCommand(commandName);
arguments.setCallersCore(new CoreUserImpl(getCoreUser()));
command.setArgs(arguments);
command.invoke();
return command.getArgs();
}
COM: <s> create an instance of the specified command and invoke it with the </s>
|
funcom_train/46290480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHighestTransactionIDIndex(TransactionID newTransactionID) throws Exception {
if (newTransactionID == null) {
throw new IllegalArgumentException("newTransactionID null");
}
if (highestTransactionIDIndex != null) {
if (newTransactionID.compareTo(highestTransactionIDIndex) > 0) {
highestTransactionIDIndex = newTransactionID;
}
} else {
highestTransactionIDIndex = newTransactionID;
}
}
COM: <s> set if its higher than the current one </s>
|
funcom_train/1332991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor fetchStarting(Long dateTime) {
return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_DATE,
KEY_PAYEE, KEY_AMOUNT, KEY_CATEGORY, KEY_MEMO, KEY_TAG}, KEY_DATE + " >= ?",
new String[] {dateTime.toString()}, null, null, KEY_DATE + " desc");
}
COM: <s> fetch all entries starting at date time </s>
|
funcom_train/15719988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getYmax() {
DataSet d;
double max=0.0;
if(dataset == null | dataset.isEmpty() ) return max;
for (int i=0; i<dataset.size(); i++) {
d = ((DataSet)dataset.elementAt(i));
if(i==0) max = d.getYmax();
else max = Math.max(max,d.getYmax());
}
return max;
}
COM: <s> get the maximum y value of all attached data sets </s>
|
funcom_train/23764053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Logger getLogger(String name) {
Logger slogger = null;
// protect against concurrent access of the loggerMap
synchronized (this) {
slogger = (Logger) loggerMap.get(name);
if (slogger == null) {
slogger = new SimpleLogger(name);
loggerMap.put(name, slogger);
}
}
return slogger;
}
COM: <s> return an appropriate </s>
|
funcom_train/51078374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newView() {
if (view() == null) {
return;
}
DrawApplication window = createApplication();
window.open(view());
if (view().drawing().getTitle() != null ) {
window.setDrawingTitle(view().drawing().getTitle() + " (View)");
}
else {
window.setDrawingTitle(getDefaultDrawingTitle() + " (View)");
}
window.setBackground(Color.white);
}
COM: <s> open a new view for this application containing a </s>
|
funcom_train/45622155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initSearcher() throws IOException {
synchronized (this.searcherMonitor) {
if (getDirectory()!=null ) {
Searcher searcher = new IndexSearcher(getDirectory());
this.target = new SimpleSearcherWrapper(searcher);
} else if (getIndexFactory()!=null ) {
this.target = getIndexFactory().getIndexReader().createSearcher();
}
this.indexSearcher = getCloseSuppressingConnectionProxy(this.target);
}
}
COM: <s> initialize the underlying shared searcher </s>
|
funcom_train/14071060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isX10() {
// check unit code for correctness
char hc = deviceId.charAt(0);
if (hc >= 'A' && hc <= 'P') {
try {
int code = Integer.parseInt(deviceId.substring(1));
return (code >= 1 && code <= 16);
}
catch (NumberFormatException e) {
// do nothing - fall through
}
}
return false;
}
COM: <s> type of physical device based on the id at this point </s>
|
funcom_train/12803320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String generateSource() {
CodeBuffer buffer = new CodeBuffer();
checkContents();
generateCopyrightComments(buffer);
generatePackage(buffer);
generateImports(buffer);
generateClassComments(buffer);
generateClassDefinition(buffer);
generateFields(buffer);
generateConstructors(buffer);
generateSettersAndGetters(buffer);
generateMethods(buffer);
generateEndOfFile(buffer);
return buffer.toString();
}
COM: <s> generate the java source representation of the source file </s>
|
funcom_train/41163388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(OpenResponse entity) {
EntityManagerHelper.log("saving OpenResponse 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 open response entity </s>
|
funcom_train/8342539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFormatDisplay(final PageFormat format) {
boolean landscape = false;
double swap;
double width = (format.getWidth() / 72.0d);
double height = (format.getHeight() / 72.0d);
String displayString;
if (format.getOrientation() == PageFormat.LANDSCAPE) {
landscape = true;
swap = width;
width = height;
height = swap;
}
displayString = buildFormatString(landscape, width, height);
pageFormatDisplay.setText(displayString);
}
COM: <s> sets the displayed page format </s>
|
funcom_train/42398982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected NewConcreteType createSerializableFactory(final String newTypeName) {
Checker.notEmpty("parameter:newTypeName", newTypeName);
final GeneratorContext context = this.getGeneratorContext();
context.info("Creating serialization factory " + newTypeName);
final NewConcreteType serializationFactory = context.newConcreteType(newTypeName);
serializationFactory.setAbstract(false);
serializationFactory.setFinal(true);
serializationFactory.setSuperType(this.getSerializationFactory());
return serializationFactory;
}
COM: <s> creates a new concrete type which contains the serialization factory type </s>
|
funcom_train/48181416 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print(PrintWriter out) {
//out.println("there are " + getM() + " channels");
out.println("cost " + cost);
// System.out.println("The (B,G) curve:");
out.println("0 0");
for(int i = 0; i< getM(); i++) {
out.println(sumGood[i] + "\t" + sumBad[i]);
}
out.flush();
}
COM: <s> prints the description of the sensor in the same format as </s>
|
funcom_train/18898705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void retrieveDefaultLoadingScripts() {
// locate the pre-loading script
URL preScriptURL = this.locateScript(PRE_LOADING_SCRIPT_PATH);
if (preScriptURL != null) {
this.setPreLoadingScriptURL(preScriptURL);
}
// locate the post-loading script
URL postScriptURL = this.locateScript(POST_LOADING_SCRIPT_PATH);
if (postScriptURL != null) {
this.setPostLoadingScriptURL(postScriptURL);
}
}
COM: <s> retrieves the default loading scripts </s>
|
funcom_train/9289230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ContextManager getCurrentContextManager() {
ThreadLocal tcl = threadContextList;
if (tcl == null) {
// The context service is already stopped.
return null;
}
Object list = tcl.get();
if (list instanceof ContextManager) {
Thread me = Thread.currentThread();
ContextManager cm = (ContextManager) list;
if (cm.activeThread == me)
return cm;
return null;
}
if (list == null)
return null;
java.util.Stack stack = (java.util.Stack) list;
return (ContextManager) (stack.peek());
}
COM: <s> get current context manager linked to the current thread </s>
|
funcom_train/34240841 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point getCenter(Logger log) {
boolean isNegativeX = maxXVisited + minXVisited < 0;
boolean isNegativeY = maxYVisited + minYVisited < 0;
int x = (maxXVisited - minXVisited) / 2;
if (isNegativeX)
x = -1 * x;
int y = (maxYVisited - minYVisited) / 2;
if (isNegativeY)
y = -1 * y;
return new Point(x, y);
}
COM: <s> gets center of a map given by the extremes of points visited </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.