__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/21349141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected XmlDocument getErrorTemplate() throws Exception {
byte[] errMsgTemplateContent = null;
if (debug) {
errMsgTemplateContent = Utility
.readFile("D:\\temp\\ValidationErrorTemplate.xml");
} else {
errMsgTemplateContent = Utility.readFile(root
+ ValidationErrorTemplatePath);
}
XmlDocument errMsgTemplate = new XmlDocument();
errMsgTemplate.Load(new java.io.ByteArrayInputStream(
errMsgTemplateContent));
// clean resource
errMsgTemplateContent = null;
return errMsgTemplate;
}
COM: <s> get error template </s>
|
funcom_train/23852983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setViewSpecificToolBar(JToolBar toolBar) {
// remove any view-specific tool bar
if (viewToolBar != null) {
remove(viewToolBar);
}
viewToolBar = toolBar;
// add new view-specific tool bar, if available
if (viewToolBar != null) {
add(viewToolBar, 1);
}
validate();
repaint();
}
COM: <s> changes the view specific tool bar replacing any previous one </s>
|
funcom_train/7421645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getTypeFromOtherReferences(ParticipantReferenceDataObject dataObject) {
List<ParticipantReferenceDataObject> references =
this.diagram.getParticipantReferencesWithName(dataObject.getName());
for (Iterator<ParticipantReferenceDataObject> it =
references.iterator(); it.hasNext();) {
ParticipantReferenceDataObject next = it.next();
if (!next.equals(dataObject)) {
String type = getType(it.next());
if (type != null) {
return type;
}
}
}
return null;
}
COM: <s> checks if the type can be determined from participant reference </s>
|
funcom_train/37429778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WipeResponse wipeEntityBeans(EntityBean bean, Collection constrainedFields) throws EJBException, RemoveException {
debugMessageFirstPart("Called "+getAbstractNameForEntityBean(bean)+"Home.removeWhereFieldsEqual(",") ",constrainedFields);
return (WipeResponse)doCommandInTransactionContext(new WipeCommand(bean,constrainedFields,this));
}
COM: <s> the eventual action of this method is to delete many entity </s>
|
funcom_train/21332343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHTML(InputStream _isHTMLSrc, String _stURL) {
if(null==_isHTMLSrc){
setURL(stAboutBlank);
return;
}
isHTMLSrc = _isHTMLSrc;
stURL = _stURL;
if(isPeerReady()) {
setDocumentReady(false);
brPeer.acceptTargetURL();
}
}
COM: <s> loads the document from the input stream </s>
|
funcom_train/31874324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseUp(final DrawingView aView, final MouseEvent e, int x, int y) {
if (fCreatedFigure.isEmpty())
aView.drawing().remove(fCreatedFigure);
fCreatedFigure.connectorVisibility(false);
fCreatedFigure = null;
fAnchorPoint = null;
}
COM: <s> checks if the created figure is empty </s>
|
funcom_train/26177137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void log (StyledDocument doc, String message) {
final String text;
if (doc.getLength() > 0) {
text= System.getProperty("line.separator") + message;
} else {
text= message;
}
try {
doc.insertString(doc.getLength(), text, doc.getStyle(toString()));
} catch (BadLocationException e) {
e.printStackTrace();
}
}
COM: <s> sends the specified message to the log </s>
|
funcom_train/34130688 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map getPrefixNamespaceMappings() {
Vector mappings = prefixNamespaceMappings.get();
Map result = new HashMap();
for ( int i = 0; i < mappings.size(); i++) {
String mapping = (String)mappings.elementAt(i);
int index = mapping.indexOf( ':');
String prefix = mapping.substring( 0, index);
String uri = mapping.substring( index+1, mapping.length());
// put( key, value)
result.put( prefix, uri);
}
return result;
}
COM: <s> returns the list of prefix namespace mappings </s>
|
funcom_train/21848998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFontValue(Font f) {
setFamilyName(f.getName());
if (f.isBold() && f.isItalic()) {
setStyle(STYLE_BOLD_ITALIC);
} else if (f.isBold()) {
setStyle(STYLE_BOLD);
} else if (f.isItalic()) {
setStyle(STYLE_ITALIC);
} else {
setStyle(STYLE_NORMAL);
}
setPointSize(f.getSize());
m_font_comp.setFont(f);
}
COM: <s> sets the font to be displayed in this view </s>
|
funcom_train/13864529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String joinStringArray(String[] vector, String glue) {
if (vector == null) return "";
boolean primero = true;
StringBuffer resp = new StringBuffer();
for (int i = 0; i < vector.length; i++) {
if (!primero) {
resp.append(glue);
} else {
primero = false;
}
resp.append(vector[i]);
}
return resp.toString();
}
COM: <s> helper method that glues together the strings in a string array </s>
|
funcom_train/27748243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawOval(int x, int y, int width, int height) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (width < 0) {
x = x + width;
width = -width;
}
if (height < 0) {
y = y + height;
height = -height;
}
OS.gdk_draw_arc(data.drawable, handle, 0, x, y, width, height, 0, 23040);
}
COM: <s> draws the outline of an oval using the foreground color </s>
|
funcom_train/43886804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IIOMetadataNode buildAttributesNodeFromMap(final Map attribMap, final String nodeName){
final IIOMetadataNode node = new IIOMetadataNode(nodeName);
synchronized (attribMap) {
if (attribMap!=null){
final Set set = attribMap.keySet();
final Iterator iter = set.iterator();
while (iter.hasNext()) {
final String key = (String)iter.next();
final String attribValue = (String) attribMap.get(key);
node.setAttribute(key, attribValue);
}
}
}
return node;
}
COM: <s> build a node having name code node name code and attributes retrieved </s>
|
funcom_train/18808091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mapDatasetToDomainAxis(int index, int axisIndex) {
this.domainAxisMap.set(index, new Integer(axisIndex));
// fake a dataset change event to update axes...
datasetChanged(new DatasetChangeEvent(this, getDataset(index)));
}
COM: <s> maps a dataset to a particular domain axis </s>
|
funcom_train/48336197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int countChildren() {
Vector v = getValue();
int ct = 0; // the result
for (int i = 0; i < v.size(); i++) {
if (v.elementAt(i).getClass().getName().equals("context.arch.comm.DataObject")) {
ct++;
}
}
return ct;
}
COM: <s> counts the children of the current data object </s>
|
funcom_train/14127625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UserData login(String login, String password) {
this.login = login;
this.password = password;
LoginArgument argument = new LoginArgument();
argument.setUsername(login);
argument.setHpassword(password);
UserData userData = client.login(argument);
loggedIn = true;
authCookie = getAuthCookie();
return userData;
}
COM: <s> performs all required authentication procedures </s>
|
funcom_train/44296931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(final IdentifiedObject operation, final ParameterDescriptorGroup parameters) {
final Map<String, Boolean> codeSpaces = new LinkedHashMap<String, Boolean>(8);
IdentifiedObjects.getCodeSpaces(operation, codeSpaces);
final Row group = createRow(operation, parameters, codeSpaces.keySet());
if (group != null) {
rows.add(group);
}
}
COM: <s> adds an operation to be show on the html page </s>
|
funcom_train/40731669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendMessage(final String to, final String msg) {
try {
this.writer.startTag("message");
this.writer.attribute("type", "chat");
this.writer.attribute("to", to);
this.writer.startTag("body");
this.writer.text(msg);
this.writer.endTag();
this.writer.endTag();
this.writer.flush();
} catch (final Exception e) {
// e.printStackTrace();
this.connectionFailed();
}
}
COM: <s> sends a message text to a known jid </s>
|
funcom_train/38552227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDataPoint(DataPoint dataPoint) {
if(!this.collectionType.equals(dataPoint.getDataPointCode())) {
throw new Cube42RuntimeException(
DataSystemCodes.WRONG_DATA_POINT_INSERTED,
new Object[] {dataPoint.getDataPointCode().toString(),
this.collectionType.toString()});
}
this.dataPoints.add(dataPoint);
}
COM: <s> adds a data point </s>
|
funcom_train/31800386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean saveModules(String userId, String mods) {
boolean retVal;
retVal = true;
logger.info("UserProfile EJB activated (saveModules). Processing demand.");
try {
UserProfileTO upTO = new UserProfileTO();
upTO.setModules(mods);
upTO.setUserProfile_id(userId);
upDAO.update(upTO);
} catch (DAOException e) {
retVal = false;
logger.info(e.getMessage());
}
logger.info("CalendarAccessRights EJB (saveModules) finished.");
return retVal;
}
COM: <s> this method saves modules chosen by user </s>
|
funcom_train/43245571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetMostRecentDateOfCare() {
System.out.println("setMostRecentDateOfCare");
Calendar mostRecentDateOfCare = null;
PatientDataDG2Object instance = new PatientDataDG2Object();
instance.setMostRecentDateOfCare(mostRecentDateOfCare);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set most recent date of care method of class org </s>
|
funcom_train/25099448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIsBidirectionalPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_FeatureLink_isBidirectional_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_FeatureLink_isBidirectional_feature", "_UI_FeatureLink_type"),
FeaturemodelingPackage.Literals.FEATURE_LINK__IS_BIDIRECTIONAL,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the is bidirectional feature </s>
|
funcom_train/33241844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUnofficialElementTagName () throws IOException, SAXException {
String desc = "Element.getTagName() should return the tag name";
Document doc = getStaffDocument();
assertEquals(desc,getTagName(getDocumentElement(doc)), getNodeName(getDocumentElement(doc)));
assertEquals(desc,getTagName(getDocumentElement(doc)), getStaffElementName());
}
COM: <s> nothing in the nist element tests ever called get tag name </s>
|
funcom_train/29618391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MgisTextField getJYearField() {
if (jYearField == null) {
jYearField = new MgisTextField();
jYearField.setFieldType(MgisTextField.FIELDTYPE_NUMERIC);
jYearField.setDocument(jYearField.new JTextFieldLimit(4, false));
jYearField.setBounds(301, 103, 46, 19);
}
return jYearField;
}
COM: <s> this method initializes j year field </s>
|
funcom_train/24938376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void stateCapture(Module module, StateMachine mach) {
CommaDelimitedStatement cds = new CommaDelimitedStatement();
cds.append(new StringStatement("%d\\n"));
cds.append(this.cycles);
ConditionalStatement condition = new ConditionalStatement(
mach.getAllDoneWire(), new FStatement.FWrite(
results.getHandle(), cds));
ProceduralTimingBlock ptb = new ProceduralTimingBlock(new EventControl(
new EventExpression.PosEdge(mach.getClock())), condition);
module.state(new Always(ptb));
}
COM: <s> states the logic for writing the cycle count to the results file </s>
|
funcom_train/19972672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Cell findCell(float x, float y) {
// Focus on the pressed cell.
int cx = (int) ((x - paddingX) / cellWidth);
int cy = (int) ((y - paddingY) / cellHeight);
if (cx < 0 || cx >= gridWidth || cy < 0 || cy >= gridHeight)
return null;
return cellMatrix[cx][cy];
}
COM: <s> find the cell corresponding to a screen location </s>
|
funcom_train/45877298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void NewGame() {
for (int j = 0; j < kBlocksHigh; j++) {
for (int i = 0; i < kBlocksWide; i++) {
_guesses[i][j] = ' ';
}
}
_oldEntry = null;
_currentEntry = _entries.iterator().next();
_curPosition = _currentEntry.getPosition();
setActiveBlock(_currentEntry.getPosition());
}
COM: <s> initializes constants at the begining of game </s>
|
funcom_train/2398650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setChildren(List<Tree> childTreesList) {
if (childTreesList == null || childTreesList.isEmpty()) {
setChildren(EMPTY_TREE_ARRAY);
} else {
int leng = childTreesList.size();
Tree[] childTrees = new Tree[leng];
childTreesList.toArray(childTrees);
setChildren(childTrees);
}
}
COM: <s> set the children of this tree node to the given list </s>
|
funcom_train/42544795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int resolveScope(String scopeStr) {
if ( scopeStr == null || scopeStr.equals("") || scopeStr.equals("request") )
return PageContext.REQUEST_SCOPE;
else if ( scopeStr.equals("page") )
return PageContext.PAGE_SCOPE;
else if ( scopeStr.equals("session") )
return PageContext.SESSION_SCOPE;
else
return PageContext.REQUEST_SCOPE;
}
COM: <s> find the scope </s>
|
funcom_train/51575900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showAboutBox() {
if (JMConfig.getInstance().getJMboolean(JMConfig.USESWING)) {
final AboutBox2 temp = new AboutBox2(muckMainFrame);
temp.setVisible(true);
} else {
final AboutBox temp = new AboutBox(muckMainFrame);
temp.setVisible(true);
}
}
COM: <s> this method creates a dialogue box to show the jamocha mud credits </s>
|
funcom_train/1209554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addInstructionCount() {
int count = cfw.getCurrentCodeOffset() - savedCodeOffset;
if (count == 0)
return;
cfw.addALoad(contextLocal);
cfw.addPush(count);
addScriptRuntimeInvoke("addInstructionCount",
"(Lorg/mozilla/javascript/Context;"
+"I)V");
}
COM: <s> generate calls to script runtime </s>
|
funcom_train/14066309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test() {
try {
open(new AudioFormat(22050, 16, 1, true, false));
byte[] data = new byte[22050 / 5];
write(data, 0, data.length);
flush();
close();
} catch (RuntimeException ex) {
throw new JMACPlayerException("Device test failed: ", ex);
}
}
COM: <s> runs a short test by playing a short silent sound </s>
|
funcom_train/15767510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
BufferInputStream out = null;
try {
out = (BufferInputStream) super.clone();
}
catch (CloneNotSupportedException ex) {
// cannot happen
throw new InternalError(ex.toString());
}
out.buf = new byte[buf.length];
System.arraycopy(buf, 0, out.buf, 0, buf.length);
return out;
}
COM: <s> deep clones this object </s>
|
funcom_train/39101301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DataModel duplicate(DataModel instance, CopyPairs<DataModel> copyPairs) {
if (instance == null) {
instance = new BooleanModel(getBoolean());
((BooleanModel) instance).setTrueFalseLabelModel(getTrueFalseLabelModel());
}
return super.duplicate(instance, copyPairs);
}
COM: <s> create a copy instance the label model is shared ot copied </s>
|
funcom_train/38413713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(List path) {
Point pathPoint;
String result = "";
for (int i=0; i<path.size(); i++) {
pathPoint = (Point) path.elementAt(i);
result += "path["+i+"] = (" + pathPoint.x + "," + pathPoint.y + ")\n";
}
return result;
}
COM: <s> prints the astar path </s>
|
funcom_train/1213770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setComboBox(String values, JComboBox comboBox) {
if (values == null) {
comboBox.addItem(null);
return;
}
String [] tokens = values.split(",");
// Add the given values to the combo box.
for (int i = 0; i < tokens.length; i++) {
comboBox.addItem(tokens[i].trim());
}
}
COM: <s> set the value of a given combo box with the given values </s>
|
funcom_train/8352842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FtpFile getWorkingDirectory() {
FtpFile fileObj = null;
if (currDir.equals("/")) {
fileObj = new NativeFtpFile("/", new File(rootDir), user);
} else {
File file = new File(rootDir, currDir.substring(1));
fileObj = new NativeFtpFile(currDir, file, user);
}
return fileObj;
}
COM: <s> get the current directory </s>
|
funcom_train/5457978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendMessage(Message message) {
try {
ostream.write(message.header().getInfo().getMessageType());
ostream.write(message.header().getInfo().getVersion());
message.writeObject(ostream);
} catch (Exception ex) {
if (config.getDebug()) {
System.out.println(ex);
ex.printStackTrace();
}
}
}
COM: <s> sends the given message to the server </s>
|
funcom_train/3102408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createCharacterRules(final List<IRule> rules) {
Assertion.valid(rules);
final IToken bracket= new Token(new SourcePresentationAttribute(this, UserPreferences.EIFFEL_COLOR_BRACKET));
final IToken operator= new Token(new SourcePresentationAttribute(this, UserPreferences.EIFFEL_COLOR_OPERATOR));
rules.add(new SingleCharacterRule(IEiffelSymbols.CATEGORY_OPERATOR, operator));
rules.add(new SingleCharacterRule(IEiffelSymbols.CATEGORY_BRACKET, bracket));
}
COM: <s> creates the necessary rules for single character highlighting </s>
|
funcom_train/18795693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateParentListeners(ParsedData parsedData) {
Set<String> parentPaths;
try {
parentPaths = getParentPaths(parsedData);
} catch (CommandException ex) {
// something's wrong, keep the old parents
return;
}
updateParentListeners(parsedData.getDocumentVersion(), parentPaths);
}
COM: <s> signals to update parent listeners with a fresh set of parsed information </s>
|
funcom_train/27842108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSource(ValidationSource inSource) {
if (sources.contains(inSource)) {
return;
}
// Initial validation status is true
sources.add(inSource);
inSource.addValidationListener(this);
if (holder != null) {
holder.sourceAdded(inSource, this);
}
}
COM: <s> adds a validation source which will notify this validation listener on </s>
|
funcom_train/41812363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void schedule(Hashtable task) {
// maybe we could test if a worker is registered for this task and
// generate an exception if not.
//System.out.println("BackgroundThread.schedule");
this.jobs.put(task);
//System.out.println("this = " + this);
}
COM: <s> schedule a task for background processing </s>
|
funcom_train/8109007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getData() {
String cr = System.getProperty("line.separator");
StringBuffer buff = new StringBuffer(70 * 48961);
buff.append(header).append(cr);
for (SimulationEntry entry : entries) {
buff.append(entry.getCsv()).append(cr);
}
return buff.toString();
}
COM: <s> returns a string with the simulation data </s>
|
funcom_train/5906848 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getEncodedData() {
if (_data == null)
return null;
final JSONArray encdata = new JSONArray();
for (int j = 0; j < _data.length; ++j) {
Object d = _data[j];
if (d instanceof DeferredValue)
d = ((DeferredValue)d).getValue();
if (d instanceof Component)
d = ((Component)d).getUuid();
if (d instanceof Date)
d = new JSONDate((Date)d);
encdata.add(d);
}
return encdata;
}
COM: <s> returns the evaluated result of the associated data of </s>
|
funcom_train/50335690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHeld(boolean newHeld) {
boolean oldHeld = mHeld;
mHeld = newHeld;
if (oldHeld != newHeld) {
// notify listeners, if any
firePropertyChange("Held", Boolean.valueOf(oldHeld), Boolean.valueOf(newHeld));
}
}
COM: <s> set the held parameter </s>
|
funcom_train/46821204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearEndedJobs() {
// check for ended jobs and clear
for (Iterator<Job> iter = this.runningJobs.iterator(); iter.hasNext();) {
Job job = iter.next();
if (job.hasEnded()) {
job.compact();
job.clear();
iter.remove();
}
}
// clear ended jobs
for (Iterator<Job> iter = this.endedJobs.iterator(); iter.hasNext();) {
Job job = iter.next();
job.clear();
iter.remove();
}
}
COM: <s> clears all the ended jobs regardless of any locks or record timeouts </s>
|
funcom_train/13916030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTypeDesc() {
if (this.iSize == 0)
return this.sTypeName;
if (this.iPrecision > 0)
return this.sTypeName + "(" + this.iSize + "," + this.iPrecision + ")";
return this.sTypeName + "(" + this.iSize + ")";
}
COM: <s> gets the type desc </s>
|
funcom_train/37590000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean _selectError(MouseEvent e) {
//TODO: get rid of cast in the next line, if possible
_error = (JUnitError)_errorAtPoint(e.getPoint());
if (_isEmptySelection() && _error != null) {
_errorListPane.switchToError(_error);
return true;
}
else {
selectNothing();
return false;
}
}
COM: <s> select the error at the given mouse event </s>
|
funcom_train/20747903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getHelpForAllCommands() {
StringBuilder answer = new StringBuilder();
Iterator iterator = commandList.keySet().iterator();
while (iterator.hasNext()) {
answer.append(commandList.get(iterator.next()).getShortDescription());
answer.append("\n");
}
return answer.toString();
}
COM: <s> get the short help strings for all commands </s>
|
funcom_train/16695781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void restoreLocalVariables() {
//
// pop the list containing the current block's local vars
//
Iterator iter = ((List) this.scopedVars.remove(this.scopedVars.size() - 1)).iterator();
while (iter.hasNext()) {
Java.LocalVariableSlot slot = (Java.LocalVariableSlot) iter.next();
if (slot.getName() != null) {
slot.setEnd(newOffset());
}
}
}
COM: <s> restore the previous size of the local variables array </s>
|
funcom_train/37589947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void _updateNoErrors(boolean haveTestsRun) throws BadLocationException {
//DefaultStyledDocument doc = new DefaultStyledDocument();
// _checkSync(getDocument());
_replaceInProgressText(haveTestsRun ? JUNIT_FINISHED_MSG : NO_TESTS_MSG);
selectNothing();
setCaretPosition(0);
}
COM: <s> updates the list pane with no errors </s>
|
funcom_train/17924702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Collection getConnected(String path) {
String connectionString =
"xmldb:xindice://" + hostname + ":" + String.valueOf(portnumber)
+ path;
try {
return DatabaseManager.getCollection(connectionString);
} catch (Exception e) {
logger.warn("Unable getting collection:" + connectionString);
return null;
}
}
COM: <s> this method tries to connect to the specified collection on the host </s>
|
funcom_train/12180522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IFile getFile(IEditorInput input) {
IFile file = null;
if (input instanceof IFileEditorInput) {
file = ((IFileEditorInput) input).getFile();
} else {
throw new IllegalStateException("Unsupported IEditorInput: " + //$NON-NLS-1$
getEditorInput());
}
return file;
}
COM: <s> get the ifile assoiciated with a given ieditor input </s>
|
funcom_train/12548521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintIcon(Component c, Graphics g, int x, int y) {
Graphics2D g2 = (Graphics2D) g.create();
g2.translate(x, y);
// Draws the state.
paintConfiguration(c, g2, getIconWidth(), getIconHeight());
g2.translate(-x, -y);
}
COM: <s> paints the graphical representation of a configuration on this icon </s>
|
funcom_train/49461962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startElt(QName element, XMLAttributes attrs, Augmentations augs) throws XNIException {
try {
if("asset".equals(element.localpart)){
startAsset(attrs);
} else if ("network_interface".equals(element.localpart)){
addNI(attrs);
} else if ("ip".equals(element.localpart)){
addIP(attrs);
} else if ("os".equals(element.localpart)){
addOS(attrs);
} else if ("application".equals(element.localpart)){
addProduct(attrs);
} else {
_logger.warn("Ignoring tag ("+element.localpart+")");
addUnknownTag(element);
}
} catch (Exception e) {
_logger.fatal("Fatal error with xml parser declared.", e);
XNIException ex = new XNIException(e.getMessage());
ex.initCause(e);
throw ex;
}
}
COM: <s> main function for the parser triggered on the start of each </s>
|
funcom_train/8065277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setText(String s) {
String newText = encode(s, lineSeparator);
if (textEditor != null && !_curText.equals(newText)) {
textEditor.cancelEditing();
}
_curText = newText;
calcBounds();
_editMode = false;
}
COM: <s> sets the given string to the current string of this fig </s>
|
funcom_train/10779140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIllegalArgumennExceptionOnInvalidNamedQuery() {
EntityManager em = emf.createEntityManager();
try {
Query query = em.createNamedQuery("This is invalid Named query");
fail("Did not throw IllegalArgumentException for invalid query.");
} catch (Throwable t) {
assertException(t, IllegalArgumentException.class);
}
em.close();
}
COM: <s> invalid named query fails as per spec on factory based construction </s>
|
funcom_train/4758298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLineAt(int pos) throws BadLocationException {
Element e = getParagraphElement(pos);
Segment seg = new Segment();
getText(e.getStartOffset(), e.getEndOffset() - e.getStartOffset(), seg);
char last = seg.last();
if (last == '\n' || last == '\r') {
seg.count--;
}
return seg.toString();
}
COM: <s> gets the line at given position </s>
|
funcom_train/36470493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Template fetchTemplateFromCursor(Cursor c) {
// Now find out what category this template belongs to
Category cat = fetchCategory(c.getInt(c.getColumnIndexOrThrow(KEY_TEMPLATE_CATEGORY)));
Template t = new Template(c.getLong(c.getColumnIndexOrThrow(KEY_TEMPLATE_ID)), cat,
c.getString(c.getColumnIndexOrThrow(KEY_TEMPLATE_NAME)),
c.getString(c.getColumnIndexOrThrow(KEY_TEMPLATE_VERSION))
);
return t;
}
COM: <s> utility method to build a template object from a record previously retrieved from </s>
|
funcom_train/33610761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDomain(SampleSet<Double> newDomain) {
if (sampler != newDomain && newDomain != null) {
if (sampler instanceof ChangeBroadcaster)
((ChangeBroadcaster) sampler).removeChangeListener(this);
sampler = newDomain;
if (sampler instanceof ChangeBroadcaster)
((ChangeBroadcaster) sampler).addChangeListener(this);
updateDomainPlottable();
firePlottableChanged();
}
}
COM: <s> sets domain of the curves parameter </s>
|
funcom_train/3369650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateRGBTextFields( Color color ) {
redField.setText(String.valueOf(color.getRed()));
greenField.setText(String.valueOf(color.getGreen()));
blueField.setText(String.valueOf(color.getBlue()));
}
COM: <s> updates the values of the rgb fields to reflect the new color change </s>
|
funcom_train/43647172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showUsage() {
final HtmlPane usageHtmlDialog = new HtmlPane(ZTerm.class
.getResource("docs/usage.html")); //$NON-NLS-1$
final JDialog dialog = usageHtmlDialog.createDialog(view, InternationalMessages
.getString("ZTerm.Title_Manual")); //$NON-NLS-1$
dialog.setSize(640, 400);
dialog.setVisible(true);
}
COM: <s> show usage dialog </s>
|
funcom_train/7623698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int waitForAsyncConnect(int timeoutMs) throws IOException {
synchronized (this) {
if (mFd == null) {
throw new IOException("socket not created");
}
int ret = waitForAsyncConnectNative(timeoutMs);
if (ret != 0) {
mIsConnecting = false;
}
return ret;
}
}
COM: <s> blocks for a specified amount of milliseconds while waiting for an </s>
|
funcom_train/2864844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Hashtable getParameters(IniFile inifile, IniFileSection section) {
Hashtable h=super.getParameters(inifile, section);
debugLCClass=section.getBooleanValue("debugLCClass", false);
if(debugLCClass)
h.put("debuglcclass", new Integer(1));
return h;
}
COM: <s> gets parameter specific to lcclass debuglcclass </s>
|
funcom_train/13659242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Partner getLocalStation(){
Partner localstation = null;
for( int i = 0; i < this.root.getChildCount(); i++ ){
DefaultMutableTreeNode child = (DefaultMutableTreeNode)root.getChildAt(i);
Partner partner = (Partner)child.getUserObject();
if( partner.isLocalStation() ){
localstation = partner;
break;
}
}
return( localstation );
}
COM: <s> returns the partner that is the localstation or null if none exists </s>
|
funcom_train/41595185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addRevPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_StrucDocLinkHtml_rev_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_StrucDocLinkHtml_rev_feature", "_UI_StrucDocLinkHtml_type"),
V3Package.eINSTANCE.getStrucDocLinkHtml_Rev(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the rev feature </s>
|
funcom_train/49214083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ContentDescriptor getCurrentContextDescriptor() {
// get reference to model data
ApplicationSessionModel applicationModel =
(ApplicationSessionModel) FacesUtils.getManagedBean(
BeanNames.APPLICATION_MODEL);
// get reference to application builder
ApplicationBuilder applicationBuilder =
(ApplicationBuilder) FacesUtils.getManagedBean(
BeanNames.APPLICATION_BUILDER);
Node currentNode = applicationModel.getCurrentNode();
// return ContextDescriptor associated with this node.
return applicationBuilder.getContextDescriptor(currentNode);
}
COM: <s> p gets the context descriptor object associated with the currently </s>
|
funcom_train/8334752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setMyCurrentSetup(HidSetup myCurrentSetup) {
//1st deal with listeners
HidSetup oldSetup = this.mySetup;
oldSetup.removePropertyChangeListener(setupListener);
this.mySetup = myCurrentSetup;
mySetup.addPropertyChangeListener(setupListener);
// propertyChangeSupport.firePropertyChange(PROP_MYCURRENTSETUP, oldSetup, mySetup);
}
COM: <s> set the value of my current setup </s>
|
funcom_train/2624889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRenderQuality(final int requestedQuality) {
renderQuality = requestedQuality;
switch (renderQuality) {
case HIGH_QUALITY_RENDERING:
setRenderQualityToHigh();
break;
case LOW_QUALITY_RENDERING:
setRenderQualityToLow();
break;
default:
throw new RuntimeException("Quality must be either HIGH_QUALITY_RENDERING or LOW_QUALITY_RENDERING");
}
}
COM: <s> set the rendering hints for this paint context </s>
|
funcom_train/49704610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clearCaches() {
if (null != caches) {
for (int i = 0; i < caches.size(); i++) {
Cache cache = caches.get(i);
logger.info("Cache " + i + ": hit ratio since last clear is " + cache.getRecentHitRatio() + ", historic is " + cache.getHitRatio());
cache.clear();
}
}
}
COM: <s> clear the caches </s>
|
funcom_train/32082745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTopIndex (int index) {
checkWidget ();
if ((style & SWT.SINGLE) != 0) return;
byte [] position = new byte [ITER_SIZEOF];
OS.gtk_text_buffer_get_iter_at_line (bufferHandle, position, index);
OS.gtk_text_view_scroll_to_iter (handle, position, 0, true, 0, 0);
}
COM: <s> sets the zero relative index of the line which is currently </s>
|
funcom_train/21940302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Field21 getField21() {
if (getSwiftMessage() == null) {
throw new IllegalStateException("SwiftMessage was not initialized");
}
if (getSwiftMessage().getBlock4() == null) {
log.info("block4 is null");
return null;
} else {
final Tag t = getSwiftMessage().getBlock4().getTagByName("21");
if (t == null) {
log.fine("field 21 not found");
return null;
} else {
return new Field21(t.getValue());
}
}
}
COM: <s> iterates through block4 fields and return the first one whose name matches 21 </s>
|
funcom_train/38623158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Credentials getCredentials() {
Credentials credentials = null;
if (this.getDomain().equals(ANONYMOUS)) {
credentials = new UsernamePasswordCredentials(this.getUserName(), this.getPassword());
} else {
credentials = new NTCredentials(this.getUserName(), this.getPassword(), this.getProxyHostName(), this.getDomain());
}
return credentials;
}
COM: <s> get the proxy credentials </s>
|
funcom_train/7607910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void validateVelocity() {
if (maxVelocity == null) {
return;
}
if (Math.abs(velocity.x) > maxVelocity.x) {
if (velocity.x > 0) {
velocity.x = maxVelocity.x;
} else {
velocity.x = -maxVelocity.x;
}
}
if (Math.abs(velocity.y) > maxVelocity.y) {
if (velocity.y > 0) {
velocity.y = maxVelocity.y;
} else {
velocity.y = -maxVelocity.y;
}
}
}
COM: <s> validate the velocity value thats just been applied </s>
|
funcom_train/30280775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void onFinish() {
if (LOG.isTraceEnabled()) {
LOG.trace("Entering onFinish ...");
}
if (LOG.isInfoEnabled()) {
LOG.info("ThreadGroup is completed for application ["
+ bProcessX.getId()
+ "]. Current status is "
+ BPStatus.toString(bProcessX.getStatus().intValue())
.toLowerCase() + ".");
}
}
COM: <s> called when this thread group is exiting execution loop </s>
|
funcom_train/32099462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addControllerErrorListener() {
IXuilController controller = xuilDocument.getController();
if (controller != null
&& this.getWizard() instanceof IXuilWizardContainer) {
final IXuilWizardContainer xuilContainer = (IXuilWizardContainer) this
.getWizard();
final IXuilWizardPage page = this;
controller
.addControllerErrorListener(new IXuilControllerErrorListener() {
public void errorThrowed(Exception e) {
xuilContainer.addControllerError(page, e);
}
});
}
}
COM: <s> add controller error listner to display icon with error when controller </s>
|
funcom_train/10267518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String checkConnectionForAdmin(String sessionHandle) throws YAuthenticationException {
checkConnection(sessionHandle);
Connection connection = (Connection) _connections.get(sessionHandle);
User user = (User) _users.get(connection._userid);
if (!user.isAdmin()) {
throw new YAuthenticationException(
"This user is not an administrator.");
}
return _permissionGranted;
}
COM: <s> checks the connection for administraive priviledges </s>
|
funcom_train/19543240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PropertyDescriptor put(PropertyDescriptor pd) {
if (pd == null)
throw new NullPointerException("A descriptor is required but null is passed");
PropertyDescriptor old = map.put(pd.getPropertyName(), pd);
if (old == null) {
super.add(pd);
} else {
super.set(super.indexOf(old), pd);
}
return old;
}
COM: <s> put a property descriptor in the map </s>
|
funcom_train/44136345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getMediaType(Node node) {
int type = -1;
NamedNodeMap map = node.getAttributes();
if(map.getLength() > 0) {
Node n = map.getNamedItem(OSMFile.OSM_MEDIA_ATT_TYPE);
if(n != null)
type = parseInt(getStringCleaned(n.getNodeValue()));
}
return type;
}
COM: <s> it gets the type of the media image sound text </s>
|
funcom_train/12189761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConcatFiveStringArgs() throws Exception {
Expression exp = compileExpression("concat('ex','pres','s','ion','s')");
Value result = exp.evaluate(context);
assertTrue("fn:concat should result in a String value",
result instanceof StringValue);
assertEquals("fn:concat expression result should be expressions",
"expressions",
((StringValue) result).asJavaString());
}
COM: <s> test the concat function with five string args </s>
|
funcom_train/1812696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Connection getConnection() throws Exception {
Connection conn;
conn = getDatasource().getConnection();
if (logger.isDebugEnabled()) {
logger.debug("Tx table connection, isolation level: "
+ conn.getTransactionIsolation()
+ " autocommit: " + conn.getAutoCommit());
}
return conn;
}
COM: <s> obtains a new connection </s>
|
funcom_train/7641194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getObjectFromString(String value) {
switch (mEventValueType) {
case INT:
try {
return Integer.valueOf(value);
} catch (NumberFormatException e) {
return null;
}
case LONG:
try {
return Long.valueOf(value);
} catch (NumberFormatException e) {
return null;
}
case STRING:
return value;
}
return null;
}
COM: <s> returns an object of a valid type based on the value returned by </s>
|
funcom_train/8140415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getCacheKey(String targetName, String methodName, Object[] arguments) {
StringBuffer sb = new StringBuffer();
sb.append(targetName).append(".").append(methodName);
if ((arguments != null) && (arguments.length != 0)) {
for (int i = 0; i < arguments.length; i++) {
sb.append(".").append(arguments[i]);
}
}
return sb.toString();
}
COM: <s> creates cache key target name </s>
|
funcom_train/37088534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isWithinRadius(Point3f t) {
dx = t.x - cx;
return (!tHemisphere || dx >= 0)
&& (dx = Math.abs(dx)) <= radius
&& (dy = Math.abs(t.y - cy)) <= radius
&& (dz = Math.abs(t.z - cz)) <= radius;
}
COM: <s> checks one point3f for distance </s>
|
funcom_train/9299611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDate(Date newDate) {
if (m_bIsSelectable && m_chkSelectable.isSelected() == false) {
return;
}
if (newDate == null) {
m_calCurrent = null;
} else {
if (m_calCurrent == null) {
m_calCurrent = new GregorianCalendar();
}
m_calCurrent.setTime(newDate);
}
updateText();
}
COM: <s> sets the current date and updates the ui to reflect the new date </s>
|
funcom_train/14435828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSplitPane getLeftSplitPane() {
if (leftSplitPane == null) {
leftSplitPane = new JSplitPane();
leftSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
leftSplitPane.setResizeWeight(0.5D);
leftSplitPane.setBottomComponent(getBottomLeftScrollPane());
leftSplitPane.setTopComponent(getTopleftScrollPane());
}
return leftSplitPane;
}
COM: <s> this method initializes left split pane </s>
|
funcom_train/44223301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void downloadData() {
//
// Close the ProxyDialog object.
//
this.proxyDialog.setVisible(false);
this.setStatus("Downloading data, please wait...", true);
//
// Initialize the ProxyAdapter object.
//
this.initAdapter();
//
// Transfer the data into the current application.
//
this.adapter.loadData();
this.setUidToLocalImp();
this.setStatus("Ready", false);
}
COM: <s> p download the data from the database </s>
|
funcom_train/132675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int mapToMapped(int ref_pos) {
int seqpos = Integer.MIN_VALUE;
if (ref_pos < ref_start || ref_pos > ref_end) {
return seqpos;
}
int i;
Span sp;
int numspans = spans.size();
for (i=0; i<numspans; i++) {
sp = spans.get(i);
if (ref_pos >= sp.ref_start && ref_pos <= sp.ref_end) {
seqpos = sp.seq_start + (ref_pos - sp.ref_start);
return seqpos;
}
}
return seqpos;
}
COM: <s> maps a reference position to a mapped position </s>
|
funcom_train/1060075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSemanticParentPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DiagramElement_semanticParent_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DiagramElement_semanticParent_feature", "_UI_DiagramElement_type"),
Di2Package.Literals.DIAGRAM_ELEMENT__SEMANTIC_PARENT,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the semantic parent feature </s>
|
funcom_train/19655727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initDb() {
DbHelper myDbHelper = new DbHelper(this);
try {
myDbHelper.createDataBase();
} catch (IOException ioe) {
throw new Error("Unable to create database");
}
try {
myDbHelper.openDataBase();
} catch (SQLException sqle) {
throw sqle;
}
}
COM: <s> create the complete database with content provided on install if it not exists </s>
|
funcom_train/32740534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected QueryTag getEnclosingList() {
final QueryTag parentList = (QueryTag) findParentWithClass(QueryTag.class);
if (parentList == null) {
throw new ProgrammerError("Function '" + expression + "' needs to be enclosed in a LIST or OBJECT tag");
}
return parentList;
}
COM: <s> finds the enclosing mak list object </s>
|
funcom_train/985740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void glVertex4s (short x, short y, short z, short w) {
if (CC.Mode == None) {
CC.gl_error (GL_INVALID_OPERATION, "glVertex4s");
return;
}
CC.gl_vertex (x, y, z, w);
}
COM: <s> glvoid gl vertex4s glshort x glshort y glshort z glshort w </s>
|
funcom_train/3942408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setPointsFromBounds() {
points[0] = new Point(bounds.x,bounds.y);
points[1] = new Point(bounds.x+bounds.width,bounds.y);
points[2] = new Point(bounds.x+bounds.width,bounds.y+bounds.height);
points[3] = new Point(bounds.x,bounds.y+bounds.height);
}
COM: <s> set points from bounds </s>
|
funcom_train/7772565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnNuovoAspetto() {
if (btnNuovoAspetto == null) {
ImageIcon imageIcon2 = new ImageIcon(getUserDir2() + File.separator + "\\resource\\nuovo.png");
btnNuovoAspetto = new JButton();
btnNuovoAspetto.setBounds(new Rectangle(740, 136, 42, 26));
btnNuovoAspetto.setIcon(imageIcon2);
btnNuovoAspetto.setToolTipText("Nuovo Aspetto");
}
return btnNuovoAspetto;
}
COM: <s> this method initializes btn nuovo aspetto </s>
|
funcom_train/49124553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDuration(String duration) {
this.duration = duration;
if (dtstartDate == null)
return;
net.fortuna.ical4j.model.Dur dur= new net.fortuna.ical4j.model.Dur(duration);
dtendDate = new net.fortuna.ical4j.model.DateTime(dur.getTime(dtstartDate));
String tmpDtendTime = timeFormat.format(dtendDate);
if(!"00:00".equals(tmpDtendTime))
this.dtendTime = tmpDtendTime;
this.isSetDuration = true;
}
COM: <s> if the duration set calculate dtend from dtstart and set it </s>
|
funcom_train/7917070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadAvatar(AvatarInfo info, boolean loadNow) {
AvatarFetcher fetcher = new AvatarFetcher(info, loadNow);
if (loadNow) {
avatarLoadThread = new Thread(fetcher);
avatarLoadThread.start();
}
else {
if (threadPool == null)
threadPool = Executors.newSingleThreadExecutor();
threadPool.execute(fetcher);
}
}
COM: <s> starts a thread to load avatar </s>
|
funcom_train/20978247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getPreferredSize(JComponent c) {
Dimension prefs = super.getMinimumSize(c);
Dimension combo = skin.getPersonality().getComboBoxPreferredSize(comboBox);
prefs.width = Math.max(prefs.width, combo.width);
prefs.height = Math.max(prefs.height, combo.height);
return prefs;
}
COM: <s> gets the preferred size attribute of the skin combo box ui object </s>
|
funcom_train/35806905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void disconnectAllCharacters() {
L1PcInstance[] players = L1World.getInstance().getAllPlayers();
for (int i = 0; i < players.length; i++) {
// Logout Character
S_Disconnect dc = new S_Disconnect();
players[i].sendPackets(dc);
try {
players[i].getNetConnection().close();
} catch (Exception e) {
// just to make sure we try to kill the connection
}
}
}
COM: <s> this disconnects all clients from the server </s>
|
funcom_train/29609556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IType getSuperclassType( IType child ) throws JavaModelException {
// Define return value
IType superclassType = null;
// Get name of super
String superclassName = child.getSuperclassName();
// Ensure name is not null
if ( superclassName != null ) {
// Attempt to find item by type
superclassType = child.getJavaProject().findType( superclassName );
}
// Return value
return superclassType;
}
COM: <s> get super as type for supplied type </s>
|
funcom_train/1147480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedJob(final JobBean selectedJob) {
JobBean oldSelectedJob = getSelectedJob();
if (oldSelectedJob != null) {
oldSelectedJob.removePropertyChangeListener(this);
}
this.selectedJob = selectedJob;
firePropertyChange("selectedJob", oldSelectedJob, getSelectedJob());
}
COM: <s> sets the selected job </s>
|
funcom_train/40773358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getAttractionVelocity(Vector myCurrentCenter, List<Boid> tooCloseNeighbors, int scale) {
Vector p = new Vector();
if (tooCloseNeighbors.size()!=0) {
for (Boid nei : tooCloseNeighbors) {
p = p.add(nei.getCenter().subtract(myCurrentCenter));
}
return p.divide(scale);
}
return p;
}
COM: <s> get the attraction velocity from its neighbors </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.