__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/46638703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertStaticColumnIndexes(String colGroupName, int... columnIndexesToInsert) {
LinkedList<Integer> staticColumnIndexes = new LinkedList<Integer>();
ColumnGroup columnGroup = nameToColumnGroup.get(colGroupName);
// Check if any of the indexes belong to existing groups
for (int columnIndexToInsert : columnIndexesToInsert) {
final Integer index = Integer.valueOf(columnIndexToInsert);
staticColumnIndexes.add(index);
}
columnGroup.staticColumnIndexes.addAll(staticColumnIndexes);
notifyListeners();
}
COM: <s> this method will add static column index s to an existing group </s>
|
funcom_train/50535439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void destroy() {
lock.writeLock().lock();
try {
running=false;
retransmitter.reset();
xmit_table.clear();
low=0;
highest_delivered=0; // next (=first) to deliver will be 1
highest_received=0;
highest_stability_seqno=0;
}
finally {
lock.writeLock().unlock();
}
}
COM: <s> destroys the nak receiver window </s>
|
funcom_train/2840651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void acquire() throws InterruptedException {
logger.debug("acquire() - start");
if (Thread.interrupted()) throw new InterruptedException();
synchronized(this) {
try {
while (permits_ <= 0) wait();
--permits_;
}
catch (InterruptedException ex) {
notify();
throw ex;
}
}
}
COM: <s> wait until a permit is available and take one </s>
|
funcom_train/6267497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected float getParameterAsFloat(String parameterName) {
if (this.getParameterValue(parameterName) != null) {
try {
if (this.getParameterValue(parameterName) instanceof String) {
return Float.parseFloat(this.getParameter(parameterName));
} else {
return ((Float) getParameterValue(parameterName))
.floatValue();
}
} catch (NumberFormatException ex) {
return -1;
}
} else
return -1;
}
COM: <s> get the parameter as a float value </s>
|
funcom_train/24087315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void runAllExperiments() {
leaves.clear();
if (experimentStatus == null) {
experimentStatus = new ExperimentStatus();
}
experimentStatus.experimentSetup(selectedPlan
.getAlternativesDefinition().getAlternatives(), selectedPlan
.getSampleRecordsDefinition().getRecords());
}
COM: <s> runs experiments of all considered alternatives </s>
|
funcom_train/26221445 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getIntOf(byte[] byteArray) {
int result = 0;
final int byteCount = byteArray.length;
for (int bytePos = 0; bytePos < byteCount; bytePos++) {
result <<= 8;
result |= (int) byteArray[bytePos] & 0xff;
}
return result;
}
COM: <s> translates a byte array into an int </s>
|
funcom_train/45121690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDatabasePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DataConfig_database_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DataConfig_database_feature", "_UI_DataConfig_type"),
DictionaryPackage.Literals.DATA_CONFIG__DATABASE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
getString("_UI_DatabasePropertyCategory"),
null));
}
COM: <s> this adds a property descriptor for the database feature </s>
|
funcom_train/40682821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void next() {
//GWT.log("Next invoked. NOC: " + this.numberOfChunks, null);
if ((this.currentChunk + 1) < this.numberOfChunks) {
this.provider.getChunk(this, ++currentChunk);
this.inChunk = true;
}
}
COM: <s> causes the table to render the next chunk of data </s>
|
funcom_train/12181812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWithManyDuplicates() throws Exception {
DuplicateNameValidator validator = new DuplicateNameValidator();
String names[] = {"M", "M", "M", "M", "M", "M", "M", "M1", "M2"};
Element root = createDOM(names);
validator.validate(root, ERROR_REPORTER);
verifyValidationResult(getExpectedDuplicates());
}
COM: <s> test with many duplicates </s>
|
funcom_train/10188341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getReplaceButton() {
if (ReplaceButton == null) {
ReplaceButton = new JButton();
ReplaceButton.setText("replace");
ReplaceButton.setEnabled(false);
ReplaceButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
fireReplaceRegexInputEvent(new ReplaceRegexInputEvent(e));
}
});
}
return ReplaceButton;
}
COM: <s> this method initializes replace button </s>
|
funcom_train/3347100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private char nameAndTypeInfo(String name, String type) {
char nindex = utf8Info(name);
char tindex = utf8Info(type);
char[] c = {12, (char) (nindex >> 8), (char) (nindex & 0xff),
(char) (tindex >> 8), (char) (tindex & 0xff)};
return poolIndex(new String(c));
}
COM: <s> returns the entry of the appropriate name and typeref info structure in </s>
|
funcom_train/18726809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setClosableTitleAt(final int index, final String value) {
final String old = getClosableTitleAt(index);
if ((value == null) ? (old != null) : (!value.equals(old))) {
setIconAt(index, getCombinedIconAt(index).cloneWithTitle(value));
}
}
COM: <s> use instead of set title at </s>
|
funcom_train/24476538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean logout() throws LoginException {
try {
UserPrincipal user = new UserPrincipal(login);
PlainRolePrincipal role = new PlainRolePrincipal("AuthorizedUser");
subject.getPrincipals().remove(user);
subject.getPrincipals().remove(role);
return true;
} catch (Exception e) {
throw new LoginException(e.getMessage());
}
}
COM: <s> clears subject from principal and credentials </s>
|
funcom_train/31477946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetGraphics() {
if (changeDisplay) {
logMessage("Resetting display mode to " + toString(oldDisplayMode), MESSAGE);
device.setDisplayMode(oldDisplayMode);
}
if (fullscreen) {
logMessage("Exiting full-screen exclusive mode.", MESSAGE);
device.setFullScreenWindow(null);
} else {
logMessage("Closing main window.", MESSAGE);
}
}
COM: <s> restores the original display settings </s>
|
funcom_train/4462046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void displaySequence(Sequence seq) {
if(seq != null) {
currentSequence = seq;
text_name.setText(seq.getFullName().trim());
text_sequence.setText(seq.getSequenceWrapped(50).trim());
} else {
currentSequence = new Sequence();
text_name.setText("");
text_sequence.setText("");
}
text_name.setText(seq.getFullName().trim());
updateInfo(currentSequence);
}
COM: <s> returns the sequence indicated </s>
|
funcom_train/22981370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUserData(Serializable object) throws IOException {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
new ObjectOutputStream(byteArrayOutputStream).writeObject(object);
SortInfo info = new SortInfo(byteArrayOutputStream.toByteArray());
setSortInfo(info);
}
COM: <s> sets the user data </s>
|
funcom_train/25136199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isSameStyleSet(StateInfo info, int styleSet) {
if (info == null) {
return false;
} else {
return (((styleSet != -1) && (info.getComponentStyleSet() == styleSet)) || (info.getComponentStyleSet() == -1));
}
}
COM: <s> check if the state info has the defined style set </s>
|
funcom_train/39535389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element createJWidgetElement(Element parentElement) {
Element jwidgetElement=parentElement.getOwnerDocument().
createElementNS(null, Toolkit.jwidgetElementName);
jwidgetElement.setAttribute(Toolkit.nameAttribute, getId());
jwidgetElement.setAttribute(Toolkit.idAttribute, getUniqueId());
//creating the property attributes
int i=0;
for(String property : propertiesList) {
//setting the new attribute for the jwidget element
jwidgetElement.setAttribute(property, defaultValues.get(i));
i++;
}
parentElement.appendChild(jwidgetElement);
return jwidgetElement;
}
COM: <s> creating the jwidget element </s>
|
funcom_train/28403661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void forward(String path) throws IOException {
RequestDispatcher rd = request.getRequestDispatcher(path);
if (rd == null) {
throw new IOException("No request dispatcher returned for path '"
+ path + "'");
}
try {
rd.forward(request, response);
} catch (ServletException ex) {
throw wrapServletException(ex, "ServletException including path '"
+ path + "'.");
}
}
COM: <s> forwards to a path </s>
|
funcom_train/31911980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EventDispatcher getEventDispatcher() {
if (EventQueue.isDispatchThread()) {
return userAgent.getEventDispatcher();
} else {
class Query implements Runnable {
EventDispatcher result;
public void run() {
result = userAgent.getEventDispatcher();
}
}
Query q = new Query();
invokeAndWait(q);
return q.result;
}
}
COM: <s> returns the event dispatcher to use </s>
|
funcom_train/5009529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSendBufferSize(long sbs) throws RserveException {
if (!connected || rt==null)
throw new RserveException(this,"Not connected");
RPacket rp=rt.request(RTalk.CMD_setBufferSize,(int)sbs);
if (rp!=null && rp.isOk()) return;
throw new RserveException(this,"setSendBufferSize failed",rp);
}
COM: <s> sets send buffer size of the rserve in bytes for the current connection </s>
|
funcom_train/17209495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu getStartMenu() {
if (startMenu == null) {
startMenu = new JMenu("Start");
startMenu.setMnemonic(KeyEvent.VK_T);
startMenu.add(connectTo());
startMenu.add(getDisconnectMenuItem());
startMenu.addSeparator();
startMenu.add(getHelpMenuItem());
startMenu.add(getAboutMenuItem());
startMenu.addSeparator();
startMenu.add(quit());
}
return startMenu;
}
COM: <s> this method initializes start menu </s>
|
funcom_train/32074814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element toXML() throws Exception {
Element e = new Element("subtypes");
for(String type : classifiers.keySet()) {
Element c = new Element("classifier");
e.appendChild(c);
c.addAttribute(new Attribute("type", type));
StringGISModelWriter sgmw = new StringGISModelWriter(classifiers.get(type));
sgmw.persist();
//System.out.println(sgmw.toString());
c.appendChild(sgmw.toString());
}
return e;
}
COM: <s> produces an xml serialisation of the current subtypes model </s>
|
funcom_train/3703741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNextState() {
if (optionEmail.isSelected() == true) {
return (PANEL_EMAIL);
}
if (optionHomepage.isSelected() == true) {
return (PANEL_INFOSPACE);
}
if (optionSearch.isSelected() == true) {
return (PANEL_SEARCH);
}
return (null);
} // of method
COM: <s> this method tells the wizard what panel to display when the </s>
|
funcom_train/2898115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedRelation(VisibleRelation aRelation) {
if (aRelation == null) {
deSelectVisibleRelations();
mySelectedRelationVector.clear();
} else {
mySelectedRelation = aRelation;
mySelectedRelation.setSelected(true);
mySelectedRelationVector.add(aRelation);
}
// repaint();
}
COM: <s> sets the current selected code visible relation code </s>
|
funcom_train/26216488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean pointInFrustum(float x, float y, float z) {
for (int i = 0; i < 6; i++) {
if (frustum[i][0] * x
+ frustum[i][1] * y
+ frustum[i][2] * z
+ frustum[i][3] < 0 ) {
return false;
}
}
return true;
}
COM: <s> checks if the given point is in the view frustum </s>
|
funcom_train/11725732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Batch apply(Batch batch) throws RepositoryException {
if (batch == null) {
throw new IllegalArgumentException("Batch must not be null");
}
for (Iterator<T> it = operations.iterator(); it.hasNext(); ) {
Operation op = it.next();
op.apply(batch);
}
return batch;
}
COM: <s> this implementation applies each of the operation maintained by </s>
|
funcom_train/16435722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SSProduct getProduct(List<SSProduct> iProducts) {
if (iProduct == null && iProductNr != null) {
for (SSProduct iCurrent: iProducts) {
if (iProductNr.equals(iCurrent.getNumber())) {
iProduct = iCurrent;
break;
}
}
}
return iProduct;
}
COM: <s> gets the product for this row </s>
|
funcom_train/1692944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void openEditorInFocus() {
checkWidget();
m_CellEditor = m_Model.getCellEditor(m_FocusCol, m_FocusRow);
if (m_CellEditor != null) {
scrollToFocus();
Rectangle r = getCellRect(m_FocusCol, m_FocusRow);
m_CellEditor.open(this, m_FocusCol, m_FocusRow, r);
}
}
COM: <s> this method activated the cell editor on the current focus cell if the </s>
|
funcom_train/26522147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getState(final int index) throws AttributeException {
if (type != AttributeType.DISCRETE) {
throw new AttributeException("AttributeSpecs.getState(...) can only be called for DISCRETE attributes.");
}
if (index < 0 || index >= states.length) {
throw new AttributeException("AttributeSpecs.getState(...) index out of range.");
}
return states[index];
}
COM: <s> returns state name for a state with the given state index </s>
|
funcom_train/15554976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getFMeasure(int beta) {
double f = ((beta * beta + 1) * this.getPrecision() * this.getRecall())
/ (beta * beta * this.getPrecision() + this.getRecall());
if (Double.isNaN(f))
return 0;
else
return f;
}
COM: <s> returns the f score </s>
|
funcom_train/51605112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSplitPane getJSplitPane() {
if (jSplitPane == null) {
jSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
jSplitPane.setDividerSize(3);
jSplitPane.setTopComponent(getJTabbedPane());
jSplitPane.setBottomComponent(getJPanel2());
}
return jSplitPane;
}
COM: <s> this method initializes j split pane </s>
|
funcom_train/42535778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o){
if(!(o instanceof View))return false;
if(o == this)return true;
View oo = (View)o;
return (((Object)incl).equals(oo.incl))&&(((Object)views).equals(oo.views));
}
COM: <s> is the given object equal to this view </s>
|
funcom_train/3846123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AudioFileFormat getAudioFileFormat(File file) throws UnsupportedAudioFileException, IOException {
if (DEBUG)
System.out.println("ModuleFileReader.getAudioFileFormat( File )");
InputStream inputStream = new FileInputStream(file);
try {
return getAudioFileFormat(inputStream);
} finally {
inputStream.close();
}
}
COM: <s> return the audio file format from the given file </s>
|
funcom_train/44222315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object getDataFromCurrentViewInstance(String attAddr, int index) {
ViewStateMachine vsm = this.plugin.get_vsm();
Object data = null;
try {
ViewInstance vi = vsm.get_currentViewInstance();
AttributeInstance ai = vi.getAttributeInstance(attAddr, index);
data = ai.get_value();
} catch (Exception ex) {
ex.printStackTrace();
}
return data;
}
COM: <s> p get the data from the current view instance with the given </s>
|
funcom_train/43319493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void prepareConnection(final Connection connection) {
assert (this.connectionIsDisposed());
this.initTransports();
log.debug("Prepare bytestreams for XMPP connection. Used transport order: "
+ Arrays.toString(transports.toArray()));
this.connection = connection;
this.fileTransferQueue = new ConcurrentLinkedQueue<TransferData>();
for (ITransport transport : transports) {
transport.prepareXMPPConnection(connection, this);
}
}
COM: <s> sets up the transports for the given xmppconnection </s>
|
funcom_train/20747258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSimpleName() {
StringBuffer sb = new StringBuffer();
String givenName = getGivenName();
if ( givenName != null ) {
sb.append( givenName );
}
String surname = getSurname();
if ( surname != null ) {
if ( givenName != null ) {
sb.append( " " );
}
sb.append( surname );
}
return sb.toString();
}
COM: <s> returns this persons given name and surname i </s>
|
funcom_train/125603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String encloses(TSDate date) {
if (date == null)
return date + " is invalid date for " + this + ".";
if (date.subPeriodicity() != lowerBound.subPeriodicity())
return date + " is invalid date for " + this + ".";
if (lowerBound.compareTo(date) < 0 || upperBound.compareTo(date) > 0)
return date + " is not in " + toString() + ".";
return null;
}
COM: <s> checks whether a given date is within the range defined by this object </s>
|
funcom_train/7780476 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeFriend(LJFriend friend) {
if (friend.getRelation() == LJRelationType.MUTUAL) {
friend.setRelation(LJRelationType.FRIEND_OF);
friend.setGroupMask(0);
} else {
m_friendArray.remove(friend);
m_hash.remove(friend.getUserName());
}
updateCounters();
}
COM: <s> removes the specified friend from the list </s>
|
funcom_train/48151299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
super.reset();
forest.reset();
getRecordTable().setText("time\tGreen\tOn Fire\tBurnt");
getRecordTable().append(
"\n" + getTime() + "\t" + forest.treesGreen() + "\t"
+ forest.treesOnFire() + "\t" + forest.treesBurnt());
}
COM: <s> this method resets the experiment including the forest and the record </s>
|
funcom_train/17019236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector retrieveRegions(Region query) {
retrieved.clear();
for (int i = 0; i < objectDB.size(); i++) {
ObjectImage obi = (ObjectImage)objectDB.get(i);
obi.setWeights(posW, volW, colW, oriW);
int index = obi.minDistanceRegion(query);
if (obi.getMinDist()<regionThreshold) {
retrieved.add(new ValuePair(i, obi.getMinDist(),
index, obi.getLocation()));
}
}
Collections.sort(retrieved);
return retrieved;
}
COM: <s> retrieves a list of regions from the object db sorted by distance </s>
|
funcom_train/2893330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isDocTextInMyList(String key) {
List objects = getDBObjects(DBObjects.MYARGISALLDOCS);
for (Iterator iObjects = objects.iterator(); iObjects.hasNext();) {
DocSearchResult doc = (DocSearchResult) iObjects.next();
if (doc.getParentDocType() == DBObjects.DOCUMENTTEXT) {
if (doc.getParentDocId().equals(key))
return true;
}
}
return false;
}
COM: <s> determines if the given document text object is in the </s>
|
funcom_train/40944164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addResource(ApplicationResource resource) {
// Check if the resource is already mapped
if (resourceKeyMap.containsKey(resource)) {
return;
}
// Generate key
final String key = String.valueOf(++lastResourceKeyNumber);
// Add the resource to mappings
resourceKeyMap.put(resource, key);
keyResourceMap.put(key, resource);
}
COM: <s> adds new resource to the application </s>
|
funcom_train/43910227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PostgisDBInfo getDBInfo() {
if (dbInfo == null) {
Connection conn;
try {
conn = getConnection(Transaction.AUTO_COMMIT);
dbInfo = new PostgisDBInfo(conn);
} catch (IOException e1) {
LOGGER.log(Level.SEVERE, "Could not obtain DBInfo object", e1);
}
}
return dbInfo;
}
COM: <s> obtains database specific information such as version supported </s>
|
funcom_train/8103853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(LanguageType l) {
String s = "";
if(l == LanguageType.ru) {
s = POSRu.getName(this);
} else if(l == LanguageType.en) {
s = name;
} else {
throw new NullPointerException("Null LanguageType");
}
if(0 == s.length()) // English name is better than nothing
s = name;
return s;
}
COM: <s> gets name of pos in the language l </s>
|
funcom_train/8344552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void nextMove() {
updateUI();
switch (board.isEndGame()) {
case 1 :
Window.alert(ChessConstants.INSTANCE.whitesWin());
restart();
break;
case -1:
Window.alert(ChessConstants.INSTANCE.blacksWin());
restart();
break;
case 99:
Window.alert(ChessConstants.INSTANCE.draw());
restart();
break;
default:
switch(getMode()) {
case whitesVsBlacks:
break;
case whitesVsComputer:
if (!board.getTurn()) {
computerMove();
}
break;
case blacksVsComputer:
if (board.getTurn()) {
computerMove();
}
break;
case computerVsComputer:
computerMove();
break;
}
break;
}
}
COM: <s> invoked to make the game advance to the next move </s>
|
funcom_train/47553588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Named cachedFind(Name name) throws SemanticException {
Option<Named> res = map.get(name);
if (res != null && res != NOT_FOUND) {
return res.get();
}
Named t = ts.systemResolver().find(QName.make(null, name)); // NOTE: short name
map.put(name, Option.<Named>Some(t));
return t;
}
COM: <s> find a type by name using the cache and the outer resolver </s>
|
funcom_train/9672793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean signOn(String[] args) {
boolean good = false;
if (args.length > 1) {
String nm = args[1];
if (perUser.rename(name, nm)) {
name = nm;
send("Signed on as " + nm + "\n");
signedOn = true;
good = true;
setTargets(args, 2);
conn.setName(nm);
} else
send("name=" + nm + " already signed on\n");
}
return good;
}
COM: <s> sign on command </s>
|
funcom_train/39383671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getGroupList() {
Vector names = new Vector();
Set ids = new LinkedHashSet();
Iterator iterator = nameTargetMap.values().iterator();
while (iterator.hasNext()) {
Target target = (Target) iterator.next();
ids.addAll(target.getTargetGroups());
}
names.addAll(ids);
return names;
}
COM: <s> the list of target names defined for the application </s>
|
funcom_train/8080732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String printFeatures() {
int i;
String s = "";
for (i=0;i<m_decisionFeatures.length;i++) {
if (i==0) {
s = ""+(m_decisionFeatures[i]+1);
} else {
s += ","+(m_decisionFeatures[i]+1);
}
}
return s;
}
COM: <s> returns a string description of the features selected </s>
|
funcom_train/37611213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getString(String key, boolean warnIfMissing) {
try {
return m_resources.getString(key);
}
catch (MissingResourceException e) {
if (warnIfMissing) {
m_errorWriter.println(
"Warning - resource " + key + " not specified");
return "";
}
return null;
}
}
COM: <s> use key to look up resource which names image url </s>
|
funcom_train/49160042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Lock lock(int pid, LockType dependency) throws UnlockableException {
// Check the dependency status
switch (accept(dependency)) {
case WAIT:
throw new UnlockableException(
"Cannot grant dependency %s for resource %s", dependency,
this);
case ERROR:
throw new RuntimeException(
format("Resource %s cannot accept dependency %s", this,
dependency));
case OK_LOCK:
return new FileLock(lockfile);
case OK_STATUS:
return new StatusLock(PID.getPID(),
dependency == LockType.WRITE_ACCESS);
case GO:
}
return null;
}
COM: <s> tries to lock the resource </s>
|
funcom_train/26311344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void beginConversation() {
// start a rumour
ACLMessage rumour = new ACLMessage( ACLMessage.INFORM );
rumour.setContent( RUMOUR );
rumour.addReceiver( randomGuest( null ) );
send( rumour );
// introduce two agents to each other
doIntroduction( randomGuest( null ) );
setPartyState( "Swinging" );
}
COM: <s> start the conversation in the party </s>
|
funcom_train/9768081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public ImageIcon getIcon16x16(String filename) {
if (!isInitialized_16x16) {
initializeIcons_16x16(defaultProperiesFile_16x16);
}
String ext = getFileExtension(filename).toLowerCase();
if (ext.length() < 1) {
return document;
}
if (extensions16x16.containsKey(ext)) {
return (ImageIcon) extensions16x16.get(ext);
}
return document;
}
COM: <s> returns image icon </s>
|
funcom_train/7660402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private LinkedList populatedQueue(int n) {
LinkedList q = new LinkedList();
assertTrue(q.isEmpty());
for(int i = 0; i < n; ++i)
assertTrue(q.offer(new Integer(i)));
assertFalse(q.isEmpty());
assertEquals(n, q.size());
return q;
}
COM: <s> create a queue of given size containing consecutive </s>
|
funcom_train/4917934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getClassPath() {
StringBuilder classPath = new StringBuilder();
// Generate the class path
boolean isFirst = true;
for (File entry : this.entries) {
// Provide separator after first entry
if (!isFirst) {
classPath.append(File.pathSeparator);
}
// Add the entry to the class path
classPath.append(entry.getPath());
// No longer the first
isFirst = false;
}
// Return the class path
return classPath.toString();
}
COM: <s> obtains the class path </s>
|
funcom_train/28764047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCsssubheadsize(String newVal) {
if ((newVal != null && this.csssubheadsize != null && (newVal.compareTo(this.csssubheadsize) == 0)) ||
(newVal == null && this.csssubheadsize == null && csssubheadsize_is_initialized)) {
return;
}
this.csssubheadsize = newVal;
csssubheadsize_is_modified = true;
csssubheadsize_is_initialized = true;
}
COM: <s> setter method for csssubheadsize </s>
|
funcom_train/45771708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addConfigItem(Node root, String attribute, String type, String value) {
Element configItem = settings.createElement(TAG_CONFIG_ITEM);
configItem.setAttribute(ATTRIBUTE_CONFIG_NAME, attribute);
configItem.setAttribute(ATTRIBUTE_CONFIG_TYPE, type);
configItem.appendChild(settings.createTextNode(value));
root.appendChild(configItem);
}
COM: <s> adds an xml entry for a particular setting </s>
|
funcom_train/3375986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
// implementors should override this method
throw new UnsupportedOperationException(
"This SAXParser, \"" + this.getClass().getName() + "\", does not support the reset functionality."
+ " Specification \"" + this.getClass().getPackage().getSpecificationTitle() + "\""
+ " version \"" + this.getClass().getPackage().getSpecificationVersion() + "\""
);
}
COM: <s> p reset this code saxparser code to its original configuration </s>
|
funcom_train/10285408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Locale getLocale(String pDisplayName) {
Locale[] lLocals = Locale.getAvailableLocales();
for (int j = 0; j < lLocals.length; j++) {
Locale lLocale = lLocals[j];
String lName = lLocale.getDisplayName();
if (lName.endsWith(pDisplayName)) {
// we have a match;
return lLocale;
}
}
return null; // No Locale for this name.
}
COM: <s> the display name is according to the locals display names </s>
|
funcom_train/43451178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer buf = new StringBuffer();
buf.append("action=").append(m_action)
.append(", path=").append(m_path);
// .append(", copyFrom=").append(m_copyFrom);
return buf.toString();
}
COM: <s> returns a string representation of the object </s>
|
funcom_train/18238556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_shortArrayFromEncodedQualities_OneValid_Zero() throws Exception{
String encodedQuals = ""+(char)(0 + QualitiesAndPositionsUtil.ASCII_ZERO);
short[] decodedQuals = QualitiesAndPositionsUtil.shortArrayFromEncodedQualities(encodedQuals);
assertEquals(decodedQuals.length,1);
assertEquals(decodedQuals[0], (short) 0);
}
COM: <s> a short quality of code 0 code is the lowest we are allowed </s>
|
funcom_train/34526728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute(String query) throws MailshotException {
Statement stmt = null;
Connection conn = null;
try {
conn = DriverManager.getConnection(url, username, password);
stmt = conn.createStatement();
stmt.execute(query);
} catch(Exception ex) {
String msg = "Unable to execute a query.";
throw new MailshotException(msg, ex);
} finally {
try {
if (stmt != null) {stmt.close();}
if (conn != null) {conn.close();}
} catch(Exception ex) {
String msg = "Unable to close the database connection.";
throw new MailshotException(msg, ex);
}
}
}
COM: <s> executes a single query </s>
|
funcom_train/16797099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(String theURL) {
if (error) return;
if (theURL==null || theURL.equals(""))
theURL = IJ.URL;
Applet applet = IJ.getApplet();
if (applet!=null) {
try {
applet.getAppletContext().showDocument(new URL(theURL), "_blank" );
} catch (Exception e) {}
return;
}
try {openURL(theURL);}
catch (IOException e) {}
}
COM: <s> opens the specified url default is the image j home page </s>
|
funcom_train/46998795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateThread() {
try {
while (true) {
Thread.sleep(100);
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
update();
}
});
}
} catch (Exception e) {
System.err.println("ERROR in TimeControlFrame.updateThread: " + e);
}
}
COM: <s> internal display update thread </s>
|
funcom_train/10210873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onModelElementAdded(Observable element) {
final AbstractView<Observable> view = AbstractViewFactory.createView(element);
if (view != null) {
/**
* Add Object to SceneGraph to visualize it or add it to update list
* to visualize it during batchProcessEnd
*/
if (isInBatchProcess()) {
if (!itemsToUpdate.contains(view)) {
itemsToUpdate.add(view);
}
} else {
graphModel.beginUpdate();
try {
graphModel.addObject(view);
} finally {
graphModel.endUpdate();
}
graphView.repaint();
}
}
}
COM: <s> gets called when a model element is added to the model manager </s>
|
funcom_train/18183796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void testEqualsHostNameFalse() {
connectionRequestInfoImpl.setRecaptchaHostName(RECAPTCHA_HOST_NAME_TEST);
secondConnectionRequestInfoImpl.setRecaptchaHostName("Something else");
assertThat(connectionRequestInfoImpl.equals(secondConnectionRequestInfoImpl), is(false));
assertThat(secondConnectionRequestInfoImpl.equals(connectionRequestInfoImpl), is(false));
}
COM: <s> test inequality on recaptcha host name property </s>
|
funcom_train/38489943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop() {
Thread t;
synchronized (this) {
t=this.layouterThread;
this.layouterThread=null;
}
if (t!=null) {
t.interrupt();
try {
//hack: omitting the timeout my result in a deadlock here - have to investigate!
t.join(500);
}
catch (InterruptedException ignored) {
}
}
}
COM: <s> stops the layouter thread </s>
|
funcom_train/11012438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test15228() {
HSSFWorkbook wb = openSample("15228.xls");
HSSFSheet s = wb.getSheetAt(0);
HSSFRow r = s.createRow(0);
HSSFCell c = r.createCell(0);
c.setCellValue(10);
writeTestOutputFileForViewing(wb, "test15228");
}
COM: <s> test reading and writing a complicated workbook </s>
|
funcom_train/19400006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected AbstractNode getLeftSibling(AbstractNode child, boolean materialize) {
int i = getIndexOf(child);
if (i == 0) {
/*
* There is no left sibling for this child.
*/
return null;
} else {
int index = i - 1;
AbstractNode sibling = childRefs[index] == null ? null
: childRefs[index].get();
if (sibling == null) {
if( materialize ) {
sibling = getChild(index);
}
} else {
btree.touch(sibling);
}
return sibling;
}
}
COM: <s> return the left sibling </s>
|
funcom_train/11374622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPreTxIdEditLogNoEdits() throws Exception {
FSNamesystem namesys = Mockito.mock(FSNamesystem.class);
namesys.dir = Mockito.mock(FSDirectory.class);
int numEdits = testLoad(
StringUtils.hexStringToByte("ffffffed"), // just version number
namesys);
assertEquals(0, numEdits);
}
COM: <s> test case for an empty edit log from a prior version of hadoop </s>
|
funcom_train/1173723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Card getTargetCard() {
if (targetCard == null) {
Target tgt = this.getTarget();
if (tgt != null) {
ArrayList<Card> list = tgt.getTargetCards();
if (!list.isEmpty())
return list.get(0);
}
return null;
}
return targetCard;
}
COM: <s> p getter for the field code target card code </s>
|
funcom_train/19646020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getNewGameComannd() {
if (newGameComannd == null) {//GEN-END:|56-getter|0|56-preInit
// write pre-init user code here
newGameComannd = new Command("New Game", Command.OK, 0);//GEN-LINE:|56-getter|1|56-postInit
// write post-init user code here
}//GEN-BEGIN:|56-getter|2|
return newGameComannd;
}
COM: <s> returns an initiliazed instance of new game comannd component </s>
|
funcom_train/43663977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BMethod_name_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BMethod_name_feature", "_UI_BMethod_type"),
XmdlboPackage.Literals.BMETHOD__NAME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
getString("_UI_BusinessModelPropertyCategory"),
null));
}
COM: <s> this adds a property descriptor for the name feature </s>
|
funcom_train/38809842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_TCM__OrgJdomDocument_setDocType_OrgJdomDocType() {
Element element = new Element("element");
DocType docType = new DocType("element");
Document doc = new Document(element);
doc.setDocType(docType);
assertEquals("incorrect root element returned", element, doc
.getRootElement());
assertEquals("incorrect doc type returned", docType, doc.getDocType());
}
COM: <s> test that set doc type works as expected </s>
|
funcom_train/35682419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutDown() {
_log.info("Shutting down Pool Manager");
Iterator < Map.Entry < LegStarAddress, ConnectionPool > > entries =
_pools.entrySet().iterator();
while (entries.hasNext()) {
entries.next().getValue().shutDown();
}
}
COM: <s> propagate shutdown on every managed pool </s>
|
funcom_train/6350412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int setComboStyles(StyleTableDO styleTableDO, int style) {
if (styleTableDO.isBorder() == true) style |= SWT.BORDER;
if (styleTableDO.isFlat() == true) style |= SWT.FLAT;
if (styleTableDO.isReadOnly() == true) style |= SWT.READ_ONLY;
return style;
}
COM: <s> set combo styles </s>
|
funcom_train/9869620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEstado(Integer newVal) {
if ((newVal != null && this.estado != null && (newVal.compareTo(this.estado) == 0)) ||
(newVal == null && this.estado == null && estado_is_initialized)) {
return;
}
this.estado = newVal;
estado_is_modified = true;
estado_is_initialized = true;
}
COM: <s> setter method for estado </s>
|
funcom_train/39062082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addOffsetPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(new ItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_IMarkingAnnotationNode_offset_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_IMarkingAnnotationNode_offset_feature", "_UI_IMarkingAnnotationNode_type"),
MarkingPackage.eINSTANCE.getIMarkingAnnotationNode_Offset(),
true,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE));
}
COM: <s> this adds a property descriptor for the offset feature </s>
|
funcom_train/10943400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getSelectedLabel(Element elem) {
String locator = elem.getAttributeValue("locator");
String out = elem.getAttributeValue("out");
String text = this.sel.getSelectedLabel(locator);
logger.info("getSelectedValue: locator=" + locator + " text="+text);
addParam(out, text);
}
COM: <s> gets the visible displayed value of a list box </s>
|
funcom_train/22749593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean terminatedOK() {
logger.debug("called");
if (AppServiceImpl.drmaaInUse) {
if (jobInfo.getExitStatus() != 0)
return false;
else
return true;
} else if (AppServiceImpl.globusInUse) {
if (job.getStatus() == GramJob.STATUS_FAILED)
return false;
else
return true;
} else {
if (proc.exitValue() != 0)
return false;
else
return true;
}
}
COM: <s> utility method to check of the job executed correctly </s>
|
funcom_train/2480450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean logout() throws LoginException {
subject.getPrincipals().remove(userPrincipal);
succeeded = false;
succeeded = commitSucceeded;
digitalSignature = null;
hash = null;
userPrincipal = null;
return true;
/*subject.getPrincipals().remove(userPrincipal);
succeeded = false;
succeeded = commitSucceeded;
userDigest = null;
userPrincipal = null;
return true;*/
}
COM: <s> logout the user </s>
|
funcom_train/36761497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void payInterestChecking(){
ArrayList<CheckingAccount> checkingAccounts = db.listOfCheckingAccounts();
if(checkingAccounts!=null){
for(int i = 0; i < checkingAccounts.size(); i++) {
if(checkingAccounts.get(i)!=null) {
depIntChecking(checkingAccounts.get(i));
if(debug)System.out.println(checkingAccounts.get(i).getBalance());
}
}
}
}
COM: <s> pay interest to checking accounts </s>
|
funcom_train/11651789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean incPattern(String text) {
this.USEFILE = false;
for (int idx = 0; idx < this.INCPATTERNS.size(); idx++) {
if (JMeterUtils.getMatcher().contains(text, this.INCPATTERNS.get(idx))) {
this.USEFILE = true;
break;
}
}
return this.USEFILE;
}
COM: <s> by default the method assumes the entry is not included unless it </s>
|
funcom_train/28449617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDirectory(java.io.File dir) {
try {
if (dir.getPath().length() == 0) {
this.searchPath.append(Py.EmptyString);
} else {
this.searchPath.append(new PyString(dir.getCanonicalPath()));
}
} catch (IOException e) {
warning("skipping bad directory, '" + dir + "'");
}
}
COM: <s> add directory dir if exists to </s>
|
funcom_train/37828923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(final CreatureRespawnPoint point) {
if (point == null) {
return false;
}
final IRPZone entityZone = point.getZone();
// We have ask the zone whether it knows about the entity because
// player-objects stay alive some time after logout.
return zone.equals(entityZone) && shape.contains(point.getX(), point.getY());
}
COM: <s> checks whether a respawn point is within this area </s>
|
funcom_train/1072098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPrefix(ITextViewer viewer, int documentOffset) {
try {
if (documentOffset != 0) {
char c = viewer.getDocument().getChar(documentOffset - 1);
if (Character.isJavaIdentifierPart(c) || (c == '\'')) {
return getPrefix(viewer, documentOffset - 1) + c;
}
}
} catch (BadLocationException e) {
return "";
}
return "";
}
COM: <s> when computing completion proposals this method retrieves the string on </s>
|
funcom_train/42949667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void adopt(Sorter oldSorter) {
if (oldSorter != null) {
toPrevious = ((ShuttleSorter) oldSorter).toPrevious.clone();
/** @todo shouldn't cast */
fromPrevious = ((ShuttleSorter) oldSorter).fromPrevious.clone();
/** @todo shouldn't cast */
}
}
COM: <s> adopts the row mappings of the specified sorter by cloning the mappings </s>
|
funcom_train/48390393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addHiddenValidationErrorsHandler(com.smartgwt.client.widgets.form.events.HiddenValidationErrorsHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.form.events.HiddenValidationErrorsEvent.getType()) == 0) setupHiddenValidationErrorsEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.form.events.HiddenValidationErrorsEvent.getType());
}
COM: <s> add a hidden validation errors handler </s>
|
funcom_train/19779872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String generateDocumentNo(SimpleBaseVo model, Connection conn) throws Exception {
// TODO:
// Uncomment the following code and modify accordinly
final String PREFIX = "FA";
final String FIELD_NAME_AUDIT_NO = "AUDIT_NO";
final int FIELD_NAME_QUOT_NO_LENGTH = 6;
FactAuditHdrVo vo = (FactAuditHdrVo) model;
DocumentNumberGenerator dng = new DocumentNumberGenerator(vo.getCompanyCode()
, ProjectConstants.DOC_FACT_AUDIT
, FIELD_NAME_AUDIT_NO
, vo.getCreateUser(), PREFIX, conn);
return dng.getAutoGenFactAuditCode(FIELD_NAME_QUOT_NO_LENGTH);
}
COM: <s> generates a unique document number </s>
|
funcom_train/25315462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initialize() {
GUI gui = GUI.getInstance();
this.xscale = gui.getWidth() / 1920.0;
this.yscale = gui.getHeight() / 1080.0;
this.mainBack = new MusicGameImage(ImageLoader.loadScaledImage("menu/menuback.png", gui.getWidth()), 0, 0);
this.buttons = new ArrayList<MenuButton>();
this.initialized = true;
}
COM: <s> initializes the section </s>
|
funcom_train/9360648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int playSilence(String callingApp, long duration, int queueMode, String[] params) {
ArrayList<String> speakingParams = new ArrayList<String>();
if (params != null) {
speakingParams = new ArrayList<String>(Arrays.asList(params));
}
return mSelf.playSilence(callingApp, duration, queueMode, speakingParams);
}
COM: <s> plays the silence using the specified queueing mode and parameters </s>
|
funcom_train/40526505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setClass(String className) throws ClassNotFoundException {
ClassLoader loader = getClass().getClassLoader();
if (loader == null) { loader = ClassLoader.getSystemClassLoader(); }
Class<?> clazz = loader.loadClass(className);
this.clazz = clazz.asSubclass(BuildCommand.class);
}
COM: <s> invoked reflectively by ant </s>
|
funcom_train/43268945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addHistory(IHistory history) {
if ((historySet == EMPTY_SET) || (historySet == null)) {
historySet = new TreeSet();
}
history.setConceptDelegate(this);
final boolean added = historySet.add(history);
// Required by Castor
if (!added) {
history.setConceptDelegate(null);
}
return added;
}
COM: <s> adds a code history code to this code concept code </s>
|
funcom_train/21656123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtFechaRegistro() {
if (BtFechaRegistro == null) {
BtFechaRegistro = new JButton();
BtFechaRegistro.setBounds(new Rectangle(310, 210, 40, 25));
BtFechaRegistro.setText("...");
BtFechaRegistro.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
seleccionarFechaRegistro();
}
});
}
return BtFechaRegistro;
}
COM: <s> this method initializes bt fecha registro </s>
|
funcom_train/7685819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CharSequence addSmileySpans(CharSequence text) {
SpannableStringBuilder builder = new SpannableStringBuilder(text);
Matcher matcher = mPattern.matcher(text);
while (matcher.find()) {
int resId = mSmileyToRes.get(matcher.group());
builder.setSpan(new ImageSpan(mContext, resId),
matcher.start(), matcher.end(),
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
}
return builder;
}
COM: <s> adds image spans to a char sequence that replace textual emoticons such </s>
|
funcom_train/17337112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Prerequisite copy(final LogFrame parentLogFrame, final LogFrameCopyContext context) {
final Prerequisite copy = new Prerequisite();
copy.code = this.code;
copy.content = this.content;
copy.parentLogFrame = parentLogFrame;
copy.group = context.getGroupCopy(this.group);
copy.position = this.position;
return copy;
}
COM: <s> duplicates this prerequisite omits the id </s>
|
funcom_train/9911837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer getInteger() throws ConfigurationException {
if (value==null) throw new ConfigurationException("Property value is null", ErrorCodes.CON_1001);
try {
return Integer.valueOf(value.toString());
} catch (NumberFormatException e){
throw new ConfigurationException("Property value cannot be converted to Integer", e, ErrorCodes.CON_1002);
}
}
COM: <s> return integer from the configuration property </s>
|
funcom_train/8053278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(GPSPosition other) {
double latitudeDiff = Math.abs(this.latitude - other.latitude);
double longtitudeDiff = Math.abs(this.longitude - other.longitude);
if (latitudeDiff <= this.allowedMarginLat
&& longtitudeDiff <= this.allowedMarginLon)
return 0;
else if (this.latitude <= other.latitude
&& this.longitude <= other.longitude)
return -1;
else
return 1;
}
COM: <s> compare two gpsposition with the allow margin of a gps position </s>
|
funcom_train/31821982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Project toProject() {
ProjectDataObject project = new ProjectDataObject(this.name);
project.setId(this.id);
for(int i = 0; i < iterations.length; i++) {
project.addIteration(iterations[i].toIteration());
}
project.setBacklog(this.backlog.toBacklog());
return project;
}
COM: <s> converts from ws project to persister </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.