__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/32636146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean markResultValid(String resultID) {
beginTransaction();
try {
Result search = TaskFactory.createResult(resultID);
Result[] matches = search.find();
if (matches.length > 0) {
SysLogger.println("Validator is marking valid result " + resultID + ".");
PRCServer.instance().getTransitioner().markResultValid(matches[0]);
return true;
}
else {
SysLogger.println("Validator tried to mark valid unknown result " + resultID + ".");
return false;
}
}
finally {
// Always end the transaction.
endTransaction();
}
}
COM: <s> informs the transitioner that the specified ingress result is valid </s>
|
funcom_train/5260710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addEstablishedByPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Means_establishedBy_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Means_establishedBy_feature", "_UI_Means_type"),
BmmPackage.Literals.MEANS__ESTABLISHED_BY,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the established by feature </s>
|
funcom_train/29773896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateCheckConfig(String pathToCheckConfig) throws XMLStreamException, FileNotFoundException {
File config = new File(pathToCheckConfig);
try {
File xsd = new File(ClassLoader.getSystemResource("net/sf/xchecker/xchecker.xsd").toURI());
return runValidate(config, xsd);
} catch (URISyntaxException ex) {
ex.printStackTrace();
}
return false;
}
COM: <s> validates the given check config with an internal xml schema </s>
|
funcom_train/50346647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected File findFile(String name) {
File fp = new File(name);
if (fp.exists()) return fp;
fp = new File(prefsDir()+name);
if (fp.exists()) {
return fp;
}
else {
File fx = new File(xmlDir()+name);
if (fx.exists()) {
return fx;
}
else {
return null;
}
}
}
COM: <s> return a file object for a name </s>
|
funcom_train/4662266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(null);
jContentPane.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));
jContentPane.add(getJGraficoPanel(), null);
jContentPane.add(getJMenuPanel(), null);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/8662053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer buf = new StringBuffer(getClass().getName());
buf.append("@");
buf.append(Integer.toHexString(hashCode()));
buf.append("[");
extendToString(buf);
buf.append("]");
return buf.toString();
}
COM: <s> converts the object to a string </s>
|
funcom_train/38967452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Action getAction(String key) throws MissingListenerException {
Action result = (Action)listeners.get(key);
// System.out.println("The Action"+result);
//if (result == null) {
//result = canvas.getAction(key);
//}
if (result == null) {
throw new MissingListenerException("Can't find action.", RESOURCES, key);
}
return result;
}
COM: <s> returns the action associated with the given string </s>
|
funcom_train/15724140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setThisTitle() {
try {
if (folderView.getFolder().isOpen()) {
setTitle(frameTitle + " ("
+ folderView.getFolder().getMessageCount() + "/"
+ folderView.getFolder().getNewMessageCount() + ")");
}
} catch (Exception ex) {
InterfaceManager.showError(ex);
}
}
COM: <s> sets the this title attribute of the folder view frame object </s>
|
funcom_train/45132218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeCover() {
_cover = "";
_coverData = new byte[0];
/* Loads the nocover cover... */
cover.setIcon(new ImageIcon(Toolkit.getDefaultToolkit().createImage(("/mediaManager/images/nocover.gif")).getScaledInstance(97,145,Image.SCALE_FAST)));
_saveCover=false;
}
COM: <s> removes the cover </s>
|
funcom_train/5551381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void verifyInverseCumulativeProbabilities() throws Exception {
for (int i = 0; i < inverseCumulativeTestPoints.length; i++) {
assertEquals("Incorrect inverse cumulative probability value returned for "
+ inverseCumulativeTestPoints[i], inverseCumulativeTestValues[i],
distribution.inverseCumulativeProbability(inverseCumulativeTestPoints[i]));
}
}
COM: <s> verifies that inverse cumulative probability density calculations match exptected values </s>
|
funcom_train/5395844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReadBoolean() throws Exception {
System.out.println("readBoolean");
BlockDataInputStream instance = null;
boolean expResult = true;
boolean result = instance.readBoolean();
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 read boolean method of class org </s>
|
funcom_train/21225282 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMinutes(final int minutes) {
switch (getFormat()) {
case VALIDITY_PERIOD_HH_MM_SS:
/* Second octet */
data[1] = minutes;
break;
default:
throw new IllegalStateException(
"The VP format does not correspond to VALIDITY_PERIOD_HH_MM_SS, "
+ "see the method setFormat() for more information.");
}
}
COM: <s> this will set the validity period in minutes </s>
|
funcom_train/45812891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLong(ListenerIF listener, String name, char c, boolean req_arg) {
if (req_arg)
// Required argument
largs.add(new LongOpt(name, LongOpt.REQUIRED_ARGUMENT, null, c));
else
// Optional argument
largs.add(new LongOpt(name, LongOpt.OPTIONAL_ARGUMENT, null, c));
// Register listener
listeners.put(new Integer(c), listener);
}
COM: <s> add a long option with argument with the specified listener </s>
|
funcom_train/18808380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFaroutCoefficient(final double faroutCoefficient) {
if (faroutCoefficient > this.getOutlierCoefficient()) {
this.faroutCoefficient = faroutCoefficient;
}
else {
throw new IllegalArgumentException("Farout value must be greater "
+ "than the outlier value, which is currently set at: ("
+ getOutlierCoefficient() + ")");
}
}
COM: <s> sets the value used as the farouts coefficient </s>
|
funcom_train/49411113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCollectionId(String id) {
this.collectionId=id;
for (Iterator it = records.iterator(); it.hasNext();) {
gov.lanl.util.oai.oaiharvesterwrapper.Record record = (gov.lanl.util.oai.oaiharvesterwrapper.Record) (it
.next());
Header header = record.getHeader();
header.addSetSpec(new Sets(Sets.BASE_URL,id));
}
}
COM: <s> add base url to as setspec a requirement of oai federator </s>
|
funcom_train/3934152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int hstrcmp(char[] s, int si, char[] t, int ti) {
for (; s[si] == t[ti]; si++, ti++)
if (s[si] == 0)
return 0;
if (t[ti] == 0)
return 0;
return s[si] - t[ti];
}
COM: <s> string compare returns 0 if equal or </s>
|
funcom_train/17806072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTargetPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DefaultConnection_target_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DefaultConnection_target_feature", "_UI_DefaultConnection_type"),
CtbPackage.Literals.DEFAULT_CONNECTION__TARGET,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the target feature </s>
|
funcom_train/50273756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void waitAtTheEnd() {
if (waitAtTheEndMs==0) {
// do not wait
return;
}
try {
sleepingThread = Thread.currentThread();
Thread.sleep((waitAtTheEndMs<0) ? ENDLESS_MS : waitAtTheEndMs);
} catch (InterruptedException e) {}
sleepingThread = null;
// wait only once
waitAtTheEndMs = 0;
}
COM: <s> wait sleep block the specified time </s>
|
funcom_train/10872220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void backupIndex(Directory dir, SnapshotDeletionPolicy dp) throws Exception {
// To backup an index we first take a snapshot:
try {
copyFiles(dir, dp.snapshot("id"));
} finally {
// Make sure to release the snapshot, otherwise these
// files will never be deleted during this IndexWriter
// session:
dp.release("id");
}
}
COM: <s> example showing how to use the snapshot deletion policy to take a backup </s>
|
funcom_train/28928652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean connectRowToOne() {
int nGroupSize = from.size() / to.size();
int i,j;
i = 0;
for (Unit v : to) {
for (j = 0; j < nGroupSize; j++) {
Unit u = from.get(i * nGroupSize + j);
addConnection(u, v, wtType, wtParams);
}
i++;
}
return true;
}
COM: <s> makes row to one connections </s>
|
funcom_train/8123397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void undoableEditHappened(UndoableEditEvent e) {
undo.addEdit(e.getEdit());
undoAction.update();
redoAction.update();
FileData fileData = (FileData) editor.getDocument().getProperty(fileDataProp);
if (!fileData.isModified) { //WHY the f.. do you modify the main title from
//here????
//if the same document will be opened in multiple views, only some of them
//will have the modified marker active....
fileData.isModified = true;
}
}
COM: <s> messaged when the document has created an edit the edit is </s>
|
funcom_train/49319519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setShowLegend(boolean show) {
_showLegend = show;
if (_chart != null) {
if (show) {
for (JFreeChart chart : _chart) {
chart.addLegend(new LegendTitle(chart.getPlot())); // TODO test change
}
} else {
for (JFreeChart chart : _chart) {
chart.removeLegend();
}
}
}
}
COM: <s> set the visibility of the legend </s>
|
funcom_train/34262652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FilePreference getNewFilePreference() {
FilePreference lFilePreference = FlywheelWorkspaceFileFactory.createFilePreference();
FilePreference lFilePreferenceClone = (FilePreference)this.getDataEditorSupport().addMasterRetrieveClone(lFilePreference);
lFilePreferenceClone.setupNewInstance();
lFilePreferenceClone.setCaseSensitive(PersistenceHelper.getGeneralPreferences().getDefaultCaseSensitivity());
return lFilePreferenceClone;
}
COM: <s> returns file preference </s>
|
funcom_train/37836780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setPartner(final IEntity partner) {
if (partner != tradingPartner) {
tradingPartner = partner;
/*
* Partner gets set to null on cancelled trade. Do not show the
* window if the user already closed it
*/
if (partner != null) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
window.setPartnerSlot(partner, "trade");
window.setPartnerName(partner.getName());
}
});
}
}
}
COM: <s> set the current trading partner </s>
|
funcom_train/5343935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(String key, String value) throws IllegalArgumentException {
try {
put(key, value==null ? null : value.getBytes(com.limegroup.gnutella.Constants.UTF_8_ENCODING));
} catch (UnsupportedEncodingException uee) {
put(key, value==null ? null : value.getBytes());
}
}
COM: <s> adds a key with string value using the default character encoding </s>
|
funcom_train/37592622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFileField(File file) {
_file = file;
if (file != null && ! file.getPath().equals("")) {
try { _file = file.getCanonicalFile(); }
catch(IOException e) { /* do nothing */ }
}
resetFileField();
}
COM: <s> sets the text of the file field to be the given file </s>
|
funcom_train/22286190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int findTarget(Event evt) {
if ((evt.x >= 0) && (evt.x < width) && (evt.y >= 0) && (evt.y < height)) {
int selcol = Math.max(0, Math.min(COLS-1, (evt.x-GAP)/(SIZE+GAP)));
int selrow = Math.max(0, Math.min(ROWS-1, (evt.y-GAP)/(SIZE+GAP)));
return selcol + selrow*COLS;
} else {
return -1;
}
}
COM: <s> find the target based on the given event </s>
|
funcom_train/43100547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AbstractArgoJPanel getTab(Class tabClass) {
Iterator iter = tabPanelList.iterator();
Object o;
while (iter.hasNext()) {
o = iter.next();
if (o.getClass().equals(tabClass)) {
return (AbstractArgoJPanel) o;
}
}
return null;
}
COM: <s> returns the tab instance of the specified class </s>
|
funcom_train/39116252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void playCard(final int x, final int y) {
selectedCards.clear();
Card selected = findSelection(x, y);
if (isLegalCardToPlay(selected)) {
System.out.println("Playing Card " + selected);
if (selected != null) {
Position p = getPosition(selected);
animateCardPlay(selected, p);
BridgeGameManager.getInstance().playCard(p, selected);
getPlayer(selected).getHand().getCards().remove(selected);
calculate();
}
}
}
COM: <s> plays the card under the mouse pointer </s>
|
funcom_train/23619395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadUninishedPaths() {
Enumeration e = unfinPaths.keys();
while (e.hasMoreElements()) {
Object key = e.nextElement();
if (loadActuatorPath(
(ActuatorPath) unfinPaths.get(key),
(String) key) == false)
Err.e("unable to load the unfinished path "
+ (String) key);
}
}
COM: <s> by the time this is called all the actuators and </s>
|
funcom_train/13286549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getDelBtn() {
if (delBtn == null) {
delBtn = new JButton();
delBtn.setText("<<");
delBtn.setBounds(new Rectangle(181, 100, 60, 31));
delBtn.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed()
}
});
}
return delBtn;
}
COM: <s> this method initializes del btn </s>
|
funcom_train/21125674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ITimestamp getGlobalDBTimestamp() throws TimestampException {
// check context, group manager and timestampfactory
if((this.context != null)
&& (this.context.getGroupManager() != null)
&& (this.context.getTimestampFactory() != null)) {
// get timestamp factory
return this.context.getTimestampFactory().getNewTimestamp(this.context.getGroupManager());
}
// return null as default
return null;
}
COM: <s> returns the global timestamp that will be used if </s>
|
funcom_train/31206324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
ByteBuffer buffer = ByteBuffer.wrap(req);
buffer.getShort();
String filename = getAsciz(buffer);
String mode = getAsciz(buffer);
log.info(filename + " " + mode);
response = new DatagramPacket(new byte[MTU], MTU, iaddr, port);
try {
responsesocket = new DatagramSocket();
} catch (SocketException e) {
log.info(e.toString(), e);
return;
}
if (!handleOptions(buffer)) {
return;
}
doRrq(filename);
}
COM: <s> main processing method for the t2hproxy object </s>
|
funcom_train/4122757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeKeyStroke(KeyStroke k) {
if (k != null && keyStroke != null && k.getKeyCode() == keyStroke.getKeyCode() && k.getModifiers() == keyStroke.getModifiers()) {
keyStroke = null;
bl.setText(" ");
}
}
COM: <s> removes the given code key stroke code </s>
|
funcom_train/46279095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ArrayList getActors() {
ArrayList acts = (ArrayList)actors.clone(); // ??? cache this?
// TODO: a SOAPService should always be associated with an engine,
// so this should never be null.... check all paths to ensure that
// constraint is true.
if (engine != null) {
acts.addAll(engine.getActorURIs());
}
return acts;
}
COM: <s> get the merged actor list for this service including engine wide </s>
|
funcom_train/18803558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireOptimalizationChanged() {
Object[] listeners = listenerList.getListenerList();
for (int i = 0; i < listeners.length; i += 2) {
if (listeners[i] == OptimalizationChangedListener.class) {
((OptimalizationChangedListener) listeners[i + 1])
.optimalizationChanged(new OptimalizationChangedEvent(
this, !isOptimalizationEnabled()));
}
}
}
COM: <s> fires the change event </s>
|
funcom_train/42394925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onPaint(Graphics2D g) {
g.setColor(Color.red);
g.drawOval((int) (getX() - 50), (int) (getY() - 50), 100, 100);
g.setColor(new Color(0, 0xFF, 0, 30));
g.fillOval((int) (getX() - 60), (int) (getY() - 60), 120, 120);
}
COM: <s> paint a red circle around our painting robot </s>
|
funcom_train/15908307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public char strokeTo(int newx, int newy) {
char newchar = '\0';
if (!strokeMode)
return newchar;
// movement is relative to middle point
strokePoint.x = newx - strokePoint0.x + middlepoint.x;
strokePoint.y = newy - strokePoint0.y + middlepoint.y;
if (traceEnabled)
addToTrace(strokePoint.x, strokePoint.y);
// if (!contains(newpoint)) return;
int num = getAreaUnder(strokePoint);
if (num != activeRegion) {
newchar = regionChanged(num);
}
doRepaints();
return newchar;
}
COM: <s> adds a stroke point in screen coordinates </s>
|
funcom_train/13530704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Hashtable computeGenerations(){
Hashtable kinToGen = new Hashtable();
StringVector ftv = getEffectiveFocalTerms();
for (ftv.reset();ftv.isNext();){
String term = ftv.getNext();
kinToGen.put(term,new Integer(0));
theGenerations(kinToGen,term);
}
return kinToGen;
}
COM: <s> checks the generation status of each kin term </s>
|
funcom_train/28297207 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEntryChangeVisualNullVisualName() throws Exception {
Entry entry =
dvm.new Entry(Package.class, Sphere.class, Package.NAME,
Sphere.NAME);
dvm.set(entry);
TestListener listener = new TestListener();
dvm.addListener(listener);
entry.changeVisual(Cube.class, null);
assertEquals(Cube.class, entry.getVisualClass());
assertNull(entry.getVisualName());
assertTrue(listener.wasChanged());
}
COM: <s> test entry change visual null visual name </s>
|
funcom_train/8232446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getTextField2() {
if (textField2 == null) {//GEN-END:|114-getter|0|114-preInit
// write pre-init user code here
textField2 = new TextField("Buscar:", null, 32, TextField.ANY);//GEN-LINE:|114-getter|1|114-postInit
// write post-init user code here
}//GEN-BEGIN:|114-getter|2|
return textField2;
}
COM: <s> returns an initiliazed instance of text field2 component </s>
|
funcom_train/49009621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton13() {
if (jButton13 == null) {
jButton13 = new JButton();
jButton13.setText("消除混合背景");
jButton13.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
Filter filter = new MixFilter();
doFilter(filter, true);
}
});
}
return jButton13;
}
COM: <s> this method initializes j button13 </s>
|
funcom_train/16761366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLodLevel(int level){
IntBuffer target;
if (level == 0)
target = levelZero;
else
target = lodLevels[level-1];
if (target != indexBuffer){
setIndexBuffer(target);
// DisplaySystem.getDisplaySystem().getRenderer().deleteVBO(vboInfo.getVBOVertexID());
// vboInfo.setVBOIndexID(-1);
}
}
COM: <s> set the current lod level </s>
|
funcom_train/31645712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
// Variables
Enumeration enum;
StringBuffer buffer;
String name;
String value;
// Get Names
enum = getNames();
// Process Each Name
buffer = new StringBuffer();
while (enum.hasMoreElements() == true) {
// Get Parameter
name = (String) enum.nextElement();
value = get(name);
// Append to Result
buffer.append(name);
buffer.append("=");
buffer.append(quote(value));
// Check for Seperator
if (enum.hasMoreElements() == true) {
buffer.append("; ");
}
} // while
// Return Result
return buffer.toString();
} // toString()
COM: <s> return string representation of parameter list </s>
|
funcom_train/28923798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int setUpAvailableCourseList(Player p) {
Vector<CourseSelector> list = new Vector<CourseSelector>(0,1);
Iterator<CourseSelector> csi = selectors.iterator();
while(csi.hasNext()) {
CourseSelector cs = csi.next();
if(cs.isVisible()) {
list.add(cs);
cs.setValue(p.getStudies().getCourseStatus(cs.getCourse()));
}
}
if(!list.isEmpty()) {
list.firstElement().setSelected(true);
}
return list.size();
}
COM: <s> returns the number of courses available for this player </s>
|
funcom_train/40792995 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand1() {
if (okCommand1 == null) {//GEN-END:|80-getter|0|80-preInit
// write pre-init user code here
okCommand1 = new Command("Ok", Command.OK, 0);//GEN-LINE:|80-getter|1|80-postInit
// write post-init user code here
}//GEN-BEGIN:|80-getter|2|
return okCommand1;
}
COM: <s> returns an initiliazed instance of ok command1 component </s>
|
funcom_train/20228616 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeProject(HProject p) {
Session session = null;
try{
session = HibernateUtil.getSessionFactory().getCurrentSession();
session.beginTransaction();
session.delete(p);
session.getTransaction().commit();
}catch (Exception e)
{
e.printStackTrace();
}finally {
if(session != null && session.isOpen())
session.close();
}
}
COM: <s> deletes the given project from the oracle database </s>
|
funcom_train/1342912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void store() throws BackingStoreException {
if (updateFlag) {
String[] keys = prefs.keys();
for (int i = 0; i < keys.length; i++) {
prefs.remove(keys[i]);
}
Iterator it = list.iterator();
while (it.hasNext()) {
Property prop = (Property) it.next();
if (prop.key.length() > 0) {
prefs.put(prop.key, prop.value);
}
}
}
}
COM: <s> writes the properties in the list back to </s>
|
funcom_train/36153777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String createURI() {
String uri = "jdbc:" + name + "://" + host + "/" + dbName;
if (!parameter.equals("")) {
uri += "?" + parameter;
}
if (debug)
log.logInfo("Connecting to " + host + "/" + dbName +
" using the ''" + name + "'' database driver");
return uri;
}
COM: <s> create a new uri string for jdbc from local connection properties </s>
|
funcom_train/4385664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LinkageSystem (String p_db_url, String p_db_driver_name,String p_db_user, String p_db_password) {
this.setDBURL(p_db_url);
this.setDBDriverName(p_db_driver_name);
this.setDBUser(p_db_url);
this.setDBPassword(p_db_driver_name);
}
COM: <s> constructor for linkage system </s>
|
funcom_train/17510266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private GameBoard2D getGameBoard2D() {
if (gameBoard2D == null) {
FlowLayout flowLayout = new FlowLayout();
flowLayout.setAlignment(java.awt.FlowLayout.CENTER);
flowLayout.setHgap(5);
gameBoard2D = new GameBoard2D(getController());
gameBoard2D.setLayout(flowLayout);
gameBoard2D.setPreferredSize(new java.awt.Dimension(800,800));
getGameModel().addObserver(new ModelObserver(gameBoard2D));
getGameModel().notifyObservers("TESTING!");
}
return gameBoard2D;
}
COM: <s> this method initializes game board2 d </s>
|
funcom_train/10510988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected XSLTLiaison getLiaison() {
// if processor wasn't specified, use TraX.
if (liaison == null) {
if (processor != null) {
try {
resolveProcessor(processor);
} catch (Exception e) {
handleError(e);
}
} else {
try {
resolveProcessor(PROCESSOR_TRAX);
} catch (Throwable e1) {
e1.printStackTrace();
handleError(e1);
}
}
}
return liaison;
}
COM: <s> get the liason implementation to use in processing </s>
|
funcom_train/30005575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextArea getPreconditionArea() {
if (this.preconditionArea == null) {
this.preconditionArea = new JTextArea();
this.preconditionArea.setEditable(false);
this.preconditionArea.setLineWrap(true);
this.preconditionArea.setWrapStyleWord(true);
}
return this.preconditionArea;
}
COM: <s> gets the precondition pane </s>
|
funcom_train/32215728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean exist(String username) throws SQLException {
try {
ResultSet rs = MySQL.connection.createStatement(Statement.CLOSE_ALL_RESULTS, Statement.KEEP_CURRENT_RESULT).executeQuery("SELECT COUNT(id) AS anz FROM users WHERE username = '" + username + "'");
rs.first();
Boolean r = (rs.getInt("anz") == 1);
rs.close();
return r;
} catch (NullPointerException e) {
System.err.println(e.getMessage());
return false;
}
}
COM: <s> checks if the username is allready in use </s>
|
funcom_train/17046590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addEntry(String nodeText, EntryItem<T> entryItem, Map<String, IndexEntry<T>> text2entry) {
IndexEntry<T> indexEntry = text2entry.get(nodeText);
if (indexEntry == null) {
indexEntry = new IndexEntry<T>(nodeText, entryItem);
text2entry.put(nodeText, indexEntry);
}
else {
indexEntry.addItem(entryItem);
}
}
COM: <s> auxiliary for adding an index entry to the map </s>
|
funcom_train/25066392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createAndAddLoadingLabels() {
logger.debug("DetailSubPanel createAndAddLoadingLabels...");
mainLoadingLabel = new LoadingLabel("Loading " + getDetailTypeLabel() + " data...", true);
mainTitledBox.add(mainLoadingLabel);
}
COM: <s> creates and adds the loading labels to the main title box </s>
|
funcom_train/7269403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean shouldShowFirewallWindow() {
if(InstallSettings.FIREWALL_WARNING.getValue())
return false;
// Only show the firewall warning if this is windows, and if
// we're not capable of automatically changing the firewall.
return OSUtils.isWindows() && !FirewallUtils.isStatuschangeCapable();
}
COM: <s> determines if the a firewall warning may be displayed window should be shown </s>
|
funcom_train/18943347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deepSearchFirst(Vertex[] graph) {
initializeProcessing(graph);
for (int i = 0; i < graph.length; i++) {
graph[i].reset();
}
for (int i = 0; i < graph.length; i++) {
if (!graph[i].isVisited()) {
process(graph[i]);
}
}
finishProcessing(graph);
}
COM: <s> performs a deep search first of the specified graph </s>
|
funcom_train/2386206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(Photo photo) throws PhotoAlbumException{
try {
// Remove the photo
super.remove(photo);
} catch (HibernateException he){
throw new PhotoAlbumException("Could not remove the photo, cause of an Hibernate problem.");
} catch (HbnDaoException hde){
throw new PhotoAlbumException("Could not remove the photo.");
}
}
COM: <s> remove an code photo code instance </s>
|
funcom_train/3051754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean readSize() {
if (!initialized) {
if ( cachedSize!=-1 && !hasQueuedOperations() ) {
return true;
}
else {
throwLazyInitializationExceptionIfNotConnected();
CollectionEntry entry = session.getPersistenceContext().getCollectionEntry(this);
CollectionPersister persister = entry.getLoadedPersister();
if ( persister.isExtraLazy() ) {
if ( hasQueuedOperations() ) {
session.flush();
}
cachedSize = persister.getSize( entry.getLoadedKey(), session );
return true;
}
}
}
read();
return false;
}
COM: <s> called by the tt size tt method </s>
|
funcom_train/4425657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String selectActor(Vertex vertex, Shell shell) {
IProject project = getProject(vertex);
FilteredRefinementDialog dialog = new FilteredRefinementDialog(project,
shell, "cal");
dialog.setTitle("Select actor");
dialog.setMessage("&Select existing actor:");
String refinement = getRefinement(vertex);
if (refinement != null) {
dialog.setInitialPattern(refinement);
}
int result = dialog.open();
if (result == Window.OK) {
return (String) dialog.getFirstResult();
}
return null;
}
COM: <s> selects the qualified identifier of an actor </s>
|
funcom_train/9188068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void attribTopLevel(Env<AttrContext> env) {
JCCompilationUnit toplevel = env.toplevel;
try {
annotate.flush();
chk.validateAnnotations(toplevel.packageAnnotations, toplevel.packge);
} catch (CompletionFailure ex) {
chk.completionError(toplevel.pos(), ex);
}
}
COM: <s> attribute a top level tree </s>
|
funcom_train/32137857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createErrorDaemon(IErrorParser parser) {
ErrorView errorView = null;
try {
IViewPart ivp = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(ErrorView.ID);
if(null != ivp && ivp instanceof ErrorView)
errorView = ((ErrorView)ivp);
} catch(Exception e) {}
errorDaemon = new ErrorStreamDaemon(this, errorView, parser);
}
COM: <s> creates the code error stream daemon code for passing data from the </s>
|
funcom_train/48082911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object setValue(Object obj) {
Object old = getValue();
if (parent.valueType > HARD) {
refValue.clear();
refValue = toReference(parent.valueType, (Reference)obj, hashCode);
} else {
super.setValue(obj);
}
return old;
}
COM: <s> sets the value of the entry </s>
|
funcom_train/35846753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getAddedTargetCollection() {
List addedTargets = new ArrayList();
List oldTargets = Arrays.asList(theOldTargets);
List newTargets = Arrays.asList(theNewTargets);
for (Object o : newTargets) {
if (!oldTargets.contains(o)) {
addedTargets.add(o);
}
}
return addedTargets;
}
COM: <s> returns the targets that are added to the selection </s>
|
funcom_train/40667588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setThreadContextLoader() {
if (isContextLoaderSaved) {
throw new RuntimeException("Context loader has not been reset");
}
if (LoaderUtils.isContextLoaderAvailable()) {
savedContextLoader = LoaderUtils.getContextClassLoader();
ClassLoader loader = this;
LoaderUtils.setContextClassLoader(loader);
isContextLoaderSaved = true;
}
}
COM: <s> sets the current threads context loader to this classloader storing </s>
|
funcom_train/18948641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String transform( String pToTransform ) {
if( ErrorUtil.is_null( pToTransform, "pToTransform" ) ) {
return Standard.EMPTY;
}
try {
return removeExtraWhiteSpace( pToTransform );
}
catch( RegExpException e ) {
ErrorUtil.nonFatalException( e );
return pToTransform;
}
}
COM: <s> transform the supplied string </s>
|
funcom_train/624598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIntersection() {
Vector bagValue = new Vector();
Vector bagValue2 = new Vector();
OclInteger elementCount = new IntegerInstance(20);
for (int i = 0; i < 20; i++) {
bagValue.add(elementCount);
bagValue2.add(elementCount);
}
OclBag bag = new BagInstance(Type.AnInteger, bagValue);
OclBag bag2 = new BagInstance(Type.AnInteger, bagValue2);
OclBag result = bag.intersection(bag2);
assertTrue(result.size().equals(elementCount));
}
COM: <s> tests the ocl operation intersection on bags </s>
|
funcom_train/24589089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getIconWidth() {
int width = 0;
// Add the width of all Icons while also including the gap
if (layout == Layout.HORIZONTAL) {
width += (icons.length - 1) * gap;
for (Icon icon : icons)
width += icon.getIconWidth();
} else { // Just find the maximum width
for (Icon icon : icons)
width = Math.max(width, icon.getIconWidth());
}
return width;
}
COM: <s> gets the width of this icon </s>
|
funcom_train/35677705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRq014Value1() {
Dfhcommarea dfhcommarea = (Dfhcommarea) convert(
new com.legstar.test.coxb.rq074.ObjectFactory(), "e4d7c40001",
new Dfhcommarea());
assertEquals("VALUE_UPD", dfhcommarea.getRq074Crud().toString());
assertEquals("VALUE_1", dfhcommarea.getRq074Bool().toString());
}
COM: <s> case of numeric value 1 </s>
|
funcom_train/12908589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateArchiveObject (ArchiveObject ao) {
ListDataEvent evt;
// Where is the ArchiveObject?
int idx = archiveObjects.indexOf(ao);
if (idx >= 0) {
listModel.updateLine (idx);
}
try {
writeFile ();
}
catch (IOException e) {
errorAlert (e.getMessage());
}
}
COM: <s> modifies an archive objects appearance from the list and </s>
|
funcom_train/41725873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean canMoveRight() {
boolean canMove = false;
if (selColumnIndex < (columnNumber - 1)) {
int lastItemIndex = ((Integer) pageMaxIndexInfo.get(new Integer(
currentPageIndex))).intValue();
int nextItemIndex = getItemArrayIndex(currentPageIndex,
selRowIndex, selColumnIndex + 1);
if (nextItemIndex <= lastItemIndex)
canMove = true;
}
return canMove;
}
COM: <s> indicate whether the selected frame can be moved in the right direction </s>
|
funcom_train/16620908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void putQuick(long key, int value) {
int pos = hash(key) % capacity;
int index;
while (nextPtr[pos] != LAST) {
pos = nextPtr[pos];
}
index = nextFree - capacity;
nextPtr[pos] = nextFree;
keys[index] = key;
elements[index] = value;
nextFree = nextPtr[nextFree];
nextPtr[nextPtr[pos]] = LAST;
count++;
}
COM: <s> put method for internal use </s>
|
funcom_train/23351122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node getParent() {
Node ret = null;
synchronized (this) {
short etx, lowestEtx = -1;
// elect the node with the lowest total etx to sink
for (short i = 0; i < size; i++) {
etx = nodes[i].getCost();
if (etx >= 0 && (etx < lowestEtx || i == 0)) {
ret = nodes[i];
lowestEtx = etx;
}
}
}
return ret;
}
COM: <s> elects a node in the list with the lowest cost </s>
|
funcom_train/20271963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getClassFromDeclarationName(String fullDeclarationName) {
String[] parts = fullDeclarationName.split("\\.prototype\\.");
Preconditions.checkState(parts.length == 1 || parts.length == 2);
if (parts.length == 2) {
return parts[0];
}
return null;
}
COM: <s> from a provide name extract the class name </s>
|
funcom_train/17928768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getAIC() {
// This is for when the developer sets the alsivImageCount
// default without using setOptions() and its error checking
// code.
if(alsivImageCount < previewCount) {
System.out.println("WARNING: alsivImageCount < previewCount"
+" in AlsivOptions.");
alsivImageCount = previewCount;
}
return alsivImageCount;
}
COM: <s> get the number of alsiv images to use </s>
|
funcom_train/33267632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return getClass().getName()+"[font="+getFont()+",color="+getColor()+
",xOffset="+xOffset+",yOffset="+yOffset+" clip="+getClipRect()+"]";
}
COM: <s> returns a string object representing this graphics value </s>
|
funcom_train/40616676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void read() {
data.reset();
data.readByte();
data.readShortInt();
for (int i = 0; i < pageCount; i += 8) {
int x = data.readByte() & 255;
used.setByte(i, x);
}
full = false;
}
COM: <s> read the page from the disk </s>
|
funcom_train/51787919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addClosedByElementPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Refinement_closedByElement_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Refinement_closedByElement_feature", "_UI_Refinement_type"),
RAMPackage.Literals.REFINEMENT__CLOSED_BY_ELEMENT,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the closed by element feature </s>
|
funcom_train/11024193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExecuteWithSimpleFloatPropertyAndStringValue() {
try {
new BeanPropertyValueChangeClosure("floatProperty", "123").execute(new TestBean());
fail("Should have thrown an IllegalArgumentException");
} catch (IllegalArgumentException e) {
/* this is what we expect */
}
}
COM: <s> test execute with simple float property and string value </s>
|
funcom_train/41114274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getMaximumPossibleThumbPosition(Rectangle trackBounds, Rectangle thumbBounds) {
int trackStartPosition = fOrientation.getPosition(trackBounds.getLocation());
int trackLength = fOrientation.getLength(trackBounds.getSize());
int thumbLength = fOrientation.getLength(thumbBounds.getSize());
return trackStartPosition + trackLength - thumbLength;
}
COM: <s> gets the maximum possible thumb position </s>
|
funcom_train/31130126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean connect(){
boolean connectionStatus = false;
NXTConnector conn = new NXTConnector();
conn.addLogListener(new NXTCommLogListener(){
public void logEvent(String message) {
System.out.println("USBSend Log.listener: "+message);
}
public void logEvent(Throwable throwable) {
System.out.println("USBSend Log.listener - stack trace: ");
throwable.printStackTrace();
}
}
);
if (!conn.connectTo("usb://")){
System.err.println("No NXT found using USB");
}else{
connectionStatus = true;
}
return connectionStatus;
}
COM: <s> this method connect with a nxt brick using a usb connection </s>
|
funcom_train/23973701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addError(int code, String key) {
errorCodes = (int[]) ArrayUtil.resizeArray(errorCodes,
errorCodes.length + 1);
errorKeys = (String[]) ArrayUtil.resizeArray(errorKeys,
errorKeys.length + 1);
errorCodes[errorCodes.length - 1] = code;
errorKeys[errorKeys.length - 1] = key;
}
COM: <s> adds the error code and the key to the list of errors </s>
|
funcom_train/46328341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
// TODO (dvo203): Replace by standard XML construction methods.
return omniAreaOpenTag + latitudeOpenTag + latitude + latitudeCloseTag + longitudeOpenTag
+ longitude + longitudeCloseTag + userInputOpenTag + userInput + userInputCloseTag
+ proximityDistanceOpenTag + proximityDistance + proximityDistanceCloseTag
+ omniAreaCloseTag;
}
COM: <s> provides the string representation of the omni location for storage and later recreation </s>
|
funcom_train/32619305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeOntClasses() {
String template = hasValue( OPT_CLASS_TEMPLATE ) ? getValue( OPT_CLASS_TEMPLATE ) : DEFAULT_TEMPLATE;
for (Iterator i = m_source.listClasses(); i.hasNext(); ) {
writeValue( (Resource) i.next(), template, "OntClass", "createClass", "_CLASS" );
}
}
COM: <s> write classes as ontology terms </s>
|
funcom_train/36187686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(PIMEvent o) {
if (this.begin_UTC_ms > ((PIMEvent) o).begin_UTC_ms) {
return 1;
}
if (this.begin_UTC_ms == ((PIMEvent) o).begin_UTC_ms) {
return 0;
}
return -1;
}
COM: <s> compare to another event </s>
|
funcom_train/8672885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getValidElements(OMDocument document) {
ArrayList list = new ArrayList();
Iterator itr = document.getChildren();
while (itr.hasNext()) {
OMNode node = (OMNode) itr.next();
if (node.getType() == OMNode.ELEMENT_NODE || node.getType() == OMNode.PI_NODE)
list.add(node);
}
return list;
}
COM: <s> gets the valid element collection of an omdocument </s>
|
funcom_train/8074660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
MetricLearner ml = null;
try {
ml = (MetricLearner) super.clone();
} catch (CloneNotSupportedException e) {
System.err.println("Metric learner can't clone");
}
// copy the fields
ml.setClusterer(this.m_clusterer);
ml.setMetric(this.m_metric);
return ml;
}
COM: <s> create a copy of this metric learner </s>
|
funcom_train/36243014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Task createAccount(IAccountCreationListener aListener, String ttpUrl){
// TODO: use existing keys of already existing accounts, define param
log.debug("account creation requested");
try {
AuthenticationTask authTask = new AuthenticationTask(ttpUrl, aListener);
queue.addTask(authTask);
return authTask;
} catch (Exception ex) {
log.fatal(ex.getMessage(), ex);
}
return null;
}
COM: <s> requests account creation on ttp url </s>
|
funcom_train/7636546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean atEndOfTimeZone(int incr) {
if (mCities.size() <= 1) {
return true;
}
float offset = getOffset(mCities.get(mCityIndex));
int nindex = (mCityIndex + mCities.size() + incr) % mCities.size();
if (tzEqual(getOffset(mCities.get(nindex)), offset)) {
return false;
}
return true;
}
COM: <s> returns true if there is another city within the current time zone </s>
|
funcom_train/2576742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double mapValueToFixedRange(double value) {
double lower = this.fixedRange.getLowerBound();
double length = this.fixedRange.getLength();
if (value < lower) {
return lower + length + ((value - lower) % length);
}
else {
return lower + ((value - lower) % length);
}
}
COM: <s> maps a data value into the fixed range </s>
|
funcom_train/46765078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ScheduleTemplateModel getScheduleTemplate(final long scheduleTemplateId, final IChainStore chain, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return SchedulingData.getScheduleTemplate(scheduleTemplateId, chain, call);
}}; return (ScheduleTemplateModel) call(method, call);
}
COM: <s> same transaction return the single schedule template model for the primary key </s>
|
funcom_train/22167543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void saveXML(Document doc, String fileName, String encoding) throws IOException {
// Open output stream where XML Document will be saved
Writer writer = new BufferedWriter(new FileWriter(fileName));
try {
printXML(writer, doc, encoding);
} finally {
writer.close();
}
}
COM: <s> saves xml document into xml file </s>
|
funcom_train/1549970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(final Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof Map.Entry)) {
return false;
}
Map.Entry e = (Map.Entry) obj;
return key.equals(e.getKey()) && value.equals(e.getValue());
}
COM: <s> compares the specified object with this entry for equality </s>
|
funcom_train/20885108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStringToIntegerMap() {
StringToIntegerMap map = new StringToIntegerMap();
map.map = new HashMap<String, Integer>();
for (int i = 0; i < 10; i++) {
map.map.put("stringValue" + i, i);
}
JSefaTestUtil.assertRepeatedRoundTripSucceeds(XML, map);
}
COM: <s> tests a map with code string code keys and code integer code elements </s>
|
funcom_train/31414852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPassword(String password) {
this.password = password;
if((password != null) &&
(password.length() != 0) &&
(password.charAt(0)=='['))
passwordClass = password.substring(1, password.length() - 1);
}
COM: <s> sets the password for this server </s>
|
funcom_train/3923774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteObserver( Observer o ) {
super.deleteObserver(o);
if ( o instanceof VRObject && o instanceof HasTransform ) {
observers.remove( ((VRObject) o).getClassName()+((VRObject) o).getId() );
((HasTransform)o).transform().deleteObserver(this);
active = observers.isEmpty();
notifyOwners( o );
}
}
COM: <s> removes observer o from the observer list and calls stop o </s>
|
funcom_train/41595181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addRelPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_StrucDocLinkHtml_rel_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_StrucDocLinkHtml_rel_feature", "_UI_StrucDocLinkHtml_type"),
V3Package.eINSTANCE.getStrucDocLinkHtml_Rel(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the rel feature </s>
|
funcom_train/31739552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isDoublePossible() {
return ((isSuitBid(bids.size() - 1)) ||
((isPassBid(bids.size() - 1) &&
isPassBid(bids.size() - 2) &&
isSuitBid(bids.size() - 3) )));
}
COM: <s> checks whether the active player is allowed to double according </s>
|
funcom_train/5730314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private WikiSiteContentInfo createDefaultWikiSiteContentInfo(String siteName) {
Date creationDate = new Date();
final WikiSiteContentInfo wikiSite = new WikiSiteContentInfo();
wikiSite.setName(siteName);
wikiSite.setText(DEFAULT_TEST_SITE_TEXT);
wikiSite.setNote(DEFAULT_TEST_SITE_NOTE);
wikiSite.setCreationDate(creationDate);
wikiSite.setAuthorId(assistantUser.getId());
wikiSite.setDomainId(defaultCourse.getId());
wikiSite.setDeleted(false);
wikiSite.setReadOnly(false);
wikiSite.setStable(false);
return wikiSite;
}
COM: <s> creates a wiki site content info </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.