__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/2867262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object arg0) {
if(arg0.getClass().getName().equals(this.getClass().getName())){ //TODO: might be slow (ensures comparing only addresses)
if (!(this.connectionID == ((Customer)arg0).getConnectionID())){
return (int)(this.connectionID - ((Customer)arg0).getConnectionID());
}
}
return 0;
}
COM: <s> compares private customer objects by their connection id </s>
|
funcom_train/38880506 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doCompress(InputStream inputStream, DST deflaterStream) throws IOException {
int count = -1;
byte[] buffer = new byte[DEFLATER_BUFFER_SIZE];
while ((count = inputStream.read(buffer)) != -1) {
deflaterStream.write(buffer, 0, count);
}
}
COM: <s> deflates data by chunk reading it from </s>
|
funcom_train/39559691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeBookmark(final Bookmark bmark) {
EList list = new BasicEList();
EList sumX = summarizeBookmarks(list, rootCategory);
for (Object object : sumX) {
list.add(object);
}
for (Object object : rootCategory.getChildren()) {
EList sum = summarizeBookmarks(list, (Category) object);
for (Object object2 : sum) {
list.add(object2);
}
}
for (Object object : list) {
if (object.equals(bmark)) {
Category cat = bmark.getCategory();
cat.getBookmarks().remove(bmark);
return true;
}
}
return false;
}
COM: <s> removes the bookmark from a category </s>
|
funcom_train/15801702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean fireSearch() {
if (isBusy()) {
m_globalLogger.log(Level.WARNING,
"BrwFileHunter:fireSearch() - search already in progress");
return false;
}
if (m_statusBox != null)
m_statusBox.setText("Searching " + m_sBaseDir + " ... please wait");
/*
* Fire search for each of the subclasses here
*/
m_subBrwFile.fireBrwFileSearch();
return true;
}
COM: <s> call this function immediately after creating a brw file hunter object to </s>
|
funcom_train/51129102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Block getCurrentPuckHoldingBlock() {
if (getCurrentHomeBlock().isPlayer(getCurrentPuckHolder())) {
return getCurrentHomeBlock();
} else if (getCurrentAwayBlock().isPlayer(getCurrentPuckHolder())) {
return getCurrentAwayBlock();
} else {
return null;
}
}
COM: <s> gets the current puck holding block </s>
|
funcom_train/989483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void glRects (short x1, short y1, short x2, short y2) {
if (CC.Mode != None) {
CC.gl_error (GL_INVALID_OPERATION, "glRects");
return;
}
glBegin (GL_QUADS);
glVertex2s (x1, y1);
glVertex2s (x2, y1);
glVertex2s (x2, y2);
glVertex2s (x1, y2);
glEnd();
}
COM: <s> glvoid gl rects glshort x1 glshort y1 glshort x2 glshort y2 </s>
|
funcom_train/18328857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GameQueue getGameQueue(int game_id) throws IOException {
try {
URL url = makeGqsURL("getGameQueue", Integer.toString(game_id));
ObjectInputStream ois = getOIS(url);
GameQueue gq = (GameQueue) ois.readObject();
ois.close();
return gq;
} catch (ClassNotFoundException e) {
throw new IOException("Class not found: "+e.toString());
}
}
COM: <s> get a game queue entry corresponding to the index </s>
|
funcom_train/43326689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public int keepOnlyNames(String[] names) {
int i,j,rv;
rv = 0;
for (i=0; i<n(); i++) {
boolean matched = false;
for (j=0; j<names.length; j++) {
if (names[j].compareTo(p(i).name) == 0) {
matched = true;
j = names.length;
}
}
if (!matched) {
remove(i);
i--;
rv++;
}
}
return rv;
}
COM: <s> like search by name but for a whole set of names </s>
|
funcom_train/6268226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SIPHeader parse() throws ParseException {
Expires expires = new Expires();
if (debug)
dbg_enter("parse");
try {
lexer.match(TokenTypes.EXPIRES);
lexer.SPorHT();
lexer.match(':');
lexer.SPorHT();
String nextId = lexer.getNextId();
lexer.match('\n');
try {
int delta = Integer.parseInt(nextId);
expires.setExpires(delta);
return expires;
} catch (NumberFormatException ex) {
throw createParseException("bad integer format");
} catch (InvalidArgumentException ex) {
throw createParseException(ex.getMessage());
}
} finally {
if (debug)
dbg_leave("parse");
}
}
COM: <s> parse the header </s>
|
funcom_train/9057187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUp() throws Exception {
super.setUp();
usr = new UserDatabase();
File f = new File("PermissionDenied.plan");
if(!f.exists()) {
f.createNewFile();
}
if(f.canRead()) {
if(!f.setReadable(false)) {
disablePermissionTest = true;
return;
}
}
if(f.canWrite()) {
if(!f.setWritable(false)){
disablePermissionTest = true;
return;
}
}
}
COM: <s> initialises the user database </s>
|
funcom_train/14329396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_bufferMaxMemory() {
String fieldName = "bufferMaxMemory";
String messageKey = Driver.BUFFERMAXMEMORY;
String expectedValue = DefaultProperties.BUFFER_MAX_MEMORY;
assertDefaultPropertyByServerType(URL_SQLSERVER, messageKey, fieldName, expectedValue);
if (!isOnlySqlServerTests()) {
assertDefaultPropertyByServerType(URL_SYBASE, messageKey, fieldName, expectedValue);
}
}
COM: <s> test the code buffer max memory code property </s>
|
funcom_train/1996698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void font(String aFaceString, String aSize) {
Element anElement = new Element("FONT");
if (aSize != null) {
anElement.add(new Attribute("SIZE", aSize));
}
if (aFaceString != null) {
anElement.add(new Attribute("FACE", aFaceString));
}
add(anElement);
}
COM: <s> creates a font element having given size and face attributes </s>
|
funcom_train/44283569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setupSwellPanel(JPanel parentPanel, Patch patch) {
addWidget(parentPanel,new KnobWidget("Attack Time", patch, 0, 127,0,new ScaledParamModel(patch,48 + pgmDumpheaderSize, 127, 63),new CCSender(49)),6,0,1,1,37);
}
COM: <s> sets up the swell panel </s>
|
funcom_train/22183778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Panel getPanel() {
Panel panel = new Panel();
panel.setLayout(new FlowLayout());
panel.setMaximumSize(new Dimension(n01, n02));
panel.setBounds(new Rectangle(n03, n04, n05, n06));
panel.add(getTextField(), null);
panel.add(getConnectButton(), null);
return panel;
}
COM: <s> this method initializes panel </s>
|
funcom_train/34482014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Value initAggregateMember(int index, EAggregation_type type) throws SdaiException {
if (tag != PhFileReader.EMBEDDED_LIST) {
printWarningToLogoValidate(AdditionalMessages.EE_NAGG);
throw new SdaiException(SdaiException.VT_NVLD);
}
if (nested_values == null || index > nested_values.length) {
enlarge_and_save_nested_values(index);
}
index--;
if (nested_values[index] == null) {
nested_values[index] = new Value();
}
nested_values[index].init(type);
return nested_values[index];
}
COM: <s> initializes an object of this class for the member of the aggregate represented </s>
|
funcom_train/33142582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getNewFile(File file) {
File newFile = new File(_path, file.getName());
int count = 0;
while (newFile.exists()) {
count++;
String filename = file.getName();
int pos = filename.lastIndexOf('.');
newFile = new File(_path, filename.substring(0, pos) + "__" + pad(count) + filename.substring(pos));
}
return newFile;
}
COM: <s> gets the new file attribute of the target object </s>
|
funcom_train/19968223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize(int numProducers, int numConsumers) {
this.numProducers = numProducers;
this.numConsumers = numConsumers;
sharedBuffer = new char[BUFFER_SIZE];
Debug.printf(
'+',
"Starting %d producers and %d consumers working on a buffer of size %d\n",
new Object[] {new Long(numProducers), new Long(numConsumers), new Long(BUFFER_SIZE)});
} // initialize
COM: <s> initializes this class with the number of producers consumers and the buffer </s>
|
funcom_train/45253974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setState(Object newState, IChangeListener toOmit) {
if (areEqual(newState, state)) {
return;
}
state = newState;
Iterator iter = views.iterator();
while (iter.hasNext()) {
IChangeListener next = (IChangeListener) iter.next();
if (next != toOmit) {
next.update(true);
}
}
}
COM: <s> sets the current state of the model </s>
|
funcom_train/44627981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void testHarness11() {
helpFailure("Number of start/end locations (7) should be double the number of tokens (2)",
"A",new Enum<?>[]{IDENTIFIER,EOF},new int[]{0,1,1,1,4,5,6},0);
}
COM: <s> this tests that the test harness fails if too many positions are given </s>
|
funcom_train/1328486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Date determineDelay(FlowContext context) {
int count = context.getRetryCount();
logger.info("delaying for retry count:" + count);
int delay = retryStrategy.getDelaySecondsForRetryCount(count);
Calendar cal = Calendar.getInstance();
cal.add(Calendar.SECOND, delay);
logger.info("delayed until:" + cal.getTime());
return cal.getTime();
}
COM: <s> determine delay for the retry of the step in case of failure </s>
|
funcom_train/1728049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void takeSnapshot(BigInteger version) {
// Create snapshot target file (using the specified version).
File snapshot = getSnapshotFile(version);
try {
// Copy the repository file to the snapshot file.
FileUtils.copyFile(fileObj, snapshot);
} catch (FileNotFoundException ffe) {
throw new GlooException(ffe);
} catch (IOException e) {
throw new GlooException(e);
}
}
COM: <s> copies the storage file into the snapshot directory </s>
|
funcom_train/10591522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void log(String s) {
filterConfig.getServletContext().log("[" + this.getClass().getName() + "] " + String.valueOf(s));
//System.out.println("[" + this.getClass().getName() + "] " + String.valueOf(s));
}
COM: <s> log message to servlet context log </s>
|
funcom_train/27779638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleEndTag(Tag t, int p) {
if (o == null) {
return;
}
if (t == Tag.TITLE) {
titleI = false;
} else if (t == Tag.BODY) {
bodyI = false;
} else if (t == Tag.SCRIPT) {
scriptI = false;
} else if (t == Tag.STYLE) {
styleI = false;
}
wSp();
}
COM: <s> handle the given closing tag </s>
|
funcom_train/29420649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStatusWithSingleFailedBuild() throws Exception {
monitor.setStatus(false);
monitorMockControl.replay();
status = new TestCcStatusImpl(monitor, URL_ONE_BUILD_FAILED, prefs);
assertFalse(status.isBuildClean());
monitorMockControl.verify();
}
COM: <s> status should be failed </s>
|
funcom_train/47833655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void forward(String payload) {
if (pubSubManager == null) {
instantiatePubSubManager();
}
PubSubMessage message = new PubSubMessage(channelName, payload);
try {
pubSubManager.publish(message);
}
catch (MessagingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
COM: <s> this class sends a monitoring result event generated by everest to the bus </s>
|
funcom_train/12768115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TreeItem copyItem(Item item, TreeItem parent, int index) {
if (item.getData() instanceof Tag) {
boolean doit = RefactorHelp.requestSave(new Tag[] {(Tag)item.getData()});
if (!doit) return null;
}
TreeItem newItem = copy(item, parent, index);
tree.showItem(newItem);
TreeItemCopyEvent copyEvent = new TreeItemCopyEvent(item, newItem);
fireAfterCopyEvent(copyEvent);
return newItem;
}
COM: <s> creates a new tree item from the existing item </s>
|
funcom_train/42710630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JButton getJButtonUpdateInvoice() {
if (jButtonUpdateInvoice == null) {
jButtonUpdateInvoice = new JButton();
jButtonUpdateInvoice.setText("Update");
jButtonUpdateInvoice.setBounds(new Rectangle(140, 450, 121, 21));
jButtonUpdateInvoice.setActionCommand("UpdateInvoice");
}
return jButtonUpdateInvoice;
}
COM: <s> this method initializes j button update invoice </s>
|
funcom_train/16754357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start (String ... params) throws EngineException {
String[] cmdarray;
if (params != null) {
cmdarray = new String[params.length + 1];
System.arraycopy(params, 0, cmdarray, 1, params.length);
} else {
cmdarray = new String[1];
}
cmdarray[0] = engineFile.getAbsolutePath();
try {
enginePlugin = startEngine(cmdarray);
} catch (IOException e) {
throw new EngineException(e);
}
logger.info ("Engine [" + engineFile.getName() + "] has been started");
}
COM: <s> starts the engine process </s>
|
funcom_train/15521061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAllSamples(String[] ids) throws BusinessException {
org.hibernate.Transaction transaction = super.begin(SampleFactory
.getInstance());
try {
for (int i = 0; i < ids.length; i++) {
Sample sample = (Sample) SampleFactory.getInstance().findByKey(
ids[i]);
SampleFactory.getInstance().remove(sample);
}
super.commit(transaction);
} catch (DAOException daoe) {
super.rollback(transaction);
throw new BusinessException(daoe);
}
}
COM: <s> removes a bunch of code sample code instances in a single transaction </s>
|
funcom_train/50863245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeEvents(int index, int number) {
// Remove the rows
for(int i = index; i < (index + number); i++) {
events.remove(i);
}
Iterator<HistoricalEventListener> iter = listeners.iterator();
while(iter.hasNext()) iter.next().eventsRemoved(index, index + number);
}
COM: <s> an event is removed from the list </s>
|
funcom_train/36658547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int indexOf(Object o) {
int listIndex = 0;
ScalableListNodeIterator<E> iter =
new ScalableListNodeIterator<E>(getHead());
while (iter.hasNext()) {
ListNode<E> n = (ListNode<E>) iter.next();
int index = n.getSubList().indexOf(o);
if (index != -1) {
return listIndex + index;
}
listIndex += n.size();
}
return -1;
}
COM: <s> returns the index in this list of the first occurrence of the specified </s>
|
funcom_train/33256762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void forceSerializeCopy(boolean bool) {
if (bool) {
System.out.println("Forcing serialization");
weekdayLabelTemplate.FORCE_SERIALIZE_COPY = true;
blankLabelTemplate.FORCE_SERIALIZE_COPY = true;
dayLabelTemplate.FORCE_SERIALIZE_COPY = true;
todayLabelTemplate.FORCE_SERIALIZE_COPY = true;
}
}
COM: <s> force a deep copy of the swing component templates instead of the </s>
|
funcom_train/20776371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStationaryLifeTimeMs(int stationaryLifeTimeMs) {
int old = this.stationaryLifeTimeMs;
this.stationaryLifeTimeMs = stationaryLifeTimeMs;
getPrefs().putInt("BluringFilter2DTracker.stationaryLifeTimeMs",stationaryLifeTimeMs);
getSupport().firePropertyChange("stationaryLifeTimeMs",old,this.stationaryLifeTimeMs);
}
COM: <s> sets stationary life time ms </s>
|
funcom_train/27944712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AllocTypeThreadMethodRef getAllocTypeThreadMethod(TypeRef peer) {
ListIterator itr = getAllocTypeThreadMethods().listIterator();
AllocTypeThreadMethodData obj;
while (itr.hasNext()) {
obj = (AllocTypeThreadMethodData) itr.next();
if ( obj.getType().equals( peer ) )
return obj;
}
return null;
}
COM: <s> returns statistic data for given class whose instances were allocated </s>
|
funcom_train/43191768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getCancelButton() {
if (cancelButton == null) {
cancelButton = new JButton();
cancelButton.setBounds(new Rectangle(410, 200, 91, 21));
cancelButton.setText("Cancel");
cancelButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
agentNameField.setText("");
valueField.setText("");
}
});
}
return cancelButton;
}
COM: <s> this method initializes cancel button </s>
|
funcom_train/34068626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void paintLocation(Graphics2D g2, float x, float y, int size, String label) {
float zoom = zoomIn ? 3f : 0.3f;
int screenX = Math.round(x * zoom + camera.getX());
int screenY = Math.round(y * zoom + camera.getZ());
g2.fillOval(screenX - size / 2, screenY - size / 2, size, size);
g2.drawString(label, screenX + size, screenY + size);
}
COM: <s> converts the specified point in world space to a coordinate in screen space </s>
|
funcom_train/45896762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setAvailable(ResearchType rt) {
if (!availableResearch.containsKey(rt)) {
List<ResearchType> avail = new ArrayList<ResearchType>();
for (EquipmentSlot slot : rt.slots.values()) {
ResearchType et0 = null;
for (ResearchType et : slot.items) {
if (isAvailable(et)) {
et0 = et;
} else {
break;
}
}
if (et0 != null) {
avail.add(et0);
}
}
availableResearch.put(rt, avail);
return true;
}
return false;
}
COM: <s> set the availability of the given research </s>
|
funcom_train/51720847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getRowFromLevel(int level) {
int row = -1;
for (int i = 0; i < table.length && row < 0; i++) {
if (table[i][0] instanceof Double) {
double lev = (Double) table[i][0];
if (lev <= level) {
row = i;
}
}
}
return row;
}
COM: <s> table representation is with low level down this provide the table row </s>
|
funcom_train/45539758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(IStructuredSelection selection) {
List newLibraries = new ArrayList();
for (int i = 0; i < fLibraries.length; i++) {
newLibraries.add(fLibraries[i]);
}
Iterator iterator = selection.iterator();
while (iterator.hasNext()) {
Object element = iterator.next();
if (element instanceof LibraryStandin) {
newLibraries.remove(element);
}
// else {
// SubElement subElement = (SubElement)element;
// subElement.remove();
// }
}
fLibraries= (LibraryStandin[]) newLibraries.toArray(new LibraryStandin[newLibraries.size()]);
fViewer.refresh();
}
COM: <s> remove the libraries contained in the given selection </s>
|
funcom_train/51167753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object setProperty(Object bean, String propertyName, Object value) {
try {
PropertyAccessors accessorMethods = getAccessorMethods(bean, propertyName);
return accessorMethods.invokeSetter(bean, value);
}
catch (Exception e) {
log.error(e.toString(), e);
return null;
}
}
COM: <s> sets the property in the bean to the specified value </s>
|
funcom_train/3985323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public PVector add(PVector v1, PVector v2, PVector target) {
if (target == null) {
target = new PVector(v1.x + v2.x,v1.y + v2.y, v1.z + v2.z);
} else {
target.set(v1.x + v2.x, v1.y + v2.y, v1.z + v2.z);
}
return target;
}
COM: <s> add two vectors into a target vector </s>
|
funcom_train/39846856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getFAQCategories() {
if (logger.isDebugEnabled()) {
logger.debug("getFAQCategories() - start");
}
if (logger.isDebugEnabled()) {
logger.debug("getFAQCategories() - end - return value = "
+ fAQCategories);
}
return fAQCategories;
}
COM: <s> p if the type is faq store all the categories of questions here </s>
|
funcom_train/38534666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addResource(int operationID, int resourceID, int start, int end, int minDur, int maxDur) throws PropagationFailureException {
actDom.addResource(operationID, resourceID, start, end, minDur, maxDur);
fireChangeEvent(DomainChangeType.DOMAIN);
}
COM: <s> adds a resource to the operation specified by operation id </s>
|
funcom_train/50488134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getQuarter() {
// then getQuarter() would be getPeriod(QUARTER) !
//setQuarter();
//return quarter;
//return getPeriod(QUARTER);
// case QUARTER:
// INTERNAL NOTE:
// The same as for QUARTER_OF_YEAR
return getPeriod(QUARTER_OF_YEAR);
}
COM: <s> get quarter function </s>
|
funcom_train/3331296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNoNamespaceSchemaLocation(String schemaLocation) {
if (schemaLocation == null) {
//-- remove if necessary
//-- to be added later.
}
else {
_topLevelAtts.setAttribute(XSI_NO_NAMESPACE_SCHEMA_LOCATION,
schemaLocation, XSI_NAMESPACE);
}
} //-- setNoNamespaceSchemaLocation
COM: <s> sets the value for the xsi no namespace schema location attribute </s>
|
funcom_train/1033757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void findThisPointer() {
clearThisPointer();
for (int i = 0; i < getNumArguments(); i++) {
JavaType arg = getJavaArgumentType(i);
if (arg.equals(containingType)) {
thisPointerIndex = i;
break;
}
if (!arg.isJNIEnv()) {
break; // this pointer must be leftmost argument excluding JNIEnvs
}
}
}
COM: <s> find the leftmost argument matching the type of the containing </s>
|
funcom_train/26489713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getParameter(String name) {
try {
String bogus = request.getParameter(name);
if (bogus == null) return null;
return new String(bogus.getBytes(), "ISO-8859-1");
} catch (UnsupportedEncodingException err) {
logError("Unsuppored encoding in getParameter", err);
return null;
}
}
COM: <s> returns a parameter value from the http request </s>
|
funcom_train/21898538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createObjectFormAssociation(Object iUserObject, ViewComponent iForm, SessionInfo iSession) {
if (iSession == null)
iSession = Roma.session().getActiveSessionInfo();
if (iSession == null)
throw new UserException(iForm.getContent(), "Cannot display the form since there is no active session");
IdentityHashMap<Object, ViewComponent> userForms = objectsForms.get(iSession);
userForms.put(iUserObject, iForm);
}
COM: <s> create an association between a user object and a content form </s>
|
funcom_train/10540658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deleteDatabase(String name) {
String shutdownUrl = "jdbc:derby:"+name+";shutdown=true";
try {
DriverManager.getConnection(shutdownUrl);
} catch (Exception se) {
// ignore shutdown exception
}
removeDirectory(getSystemProperty("derby.system.home") + File.separator +
name);
}
COM: <s> delete the database with the name name </s>
|
funcom_train/3926251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addChiselFactory( String chiselName, int chiselType, String baseFilePath, String nameWithoutPath, RowState rowState ) {
System.out.println( "addChiselFactory '" + chiselName + "'" );
ChiselFactory chiselFactory = new ChiselFactory( chiselType, ChiselSet.getProgressIndicator( chiselGroup ), rowState );
addFactory( chiselFactory, chiselName, baseFilePath, nameWithoutPath );
}
COM: <s> add a factory to the list of factories </s>
|
funcom_train/23719216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(IWorkbench workbench, IStructuredSelection selection) {
super.init(workbench, selection);
setWindowTitle(MSSEditorPlugin.INSTANCE.getString("_UI_MDSRImportWizard_label"));
MSSEditorPlugin.getPlugin().getWorkbench().saveAllEditors(true);
}
COM: <s> used when we are launched from the workbench import wizard </s>
|
funcom_train/1723634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean pack(FileRef folder, FileRef archive) throws Exception {
File file = new File(archive.getAbsolutePath());
FileOutputStream fos = new FileOutputStream(file);
CheckedOutputStream checksum = new CheckedOutputStream(fos, new Adler32());
ZipOutputStream zos = new ZipOutputStream(checksum);
pack(zos, folder.getAbsolutePath(), "");
zos.flush();
zos.finish();
zos.close();
fos.flush();
fos.close();
return true;
}
COM: <s> pack the contents of a given folder into a new zip compressed archive </s>
|
funcom_train/10746752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return "Variable: codeIndex=" + codeIndex + ", name=" + name
+ ", signature=" + signature + ", length=" + length
+ ", slot=" + slot + ", tag="
+ JDWPConstants.Tag.getName(tag) + ", type=" + type;
}
COM: <s> converts variable object to string </s>
|
funcom_train/34595600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mergeMoves(int category, String[] moves) {
HashSet set = new HashSet(Arrays.asList(m_moves[category]));
set.addAll(Arrays.asList(moves));
m_moves[category] = (String[])set.toArray(new String[set.size()]);
}
COM: <s> merge in another move sets data </s>
|
funcom_train/19913116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getFilesFirstBox() {
if (filesFirstBox == null) {
filesFirstBox = new JCheckBox();
filesFirstBox.setText(LangageManager
.getProperty("trackenum.filesfirst"));
filesFirstBox.setName("filesFirstBox");
}
return filesFirstBox;
}
COM: <s> this method initializes j check box1 </s>
|
funcom_train/43485350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DisclosurePanel getWildcardPanel() {
if (this.IsOnlyWildcardElementContained()) {
Wildcard wildcard_p = (Wildcard) modelGroup.getParticle(0);
WildcardWrapper wildcardWrapper = new WildcardWrapper(wildcard_p, this.fatherElement, this.fatherElementContainter);
ModelGroup_WildcarWrapper_List.add(wildcardWrapper);
return wildcardWrapper.getWildcardPanel();
} else {
return null;
}
}
COM: <s> get the wildcard panel only if this model group only contains one child </s>
|
funcom_train/4468927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStore(AbstractDataStore store) {
if(this.store != null){
this.store.removeDatumChangeListener(this);
this.paginator.removeFetchListener(this);
}
this.store = store;
store.addDatumChangeListener(this);
paginator.setStore(store);
paginator.addFetchListener(this);
store.doAfterCreation();
if(dojoWidget != null){
dojoSetStore(getDojoWidget(),store.getDojoWidget());
}
}
COM: <s> sets the store that the grid should use </s>
|
funcom_train/21656450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtEditarSustrato() {
if (BtEditarSustrato == null) {
BtEditarSustrato = new JButton();
BtEditarSustrato.setBounds(new Rectangle(659, 112, 124, 25));
BtEditarSustrato.setMnemonic('m');
BtEditarSustrato.setText("Modificar");
BtEditarSustrato.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
editarSustratos();
}
});
}
return BtEditarSustrato;
}
COM: <s> this method initializes bt editar sustrato </s>
|
funcom_train/16462200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showNewGroupDialog(Object groupList) {
Object newGroupForm = this.uiController.loadComponentFromFile(UI_FILE_NEW_GROUP_FORM, this);
this.uiController.setAttachedObject(newGroupForm, this.uiController.getGroupFromSelectedNode(this.uiController.getSelectedItem(groupList)));
this.uiController.add(newGroupForm);
}
COM: <s> shows the new group dialog </s>
|
funcom_train/7271695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleSelection(int row) {
UploadDataLine dataLine = DATA_MODEL.get(row);
_chatEnabled = dataLine.isChatEnabled();
_browseEnabled = dataLine.isBrowseEnabled();
setButtonEnabled(UploadButtons.KILL_BUTTON,
!TABLE.getSelectionModel().isSelectionEmpty());
setButtonEnabled(UploadButtons.BROWSE_BUTTON, _browseEnabled);
}
COM: <s> handles the selection of the specified row in the download window </s>
|
funcom_train/33820677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void logInjectTo() throws IOException {
BufferedReader destReader = null;
try{
destReader = new BufferedReader(new FileReader(injectTo));
String line = destReader.readLine();
while (line != null) {
log(line,LOG_LEVEL);
line = destReader.readLine();
}
}
finally{
close(destReader);
}
}
COM: <s> log the entire inject to file </s>
|
funcom_train/31480822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLog(String file) {
if (null != file) {
try {
this.log = new PrintWriter(new
BufferedWriter(new FileWriter(file, true)),
true);
} catch (IOException e) {
System.err.println(__me + ".setLog(\"" + file +
"\"): caught " + e + " - will log to standard error");
this.log = new PrintWriter(System.err, true);
}
} else
this.log = null;
}
COM: <s> set the file to log to </s>
|
funcom_train/16677397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setAllData(Object object) {
if (object != null && object instanceof Object[]) {
Object[] data = (Object[]) object;
for (int i = 1; i < data.length; i += 2) {
String key = (String) data[i];
Object obj = data[i + 1];
this.setData(key, obj);
}
this.setData(data[0]);
}
}
COM: <s> sets the data to this item from the given object </s>
|
funcom_train/13577600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double sampleFromCDF(){
Double d = null;
double rnd = MatsimRandom.getRandom().nextDouble();
int index = 1;
while(d == null && index <= this.getNumBins() ){
if( this.ys[index] > rnd){
d = this.xs[index-1] + (this.xs[index] - this.xs[index-1]) / 2;
} else{
index++;
}
}
assert(d != null) : "Could not draw from the cumulative distribution function";
return d;
}
COM: <s> draws a single sample from the cumulative distribution function </s>
|
funcom_train/48658016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendMulticast(NetworkObj ob)throws IOException{
String trans = serial.serializeMessage(ob);
DatagramPacket dp = new DatagramPacket(trans.getBytes(),trans.getBytes().length,group,portNum);
ms.send(dp);
lastSent = ob;
}
COM: <s> this sends a message via a multicast link </s>
|
funcom_train/2880617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String makeCommandLine(String args[]) {
StringBuffer buffer = new StringBuffer();
buffer.append(Launcher.MAIN_CLASS);
buffer.append(" ");
for (int i = 0; i < args.length; i++) {
buffer.append(args[i]);
buffer.append(" ");
}
return buffer.toString();
}
COM: <s> for diagnostics turn the args into a flat command line </s>
|
funcom_train/18329044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Number toNumber(String numberStr, String formatStr) {
try {
if (formatStr == null || "".equals(formatStr)) {
return s_numberFormat.parse(numberStr);
} else {
s_decimalFormat.applyPattern(formatStr);
return s_decimalFormat.parse(numberStr);
}
} catch (ParseException e) {
log.error("Failed to extract number: " + numberStr
+ " with format: " + formatStr, e);
}
return null;
}
COM: <s> if a sub format is present the decimal format is used </s>
|
funcom_train/13371020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run()
{
this.isDrawing = true;
currentWidth = this.mapPanel.getWidth();
currentHeight = this.mapPanel.getHeight();
try
{
while (true)
{
if (this.isDrawing)
{
long startTime = System.currentTimeMillis();
this.draw();
long sleepTime = this.minimumRenderCycleTime - (startTime
- System.currentTimeMillis());
if ( sleepTime > 0 ) Thread.sleep( sleepTime );
}
}
}
catch (InterruptedException ie)
{
this.isDrawing = false;
return;
}
}
COM: <s> entry point for the simulation thread </s>
|
funcom_train/13439543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildTree() {
if (topNode != null) topNode.removeAllChildren();
topNode = new DefaultMutableTreeNode(new PDesktopGroup("desktop"));
Iterator groups = mainFrame.getDesktopGroups();
boolean hidenda = HGBaseConfig.getBoolean("hide_empty_nda");
while (groups.hasNext()) {
PDesktopGroup desk = (PDesktopGroup)groups.next();
if (desk.getParent()==null) addGroupToTree(hidenda, desk, topNode);
}
}
COM: <s> build the tree view </s>
|
funcom_train/21644489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getHelpVersionsTxtMenuItem() {
if (helpVersionsTxtMenuItem == null) {
helpVersionsTxtMenuItem = new JMenuItem();
helpVersionsTxtMenuItem.setText("Version Info");
helpVersionsTxtMenuItem.setMnemonic('V');
helpVersionsTxtMenuItem.setDisplayedMnemonicIndex(0);
helpVersionsTxtMenuItem.addActionListener(eventHandler);
}
return helpVersionsTxtMenuItem;
}
COM: <s> return the help versions txt menu item </s>
|
funcom_train/4506871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean createDemoWorkgroup() {
// Create example workgroup
try {
if (WorkgroupUtils.createWorkgroup("demo", "Demo workgroup", "demo").size() == 0) {
JiveGlobals.setProperty("demo.workgroup", "true");
}
}
catch (Exception e) {
Log.error(e);
return false;
}
return true;
}
COM: <s> creates a demo workgroup </s>
|
funcom_train/32058008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddGPInternalFrame() {
System.out.println("testAddGPInternalFrame");
GPInternalFrame frame = new GPInternalFrame(new GPDocument(pad,
"file25.txt", new TPGraphModelProvider(), new GPGraph(),
new DefaultGraphModel(), new GraphUndoManager()));
try {
pad.addGPInternalFrame(frame);
} catch (Exception e) {
fail();
}
}
COM: <s> test of add gpinternal frame method of class gpgraphpad </s>
|
funcom_train/25419653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getResourceUuidsForSql() {
StringBuilder sb = new StringBuilder();
for (String uuid : resourceUuids) {
if (uuid.length()>0) {
if (sb.length()>0) {
sb.append(",");
}
sb.append("'"+uuid+"'");
}
}
return sb.toString();
}
COM: <s> gets resource uuids formated to use in where in lt collection gt clause </s>
|
funcom_train/45809153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(QueryMatches extra) {
if (extra.last == -1)
return;
ensureCapacity(last + extra.last + 2);
System.arraycopy(extra.data, 0, data, last+1, extra.last+1);
last += extra.last + 1;
}
COM: <s> internal adds all the matches in the given table to this table </s>
|
funcom_train/13997753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ActionConnector addConnector(ModelEntity from, ModelEntity to) {
if (to.isCanAcceptInputFrom(from)) {
ActionConnector connector = getConnectorBetween(from, to);
if (connector == null) {
connector = new ActionConnector(from, to, entityIdentifier++);
connectors.add(connector);
firePropertyChange(CONNECTOR_ADDED_PROP, null, connector);
}
return connector;
} else {
return null;
}
}
COM: <s> add an action connector between two given entities </s>
|
funcom_train/31917341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getInflictedHullDamage() {
int damage = 0;
if(getDamagePercentage() == 100)
return 0;
if(!isActive())
return 0;
damage=( (int) (Math.random() * maxInflictableHullDamage[techLevel]) -
MISFIRE);
if(damage<0) damage=0;
damage = (damage * (100-this.getDamagePercentage())) / 100;
return damage+1;
}
COM: <s> returns an integer number which represents the damage inflicted </s>
|
funcom_train/3371756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insert(String str, int pos) {
Document doc = getDocument();
if (doc != null) {
try {
doc.insertString(pos, str, null);
} catch (BadLocationException e) {
throw new IllegalArgumentException(e.getMessage());
}
}
}
COM: <s> inserts the specified text at the specified position </s>
|
funcom_train/38292533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BehaviourID (Behaviour b) {
code = b.hashCode();
name = b.getBehaviourName();
className = b.getClass().getName();
kind = getClassKind(b.getClass());
// If we have a composite behaviour, add the
// children to this behaviour id.
if (b instanceof CompositeBehaviour) {
CompositeBehaviour c = (CompositeBehaviour)b;
Iterator iter = c.getChildren().iterator();
while (iter.hasNext()) {
addChildren(new BehaviourID((Behaviour)iter.next()));
}
}
}
COM: <s> this constructor builds a new behaviour id describing the </s>
|
funcom_train/45863961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTempoFactor(int millirate, int duration) {
if (ENABLE_SNDFX) {
try {
/*
* As with the <code>MidiControl</code> this might also be
* missing from the implementation.
*/
if (player != null && ((RateControl) player.getControl("RateControl")).setRate(millirate) != 100000) {
tempoTimer = duration;
}
} catch (Throwable e) {}
}
}
COM: <s> adjusts the tempo of the currently playing midi file </s>
|
funcom_train/38810073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_TCM__OrgJdomDocument_getDocument() {
Element element = new Element("element");
assertNull("incorrectly returned document before there is one", element
.getDocument());
Element child = new Element("child");
Element child2 = new Element("child");
element.addContent(child);
element.addContent(child2);
Document doc = new Document(element);
assertEquals("didn't return correct Document", element.getDocument(),
doc);
assertEquals("didn't return correct Document", child.getDocument(), doc);
}
COM: <s> test that an element returns the reference to its enclosing document </s>
|
funcom_train/12857893 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int toNext(int amount) throws FetchException {
if (amount <= 1) {
return (amount <= 0) ? 0 : (toNext() ? 1 : 0);
}
int count = 0;
disableKeyAndValue();
try {
while (amount > 0) {
if (toNext()) {
count++;
amount--;
} else {
break;
}
}
} finally {
enableKeyAndValue();
}
return count;
}
COM: <s> move the cursor to the next available entry incrementing by the amount </s>
|
funcom_train/50982796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUpperCaseDocument() throws Exception {
final Document document
= DocumentUtil.upperCaseDocument( new PlainDocument() );
add( document, "aBc" );
assertEquals( "ABC", getText(document) );
add( document, "d" );
assertEquals( "ABCD", getText(document) );
}
COM: <s> test upper case document with mixed case inputs </s>
|
funcom_train/965363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Component createPreviousButton() {
if (LookUtils.IS_LAF_WINDOWS_XP_ENABLED)
return super.createPreviousButton();
JButton b = new WindowsArrowButton(SwingConstants.SOUTH);
b.addActionListener(PREVIOUS_BUTTON_HANDLER);
b.addMouseListener(PREVIOUS_BUTTON_HANDLER);
return b;
}
COM: <s> create a component that will replace the spinner models value with the </s>
|
funcom_train/3116532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
DenimComponentInstance container =
source.getContainingComponentInstance();
assert container != null;
// "A component instance not within a component is trying to
// dispatch a named event"
DenimPanel thePanel = container.getContainingPanel();
container.handleEvent
(event,
thePanel.getCurrentRunTimeCondition());
}
COM: <s> dispatches this objects event to the event sources containing </s>
|
funcom_train/31659109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBorders(JComponent c) {
Color color = primaryColor; // (hasPrimaryColor ? primaryColor :
// secondaryColor); //new
// Color(0,0,0,0);
if (this.isFirst) {
c.setBorder(new FormBorder(borderSize, borderSize, borderSize,
borderSize, color));
} else {
c.setBorder(new FormBorder(0, borderSize, borderSize,
borderSize, color));
}
}
COM: <s> adds the borders </s>
|
funcom_train/44497366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String string_value() {
String ret = "";
ret += XSDateTime.pad_int(year(), 4);
ret += "-";
ret += XSDateTime.pad_int(month(), 2);
ret += "-";
ret += XSDateTime.pad_int(day(), 2);
if(timezoned())
ret += "Z";
return ret;
}
COM: <s> retrieves a string representation of the date stored </s>
|
funcom_train/41163705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(CoMatrixExr1User entity) {
EntityManagerHelper.log("saving CoMatrixExr1User 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 co matrix exr1 user entity </s>
|
funcom_train/15606650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(ObjectWithPreferences object, String prefName, Object prefValue) {
Value v = (Value)map.get(prefName);
if (v != null) {
if (Assert.debug)
Assert.vAssert(v.preferenceValue == prefValue);
v.objects.add(object);
return;
}
map.put(prefName, new Value(object, prefValue));
}
COM: <s> add the preference with key pref name and value pref value </s>
|
funcom_train/35839537 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadCodes() throws SQLException, ModelSessionException {
Vector codes = new Vector(51);
// for(Enumeration e = codes.elements();e.hasMoreElements();) {
// Code code = (Code)e.nextElement();
// if(!htCodes.containsKey(code.getId()))
// htCodes.put(code.getId(),code);
// }
}
COM: <s> load all the codes referenced by this node from the database </s>
|
funcom_train/940981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Class filterInterface(Class _interfaceType, Class _objClass) {
Class ca[] = _objClass.getInterfaces();
for (int i=0; i<ca.length; i++) {
if (_interfaceType.isAssignableFrom(ca[i])) {
return ca[i];
}
}
Class sc = _objClass.getSuperclass();
if (sc!=null) {
return filterInterface(_interfaceType, sc);
}
return null;
}
COM: <s> returns an implemented interface of the objects class </s>
|
funcom_train/8485830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBugfixOverloadedConstructor() throws InterpreterException {
// def jStringBuffer := jLobby.java.lang.StringBuffer;
ATObject jStringBuffer = JavaClass.wrapperFor(StringBuffer.class);
// jStringBuffer.new(10);
jStringBuffer.impl_invoke(jStringBuffer, AGSymbol.jAlloc("new"),
NATTable.atValue(new ATObject[] { NATNumber.atValue(10) }));
}
COM: <s> bugfix test jlobby </s>
|
funcom_train/40225189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CacheStatus getCacheStatus(String url) {
if(gwtNoCachePattern.matcher(url).matches()) {
return CacheStatus.NOCACHE;
}
else if(gwtCachePattern.matcher(url).matches()) {
return CacheStatus.CACHE_1YEAR;
}
// handle one day caching
if(oneDayCacheFileExts != null) {
for(final String ext : oneDayCacheFileExts) {
if(url.endsWith(ext)) {
return CacheStatus.CACHE_1DAY;
}
}
}
// we are indifferent for any other request types
return CacheStatus.INDIFFERENT;
}
COM: <s> central method that decides if we want the client to cache the requested </s>
|
funcom_train/50849760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateOrbitParameters(boolean focusOpenGL) {
OrbitParameterComposite.this.controller.putAllOrbitParameters();
if (focusOpenGL) {
OrbitParameterComposite.this.controller.focusOpenGL();
}
OrbitParameterComposite.this.controller.saveCustomOrbit();
standardOrbitsBox.setText(standardOrbitsBox.getItem(0));
}
COM: <s> pushes the text field contents to the orbit display </s>
|
funcom_train/3673714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createLearningOutput(){
for (int i = 0; i < 40; i++) {
for (int j = 0; j < 40; j++) {
if (i==j) {
lernausgabe[i][j] = 1;
}
else lernausgabe [i][j]=0;
}
}
}
COM: <s> the method create learning output serves the production of sample spent </s>
|
funcom_train/47947185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getTopPositions() {
if (topPositions == null) {
GridLayout gridLayout = new GridLayout();
gridLayout.setRows(1);
gridLayout.setColumns(3);
topPositions = new JPanel();
topPositions.setLayout(gridLayout);
topPositions.add(getTopLeft(), null);
topPositions.add(getTopCenter(), null);
topPositions.add(getTopRight(), null);
}
return topPositions;
}
COM: <s> this method initializes top positions </s>
|
funcom_train/14027548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public APoolInfo getConstantPoolItem(int index) {
APoolInfo cp;
assert(index <= 0xFFFF);
if ((0 >= index) || (index > (_constantPool.size() - 1))) {
return null;
}
cp = _constantPool.get(index);
cp.reindex();
return cp;
}
COM: <s> return a constant pool item from this class </s>
|
funcom_train/49866207 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Connection createConnection() throws ClassNotFoundException, SQLException, InstantiationException, IllegalAccessException {
Class.forName(this.driver).newInstance();
Connection connection = DriverManager.getConnection(this.server,
this.user, this.password);
MultithreadedConnection jc = new MultithreadedConnection(connection);
synchronized (pool) {
this.pool.put(jc.getMemoryAddress(), jc);
this.jcc.increaseConnectionsInUse();
}
return connection;
}
COM: <s> method that creates new connection </s>
|
funcom_train/13888659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void importProfile(String filePath, String section) throws ProfileException {
Profile p = ProfileReader.getProfile(filePath, section);
init(p.getString(DRIVER_PROPERTY),
p.getString(DBMS_URL_PROPERTY),
p.getString(DATABASE_PROPERTY),
p.getString(USER_PROPERTY),
p.getString(PASSWORD_PROPERTY));
}
COM: <s> use the import profile together with the 0 ary constructor of jdbc address </s>
|
funcom_train/13675494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeDeleted() {
if (m_HasDeleted) {
JwmaMessageInfoImpl msg = null;
for (Iterator iter = iterator(); iter.hasNext();) {
msg = (JwmaMessageInfoImpl) iter.next();
if (msg.isDeleted()) {
iter.remove();
}
}
m_HasDeleted = false;
}
}//removeDeleted
COM: <s> removes items that are flagged deleted from this list </s>
|
funcom_train/42667285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch(Exception e) {
System.out.println("Error setting native LAF: " + e);
}
this.setTitle("Exactitude - GUI demo interface");
this.setJMenuBar(getJJMenuBar());
this.setContentPane(getJSplitMain());
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.pack();
this.setExtendedState(this.getExtendedState() | JFrame.MAXIMIZED_BOTH);
this.setVisible(true);
}
COM: <s> this method initializes this </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.