__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/48045403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LocalDate atDay(int dayOfYear) {
DAY_OF_YEAR.checkValidValue(dayOfYear);
if (dayOfYear == 366 && !isLeap()) {
throw new InvalidCalendarFieldException("Day of year 366 is invalid for year " + year, DAY_OF_YEAR);
}
return LocalDate.of(year, 1, 1).plusDays(dayOfYear - 1);
}
COM: <s> returns a date formed from this year at the specified day of year </s>
|
funcom_train/22909923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setObject(int tagType, Object value) {
if (value == null) {
throw new NullPointerException("cannot set a null object");
}
Integer key = new Integer(tagType);
if (!_tagMap.containsKey(key)) {
_definedTagList.add(new Tag(tagType, this));
}
_tagMap.put(key, value);
}
COM: <s> private helper method containing common functionality for all add </s>
|
funcom_train/39540246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void itemStateChanged(ItemEvent evt) {
// Update all objects that share this item
boolean newValue;
boolean oldValue = isSelected();
if (evt.getStateChange() == ItemEvent.SELECTED) {
newValue = true;
} else {
newValue = false;
}
if (oldValue != newValue) {
setSelected(newValue);
getTargetManager().doCommand(getActionCommand(), evt);
}
}
COM: <s> callback for toggle actions </s>
|
funcom_train/29078259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String hasCompleteRecord() {
int pos = sb.indexOf(sor);
if (pos != -1) {
int pos2 = sb.indexOf(sor, pos+1);
if (pos2 != -1) {
String retVal = sb.substring(pos, pos2);
sb.delete(0, pos2);
return retVal;
}
}
return null;
}
COM: <s> checks to see if a complete record already exists in </s>
|
funcom_train/29950903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int drawRight(final OutDevice device) {
int i;
int offset = device.size().m_width;
for (i=0; i<m_rightFrozen; i++) {
Column column = getColumn(m_columns.size()-(i+1));
Size size = column.getSize();
offset -= size.m_width;
drawColumn(column, offset, device);
}
return offset;
}
COM: <s> draw right frozen columns and return right extent </s>
|
funcom_train/7772559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnNuovaCausale() {
if (btnNuovaCausale == null) {
ImageIcon imageIcon1 = new ImageIcon(getUserDir1() + File.separator + "\\resource\\nuovo.png");
btnNuovaCausale = new JButton();
btnNuovaCausale.setBounds(new Rectangle(740, 93, 42, 26));
btnNuovaCausale.setIcon(imageIcon1);
btnNuovaCausale.setToolTipText("Nuova Causale");
}
return btnNuovaCausale;
}
COM: <s> this method initializes btn nuova causale </s>
|
funcom_train/37204023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Port locatePort(String port_name) throws UnknownPortException {
for (Iterator i = ports.iterator(); i.hasNext();) {
Port p = (Port) i.next();
if (p.getName().equalsIgnoreCase(port_name)) {
return p;
}
}
throw new UnknownPortException("Unable to find the port with name '"
+ port_name + "' in '" + getName() + "'");
}
COM: <s> find a particular named port </s>
|
funcom_train/16668292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getTaskAtPoint(Point point) {
//see if mouse is over selected task first
for (Object task : selectedTasks) {
Rectangle2D bounds = getTaskBounds(task);
if (bounds.contains(point)) {
return task;
}
}
for (int i=model.getTaskCount()-1; i>=0; i--) {
Object task = model.getTaskAt(i);
Rectangle2D bounds = getTaskBounds(task);
if (bounds.contains(point)) {
return task;
}
}
return null;
}
COM: <s> returns the task at the specified point or </s>
|
funcom_train/40535444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEmptyIterator() {
if (supportsEmptyIterator() == false) {
return;
}
Iterator iter = makeEmptyIterator();
assertTrue("hasNext() should return false for empty iterators",iter.hasNext() == false);
try {
iter.next();
fail("NoSuchElementException must be thrown when Iterator is exhausted");
} catch (NoSuchElementException e) {
}
}
COM: <s> should throw a no such element exception </s>
|
funcom_train/23828574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeDatatypeProperties() {
String template = hasValue( OPT_PROP_TEMPLATE ) ? getValue( OPT_PROP_TEMPLATE ) : DEFAULT_TEMPLATE;
if (!isTrue( OPT_LANG_RDFS )) {
for (Iterator i = listDatatypeProperties(m_source); i.hasNext(); ) {
writeValue( (Resource) i.next(), template, "DatatypeProperty", "createDatatypeProperty", "_PROP" );
}
}
}
COM: <s> write any datatype properties in the vocabulary </s>
|
funcom_train/44872575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getLabelFontPanel() {
if (labelFontPanel == null) {
labelFontLabel = new JLabel();
labelFontLabel.setText("Font Size ");
labelFontPanel = new JPanel();
labelFontPanel.setLayout(new BoxLayout(getLabelFontPanel(),
BoxLayout.X_AXIS));
labelFontPanel.add(labelFontLabel, null);
labelFontPanel.add(getLabelFontSizeCB(), null);
}
return labelFontPanel;
}
COM: <s> this method initializes label font panel </s>
|
funcom_train/51189516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JDialog getAboutDialog() {
if (aboutDialog == null) {
aboutDialog = new JDialog(getJFrame(), true);
aboutDialog.setTitle("About");
aboutDialog.setSize(new Dimension(179, 99));
aboutDialog.setPreferredSize(new Dimension(180, 100));
aboutDialog.setContentPane(getAboutContentPane());
}
return aboutDialog;
}
COM: <s> this method initializes about dialog </s>
|
funcom_train/42205869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateDrives() {
if (roots == null) {
roots = VolumeLister.listVolumes();
updateDrives0();
} else {
File[] newRoots = VolumeLister.listVolumes();
if (newRoots.length != roots.length) {
roots = newRoots;
updateDrives0();
} else for (int i = 0; i < roots.length; i++)
if (!roots[i].equals(newRoots[i])) {
roots = newRoots;
updateDrives0();
break;
}
}
}
COM: <s> updates the drive list </s>
|
funcom_train/23519012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String mapURIEntities(String inString) {
String outString = inString;
for (Entry<String, URI> prefix : uriPrefixes.entrySet()) {
outString = outString.replaceAll("&" + prefix.getKey() + ";",
prefix.getValue().toString());
}
// log.trace("Mapped {} -> {}", inString, outString);
return outString;
}
COM: <s> expands any uri entities in a given string returning a new uri </s>
|
funcom_train/885720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DataFlavor getComplexInstanceDataFlavor() {
// javaJVMLocalObjectMimeType
String mimeType = DataFlavor.javaJVMLocalObjectMimeType
+ ";class=com.foursoft.fourever.objectmodel.ComplexInstance"; //$NON-NLS-1$
if (complexInstanceFlavor == null) {
try {
complexInstanceFlavor = new DataFlavor(mimeType);
} catch (Exception e) {
ViewManagerImpl.getLog().error(
"Could not create transferable for drag n drop", e); //$NON-NLS-1$
}
}
return complexInstanceFlavor;
}
COM: <s> creates a dataflavour to transfer complex objects between transferables </s>
|
funcom_train/7293214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void Test4118384() {
Calendar cal = Calendar.getInstance();
if (cal.getMaximum(Calendar.HOUR) != 11 ||
cal.getLeastMaximum(Calendar.HOUR) != 11 ||
cal.getActualMaximum(Calendar.HOUR) != 11)
errln("Fail: maximum of HOUR field should be 11");
}
COM: <s> make sure maximum for hour field is 11 not 12 </s>
|
funcom_train/36982340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void instrument(JiapiClass clazz) throws InstrumentationException {
log.debug("Instrumenting " + clazz.getName());
JiapiMethod[] methods = clazz.getDeclaredMethods();
for (int i = 0; i < methods.length; i++) {
if (methods[i].getInstructionList() != null) {
instrument(methods[i]);
} else {
log.debug("Won't instrument " + clazz + "#" + methods[i]
+ ", it has no instructions");
}
}
}
COM: <s> implementation of instrumentor </s>
|
funcom_train/10210709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMappingKey(T key) {
logger.debug("setAccessorKey: " + key);
if (this.accessorKey != null)
fireRemoveUpdate(0, accessor.get(this.accessorKey).length());
this.accessorKey = key;
if (this.accessorKey != null)
fireInsertUpdate(0, accessor.get(this.accessorKey).length());
}
COM: <s> sets the key with which the documents string can be accessed through </s>
|
funcom_train/25421044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sort() {
if (size() > 1) {
ArrayList<User> al = new ArrayList<User>();
for (User user: values()) al.add(user);
java.util.Collections.sort(al,this);
clear();
for (User user: al) add(user);
}
}
COM: <s> sorts a collection of users by display name </s>
|
funcom_train/10716002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getArray(long index, int count) throws SerialException {
if (index < 0 || count + index > elements.length) {
throw new SerialException(Messages.getString("sql.42")); //$NON-NLS-1$
}
Object[] ret = new Object[count];
System.arraycopy(elements, (int) index, ret, 0, count);
return ret;
}
COM: <s> answers the array that copies the certain elements of the serial array </s>
|
funcom_train/25033402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AttributeList getAttributeList(Document document) throws DicomException {
AttributeList list = new AttributeList();
org.w3c.dom.Node element = document.getDocumentElement(); // should be DicomObject
addAttributesFromNodeToList(list,element);
//System.err.println("XMLRepresentationOfDicomObjectFactory.getAttributeList(Document document): List is "+list);
return list;
}
COM: <s> p given a dicom object encoded as an xml document </s>
|
funcom_train/20891574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getDataAt(int row, int column) {
if (row == -1) {
JOptionPane.showMessageDialog(this.owner, "select a row", "select a row", JOptionPane.ERROR_MESSAGE);
return null;
}
ConfigurationParameter tmp = data.get(row);
switch (column) {
case CONFIGURATION_NAME:
return tmp.getName();
case CONFIGURATION_TYPE_CLASS:
return tmp.getType();
case CONFIGURATION_DESCRIPTION:
return tmp.getDescription();
case CONFIGURATION_VALUE:
Object value = map.get(tmp);
return value;
default:
return tmp.getName();
}
}
COM: <s> gets the object in the given row and column number </s>
|
funcom_train/33637979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected GsonBuilder getGsonBuilder() {
GsonBuilder builder = new GsonBuilder();
builder.setDateFormat(ApplicationConstants.DATE_FORMAT);
builder.setFieldNamingPolicy(FieldNamingPolicy.UPPER_CAMEL_CASE);
// builder.registerTypeAdapter(Issue.State.class, new JsonDeserializer<Issue.State>() {
// @Override
// public Issue.State deserialize(JsonElement arg0, Type arg1,
// JsonDeserializationContext arg2) throws JsonParseException {
// return Issue.State.fromValue(arg0.getAsString());
// }
// });
return builder;
}
COM: <s> gets the gson builder </s>
|
funcom_train/43936004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean writeComplex(Output out, Object complex) {
log.debug("writeComplex");
if (writeListType(out, complex)) {
return true;
} else if (writeArrayType(out, complex)) {
return true;
} else if (writeXMLType(out, complex)) {
return true;
} else if (writeCustomType(out, complex)) {
return true;
} else if (writeObjectType(out, complex)) {
return true;
} else {
return false;
}
}
COM: <s> writes a complex type object out </s>
|
funcom_train/40735934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMailProtocol(String newVal) {
if ((newVal != null && mailProtocol != null && (newVal.compareTo(mailProtocol) == 0)) ||
(newVal == null && mailProtocol == null && mailProtocolIsInitialized)) {
return;
}
mailProtocol = newVal;
mailProtocolIsModified = true;
mailProtocolIsInitialized = true;
}
COM: <s> setter method for mail protocol </s>
|
funcom_train/1653136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ByteBuffer readHD(long offset) throws IOException {
ByteBuffer buf = ByteBuffer.allocate(headerBlockLength + dataBlockLength + hdPadding);
long pos = (headerBlockLength + dataBlockLength + hdPadding) * offset;
do {
int status = hdFC.read(buf, pos + buf.position());
if (status == -1)
throw new EOFException();
} while (buf.hasRemaining());
buf.flip();
return buf;
}
COM: <s> read header data from disk </s>
|
funcom_train/42189037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DataSource getDataSource() {
DataSource _ds = null;
String _data_source = m_config.getString("data.source");
if (_data_source == null)
return getBasicDataSource();
//throw new RuntimeException("Missing (data.source) property!");
try {
Context _initContext = new InitialContext();
Context _envContext = (Context) _initContext.lookup("java:comp/env");
_ds = (DataSource) _envContext.lookup(_data_source);
} catch (NamingException _e) {
_e.printStackTrace();
throw new RuntimeException(_e);
}
return _ds;
}
COM: <s> returns data source for use by create connection </s>
|
funcom_train/13198969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object o) {
// default sort for string seemed to be decending.. adding - reverses
// sort order
//String oString = ((Index) o).toString().toLowerCase();
//return -(oString.compareTo(this.toString().toLowerCase()));
return ((Comparable)(MasterList.master[index])).compareTo(MasterList.master[((Index)o).index]);
}// compareTo
COM: <s> for sorthing lists </s>
|
funcom_train/19408553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MOperation operation(String name, boolean searchInherited) {
MOperation op = (MOperation) fOperations.get(name);
if (op == null && searchInherited) {
Iterator it = allParents().iterator();
while (it.hasNext()) {
MClass cls = (MClass) it.next();
op = (MOperation) cls.operation(name, false);
if (op != null)
break;
}
}
return op;
}
COM: <s> gets an operation by name </s>
|
funcom_train/13271556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPhotoQuality(int photoQuality) {
if (this.photoQuality != photoQuality) {
int oldPhotoQuality = this.photoQuality;
this.photoQuality = photoQuality;
this.propertyChangeSupport.firePropertyChange(Property.PHOTO_QUALITY.name(),
oldPhotoQuality, photoQuality);
}
}
COM: <s> sets preferred photo quality and notifies </s>
|
funcom_train/9148053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double geometricMeanAveragePrecision() {
double productAveragePrecision = 1.0;
if (_evaluators.size() == 0) return 0;
for( RetrievalEvaluator evaluator : _evaluators ) {
productAveragePrecision *= evaluator.averagePrecision();
}
return Math.pow( productAveragePrecision, 1.0 / _evaluators.size() );
}
COM: <s> returns the geometric mean of average precision values </s>
|
funcom_train/37589470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRegexFilter() {
FileFilter filter = new RecursiveFileListProperty.RegexFilter(".");
Assert.assertTrue("Does not accept single char strings", filter.accept(new File("a")));
Assert.assertFalse("Does not reject non-length 1 strings", filter.accept(new File("abc")));
}
COM: <s> test the regex filter inner class </s>
|
funcom_train/12178618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTransformWithRedundantMarkup() throws Exception {
String input =
"<body>" +
"<i>" +
"Some " +
"<span>" +
"Unbold " +
"</span>" +
"text" +
"</i>" +
"normal" +
"</body>";
String expected = input;
doTest(input, expected);
}
COM: <s> test that a document containing redundant markup i </s>
|
funcom_train/7771493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getTxtPathClienti() {
if (txtPathClienti == null) {
try {
txtPathClienti = new JTextField();
txtPathClienti
.setPreferredSize(new java.awt.Dimension(300, 20)); // Generated
txtPathClienti.setEditable(false); // Generated
} catch (java.lang.Throwable e) {
// TODO: Something
}
}
return txtPathClienti;
}
COM: <s> this method initializes txt path clienti </s>
|
funcom_train/3514824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SMTPResponse sendRcptTo(String recipient) throws IOException, SMTPStateException, SMTPCommandException {
assertState(SMTPClientState.MAIL_SENT, SMTPClientState.RCPT_SENT);
return commandResponse("RCPT TO: <" + recipient + ">", false, "Failure while reading RCPT TO response from remote host.", SMTPClientState.RCPT_SENT);
}
COM: <s> send rcpt to and wait for a successful response </s>
|
funcom_train/18215371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ResultInformation createResultInformation(String description, String metricResult) {
if (metricResult.equals("<metricResult />")) {
return new ResultInformation(description, "No metric result could be calculated. "
+ "Either no cases cases match the base filter, or "
+ "none of the specified events did occur.");
} else {
return new ResultInformation(description);
}
}
COM: <s> creates an result information object </s>
|
funcom_train/50605335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCanBeLinearlyConstructed () {
Strings spec = Strings.startingWith("foo").endingWithAny();
assertTrue(!spec.isSatisfiedBy(""));
assertTrue(spec.isSatisfiedBy("foo"));
assertTrue(spec.isSatisfiedBy("foobar"));
assertTrue(!spec.isSatisfiedBy("baz"));
}
COM: <s> ensures instance of strings are capable of being linearly constructed via the </s>
|
funcom_train/37508181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JMenuItem getMenuFileNew() {
if (m_menuFileNew == null) {
m_menuFileNew = new JMenuItem("New Album", 'N');
m_menuFileNew.setActionCommand(ACTION_FILE_NEW);
}
return m_menuFileNew;
}
COM: <s> returns the file new album item </s>
|
funcom_train/50770666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ConditionReference addConditionReference(Vector pack, String concern, String filterm, String name) {
ConditionReference condref = new ConditionReference();
condref.setPackage(pack);
condref.setConcern(concern);
condref.setFilterModule(filterm);
condref.setName(name);
this.addToRepository(condref);
return (condref);
}
COM: <s> creates a new reference to a condition will be resolved in rexref </s>
|
funcom_train/49050739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAlternativesToVisual(String inPrimaryURI) {
AlternativesToVisualElementType altsToVisual = getAlternativesToVisual(inPrimaryURI);
if (altsToVisual != null) {
EquivalentType equiv = getEquivalentFor(inPrimaryURI);
JAXBPath.deleteJaxbObject ("/Content/AlternativesToVisual", equiv);
}
}
COM: <s> remove the alternatives to visual element from the code accessibility code metadata </s>
|
funcom_train/31652273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isEscChar(int character){
//SM.warning(properties.get(HL7DataSource.PROP_COMP_DELIM).toString());
if(character == properties.get(HL7DataSource.PROP_ESC_CHAR).toString().charAt(0)) return true;
return false;
}
COM: <s> check for escape chracter </s>
|
funcom_train/12699105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void linkPoints(DBPoint pt1, DBPoint pt2) throws WildDBException, SQLException
{
String id1 = Integer.toString(pt1.getPointID());
String id2 = Integer.toString(pt2.getPointID());
if(pt1.getNeighbors().contains(id2) || pt2.getNeighbors().contains(id1))
{
throw new WildDBException("Points are already linked");
}
else
{
pt1.getNeighbors().add(id2);
pt2.getNeighbors().add(id1);
updateNeighbors(pt1);
updateNeighbors(pt2);
}
COM: <s> adds the two points as each others neighbor </s>
|
funcom_train/46618302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getContent() throws BuildException {
if (key == null || value == null) {
throw new BuildException("key and value must be specified "
+ "for environment variables.");
}
StringBuffer sb = new StringBuffer(key.trim());
sb.append("=").append(value.trim());
return sb.toString();
}
COM: <s> get the assigment string </s>
|
funcom_train/28133293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createSerializableControls(Composite composite, int nColumns) {
LayoutUtil.setHorizontalSpan(fSerializableExtensionButtons.getLabelControl(composite), 1);
Control control = fSerializableExtensionButtons.getSelectionButtonsGroup(composite);
GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
gd.horizontalSpan = nColumns - 2;
control.setLayoutData(gd);
DialogField.createEmptySpace(composite);
}
COM: <s> creates the controls for inheritance strategies </s>
|
funcom_train/18133064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateFilter() {
RoleItemFilterHolder filterHolder = (RoleItemFilterHolder) roleFilterHolderComboBox
.getSelectedItem();
try {
RoleItemFilter filter = filterHolder
.getRoleItemFilterInstance(roleFilterTextField.getText());
roleTree.getModel().setFilter(filter);
} catch (Exception e) {
EBioFlowLogger.error("Cannot set filter", e);
}
}
COM: <s> method for updating the filter </s>
|
funcom_train/42645868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isBorder() {
boolean borderWidth = false;
Object border = getObject(BORDER_KEY);
if (border != null && border instanceof Vector) {
Vector borderProps = (Vector) border;
if (borderProps.size() == 3) {
borderWidth = ((Number) borderProps.get(2)).floatValue() > 0;
}
}
return getBorderStyle() != null || borderWidth;
}
COM: <s> checks to see if the annotation has defined a drawable border width </s>
|
funcom_train/22579090 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean dbUpdateDevice(Connection dbConn) {
String sqlString = new String ("UPDATE "+Defines.D_TBL_NAME
+ " SET ipAddress='"+ipAddress+"'"
+ ",community='"+community+"'"
+ ",sysName='"+sysName+"'"
+ ",sysDescr='"+sysDescr+"'"
+ ",sysUpTime='"+sysUpTime+"'"
+ ",ifNumber='"+ifNumber+"'"
+ ",monitored='"+monitored+"'"
+ ",removed='"+removed+"'"
+ " WHERE deviceID="+deviceID);
return DbUtilities.executeUpdate(dbConn, sqlString);
}
COM: <s> update all the fields in a device to the database </s>
|
funcom_train/3091674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection partitionActiveAuthors() {
Iterator iterator;
Collection authorPartition;
ExtendedHashSet result;
AuthorGroup activeAuthors;
AuthorsTopicBucket authorsTopicBucket;
activeAuthors =
DefaultAuthorUtility.getAllActiveAuthors(authors.getAuthors());
authorPartition = DefaultAuthorUtility.partitionOnTopic(activeAuthors);
result = new ExtendedHashSet();
iterator = authorPartition.iterator();
while (iterator.hasNext()) {
authorsTopicBucket = (DefaultAuthorsTopicBucket)iterator.next();
result.union(authorsTopicBucket.partitionBucket(authorParameters
.getNumCoAuthors() + 1));
}
return result;
}
COM: <s> returns the code collection code of code authors topic buckets code </s>
|
funcom_train/48959768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected SonarConfiguration loadSonar(UUID project) {
if (project != null) {
List<SonarConfiguration> conf = dao.findByNamedQuery(SonarConfiguration.FIND_BY_PROJECT, 0, 1, getProjectParams(project));
if (CollectionUtils.isNotEmpty(conf)) {
return conf.get(0);
}
}
return null;
}
COM: <s> loads the sonar configuration for this project if it already exists </s>
|
funcom_train/15930890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ParallelLongArray allUniqueElements() {
PAS.UniquifierTable tab = new PAS.UniquifierTable
(fence - origin, this, false);
PAS.FJLUniquifier f = new PAS.FJLUniquifier
(this, origin, fence, null, tab);
ex.invoke(f);
long[] res = tab.uniqueLongs(f.count);
return new ParallelLongArray(ex, res);
}
COM: <s> returns a new parallel long array containing only unique </s>
|
funcom_train/13272606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showError(Throwable ex) {
showText("<html>" + getLocalizedString("startError")
+ "<br>Exception " + ex.getClass().getName()
+ (ex.getMessage() != null ? " " + ex.getMessage() : ""));
ex.printStackTrace();
}
COM: <s> reports the given exception at screen </s>
|
funcom_train/21437620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(TransformerHandler th) throws SAXException {
th.startElement("","","FragmentCollection",new AttributesImpl());
for(FragmentEntry fe : fragments )
fe.write(th);
th.endElement("","","FragmentCollection");
}
COM: <s> write a representation of this object into an xml stream using </s>
|
funcom_train/46825653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ColourSquare (int index, Color innerColour) {
this.index = index;
// Add a mouse listener
addMouseListener (this);
// Add a tool tip
setToolTipText (GameLabels.getPlayerLabel(index));
// Set innert colour, size and then repaint.
setPreferredSize (new Dimension (SIZE, SIZE));
}
COM: <s> constructor which takes an inner colour </s>
|
funcom_train/24525089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getLeftAndRightMargin(final Tag t, final float pageWidth) {
float horizontalMargin = 0;
String value = t.getCSS().get(CSS.Property.MARGIN_LEFT);
if (value != null) {
horizontalMargin += parseValueToPt(value, pageWidth);
}
value = t.getCSS().get(CSS.Property.MARGIN_RIGHT);
if (value != null) {
horizontalMargin += parseValueToPt(value, pageWidth);
}
return horizontalMargin;
}
COM: <s> returns the sum of the left and right margin of a tag </s>
|
funcom_train/41071157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawCaret(Graphics g, int x, int y)
{
g.setColor(255, 0, 0);
g.setClip(x, y - 5, 10, 20);
g.drawLine(x, y - 5, x, y + 7);
}
COM: <s> draw caret standard color is red 255 0 0 </s>
|
funcom_train/39911770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetEh4() {
System.out.println("getEh4");
Page1 instance = new Page1();
TextField expResult = null;
TextField result = instance.getEh4();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get eh4 method of class timesheetmanagement </s>
|
funcom_train/1676674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(E value) {
if (!coll.hasValues()) throw new UnsupportedOperationException();
if (!setAndRemoveAllowed) throw new IllegalStateException();
try {
moveToCurrent();
cursor.putCurrent(value);
} catch (Exception e) {
throw StoredContainer.convertException(e);
}
}
COM: <s> replaces the last element returned by next or previous with the </s>
|
funcom_train/22233271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
// Concatenate string representation of error code with error message
String errorCodeStr;
switch (errorCode) {
case NO_ERROR:
errorCodeStr = "NO_ERROR";
break;
case UNEXPECTED_RENDERING_ERROR:
errorCodeStr = "UNEXPECTED_RENDERING_ERROR";
break;
case GRAPHICS_CONFIG_ERROR:
errorCodeStr = "GRAPHICS_CONFIG_ERROR";
break;
case CONTEXT_CREATION_ERROR:
errorCodeStr = "CONTEXT_CREATION_ERROR";
break;
case OFF_SCREEN_BUFFER_ERROR:
errorCodeStr = "OFF_SCREEN_BUFFER_ERROR";
break;
default:
errorCodeStr = "UNKNOWN ERROR CODE (" + errorCode + ")";
}
if (errorMessage == null) {
return errorCodeStr;
}
return errorCodeStr + ": " + errorMessage;
}
COM: <s> returns a short string that describes this rendering error </s>
|
funcom_train/22544266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doBrowseHost() {
int[] rows = TABLE.getSelectedRows();
if(rows.length > 0) {
ManagedConnection c = DATA_MODEL.get(rows[0]).getInitializeObject();
GUIMediator.instance().doBrowseHost(c.getAddress(), c.getPort());
}
}
COM: <s> get the first selected row and trigger a browse host </s>
|
funcom_train/31018082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point getLabelPosition(EdgeView view) {
Rectangle tmp = getPaintBounds(view);
Point pos = view.getLabelPosition();
int unit = GraphConstants.PERCENT;
if (pos != null && tmp != null) {
int x = tmp.x + tmp.width * pos.x / unit;
int y = tmp.y + tmp.height * pos.y / unit;
return new Point(x, y);
}
return null;
}
COM: <s> returns the label position of the specified view in the given graph </s>
|
funcom_train/27843666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNextBinding(Binding nextBinding) {
_nextBinding = nextBinding;
if ((_nextBinding != null) && (_nextBinding instanceof ChainedBinding)) {
ChainedBinding chainedBinding = (ChainedBinding) _nextBinding;
if (chainedBinding.getPreviousBinding() != this) {
chainedBinding.setPreviousBinding(this);
}
}
}
COM: <s> sets the next binding </s>
|
funcom_train/38806544 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bindTaskAndShape(LayoutTask task, ShapeAdapter shape) {
shapeMap.put(task.getId(), shape);
taskMap.put(task.getId(), task);
// log.debug("Thread {}", Thread.currentThread().getId());
log.debug("Task {} bound with shape {} by ID {}",new Object[]{task, shape, task.getId()});
}
COM: <s> bind task and its shape by task id on canvas </s>
|
funcom_train/28362579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TrialPoint nextTrialPoint() {
Map<Variable, Double> values = new HashMap<Variable, Double>();
Iterator<Variable> variableIter = _problem.getVariables().iterator();
while ( variableIter.hasNext() ) {
Variable variable = variableIter.next();
double value = generateRandomValue( variable );
values.put( variable, new Double( value ) );
}
return new TrialPoint( values );
}
COM: <s> return the next trial point </s>
|
funcom_train/2513881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isOver(MouseEvent e){
//check if the widget has been clicked. by checking the location and boundaries
int bbX = _wX + _wbX;
int bby = _wY + _wbY;
if(e.getX()>_wX && e.getX()<bbX){
if(e.getY()>_wY && e.getY()<bby){
return true;
}
}
return false;
}
COM: <s> check to see if the mouse is over the current widget </s>
|
funcom_train/42394644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
initializeBattle();
while (!isAborted && roundNum < getNumRounds()) {
try {
preloadRound();
initializeRound();
runRound();
finalizeRound();
cleanupRound();
} catch (Exception e) {
logError("Exception running a battle round", e);
isAborted = true;
}
roundNum++;
}
finalizeBattle();
cleanup();
} catch (Throwable e) {
logError("Exception running a battle: ", e);
}
}
COM: <s> when an object implementing interface </s>
|
funcom_train/15889194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void destroyLink(){
XdrInt id = new XdrInt(this.linkId);
XdrInt res = new XdrInt();
try {
client.call(23,id,res);
client.close();
} catch (OncRpcException ex) {
logger.log(Level.SEVERE,ex.getMessage(),ex);
}
logger.fine("Destroy Link");
this.linkOpen = false;
}
COM: <s> close the link </s>
|
funcom_train/41817187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand () {
if (okCommand == null) {//GEN-END:|23-getter|0|23-preInit
// write pre-init user code here
okCommand = new Command ("Save", Command.OK, 0);//GEN-LINE:|23-getter|1|23-postInit
// write post-init user code here
}//GEN-BEGIN:|23-getter|2|
return okCommand;
}
COM: <s> returns an initiliazed instance of ok command component </s>
|
funcom_train/4856058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void useBuffers() {
this.addVolume(this.material.getBufferAmount(), this.material);
this.material.emptyBuffer();
for (Material diffuse : this.material.getDiffuseMaterials()) {
this.addVolume(diffuse.getBufferAmount(), diffuse);
diffuse.emptyBuffer();
}
}
COM: <s> this method adds all buffer volumes to the volumes of all materials in </s>
|
funcom_train/46582691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doStopService() {
try {
if (isDropTablesAtShutdown()) {
if (isLoggingInfo())
logInfo("Dropping tables because 'dropTablesAtShutdown' is true....");
dropTables();
}
} catch (Exception e) {
if (isLoggingError())
logError(e);
} finally {
super.doStopService();
}
}
COM: <s> this method is called when the repository is shutdown </s>
|
funcom_train/31977745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int SET_SUBSTRING(CommandEvent event, String where, String what, String start, String length) throws Exception{
String str2 = what;
int startval = Integer.parseInt(start);
if (startval < 0) startval = what.length()+startval;
if (length.equals("")) str2 = what.substring(startval);
else{
int len = Integer.parseInt(length);
if (len < 0){
len = what.length() + len;
}
str2 = what.substring(startval, len);
}
event.instance.nv.put(where,str2);
return 1;
}
COM: <s> get part of a string and store it in a variable </s>
|
funcom_train/25185703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void traverse(PropertyGroup group) {
for (String k : group.getKeys()) {
if (group.isValue(k)) {
for (String v : group.getValues(k)) {
getReceiver().literal(k, v);
}
} else {
for (PropertyGroup g : group.getGroups(k)) {
getReceiver().startEntity(k);
traverse(g);
getReceiver().endEntity();
}
}
}
}
COM: <s> traverses a property group with all children </s>
|
funcom_train/45451558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAnswers(final String[] answers) {
answerLength = 0;
if (answers != null) {
answerLength = answers.length;
if (answerLength > maxAnswerLength) {
setMaxAnswerLength(answerLength);
}
for (int i = 0; i < answerLength; i++) {
this.answers[i] = answers[i];
}
}
}
COM: <s> sets the answers string array </s>
|
funcom_train/25618912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getMilliseconds(int action) {
String granularityU = getValue().toUpperCase(Locale.US);
if ("".equals(granularityU)) {
if (action == SEND_FILES) {
return GRANULARITY_MINUTE;
}
} else if ("MINUTE".equals(granularityU)) {
return GRANULARITY_MINUTE;
}
return 0L;
}
COM: <s> returns the number of milliseconds associated with </s>
|
funcom_train/50044360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FTPReply connect(String host) throws IOException {
this.host = host;
commandSocket = new Socket(host, 21);
commandStream = new PrintStream(commandSocket.getOutputStream());
responseReader = new BufferedReader(new InputStreamReader(commandSocket.getInputStream()));
FTPReply reply = new FTPReply(responseReader);
if (!reply.isPositiveCompletion()) {
disconnect();
}
return reply;
}
COM: <s> connects to the given ftp host on the default port </s>
|
funcom_train/42188574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJPreviousButton() {
if (jPreviousButton == null) {
jPreviousButton = new JButton();
jPreviousButton.setText("Anterior");
jPreviousButton.setEnabled(false);
jPreviousButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
retrocederPanel();
}
});
}
return jPreviousButton;
}
COM: <s> this method initializes j previous button </s>
|
funcom_train/3123637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean applyPattern(Component theComponent){
MetalLookAndFeel.setCurrentTheme(this);
try{
UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
SwingUtilities.updateComponentTreeUI(theComponent);
}
catch (Exception e){
return false;
}
return true;
}
COM: <s> this method applies the current pattern to every component in the component tree </s>
|
funcom_train/25057974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void cleanupAsyncActionsLaunch() {
if (tempWaitQueue != null && waitingOnAsync) {
try {
messageInterface.returnQueueForReceivingMessages(tempWaitQueue);
tempWaitQueue = null;
waitingOnAsync = false;
}
catch (JMSException e) {
logger.error("Error deregistering", e); // leak
}
}
}
COM: <s> returns the temporary queue that might have been created </s>
|
funcom_train/3840485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFile(String filename) {
JDPFile file = new JDPFile(filename,this.mediaType);
if(!contents.contains(file)) {
contents.add(file);
}
else {
file =(JDPFile)contents.elementAt(contents.indexOf(file));
file.setTimesPlayed(file.getTimesPlayed()+1);
}
}
COM: <s> add a file to the playlist </s>
|
funcom_train/46060521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doSearch(UserRequest ureq) {
RepositoryManager rm = RepositoryManager.getInstance();
Set s = searchForm.getRestrictedTypes();
List restrictedTypes = (s == null) ? null : new ArrayList(s);
List entries = rm.genericANDQueryWithRolesRestriction(searchForm.getDisplayName(), searchForm.getAuthor(),
searchForm.getDescription(), restrictedTypes, ureq.getUserSession().getRoles());
repoTableModel.setEntries(entries);
tableCtr.modelChanged();
displaySearchResults(ureq);
}
COM: <s> implementation normal search find repo entries that are public </s>
|
funcom_train/35794268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void caseABlock(ABlock node){
inABlock(node);
_symTab.newLocalScope();
_varTab.pushScope();
try{
node.getStatements().apply(this);
}finally{
_varTab.popScope();
_symTab.pop();
}
outABlock(node);
}
COM: <s> new block stack the scopes of the two tables </s>
|
funcom_train/12156857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMultipleCharsetQvalue() {
doCharsetParserTest("A;q=0.5,B;q=0.600,C;q=0.2,D;q=0.5",
new String[]{"ISO-8859-1", "B", "A", "D", "C"});
}
COM: <s> test multiple charset values with qvalues 1 </s>
|
funcom_train/9867454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setRefactoringInfoDestinationFile() {
IProject project = this.facade.getWorkingProject();
List<RefactoringInfo> infos = new ArrayList<RefactoringInfo>(
this.flipWizardPageContainer.getInfoToAssociation().keySet());
for (RefactoringInfo info : infos) {
IComponent component = this.flipWizardPageContainer.getAssociation(
info).getComponent();
info.setDestination(project.getFile(component.getPath()));
}
}
COM: <s> sets the destination files in the code refactoring info code chosen </s>
|
funcom_train/36188594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processServiceUninstallation(IServiceIdentifier serviceId) {
PssService uninstalledService = null;
this.logger.debug("Process service uninstallation event : " + serviceId.toUriString());
if (this.serviceRegistry != null) {
uninstalledService = this.serviceRegistry.findService(serviceId);
}
if (uninstalledService != null) {
this.unRegisterService(uninstalledService);
this.synchMgr.uninstalledLocalService(uninstalledService);
}
}
COM: <s> purge the persisted service meta data notify the service synchronizer about this unregister </s>
|
funcom_train/37394551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writePrimitive(String type, String value) {
String clippedValue = "";
if (value != null) {
clippedValue = value;
if (value.length() > (50 + 3)) {
clippedValue = value.substring(0, 50) + "...";
}
}
currentState.writePrimitive(type,
EscapeString.escapeHTML(clippedValue));
}
COM: <s> overly long string buffers will cause formatting problems especially if </s>
|
funcom_train/20364673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testXMLPersistence() {
StatBiasList list1 = getTestList();
StatBiasList list2 = new StatBiasList();
Element xml = list1.getXML();
//2 list should be equal
list2.setXML( xml );
assertEquals( list1,list2 );
//Change to original list does not affect XMl
list1.get(MainStat.Agility).setValue(7);
list2.setXML( xml );
assertFalse( list1.equals( list2 ) );
}
COM: <s> test persisting and reading from xml </s>
|
funcom_train/50221583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected AbstractTag getMainTag(GraphObject ge) {
for (int i = 0; i < tags.size(); i++ ) {
AbstractTag tag = (AbstractTag) tags.get(i);
if ((tag.getElement() == ge) && tag.isMainTag()) return tag;
}
// not found
System.err.println("getMainTag not found");
return null;
}
COM: <s> go through all tags returning the main tag for the element </s>
|
funcom_train/39533675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateRulers(){
//getting the rulers manager
RulersParametersManager manager=
Editor.getEditor().getHandlesManager().getRulersParametersHandler();
boolean rulersVisible=manager.areRulersEnabled();
horizontalRuler.setEnabled(rulersVisible);
verticalRuler.setEnabled(rulersVisible);
if(rulersVisible){
add(BorderLayout.NORTH, northPanel);
add(BorderLayout.WEST, westPanel);
}else{
remove(northPanel);
remove(westPanel);
}
revalidate();
}
COM: <s> updates the state of the rulers </s>
|
funcom_train/25779116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addScopePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_TestParameter_scope_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_TestParameter_scope_feature", "_UI_TestParameter_type"),
TestpackagePackage.Literals.TEST_PARAMETER__SCOPE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the scope feature </s>
|
funcom_train/40359864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStartWithEmptyChangeSource() throws IOException {
ChangeSource changeSource = new MockChangeSource(0);
CheckpointAndChangeQueue q = new CheckpointAndChangeQueue(changeSource,
persistDir, internalFactory, clientFactory);
q.setMaximumQueueSize(3);
q.start(null);
Iterator<CheckpointAndChange> it = q.resume(null).iterator();
assertFalse(it.hasNext());
}
COM: <s> tests resume for a null checkpoint when the </s>
|
funcom_train/35119306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean startsWith(Sequence prefix) {
if (prefix.length() > this.length()) {
return false;
}
else {
for (int i = 0; i < prefix.length(); i++) {
if (!this.tokenAt(i).equals(prefix.tokenAt(i))) {
return false;
}
}
return true;
}
}
COM: <s> test if the sequence has the prefix </s>
|
funcom_train/49626514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(final ServiceRequest req) {
HttpServletResponse res = req.getHttpServletResponse();
res.setContentType("text/plain");
res.setCharacterEncoding(this.outputEncoding);
try {
byte[] bytes = this.message.getBytes(this.outputEncoding);
res.setContentLength(bytes.length);
res.getOutputStream().write(bytes);
} catch (IOException e) {
throw new PulseException("Error running Event "
+ this.getClass().getCanonicalName() + ": "
+ e.getLocalizedMessage(), e);
}
return;
}
COM: <s> performs the text output </s>
|
funcom_train/49654968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int computeBaseScore(EventScore score, int devTimeSum) {
if (devTimeSum == 0) {
score.setExplanation("Someone has not developed in the past 72 hours!");
return this.oneNoDevTime;
}
else {
score.setExplanation("All members have dev time.");
return 0;
}
}
COM: <s> computes the base score from a check on development time </s>
|
funcom_train/43123237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(String.format("Day: %d, ", day));
stringBuilder.append(String.format("End time: %d,", endTime));
stringBuilder.append(String.format("Start time: %d",startTime));
return stringBuilder.toString();
}
COM: <s> returns the values of this objects variables in a single string </s>
|
funcom_train/958811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private RegistryErrorList createRegistryErrorList(String error) {
RegistryError registryError = new RegistryError();
registryError.setErrorCode("");
registryError.setCodeContext("");
registryError.setValue(error);
RegistryErrorList registryErrorList = new RegistryErrorList();
registryErrorList.getRegistryError().add(registryError);
return registryErrorList;
}
COM: <s> helper method to create a registry error list </s>
|
funcom_train/18812614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createTableViewer() {
tableViewer = new TableViewer(table);
tableViewer.setUseHashlookup(true);
tableViewer.setColumnProperties(columnNames);
tableViewer.setContentProvider(new C64FileConvertorContentProvider());
tableViewer.setLabelProvider(new C64FileConvertorLabelProvider());
tableViewer.setInput(UiPlugin.getDefault().getExtensionPointManager());
}
COM: <s> create the table viewer </s>
|
funcom_train/28109709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isUniqueSerial() throws SQLException {
// Given the model number, check if any other products registered have the same serial number.
ResultSet rs = DBSystem.executeQuery(connection,
"SELECT 'TRUE' AS `Duplicate` FROM registrations " +
"WHERE `product`='" + product + "' AND `serial_number`='" + serial_number + "'" +
" AND `id`!=" + id);
if (rs == null)
return true;
else {
rs.getStatement().close();
return false;
}
}
COM: <s> checks if the serial number was already registered before for that model number </s>
|
funcom_train/22369459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doInBackground() {
if (currentLoader != null) {
backgroundLoad = true;
repositoryProgressDialog.hideDialog();
frame.showProgressBar(false, StringUtils.getString(I18nUtils.getString("LOADING"), "..."));
frame.getProgressBar().addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
backgroundLoad = false;
frame.hideProgressBar();
repositoryProgressDialog.showDialog();
frame.getProgressBar().removeMouseListener(this);
};
});
}
}
COM: <s> hides progress dialog so user can work with application while repository finishes loading </s>
|
funcom_train/12305184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addAll( Collection c ) {
boolean returnCode = true;
if( c != null ) {
Iterator iter = c.iterator();
while( iter.hasNext() ) {
boolean rc =
add( iter.next() );
if ( rc == false ) {
returnCode = false;
}
}
}
return returnCode;
}
COM: <s> this method inserts sorted the elements contained in the specified </s>
|
funcom_train/34505158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void nextNoteRight(Note n) {
if (!showHints) {
return;
}
if (n.getPitch()<getLowest() ||
n.getPitch()>getHighest()) {
return;
}
if (highlightedRight!=null) {
highlightedRight.setHighlighted(false);
}
highlightedRight=keyMap.get(n.getPitch());
if (highlightedRight!=null) {
highlightedRight.setHighlighted(true);
} else {
log.error("could not find key for note "+n);
}
}
COM: <s> maybe displays next note on keys </s>
|
funcom_train/20474364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object get(int index) {
if (index < 0 || index >= this.size) {
throw new IndexOutOfBoundsException("the index [" + index + "] is not valid for this list with the size [" + this.size + "].");
}
return this.storedObjects[index];
}
COM: <s> returns the element at the specified position in this list </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.