__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/51575702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String paramString() {
final String retStr = getClass() + java.util.ResourceBundle.getBundle("anecho/gui/guiBundle").getString(",_") + getName();
return retStr;
// return new String(getClass() + ", " + getName());
}
COM: <s> a param string so that other classes can identify individual sync frames </s>
|
funcom_train/19909665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMethodParameters() throws Exception {
Method m = Mapper1.class.getDeclaredMethod("method", Object.class);
Assert.assertNotNull(m);
Type[] params = TypeOracle.resolveMethodArguments(m, Mapper2.class);
Assert.assertEquals(1, params.length);
Assert.assertEquals(Integer.class, params[0]);
}
COM: <s> test resolving method parameters </s>
|
funcom_train/16092613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRequestAllHeadersForce(String header) throws IOException {
String[] headerLine = header.split(EOL);
for (int i = 0; i < headerLine.length; ++i) {
String[] parse = headerLine[i].split(TOKEN_SPACE, 2);
addRequestHeaderForce(parse[0],parse[1]);
}
}
COM: <s> adds all headers to the header list foece </s>
|
funcom_train/19566193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean changeIndex(int from, int to) {
if (this.classes.contains(to)) {
return false;
} else {
if (this.map.containsKey(new Integer(from))) {
this.addClass(to);
for (int i = 0; i < this.classes.size(); i++) {
if (this.classes.get(i) == from) {
this.classes.set(i, to);
}
}
this.remove(from);
}
return true;
}
}
COM: <s> change index of class </s>
|
funcom_train/13510994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getLabelValue(int labelLocation){
int dayOfMonth = this.getSelectedDayCount();
int dayInWeek = DateHelper.getFirstDayOfMonth(this.displayedDate) + 6;
int delta = labelLocation - dayInWeek;
if (delta > 0 && delta <= dayOfMonth){
return delta;
} else {
return -1;
}
}
COM: <s> get the value to display in label </s>
|
funcom_train/2887103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateSettingsMap(Class kitClass, Map settingsMap) {
if (kitClass == BaseKit.class) {
new SmartFrogTokenColoringInitializer().
updateSettingsMap(kitClass, settingsMap);
}
if (kitClass == SmartFrogEditorKit.class) {
SettingsUtil.updateListSetting(
settingsMap,
SettingsNames.TOKEN_CONTEXT_LIST,
new TokenContext[]
{ SmartFrogTokenContext.context }
);
}
}
COM: <s> update map filled with the settings </s>
|
funcom_train/11314978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double removeElementAt(int index) {
checkRange(index);
incrModCount();
double oldval = _data[index];
int numtomove = _size - index - 1;
if(numtomove > 0) {
System.arraycopy(_data,index+1,_data,index,numtomove);
}
_size--;
return oldval;
}
COM: <s> removes the element at the specified position in </s>
|
funcom_train/21173589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createUser() {
client.createNewUser (getUserName (), getPassword(), new MinimumLengthPolicy(1));
client.createNewUser (getUserName () + "1", getPassword(), new MinimumLengthPolicy(1));
client.createNewUser (getUserName () + "2", getPassword(), new MinimumLengthPolicy(1));
}
COM: <s> creates the user returned by get user name if it doesnt already exist </s>
|
funcom_train/22232823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDstOffset(int xDstOffset, int yDstOffset) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_OFFSET_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("Raster7"));
((RasterRetained)this.retained).setDstOffset(xDstOffset, yDstOffset);
}
COM: <s> sets the destination pixel offset of the upper left corner of </s>
|
funcom_train/4376669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRawFragment(char[] escapedFragment) throws URIException {
if (escapedFragment == null || escapedFragment.length == 0) {
_fragment = escapedFragment;
hash = 0;
return;
}
if (!validate(escapedFragment, fragment)) {
throw new URIException(URIException.ESCAPING,
"escaped fragment not valid");
}
_fragment = escapedFragment;
hash = 0;
}
COM: <s> set the raw escaped fragment </s>
|
funcom_train/37035458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean deriveProcessEnvironment(HttpServletRequest req) {
Hashtable envp = new Hashtable();
command = getCommand();
if (command != null) {
workingDirectory = new
File(command.substring(0,
command.lastIndexOf(File.separator)));
envp.put("X_TOMCAT_COMMAND_PATH", command); //for kicks
}
this.env = envp;
return true;
}
COM: <s> constructs the process environment to be supplied to the invoked </s>
|
funcom_train/39968505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(Object value) {
if ( !isEnabled() ) return;
if (!isValueSupported(value)) {
throw new IllegalArgumentException("Requested value " + value + " is not supported.");
}
if (!value.equals(this.value)) {
this.value = value;
notifyParent(this);
}
}
COM: <s> sets the current value for the control </s>
|
funcom_train/38551780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCompressedFile(CompressedFile cFile) throws Cube42Exception {
Cube42NullParameterException.checkNull(cFile,
"cFile",
"addCompressedFile",
this);
if(this.contains(cFile)) {
throw new Cube42Exception(
FileSystemCodes.DUPLICATE_ENTRY_IN_ZIPFILEHANDLER,
new Object[] {cFile.getName()});
} else {
this.compressedFiles.add(cFile);
}
}
COM: <s> adds a compressed file to the handler </s>
|
funcom_train/18183652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void testSetValidRecordNames() {
for (RecordTypeMapped recordType : LEGAL_RECORD_NAMES_TEST) {
mappedRecordImpl.setRecordName(recordType.name());
assertThat(mappedRecordImpl.getRecordName(), is(equalTo(recordType.name())));
}
}
COM: <s> ensures that all valid record names can be set </s>
|
funcom_train/31057559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SerializableImage getImage(Agent sender, int i) {
myCell.noteAgentMessage( this, "getImage", sender, this ); // the message
myCell.noteAgentMessage( this, "getImage reply", this, sender ); // the reply
return rb.getElement(i);
}
COM: <s> returns the image of index i </s>
|
funcom_train/28775418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void connect() throws IOException, KeyManagementException, NoSuchAlgorithmException {
System.out.println ("Proxy connect");
if (this.useSSL) {
initSSL();
} else {
initUnencrypted();
}
ServerSocketFactory socketFactory = this.getServerSocketFactory();
this.listenServerSocket = socketFactory.createServerSocket(this.localPort);
System.out.println ("Proxy connect done");
}
COM: <s> set up the socket initializes the proxy </s>
|
funcom_train/2364105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ILookupCategory ensureLookupCategory(IndexType indexType, int[] variableIndices) {
assert indexType != IndexType.NONE;
ILookupCategory result = getLookupCategory(indexType, variableIndices);
if (result == null) {
result = new LookupCategory(indexType, variableIndices);
addLookupCategory(result);
}
return result;
}
COM: <s> makes sure a lookup category with given type not none and </s>
|
funcom_train/26573588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRequirementStateFactory() {
RequirementStateFactory factory = new RequirementStateFactory(conParam);
RequirementState obj = null;
try {
obj = (RequirementState) factory.load(new java.lang.Long(1));
assertEquals(obj.getName(), "PROPOSED");
assertEquals(obj.getIcon(), "question.gif");
assertEquals(obj.getPK(), new java.lang.Long(1));
} catch (Exception e) {
JEErrorHandler handler = new JEErrorHandler(conParam.getLogList());
handler.fatalError(e);
assertNull(this);
}
}
COM: <s> method test requirement state factory </s>
|
funcom_train/12628489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readHeader() throws IOException {
if (eof) return;
int bytesRead = in.read(header);
int thisPass = 0;
while (bytesRead < 5) {
thisPass = in.read(header, bytesRead, 5 - bytesRead);
if (thisPass < 0) {
eof = true;
return;
}
bytesRead += thisPass;
}
switch(header[4]) {
case NGConstants.CHUNKTYPE_STDIN:
remaining = LongUtils.fromArray(header, 0);
break;
case NGConstants.CHUNKTYPE_STDIN_EOF:
eof = true;
break;
default: throw(new IOException("Unknown stream type: " + (char) header[4]));
}
}
COM: <s> reads a nail gun chunk header from the underlying input stream </s>
|
funcom_train/16750689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toVerboseString(SQLiteDatabase database, boolean coordinates) {
StringBuilder strb = new StringBuilder();
if (coordinates) {
strb.append(toString());
} else {
strb.append(name);
}
String bs = getBoroughsAsString(database);
if (bs.length() > 0) {
strb.append(" (");
strb.append(bs);
strb.append(")");
}
String ps = getPostcodesAsString(database);
if (ps.length() > 0) {
strb.append(" (");
strb.append(ps);
strb.append(")");
}
return strb.toString();
}
COM: <s> produce a verbose string for detailed output </s>
|
funcom_train/36634120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() throws ResourceException {
LOG.info("Closing a connection " + this.managedConnection);
if (this.managedConnection == null) {
return; // connection is already closed
}
this.managedConnection.removeDb4oConnection(this);
// Send a close event to the App Server
this.managedConnection.sendEvent(ConnectionEvent.CONNECTION_CLOSED, null, this);
this.managedConnection = null;
LOG.info("Connection closed OK");
}
COM: <s> closes the connection </s>
|
funcom_train/41461952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sort(int p) {
int q = dec(p);
if (q == readCursor) {
return;
}
if (queue[q] == null) {
return;
}
if (queue[p].getSequenceNumber() < queue[q].getSequenceNumber()) {
Frame temp = queue[p];
queue[p] = queue[q];
queue[q] = temp;
sort(q);
}
}
COM: <s> checks the sequence numbers of specified packet and neightbor from left </s>
|
funcom_train/23390560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void centerFrame(Window frame) {
Point center = GraphicsEnvironment.getLocalGraphicsEnvironment().getCenterPoint();
Dimension frameSize = frame.getSize();
frame.setLocation(center.x - frameSize.width / 2, center.y - frameSize.height / 2 - 10);
}
COM: <s> centers a window on screen </s>
|
funcom_train/550018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearCommands() {
if (JOptionPane.showConfirmDialog(null, "Do you really want to "
+ "clear the command table?", "Alert",
JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION)
commandTable.clear();
}
COM: <s> code clear commands code calls the code clear code of the second </s>
|
funcom_train/8572875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ListBox createFontList() {
ListBox mylistBox = new ListBox();
mylistBox.addChangeHandler(evHandler);
mylistBox.setVisibleItemCount(1);
mylistBox.addItem(GUI_LISTNAME_FONTS);
for (String name : GUI_FONTLIST.keySet()) {
mylistBox.addItem(name, GUI_FONTLIST.get(name));
}
return mylistBox;
}
COM: <s> method to create the fontlist for the toolbar </s>
|
funcom_train/35715934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void installValidator(ContextFrame frame) {
if (fContentAssistSubjectControl != null) {
if (frame.fValidator instanceof ISubjectControlContextInformationValidator)
((ISubjectControlContextInformationValidator)frame.fValidator).install(frame.fInformation, fContentAssistSubjectControl, frame.fOffset);
} else
frame.fValidator.install(frame.fInformation, fViewer, frame.fOffset);
}
COM: <s> installs this adapters information validator on the given context frame </s>
|
funcom_train/40764967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateEntries(List<Map<String, Object>> entries) throws FeedServerClientException {
for (Map<String, Object> entry : entries) {
URL entryUrl;
try {
entryUrl = new URL(getEntryId(entry));
} catch (MalformedURLException e) {
throw new FeedServerClientException(e);
}
updateEntry(entryUrl, entry);
}
}
COM: <s> updates each entry in the supplied list of entries </s>
|
funcom_train/45737065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TSMethod getApplyCallbacks(Scenario scenario) throws OdbgenException{
if(scenario==XmlSchemaUtils.Scenario.CLIENT){
return this._applyCallbacksClientMethod;
}
else if(scenario==XmlSchemaUtils.Scenario.SERVER){
return this._applyCallbacksServerMethod;
}
else if(scenario==XmlSchemaUtils.Scenario.EMBEDDED){
return this._applyCallbacksEmbeddedMethod;
}
else{
throw new OdbgenException("Unknown config file type '%s'.", scenario.toString());
}
}
COM: <s> returns one of the apply callbacks methods </s>
|
funcom_train/3904301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintComponent(Graphics g) {
super.paintComponent(g);
Graphics2D g2d = (Graphics2D)g;
GradientPaint gradient = new GradientPaint(0, 0, _color, 50, 100, getBackground());
g2d.setPaint(gradient);
g2d.fillRect(0, 0, getWidth(), getHeight());
}
COM: <s> paint the gradient </s>
|
funcom_train/26221314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton createButton(String text) {
final int textFieldHeight = this.realFileField.getPreferredSize().height + 2;
final JButton button = new JButton(text);
button.setPreferredSize(new Dimension(button.getPreferredSize().width, textFieldHeight));
return button;
}
COM: <s> creates a butten with given text and adjusted size and appearance </s>
|
funcom_train/4925927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateBackgroundImage() {
try {
Dimension dim = this.toolKit.getScreenSize();
this.backgroundImage = RecordComponent.this.robot
.createScreenCapture(new Rectangle(0, 0, (int) dim
.getWidth(), (int) dim.getHeight()));
} catch (Exception ex) {
JOptionPane.showMessageDialog(this.frame, ex.getClass()
.getSimpleName()
+ ": " + ex.getMessage(), "Transparency Error",
JOptionPane.ERROR_MESSAGE);
}
}
COM: <s> updates the background image to mimic transparency </s>
|
funcom_train/45145822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createPackageContents() {
if (isCreated) return;
isCreated = true;
// Create classes and their features
iorEntryEClass = createEClass(IOR_ENTRY);
createEAttribute(iorEntryEClass, IOR_ENTRY__NAME);
createEAttribute(iorEntryEClass, IOR_ENTRY__STRINGIFIED);
createEReference(iorEntryEClass, IOR_ENTRY__IOR);
ioR_listEClass = createEClass(IOR_LIST);
createEReference(ioR_listEClass, IOR_LIST__IOR_ENTRIES);
}
COM: <s> creates the meta model objects for the package </s>
|
funcom_train/7529291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void registerHandler(Transaction tx, Synchronization handler, InvocationContext ctx) throws Exception {
OrderedSynchronizationHandler orderedHandler = ctx.getTransactionContext().getOrderedSynchronizationHandler(); //OrderedSynchronizationHandler.getInstance(tx);
if (trace) log.trace("registering for TX completion: SynchronizationHandler(" + handler + ")");
orderedHandler.registerAtHead(handler);// needs to be invoked first on TX commit
notifier.notifyTransactionRegistered(tx, ctx);
}
COM: <s> registers a sync hander against a tx </s>
|
funcom_train/6409700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParameter(float[] param, int paramID) {
if (paramID < 0 || paramID > 23)
throw new IllegalArgumentException("Invalid parameter ID");
if (param != null && param.length != 4)
throw new IllegalArgumentException("Fragment program parameters must be of type float[4]");
usingParameters = true;
parameters[paramID] = param;
setNeedsRefresh(true);
}
COM: <s> code set parameter code sets a parameter for this fragment program </s>
|
funcom_train/16415344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMessage(final String msg) {
if (EventQueue.isDispatchThread()) {
((DefaultListModel) msgList.getModel()).addElement(msg);
msgList.ensureIndexIsVisible(msgList.getModel().getSize() - 1);
} else {
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
addMessage(msg);
}
});
}
}
COM: <s> adds msg to msg list </s>
|
funcom_train/17026239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void filterParameters(Map<String, List<String>> params) {
for (String key : params.keySet()) {
if (!key.endsWith("_xml")&&!key.endsWith("_json")) {
List<String> filteredValues = new ArrayList<String>();
for (String value : params.get(key)) {
filteredValues.add(RequestUtil.filter(value));
}
params.put(key, filteredValues);
}
}
}
COM: <s> remove code from all parameters except those ending with xml </s>
|
funcom_train/40091842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getLogoURL(){
utilityService.getLogoURL(new AsyncCallback<String>(){
@Override
public void onFailure(Throwable caught) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void onSuccess(String result) {
mainWindow.getHeaderPanel().setLogoURL(result);
}
});
}
COM: <s> this method invokes the ajax call to get the server logo </s>
|
funcom_train/39865369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void engineSetSeed(byte[] seed) {
if (seed == null) {
throw new NullPointerException("seed == null");
}
if (state == NEXT_BYTES) { // first setSeed after NextBytes; restoring hash
System.arraycopy(copies, HASHCOPY_OFFSET, this.seed, HASH_OFFSET,
EXTRAFRAME_OFFSET);
}
state = SET_SEED;
if (seed.length != 0) {
updateSeed(seed);
}
}
COM: <s> changes current seed by supplementing a seed argument to the current seed </s>
|
funcom_train/310972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFace(int f) {
faceNo = f;
if (nestView && nestGroup!=null) nestGroup.detach();
nestGroup = new BranchGroup(); // Show one zone
HealSphere face = new NestSphere(nside,f);
nestGroup.addChild(face);
nestGroup.setCapability(BranchGroup.ALLOW_DETACH);
objTrans.addChild(nestGroup);
if (!nestView) nestGroup.detach();
}
COM: <s> sets the face </s>
|
funcom_train/35043866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GetResponse getBucketRequestPayment(String bucket, Map headers) throws IOException {
Map pathArgs=new HashMap();
pathArgs.put("requestPayment", null);
return new GetResponse(makeRequest("GET", bucket, "", pathArgs, headers));
}
COM: <s> get the request payment xml document for a given bucket </s>
|
funcom_train/47433938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ChainPhantom getPhantom(IProject project) throws CoreException {
IPath path = new Path(PHANTOM_CHAIN_FILE);
IFile phantomChainFile = project.getFile(path);
ChainPhantom phantom = (ChainPhantom) project2Phantom.get(phantomChainFile);
if (phantom == null) {
phantom = readPhantom(phantomChainFile);
if (phantom == null) {
phantom = new ChainPhantom();
}
project2Phantom.put(phantomChainFile, phantom);
}
return phantom;
}
COM: <s> gets the phantom of the given project </s>
|
funcom_train/28268886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringBuilder getText(int startL, int endL) {
StringBuilder sb = new StringBuilder();
String line;
try {
BufferedReader lnr = new BufferedReader(
new InputStreamReader(
new FileInputStream(inputfile), encoding));
for (int i=0; i<endL; i++) {
line = lnr.readLine();
if (i >= startL-1 && i < endL)
sb.append(line+"\n");
}
} catch (IOException e){
System.out.println("ERROR: LineNumberReader");
}
return sb;
}
COM: <s> return a text block from the file currently being parsed </s>
|
funcom_train/50140070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
running = true;
while (running) {
switch (function) {
case FDELETING:
deleting();
break;
case FCREATING:
creating();
break;
case FUPDATING:
updating();
break;
case FREADING:
reading();
break;
case FDBMANIPULATION:
dbManipulation1();
dbManipulation2();
dbManipulation3();
break;
}
}
}
COM: <s> main processing method for the stress tester object </s>
|
funcom_train/3834772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void push(Object identifier, Object data) {
Debug.debugMethodBegin( this, "put" );
synchronized (this.data) {
this.data.put( identifier, data );
lastCallTime.put( identifier, new Long( System.currentTimeMillis() ) );
if ( this.data.size() > maxCacheSize ) {
deleteOldest();
}
}
Debug.debugMethodEnd();
}
COM: <s> pushes a new entry to the cache </s>
|
funcom_train/22172239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCurrentLesson(final String currentLesson) {
if (this.currentLesson == null || !this.currentLesson.equals(currentLesson)) {
this.currentLesson = currentLesson;
paukerPrefs.setLastLessonName(currentLesson);
// store the prefs now to preserve the lesson name
if (paukerPrefs.isAutoLoadLastLesson()) {
paukerPrefs.savePreferences();
}
}
}
COM: <s> set the name of the currently opened lesson </s>
|
funcom_train/44828850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeEdge(Edge edge) {
if (edge.getFromNode().equals(this)) {
_edgesOut.remove(edge);
}
if (edge.getToNode().equals(this)) {
_edgesIn.remove(edge);
if (edge.getFromNode().equals(this)) {
_selfEdge--;
}
}
pack(true);
}
COM: <s> removes an edge from this node </s>
|
funcom_train/253272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAllURIs() {
for ( int i = uriSelectors.size()-1; i > 0; i--) {
remove(uriSelectors.get(i));
}
uriSelectors.get(0).setURI(null);
if (resultEnabled) {
uriSelectors.get(0).setResultURI(null);
}
}
COM: <s> removes all extra uri selectors allowing undo afterwards </s>
|
funcom_train/4743984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createSchedule(long wait, String cron) {
try {
if (this.currentSchedule != null) {
this.currentSchedule.cancel();
}
this.currentSchedule = cronDaemon.update(wait, cron);
} catch (SchedulerException e) {
log.error(e.getMessage());
}
}
COM: <s> create the schedule </s>
|
funcom_train/31106379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMakeFinderMethodCollection() {
MethodInfo ejbFinder =
new MethodInfo( "java.util.Collection", "ejbFindAll" );
MethodInfo finder = getView( fubarEjb ).makeFinderMethod( ejbFinder );
assertEquals( "findAll", finder.getName() );
assertEquals( "java.util.Collection", finder.getType() );
}
COM: <s> if ejb find xxx returns a collection so should find xxx </s>
|
funcom_train/3364659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paintHorizontalLabel( Graphics g, int value, Component label ) {
int labelCenter = xPositionForValue( value );
int labelLeft = labelCenter - (label.getPreferredSize().width / 2);
g.translate( labelLeft, 0 );
label.paint( g );
g.translate( -labelLeft, 0 );
}
COM: <s> called for every label in the label table </s>
|
funcom_train/9702420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createRadioButtons(Composite parent,Label lbl, Button[] btn,String lblText,String[] text, String[] tooltip, boolean[] visible, boolean[] editable,boolean[] selected) {
Composite cont = new Composite(parent,SWT.NULL);
FillLayout fl = new FillLayout(SWT.HORIZONTAL);
cont.setLayout(fl);
lbl = new Label(parent,SWT.NULL);
lbl.setText(lblText);
lbl.setVisible(visible[0]);
for (int i = 0; i < selected.length; i++) {
createRadioButton(cont,btn[i],text[i],tooltip[i],visible[i],editable[i],selected[i]);
}
}
COM: <s> create radio buttons </s>
|
funcom_train/3612543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Revision getPreviousRevision(final Revision revision) {
if (!revisions.contains(revision)) {
throw new IllegalArgumentException("revision not containted in file");
}
final SortedSet headSet = revisions.headSet(revision);
if (headSet.isEmpty()) {
return null;
}
return (Revision) headSet.last();
}
COM: <s> returns the revision which was replaced by the revision given as </s>
|
funcom_train/4521129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ConstanciaVotacion update(ConstanciaVotacion entity) {
LogUtil.log("updating ConstanciaVotacion instance", Level.INFO, null);
try {
ConstanciaVotacion result = entityManager.merge(entity);
LogUtil.log("update successful", Level.INFO, null);
return result;
} catch (RuntimeException re) {
LogUtil.log("update failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> persist a previously saved constancia votacion entity and return it or a </s>
|
funcom_train/19539975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDrawable(Pen pen, Drawable drawable) {
checkZone();
if (log.isDebugEnabled())
log.debug("drawable " + drawable + " being added to zone " + zone.getName());
manager.addEdit(new DrawableUndoableEdit(pen, drawable));
net.rptools.maptool.client.AppActions.UNDO_PER_MAP.isAvailable();
net.rptools.maptool.client.AppActions.REDO_PER_MAP.isAvailable();
}
COM: <s> add a drawable to the undo set </s>
|
funcom_train/22574049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ArrayList getObjectsOfType(String type) throws Exception {
if (objects == null)
throw new Exception("Metadata: getObjectsOfType: objects is null");
ArrayList al = (ArrayList) objects.get(type);
if (al == null) {
al = new ArrayList();
objects.put(type, al);
}
return al;
}
COM: <s> gets all objects with the name specified as a parameter </s>
|
funcom_train/42877120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateAllAutoplaylists() {
Playlist playlist;
int size = this.playlistListModel.size();
for (int i = 0; i < size; i++) {
playlist = this.getPlaylist(i);
if (playlist.isAutoplaylist()) {
((AutoPlaylist) playlist).update(null, this.dataPool);
}
}
}
COM: <s> update all autoplaylists </s>
|
funcom_train/27785103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private GraphSource getDayLow() {
if(dayLowGraphSource == null)
if (indexChart) {
dayLowGraphSource = new OHLCVIndexQuoteGraphSource(quoteBundle, Quote.DAY_LOW);
} else {
dayLowGraphSource = new OHLCVQuoteGraphSource(quoteBundle, Quote.DAY_LOW);
}
return dayLowGraphSource;
}
COM: <s> returns day low graph source for input to graph </s>
|
funcom_train/31080598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDeclaredInterfaces(Class[] interfaces) {
String[] names = null;
if (interfaces != null) {
names = new String[interfaces.length];
for (int i = 0; i < interfaces.length; i++)
names[i] = interfaces[i].getName();
}
setDeclaredInterfaces(names);
}
COM: <s> set the interfaces declared implemented extended by this class set to </s>
|
funcom_train/46735321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUpdateDt(DateTimeModel updateDt) {
if (Converter.isDifferent(this.updateDt, updateDt)) {
DateTimeModel oldupdateDt= DateTimeModel.getNow();
oldupdateDt.copyAllFrom(this.updateDt);
this.updateDt.copyAllFrom(updateDt);
setModified("updateDt");
firePropertyChange(String.valueOf(RECORDITEMS_UPDATEDT), oldupdateDt, updateDt);
}
}
COM: <s> date the record item was updated </s>
|
funcom_train/14005782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Class getEventBasedHandlerType() throws EventBasedHandlingException {
try {
if (IEventBasedHandler.class.isAssignableFrom(this.handlerType) == false) {
throw new Exception(this.handlerType.getName() + " does not implements " + IEventBasedHandler.class);
}
return this.handlerType;
} catch (Exception exn) {
throw EventBasedHandlingException.create(Location.NO_LOCATION, exn);
}
}
COM: <s> return the class to be used for event based handler construction </s>
|
funcom_train/22654945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startup() {
if (this.state == ACTIVE) { // this thread has started already
return;
}
this.state = ACTIVE;
// explicitly set the priority to normal. Otherwise
// this thread will inherit the priority of the creator thread
// i.e the AWT event dispatch thread that runs with max priority
this.setPriority(Thread.NORM_PRIORITY);
this.start();
}
COM: <s> informs this receiver to start processing events from the </s>
|
funcom_train/19972275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void selectTimer(int pos) {
currentTimer = pos;
currentConfig = timerConfigs[currentTimer];
uiUpdating = true;
timerName.setText(currentConfig.name);
updateButton(butPreTime, currentConfig.preTime);
startBell.setSelection(currentConfig.startBell);
updateButton(butRunTime, currentConfig.runTime);
endBell.setSelection(currentConfig.endBell);
uiUpdating = false;
}
COM: <s> select the timer to configure </s>
|
funcom_train/31477568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void firePercept(Percept percept, int range) {
ItemList.Iterator i = location.getItemsInRange(range).iterator();
while (i.hasNext()) {
try {
((Item)i.next()).perceive(percept);
} catch (Throwable e) {
World.getInstance().logException("In Item.firePercept() ("+toString()+")", e);
}
}
}
COM: <s> sends the percept to all surrounding items </s>
|
funcom_train/46335927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetJavaInterfaceName() {
System.out.println("getJavaInterfaceName");
PlsqlPackage instance = new PlsqlPackage();
assertNull(instance.getJavaInterfaceName());
instance.setSqlName("a");
assertEquals("A", instance.getJavaInterfaceName());
}
COM: <s> test of get java interface name method of class plsql package </s>
|
funcom_train/3174184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void renderYear(UnitGraphics g, Model model, FontMetrics fm, double year, double align) {
// draw a vertical line
g.setColor(cTick);
g.draw(tickMark, year, 1, true);
// draw the label
g.setColor(cText);
g.draw(Integer.toString((int)year), year, 1, align, 1.0);
// done
}
COM: <s> renders one year </s>
|
funcom_train/13938736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void changeMenuetToolMode(int mode){
// (1) call menuetElementDeselected() (via the active controller in AvoGlobal) if != NULL.
if(AvoGlobal.activeToolController != null){
AvoGlobal.activeToolController.menuetElementDeselected();
}
AvoGlobal.activeToolController = null;
// (2) update the state of the menuet to reflect the desired mode (via setCurrentToolMode)
AvoGlobal.menuet.setCurrentToolMode(mode);
}
COM: <s> changes the menuet tool by br </s>
|
funcom_train/31009299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNames() throws Exception {
assertEquals("P01 NAME", p01.getName());
assertEquals("P02 NAME", p02.getName());
assertEquals("P03 NAME", p03.getName());
assertEquals("P04 NAME", p04.getName());
assertEquals("P05 NAME", p05.getName());
}
COM: <s> test if names are correct </s>
|
funcom_train/22178987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createTabs(Composite parent) {
folder = new TabFolder(parent, SWT.TOP);
folder.setLayoutData(new GridData(GridData.FILL_BOTH));
if (getElement() instanceof IProject) {
project = (IProject)getElement();
tabLibPath = new LibraryPathTab(folder, project);
projectLayoutTab = new ProjectLayoutTab(folder, project);
}
}
COM: <s> creates the code tab folder code as well as all tabs </s>
|
funcom_train/20591586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onModuleLoad() {
History.addHistoryListener(this);
String initToken = History.getToken();
if(initToken.length() == 0) {
initToken = HistoryEncoder.encode("user_login",null);
History.newItem(initToken);
} else {
History.newItem(initToken);
onHistoryChanged(initToken);
}
}
COM: <s> this is the entry point method </s>
|
funcom_train/10909062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean followingParen() {
for (int i = exprIndex; i < exprLength; i++) {
switch (expr.charAt(i)) {
case '(':
exprIndex = i + 1;
return true;
case ' ':
case '\r':
case '\n':
case '\t':
break;
default:
return false;
}
}
return false;
}
COM: <s> return a boolean value indicating whether the following non whitespace </s>
|
funcom_train/36780429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSetLocationInfo() {
XSLTLayout layout = new XSLTLayout();
assertEquals(false, layout.getLocationInfo());
layout.setLocationInfo(true);
assertEquals(true, layout.getLocationInfo());
layout.setLocationInfo(false);
assertEquals(false, layout.getLocationInfo());
}
COM: <s> tests get location info and set location info </s>
|
funcom_train/9086762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Offices entity) {
EntityManagerHelper.log("saving Offices 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 offices entity </s>
|
funcom_train/14360975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean execute() throws SQLException {
//execute query
Boolean results = null;
try {
results = (Boolean) executeVerboseQuery("execute", null);
} catch (Exception e) {
throw new SQLException(
"Could not execute sql command - Original message: " + e.getMessage());
}
return results.booleanValue();
}
COM: <s> executes query and calculates query execution time if debug level verbose </s>
|
funcom_train/27975570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ConcourseSpecification getSpecification() {
ConcourseSpecification spec = new ConcourseSpecification();
spec.setConcourseClass( getClass() );
Set<String> gateAddresses = new HashSet<String>();
for ( Gate gate : getGates() ) {
String address = gate.getAddress();
if ( address != null ) {
gateAddresses.add( address );
}
}
spec.setGateAddresses( gateAddresses );
return spec;
}
COM: <s> creates a code concourse specification code for this code concourse code </s>
|
funcom_train/19433868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update( long elapsedTime ) {
// must be called in the event dispatch thread to not cause a deadlock with
// swing components that are modyfied in it
SwingUtilities.invokeLater( new Runnable() {
public void run() {
paint( screenManager.getGraphicsContext() );
screenManager.paintingDone();
}
} );
}
COM: <s> updates the screen and repaints it </s>
|
funcom_train/50313705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove (int start, int end) {
checkWidget ();
if (start > end) return;
int topIndex = getTopIndex();
int index = start;
int count = Fox.FXList_getNumItems(handle);
while (index <= end) {
if (!(0 <= index && index < count))
error (SWT.ERROR_INVALID_RANGE);
Fox.FXList_removeItem(handle, start, true);
index++;
}
if (end < topIndex) {
topIndex -= end - start + 1;
setTopIndex(topIndex);
}
}
COM: <s> removes the items from the receiver which are </s>
|
funcom_train/50155842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Object o1, Object o2) {
String s1;
String s2;
try {
s1 = getStatus ((ManagedSuggestion) o1);
s2 = getStatus ((ManagedSuggestion) o2);
} catch (Exception e) {
System.out.println ("SortRecsByStatus.compare(): " + e);
return -0;
}
if (s2.equals(s1))
return new SortRecsByLastTouch().compare(o1, o2);
else
return (s2.compareTo(s1));
/* if (s1 > s2) {
return -1;
}
if (s1 == s2) {
return 0;
}
return 1; */
}
COM: <s> provide comparison for sorting sugest a url records by reverse creation date </s>
|
funcom_train/17859495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createInsertEdit(List toInsert, Map viewMap) {
Map map = (Map)viewMap.get(this);
if (map == null) {
map = TCGraphConstants.createMap();
viewMap.put(this, map);
}
TCGraphConstants.setLineEnd(map, TCGraphConstants.ARROW_DIAMOND);
}
COM: <s> insert into list additional cells to be created with this tcedge </s>
|
funcom_train/38297452 | /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) {
jLabelStatus = new JLabel();
jLabelStatus.setPreferredSize(new Dimension(0, 15));
jContentPane = new JPanel();
jContentPane.setLayout(new BorderLayout());
jContentPane.add(getJPanel(), BorderLayout.SOUTH);
jContentPane.add(jLabelStatus, BorderLayout.NORTH);
jContentPane.add(getJScrollPane(), BorderLayout.CENTER);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/51812133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void assertEmbeddedBean(SimpleTestService service) {
assertEquals("wrong name", "foo", service.getName());
assertEquals("Wrong int", 5, service.getInteger());
assertNotNull("Other not wired in", service.getOtherService());
}
COM: <s> common asserts for the embedded bean tests </s>
|
funcom_train/3417165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String concat(String str) {
int otherLen = str.length();
if (otherLen == 0) {
return this;
}
char buf[] = new char[count + otherLen];
getChars(0, count, buf, 0);
str.getChars(0, otherLen, buf, count);
return new String(0, count + otherLen, buf);
}
COM: <s> concatenates the specified string to the end of this string </s>
|
funcom_train/29548297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addUIs() {
tgUIManager = new TGUIManager();
GLEditUI editUI = new GLEditUI(this);
GLNavigateUI navigateUI = new GLNavigateUI(this);
tgUIManager.addUI(editUI, "Edit");
tgUIManager.addUI(navigateUI, "Navigate");
tgUIManager.activate("Navigate");
}
COM: <s> add user interfaces </s>
|
funcom_train/50911444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point3 transform(Transform3 t) {
RealArray col3 = new RealArray(4, 1.0);
// set the translation in col 3
col3.setElements(0, this.flarray);
RealArray result = t.multiply(col3);
Point3 pout = new Point3(result.getSubArray(0, 2).getArray());
return pout;
}
COM: <s> get transformed point </s>
|
funcom_train/12557956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Reply receiveEvent(int command, int Delay) throws IOException {
Reply r;
while (Delay > 0) {
receive();
for (int i = 0; i < Replies.size(); i++) {
r = (Reply) Replies.elementAt(i);
if (r.getFlags() == 0 && r.getErrorCode() == command)
return (Reply) Replies.remove(i);
}
Tools.wait(delta);
Delay = Delay - delta;
}
return Reply.Error(Reply.errNotAvailable);
}
COM: <s> tries to receive a jdwp event </s>
|
funcom_train/14173321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(){
return super.toString()+" TCP "+
src_port+" > "+dst_port+" seq("+sequence+
") win("+window+")"+(ack?" ack "+ack_num:"")+" "+
(syn?" S":"")+(fin?" F":"")+(psh?" P":"")+
(rst?" R":"")+(urg?" U":"");
}
COM: <s> returns a string representation of this packet br </s>
|
funcom_train/37421631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMetadataItem(String key, String fullKey,
String minOccursAttr, String maxOccursAttr) {
if (! msCompositeContext.isEmpty()) {
if (! msModelGroupContext.isEmpty()) {
((PmtModelGroup)msModelGroupContext.elementAt(msModelGroupContext.size() - 1)).addMetadataKey(
key, fullKey, minOccursAttr, maxOccursAttr);
}
}
COM: <s> method add metadata item </s>
|
funcom_train/5733391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void validateChildren(ElementInfo info, Element childrenDescriptor) {
if (!isDescriptorValid(info, childrenDescriptor)) {
return;
}
processDescriptors(info, childrenDescriptor);
if (!info.allElementsValidated()) {
logger.logWarning(MessageManager.notAllChildren, info.getElementName());
}
}
COM: <s> validates the children of the element </s>
|
funcom_train/37740693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private InvocationHelperLocal invocationHelper() {
if (invocationHelperCache == null) {
try {
invocationHelperCache = (InvocationHelperLocal)
EJBUtil.createSession
(InvocationHelperLocalHome.class,
"java:comp/env/ejb/InvocationHelper");
} catch (RemoteException e) {
throw new EJBException (e);
}
}
return invocationHelperCache;
}
COM: <s> the invocation helper must be created lazily as we need permissions that </s>
|
funcom_train/25945863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateCities(WheelView city, String cities[][], int index) {
ArrayWheelAdapter<String> adapter =
new ArrayWheelAdapter<String>(this, cities[index]);
adapter.setTextSize(18);
city.setViewAdapter(adapter);
city.setCurrentItem(cities[index].length / 2);
}
COM: <s> updates the city wheel </s>
|
funcom_train/40669354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sort(JClassType[] types) {
Arrays.sort(types, new Comparator<JClassType>() {
public int compare(JClassType type1, JClassType type2) {
String name1 = type1.getQualifiedSourceName();
String name2 = type2.getQualifiedSourceName();
return name1.compareTo(name2);
}
});
}
COM: <s> convenience method to sort class types in a consistent way </s>
|
funcom_train/22402560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public Action getAction() {
Action result = null;
if( canceled == false) {
JPanel select = (JPanel) jTabbedPane.getSelectedComponent();
if ( select == jPanelCopy) {
try {
result = new CopyAction( new File( jTextFieldDest.getText()), jCheckBoxRecurseCopy.isSelected());
} catch (IOException e) {
e.printStackTrace();
}
}
if ( select == jPanelMediaPlayer) {
//result = new ActionMediaPlayer();
}
}
return result;
}
COM: <s> returns the action selected by the user </s>
|
funcom_train/50119969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void errorlog(int level, String s, Exception e) {
String fname;
if(query_owner().equals("root")) fname="javamud.log";
else fname = query_owner()+".log";
mudlog.errorlog(level, fname, query_id()+"\n\r"+s, e);
}
COM: <s> log an error to the error logs </s>
|
funcom_train/8347708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBackCommand() {
if (backCommand == null) {//GEN-END:|171-getter|0|171-preInit
// write pre-init user code here
backCommand = new Command("Back", Command.BACK, 0);//GEN-LINE:|171-getter|1|171-postInit
// write post-init user code here
}//GEN-BEGIN:|171-getter|2|
return backCommand;
}
COM: <s> returns an initiliazed instance of back command component </s>
|
funcom_train/33381324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeEsc(char ch[], int start, int length, boolean isAttVal) throws SAXException {
for(int i = start; i < start + length; i++) {
switch(ch[i]) {
case '&':
write("&");
break;
case '<':
write("<");
break;
case '>':
write(">");
break;
case '\"':
if(isAttVal) {
write(""");
} else {
write('\"');
}
break;
default:
if(ch[i] > '') {
write("&#");
write(Integer.toString(ch[i]));
write(';');
} else {
write(ch[i]);
}
}
}
}
COM: <s> write an array of data characters with escaping </s>
|
funcom_train/1156746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIndex(int i) {
if (buffer != null) {
i = Math.max(0, Math.min(i, buffer.getLength()));
if ((index != i || isDirty)) {
index = i;
bufferToViewLayoutForward();
}
}
}
COM: <s> sets the position of the buffer </s>
|
funcom_train/12168667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetRootElement() throws Exception {
DOMFactory factory = DOMFactory.getDefaultInstance();
Document document = factory.createDocument();
Element root = factory.createElement("root");
document.addNode(root);
assertSame(root, document.getRootElement());
Text text = factory.createText(" ");
text.insertBefore(root);
assertSame(root, document.getRootElement());
}
COM: <s> ensure that get root element works </s>
|
funcom_train/38865482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDefaultProp() {
// Set default properties
user = System.getProperty("user.name");
password = "";
dbms = DEFAULT_DBMS;
database = DEFAULT_DATABASE;
host = DEFAULT_HOST;
dbprotocol = DEFAULT_DBPROTOCOL;
port = DEFAULT_PORT;
driver = DEFAULT_DRIVER;
propPrefix = "";
}
COM: <s> this method sets connection defaults </s>
|
funcom_train/4672788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
JDialog box = view.getAboutBox();
if (box == null) {
JFrame mainFrame = StudentAdvisingSystemApp.getApplication().getMainFrame();
box = new StudentAdvisingSystemAboutBox(mainFrame);
box.setLocationRelativeTo(mainFrame);
}
StudentAdvisingSystemApp.getApplication().show(box);
}
COM: <s> handles the action of the user clicking the button </s>
|
funcom_train/2885138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void logOneWarning(SQLWarning warning) {
Log l = getLog();
l.warn("Warning:");
l.warn(warning.getMessage());
l.warn("SQL State: " + warning.getSQLState());
l.warn("Error Code: " + warning.getErrorCode());
}
COM: <s> override point log one warning </s>
|
funcom_train/42715127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ErrCode closeRecordStore() {
if (exists) {
try {
r.closeRecordStore();
return new ErrCode(Constants.ERR_SUCCESS);
} catch (RecordStoreException rse) {
return new ErrCode(Constants.ERR_FAILURE);
}
}
else {
return new ErrCode(Constants.ERR_SUCCESS);
}
}
COM: <s> closes a record store so no further operations can be made </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.