__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/32987091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCMLString(int setid) throws TransformerConfigurationException, TransformerException, Exception {
ByteArrayOutputStream out = new ByteArrayOutputStream();
Serializer ser = new Serializer(out, "ISO-8859-1");
ser.setIndent(1);
ser.write(new Document(getCML(setid)));
return new String(out.toString().getBytes());
}
COM: <s> gets this molecule as cml as a string </s>
|
funcom_train/2764167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String marshalContextModification(ContextModification contextModification) throws JAXBException {
if(contextModification == null) {
return null;
}
ContextModificationElement elem = getObjectFactory().createContextModificationElement();
elem.getAddOrUpdateOrDelete().addAll(contextModification.getAddOrUpdateOrDelete());
StringWriter sw = new StringWriter();
Marshaller marshaller = getJaxbContext().createMarshaller();
marshaller.marshal(elem, sw);
return sw.toString();
}
COM: <s> helper method that marshals the supplied context modification </s>
|
funcom_train/47015238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCompareSingle() {
System.out.println("compareSingle");
byte b = 'a';
byte b0 = 'A';
int expResult = 0;
int result = dictIndex.compareSingle(b, b0);
assertEquals(expResult, result);
b = 'b';
expResult = 1;
result = dictIndex.compareSingle(b, b0);
assertEquals(expResult, result);
}
COM: <s> test of compare single method of class com </s>
|
funcom_train/18566295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JButton getLoadButton() {
if (loadButton == null) {
loadButton = new JButton();
loadButton.setIcon(loadImageIcon);
loadButton.setText("Load");
loadButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
ilPool.load();
}
});
}
return loadButton;
}
COM: <s> this method initializes load button </s>
|
funcom_train/20045327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _collapseToEnd(){
boolean bCol = false;
oObj.setString("XTextCursor");
oObj.gotoStart(false);
oObj.gotoEnd(true);
oObj.collapseToEnd();
bCol = oObj.getString().equals("");
tRes.tested("collapseToEnd()", bCol );
}
COM: <s> first some text is set for component to has at least some </s>
|
funcom_train/45460504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writePlaylists() {
Log.getInstance(PlaylistController.class).debug("Writting playlists to : " + SystemUtils.playlistDirectory); //$NON-NLS-1$
Playlist item;
Set<String> keys;
Iterator<String> iter;
keys = _itemsToDelete.keySet();
iter = keys.iterator();
while (iter.hasNext()) {
item = _itemsToDelete.get(iter.next());
item.deletePlaylist();
}
keys = _items.keySet();
iter = keys.iterator();
while (iter.hasNext()) {
item = _items.get(iter.next());
item.writePlaylist();
}
}
COM: <s> write the playlist list to the playlist directory </s>
|
funcom_train/5002264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setLineCounts() {
for (Line line : lines)// for each Line set its count
{
int[] c = new int[partnames.size()];
for (int i = 0; i < partnames.size(); i++)
if (counts.get(line.getSignature()).size() <= i)
c[i] = 0;
else
c[i] = counts.get(line.getSignature()).get(i);
line.setCounts(c, -1);
}
}
COM: <s> update the lines counts </s>
|
funcom_train/25195025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(){
return String.format("%d,\"%s\",%d,\"%s\",\"%B\",\"%s\",%d,\"%B\",\"%B\"",
defLine, defName, usedInLine, usedInSchema, usedInMainFile, usedInFile, usedInLineInFile, usedAsInclusion, usedAsExpression);
}
COM: <s> creates a string containing the object in lisp format for input to zxref </s>
|
funcom_train/4352374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isWordOnLine(String word, int fileIndex, int lineNumber) {
boolean retval = true;
long testBitmask = bloomFilterMask(word, lineNumber);
int startPosition = fileBitmaskOffsets[fileIndex] + (lineNumber * bitsPerBitmask);
long lineBitmask = getBits(bitsPerBitmask, startPosition);
if ((testBitmask & lineBitmask) != testBitmask) {
retval = false;
}
return retval;
}
COM: <s> checks the proper bitmask bits for the given word on the given line </s>
|
funcom_train/3471035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setController(SyncController controller, BlockType type) {
assert(controller != null);
assert(type != null);
if (type.equals(BlockType.AUDIO) || type.equals(BlockType.VIDEO)) {
this.controllerMap.put(BlockType.AUDIO, controller);
this.controllerMap.put(BlockType.VIDEO, controller);
} else {
this.controllerMap.put(type, controller);
}
}
COM: <s> sets the current sync controller for the given block type </s>
|
funcom_train/3429511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addTransform(Transform transform) {
if (true)
if (log.isLoggable(java.util.logging.Level.FINE)) log.log(java.util.logging.Level.FINE, "Transforms.addTransform(" + transform.getURI() + ")");
Element transformElement = transform.getElement();
this._constructionElement.appendChild(transformElement);
XMLUtils.addReturnToElement(this._constructionElement);
}
COM: <s> adds a user provided transform step </s>
|
funcom_train/18257197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void build() {
super.build();
propertySupport = UserEnvironment.getDefaultEnvironment().getPropertySupportForObject(getScape());
buildSettingsPanel();
buildRulePanel();
addPanels();
// setPreferredSize(new Dimension(280, getPreferredSize().height));
setPreferredSize(new Dimension(320, getPreferredSize().height)); // changed 8/4/03 to fit 3 tab panes for NIMA
validate();
}
COM: <s> create and place the customizers components </s>
|
funcom_train/42903879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int available() throws IOException {
int nAvailable = 0;
Iterator<AudioInputStream> streamIterator = m_audioInputStreamList.iterator();
while (streamIterator.hasNext()) {
AudioInputStream stream = streamIterator.next();
nAvailable = Math.min(nAvailable, stream.available());
}
return nAvailable;
}
COM: <s> the minimum of available of all input stream is calculated and </s>
|
funcom_train/2759264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMountPoint(MountPoint mountPoint) {
if(getMountPoint(mountPoint.getMountPath()) != null) {
throw new IllegalArgumentException("Mountpoint exists for path:" + mountPoint.getMountPath());
}
ArrayList mountPoints = new ArrayList();
mountPoints.add(mountPoint);
_mountPoints = (MountPoint[]) mountPoints.toArray(new MountPoint[mountPoints.size()]);
}
COM: <s> adds the supplied mount point to the set of mount points </s>
|
funcom_train/48339020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void enterTest(int number, String operation, Object result) {
if (this.number != number) {
throw new Bug("Actual test (" + number + ") not the same as "
+ "requested test (" + this.number + ")");
}
this.operation = (null == operation)? "" : operation;
expectedResult = result;
}
COM: <s> enter the specified test </s>
|
funcom_train/47870401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rectangle2D getBounds2D() {
Point2D p = getCorner(0);
Rectangle2D r = new Rectangle2D.Double(p.getX(), p.getY(), 0, 0);
r.add(getCorner(1));
r.add(getCorner(2));
return r;
}
COM: <s> calculate bounding box </s>
|
funcom_train/7639530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IPath getJavaPackagePath(String javaPackageName) {
// convert the java package into path
String[] segments = javaPackageName.split(AndroidConstants.RE_DOT);
StringBuilder path = new StringBuilder();
for (String s : segments) {
path.append(AndroidConstants.WS_SEP_CHAR);
path.append(s);
}
return new Path(path.toString());
}
COM: <s> creates a relative </s>
|
funcom_train/5379669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean needsRefilter(Object element, String property) {
if (sorter != null && sorter.isSorterProperty(element, property))
return true;
if (filters != null) {
for (int i = 0, n = filters.size(); i < n; ++i) {
ViewerFilter filter = (ViewerFilter) filters.get(i);
if (filter.isFilterProperty(element, property))
return true;
}
}
return false;
}
COM: <s> determines whether a change to the given property of the given element </s>
|
funcom_train/3476054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int run() {
DatabaseException.check(db!=null && table==null, "No update count");
try {
Connection conn = db.getConnection();
PreparedStatement prep = conn.prepareStatement(sql);
bind(prep);
int count = prep.executeUpdate();
return count;
} catch (Throwable e) {
throw new DatabaseException("Error executing command "
+ sql, e);
}
}
COM: <s> runs a delete update or insert statement </s>
|
funcom_train/3775235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteTable( String tableName ) {
String opname = "dropTable";
try {
PreparedStatement ps = m_sql.getPreparedSQLStatement(opname, tableName);
ps.executeUpdate();
return;
} catch (Exception e1) {
throw new RDFRDBException("Failed to delete table ", e1);
}
}
COM: <s> delete a table </s>
|
funcom_train/33705790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEstimate(int estimate) {
LOGGER.entering("Task", "setEstimate", estimate);
if (estimate < 0) {
throw new IllegalArgumentException("Estimate should be positive");
}
this.estimate = estimate;
LOGGER.exiting("Task", "setEstimate", this.estimate);
}
COM: <s> changes the estimated number of working days to complete this </s>
|
funcom_train/3431548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getNextAttributeIdentity(int identity) {
// Assume that attributes and namespace nodes immediately follow the element
while (DTM.NULL != (identity = getNextNodeIdentity(identity))) {
int type = _type(identity);
if (type == DTM.ATTRIBUTE_NODE) {
return identity;
} else if (type != DTM.NAMESPACE_NODE) {
break;
}
}
return DTM.NULL;
}
COM: <s> given a node identity for an attribute advance to the next attribute </s>
|
funcom_train/34888523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toEnclosureString() {
StringBuffer buffer = new StringBuffer(200);
// All three enclosure attributes are required.
buffer.append("<enclosure length=\"" + this.fileSize +
"\" type=\"" + this.type +
"\" url=\"" + this.url + "\" />\n");
return buffer.toString();
}
COM: <s> return image formatted as enclosure element </s>
|
funcom_train/17111555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void activate(Editor editor) {
// First deactivate the current editor if there is one.
if (EditorActionManager.s_editor != null) {
deactivate(EditorActionManager.s_editor);
}
EditorActionManager.s_editor = editor;
editor.hasBeenActivated(editor);
editor.getTextComponent().addCaretListener(
editor.getEditorActionManager().m_attributeTracker);
}
COM: <s> add an editor to the action manager </s>
|
funcom_train/33517258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void computeRatio() {
for(int i = 0; i < vectorSize; i++) {
double keyWeight = getWeight(keyVector[i]);
double fpWeight = getWeight(fpVector[i]);
if(keyWeight > 0 && fpWeight > 0) {
ratio[i] = keyWeight/fpWeight;
}
}//end for - i
}//end computeRatio()
COM: <s> computes the ratio a fp </s>
|
funcom_train/38417888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleCut(TimedStroke stk) {
/*
// Provide feedback
provideFeedback("CutSmallA", stk.getLocation2D(COORD_ABS));
// Get the things we touch, and cut
GraphicalObjectCollection gobcol = getGraphicalObjectsTouching(stk, 2);
cmdqueue.doCommand(new TopiaryCutCommand(gobcol.getForwardIterator()));
*/
} // of method
COM: <s> cut whatever intersects the stroke </s>
|
funcom_train/18661606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parseRotation() {
try {
rotation = ( new Double( rotationString ) ).doubleValue();
rotationString = null;
} catch ( NumberFormatException x ) {
LOGGER.info( "invalid rotation: " + rotationString + " on picture: " + getHighresFilename() + " --> Set to Zero" );
rotation = 0;
}
sendRotationChangedEvent();
}
COM: <s> converts the temporary rotation string to the rotation double </s>
|
funcom_train/20574526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void predict() throws QSARModelException {
try{
if(pathNewX != null){
Object[] object = weka.getPredictionCDK(pathNewX);
results = new Double[object.length];
for(int i = 0 ; i < object.length; i++){
results[i] = (Double)object[i];
}
}
else if(newX != null){
Object[] object = weka.getPrediction(newX);
results = new Double[object.length];
for(int i = 0 ; i < object.length; i++){
results[i] = (Double)object[i];
}
}
} catch ( Exception e){
e.printStackTrace();
}
}
COM: <s> makes predictions using a previously built model </s>
|
funcom_train/7732738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean recordStoreExists(){
// list the record stores
String[] names = RecordStore.listRecordStores();
// no record store
if(names == null){
return false;
}
// search for the record store that we use
for(int i = 0; i < names.length; i++){
if(names[i].equals(recordStoreName)){
return true;
}
}
return false;
}
COM: <s> check if the record store already exists </s>
|
funcom_train/39172422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resourceRenamed(Resource resource, String string, String string2) {
if(resource instanceof Ontology) {
int index = ontologies.indexOf((Ontology)resource);
ontologyCB.remove(index);
ontologyCB.insertItemAt(((Ontology)resource).getName(), index);
ontologyCB.invalidate();
}
}
COM: <s> gets executed whenever resource name is changed </s>
|
funcom_train/16618350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addImage(NestImage image){
int index = 0;
Iterator<NestImage> i= images.iterator();
while(i.hasNext()){
NestImage ni = i.next();
if(ni.getTimeDateTaken().equals(image.getTimeDateTaken())){
return false;
}
if(!ni.getTimeDateTaken().before(image.getTimeDateTaken())){
images.add(index, image);
return true;
}
index++;
}
this.images.add(image);
return true;
}
COM: <s> add a nestimage to the current day </s>
|
funcom_train/33606716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testContractDegreeTwo() {
System.out.println("contractDegreeTwo");
instance.contractDegreeTwo();
assertEquals("{(2)3(1->2)(1->6)(2->3)(2->4)(2->5)(6->1)2(6->6)(20->21)}",instance.toString());
}
COM: <s> test of contract vertices by degree method of class scio </s>
|
funcom_train/25946382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DataSource getDataSource(String dataSourceName) throws ServiceLocatorException {
DataSource dataSource = null;
try {
dataSource = (DataSource)ic.lookup(dataSourceName);
} catch (NamingException ne) {
throw new ServiceLocatorException(ne);
} catch (Exception e) {
throw new ServiceLocatorException(e);
}
return dataSource;
}
COM: <s> this method obtains the datasource itself for a caller </s>
|
funcom_train/17203354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void appendInstruction(Instruction s) {
currentBBLE.block.appendInstruction(s);
s.position = gc.inlineSequence;
s.bcIndex = instrIndex;
lastInstr = s;
if (DBG_INSTR || DBG_SELECTED) db("-> " + s.bcIndex + ":\t" + s);
}
COM: <s> append an instruction to the current basic block </s>
|
funcom_train/3462570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeChild(EntityInterface child) {
if (listeners!=null) listeners.childRemoved(this,child);
child.setParent(null);
getChildList().remove(child);
if(child.needsPreUpdate()) getPreUpdateList().remove(child);
if(child.needsDoUpdate()) getDoUpdateList().remove(child);
}
COM: <s> the listener is called before the child is removed </s>
|
funcom_train/23999682 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public Attribute lookupProperty(String name) {
// for (Attribute a : allProperties()) {
// if (a.getName().equals(name)) {
// return a;
// }
// }
// for (OclType t : getGeneralizations()) {
// Attribute a = t.lookupProperty(name);
// if (a != null) {
// return a;
// }
// }
// return null;
//
// }
COM: <s> def lookup property att name string attribute </s>
|
funcom_train/45470803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAnyNode(AnyNode node) {
if (node == null) {
throw new IllegalArgumentException("null argument in addAnyNode");
}
switch(node.getNodeType()) {
case ATTRIBUTE:
addAttribute(node);
break;
case NAMESPACE:
addNamespace(node);
break;
default:
addChild(node);
break;
}
}
COM: <s> adds an any node to the current node </s>
|
funcom_train/3182985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEditBugState() {
try {
ControllerResponse response = super.controllerProcess();
assertNotNull("Returned response from editBug state null", response);
} catch (Exception e) {
logger.error("Test failed", e);
fail(e.getMessage());
}
}
COM: <s> starts the test against edit bug state </s>
|
funcom_train/2310035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node findNextTag(Set<String> tags, String value, Node node, Node root) {
Node header = node;
Node nextNode = nextNode(header, root);
header = findTag(tags, null, nextNode);
while ((header == null) && (nextNode != null)) {
nextNode = nextNode(nextNode, root);
header = findTag(tags, null, nextNode);
}
return header;
}
COM: <s> find the next node for the tag search children siblings and cousins </s>
|
funcom_train/42068221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLowVelocityPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ChunkInstrument_lowVelocity_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ChunkInstrument_lowVelocity_feature", "_UI_ChunkInstrument_type"),
WavPackage.Literals.CHUNK_INSTRUMENT__LOW_VELOCITY,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the low velocity feature </s>
|
funcom_train/49426504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SoundHandle loadMusic(final SoundSystem soundSystem, final String filename) {
try {
return new SlickMusicHandle(soundSystem, new Music(filename, true));
} catch (SlickException e) {
log.warning("loading of '" + filename + "' failed" + e);
}
return null;
}
COM: <s> load a music piece </s>
|
funcom_train/28947606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(String fullRemoteDestination) throws ArcException {
String cmd=Command.RM_RF+" "+fullRemoteDestination;
log.debug("We are going to remove: "+cmd);
String[] ret=uiConnector.executeGridUICommand(cmd);
log.debug("stdOut: "+ret[0]+"\nstdErr: "+ret[1]+"\ncommand: "+cmd);
}
COM: <s> remove a file or a directory </s>
|
funcom_train/26575874 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getConstantDrawer(String constant) {
int i;
for (i=0;i<constantDrawerList.size();i++)
if (((NodeDrawerInfo)constantDrawerList.elementAt(i)).nodeName.equals(constant)) break;
return ((NodeDrawerInfo)constantDrawerList.elementAt(i-1)).className;
}
COM: <s> retrieves the classname of the matching inode drawer </s>
|
funcom_train/20117513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFileName(Id id, String objectName, String attrName) throws ChannelException {
checkAccessPremissions(getConnectedDatabaseName());
try {
return _r.getFileName(getConnectedDatabaseName(), id, objectName, attrName);
} catch (RepositoryException e) {
throw new ChannelException(e);
}
}
COM: <s> it used by remote client shelladmin </s>
|
funcom_train/1098585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getWebServiceTimeout(IAeProcessPlan aPlan, String aPartnerLink) {
ServiceDeployment deployInfo = AeProcessDeploymentFactory
.getDeploymentForPlan(aPlan).getServiceInfo(aPartnerLink);
Element timeoutPolicy = AeWSDLPolicyHelper.getPolicyElement(
deployInfo.getAny(), AeTimeoutPolicy.TIMEOUT_ID);
if (timeoutPolicy != null)
return AeTimeoutPolicy.getTimeoutValue(timeoutPolicy);
return super.getWebServiceTimeout(aPlan, aPartnerLink);
}
COM: <s> overrides method to get timeout from policy if one has been specified </s>
|
funcom_train/14238107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void trimHeight(Rectangle bounds, int maxHeight, ResizeDirection rd) {
if(bounds.height <= maxHeight)
return;
if(rd == NORTHWEST || rd == NORTHEAST || rd == NORTH) {
bounds.y += (bounds.height - maxHeight);
bounds.height = maxHeight;
}
else if(rd == SOUTHWEST || rd == SOUTHEAST || rd == SOUTH) {
bounds.height = maxHeight;
}
}
COM: <s> take the given bounds and make sure it fills max height </s>
|
funcom_train/33775989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdConfig () {
if (cmdConfig == null) {//GEN-END:|38-getter|0|38-preInit
// write pre-init user code here
cmdConfig = new Command ("R\u00E9glages", Command.HELP, 2);//GEN-LINE:|38-getter|1|38-postInit
// write post-init user code here
}//GEN-BEGIN:|38-getter|2|
return cmdConfig;
}
COM: <s> returns an initiliazed instance of cmd config component </s>
|
funcom_train/33380878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void __setattr__(String name, PyObject value) {
if("arraysize".equals(name)) {
arraysize = ((PyInteger) value).getValue();
} else if("datahandler".equals(name)) {
this.datahandler = (DataHandler) value.__tojava__(DataHandler.class);
} else {
super.__setattr__(name, value);
}
}
COM: <s> sets the attribute name to value </s>
|
funcom_train/3168992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isInterval() {
return isSimple();
/*
udanax-top.st:69291:RealRegion methodsFor: 'enumerating'!
{BooleanVar CLIENT INLINE} isInterval
"Whether this Region is a non-empty interval, i.e. if A, B in the Region and A <= C <= B then C is in the Region. This includes inequalities (e.g. {x | x > 5}) and the fullRegion in addition to ordinary two-ended intervals."
^self isSimple!
*/
}
COM: <s> whether this region is a non empty interval i </s>
|
funcom_train/2446230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void install(Action ok, Action cancel) {
if (ok != null) {
bindings.addBinding(KeyUtils.ENTER, okKey, ok);
}
if (cancel != null) {
bindings.addBinding(KeyUtils.ESCAPE, cancelKey, cancel);
}
bindings.install();
}
COM: <s> installs keyboard shortcuts for the given ok and cancel actions </s>
|
funcom_train/34038750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void link(INode p, String txt, int eoff, Object target) {
Leaf l = new LeafUnicode(txt,null, p);
HyperlinkSpan hspan = (HyperlinkSpan)Behavior.getInstance("uri","HyperlinkSpan",null, null, getLayer());
hspan.setTarget(target);
hspan.moveq(l,0, l,l.size()-eoff);
}
COM: <s> add the passed text making it a hyperlink </s>
|
funcom_train/3903849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addChildActivitySetPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RollupRuleType_childActivitySet_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_RollupRuleType_childActivitySet_feature", "_UI_RollupRuleType_type"),
ImsssPackage.Literals.ROLLUP_RULE_TYPE__CHILD_ACTIVITY_SET,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the child activity set feature </s>
|
funcom_train/15862542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDesign(int [][] coding){
boolean found=false;
for(int i=0;i<largeur;i++)
for(int j=0;j<longueur;j++){
forme[i][j]=composantLabyrinthe.makeComponent(coding[i][j]);
if(coding[i][j]==2){
this.xtre=i;
this.ytre=j;
}
if((!found)&&(forme[i][j].isFree()))
{
defaultCurrentState=new MazeState(i,j,this);
oldState=defaultCurrentState;
found=true;
}
}
}
COM: <s> build a maze according to a two dimensional array description </s>
|
funcom_train/8605545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getContributionPrice() {
switch (getLegionLevel()) {
case 1:
return LegionConfig.LEGION_LEVEL2_REQUIRED_CONTRIBUTION;
case 2:
return LegionConfig.LEGION_LEVEL3_REQUIRED_CONTRIBUTION;
case 3:
return LegionConfig.LEGION_LEVEL4_REQUIRED_CONTRIBUTION;
case 4:
return LegionConfig.LEGION_LEVEL5_REQUIRED_CONTRIBUTION;
}
return 0;
}
COM: <s> this method will return the contribution points required to level up </s>
|
funcom_train/42584011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paintSquiggle(Graphics g, Rectangle r) {
int x = r.x;
int y = r.y + r.height - AMT;
int delta = -AMT;
while (x < r.x + r.width) {
g.drawLine(x, y + 2, x + AMT, y + delta + 2);
g.drawLine(x, y + 1, x + AMT, y + delta + 1);
y += delta;
delta = -delta;
x += AMT;
}
}
COM: <s> paints a squiggle underneath text in the specified rectangle </s>
|
funcom_train/41740330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getWorkdayInMonth(LocalDate date) {
LocalDate ref = new LocalDate(date);
ref = ref.minusDays(date.getDayOfMonth() - 1);
int workday = 0;
while (ref.compareTo(date) < 0) {
if (ref.getDayOfWeek() < 6) {
if (!isHoliday(ref))
workday++;
}
ref = ref.plusDays(1);
}
return workday;
}
COM: <s> gets the workday in month considering holidays </s>
|
funcom_train/2576837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Date getMinimumDate() {
Date result = null;
Range range = getRange();
if (range instanceof DateRange) {
DateRange r = (DateRange) range;
result = r.getLowerDate();
}
else {
result = new Date((long) range.getLowerBound());
}
return result;
}
COM: <s> returns the earliest date visible on the axis </s>
|
funcom_train/25649385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsEmpty() {
// remove all items
while(instance.getItemCount() > 0) {
instance.removeItem(0);
}
// should be empty
assertTrue(instance.isEmpty());
// add one item and test for emptiness
assertNotNull(instance.createTestSetItem(appModelItem));
assertFalse(instance.isEmpty());
}
COM: <s> test of is empty method of class com </s>
|
funcom_train/51338101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test2() throws InterruptedException, ExecutionException {
final Latch latch = new Latch();
final Callable<?> r = new Callable<Void>() {
public Void call() throws Exception {
latch.inc();
if(!latch.await(100, TimeUnit.MILLISECONDS))
throw new TimeoutException();
return null;
}
};
final ExecutorService service = Executors
.newSingleThreadExecutor(DaemonThreadFactory
.defaultThreadFactory());
try {
final Future<?> future = service.submit(r);
Thread.sleep(50);
latch.dec();
future.get();
} finally {
service.shutdownNow();
}
}
COM: <s> basic tests releasing blocked threads </s>
|
funcom_train/9042846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String debug() {
String s = name + ": ";
s += running ? " running: " : " stopped: ";
s += format(read(name));
s += " lap times: ";
for (long lap : laps) {
s += format(lap) + " ";
}
return s;
}
COM: <s> prints a debug string </s>
|
funcom_train/38524201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBinaryXMLData() {
File file = new File("test/files/binary-test.pdf");
File toFile = new File("test/files/binary-xml.xml");
File binFile = new File("test/files/binary-new-file.pdf");
byte[] bin;
byte[] xml;
assertNotNull( (bin=readBinaryFile(file)));
assertTrue(writeXMLData(Base64.encodeObject(bin, Base64.GZIP).toString(), toFile));
assertNotNull((xml=readXMLFile(toFile)));
assertTrue(writeBinaryData(xml, binFile));
}
COM: <s> reads a binary file </s>
|
funcom_train/14069721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
setLayout(new BorderLayout());
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setTitle("OOHome");
// add UI components
setJMenuBar(getMainMenuBar());
add(getCenter(),BorderLayout.CENTER);
add(new StatusBar(),BorderLayout.SOUTH);
// position the frame (or not)
UITools.windowPositionByPrefs(this);
}
COM: <s> initialize the main ui components </s>
|
funcom_train/33749882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDelete() {
IAccount account = new Account();
// set all not-null properties
account.setId(new Long(1));
account.setLogin("LOGIN01");
account.setPasswd("123456");
account.setName("NAME01");
account.setEmail("demo@yahoo.com");
try {
baseDAO.delete(account);
} catch (DAOException e1) {
e1.printStackTrace();
fail();
}
try {
account = (IAccount) baseDAO.load(new Long(1));
} catch (HibernateObjectRetrievalFailureException e) {
// object not found in DB
assertTrue(true);
}
}
COM: <s> test the delete method </s>
|
funcom_train/46120472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int checkPackageContent () {
int nErrors = 0;
Iterator<Integer> iter = docs.keySet().iterator();
int docId;
ManifestItem mi;
while ( iter.hasNext() ) {
docId = iter.next();
mi = docs.get(docId);
File F = new File(getFileToMergePath(docId));
if ( !F.exists() ) {
nErrors++;
mi.setExists(false);
}
}
return nErrors;
}
COM: <s> checks the content of the manifest against the package where </s>
|
funcom_train/10858281 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLetterTokenizer() throws Exception {
Reader reader = new StringReader("What's this thing do?");
LetterTokenizerFactory factory = new LetterTokenizerFactory();
factory.init(DEFAULT_VERSION_PARAM);
Tokenizer stream = factory.create(reader);
assertTokenStreamContents(stream,
new String[] {"What", "s", "this", "thing", "do"});
}
COM: <s> test letter tokenizer factory </s>
|
funcom_train/7796153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || !(obj instanceof IntList)) {
return false;
}
IntList s2 = (IntList) obj;
if (this.size != s2.size) {
return false;
}
for (int i = size; i >= 0; i--) {
if (this.data[i] != s2.data[i]) {
return false;
}
}
return true;
}
COM: <s> return if the specific object equals to this list </s>
|
funcom_train/5867907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object resolveVariable(String var) throws XelException {
Object variable= null;
/*
* First, find the variable, var in JNDI key-value map. If
* not found, look for the variable as a sessionBean
*/
variable = jndiLookup("java:comp/env/"+var);
if(variable == null){
variable = jndiLookup("java:comp/"+var);
}
if(variable == null){
variable = jndiLookup("java:/"+var);
}
if(variable == null){
variable = defaultBean(var);
}
if(!_jndiMapping.isEmpty()&&variable==null){
Object jndiPattern = _jndiMapping.get(var);
if(jndiPattern != null){
variable = jndiLookup(jndiPattern.toString());
}
}
return variable;
}
COM: <s> get object from jndi binding </s>
|
funcom_train/30005029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getChildCount(Object parent) {
int i = 0;
if (parent instanceof TestSequence) {
Iterator<TestBase> iter = ((TestSequence) parent).getChildren().iterator();
TestBase test;
while (iter.hasNext()) {
test = iter.next();
if (test instanceof TestSequence) {
i++;
}
}
}
return i;
}
COM: <s> returns the number of childs of the specified parent </s>
|
funcom_train/8789871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Control createContents(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
composite.setLayout(new GridLayout(1, false));
// Create a big text box to accept error text
final Text text = new Text(composite, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL);
text.setLayoutData(new GridData(GridData.FILL_BOTH));
text.setText(msg);
return composite;
}
COM: <s> creates the main windows contents </s>
|
funcom_train/48337530 | /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 (this == o) return true;
if (! (o instanceof Data)) return false;
Data other = (Data)o;
return ( (name.equals(other.name))
&& (opcode == other.opcode)
&& (minArgs == other.minArgs)
&& (maxArgs == other.maxArgs));
}
COM: <s> determine whether this data operator equals the specified object </s>
|
funcom_train/25282880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unloadAndLoadLibProcedures() {
pm.stopStreaming();
final CommonFilterConfigs common_configs = new CommonFilterConfigs(
width, height, frame_rate, cam_num, library, format);
pm.initializeVideoManager(common_configs, null);
pm.startStreaming();
PManager.main_gui.configureScreenDrawerFilter("ScreenDrawer", null,
true);
ModulesManager.getDefault().updateModuleConfigs(
new ModuleConfigs[] { new ZonesModuleConfigs("Zones Module",
-1, width, height) });
}
COM: <s> unloads video manager and then initializes it </s>
|
funcom_train/34562839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean dbnodes() {
if(dupl) sort(sort);
if(size == 0 || !(item[0] instanceof DBNode)) return false;
final DBNode n = (DBNode) item[0];
for(int s = 1; s < size; s++) {
if(!(item[s] instanceof DBNode) || n.data != ((DBNode) item[s]).data)
return false;
}
return true;
}
COM: <s> checks if binary search can be applied to this iterator i </s>
|
funcom_train/5785663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public void internalEntityDecl(int entityNameIndex, int entityValueIndex) {
// System.err.println ("<!ENTITY " + fStringPool.toString(entityNameIndex) + " \"" +
// fStringPool.toString(entityValueIndex) + "\"");
// }
COM: <s> lt entity name entity value gt internal </s>
|
funcom_train/26467332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object create(Element element, Object forBean) {
Namespace namespace = findNamespace(element);
if ( namespace != null ) {
Aspectory aspectory = Codex.theCodex().getAspectory(namespace.getURI());
return aspectory.create(element.getName());
}
return defaultFactory.create(element.getName());
}
COM: <s> the following algorithm is used to determine how the object shall be created </s>
|
funcom_train/5375721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int countTokens() {
int count = 0;
boolean inToken = false;
for (int i = position, length = string.length(); i < length; i++) {
if (delimiters.indexOf(string.charAt(i), 0) >= 0) {
if (returnDelimiters)
count++;
if (inToken) {
count++;
inToken = false;
}
} else {
inToken = true;
}
}
if (inToken)
count++;
return count;
}
COM: <s> returns the number of unprocessed tokens remaining in the string </s>
|
funcom_train/3374579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getAttribute(AttributedCharacterIterator.Attribute attribute) {
int pos = toModelPosition(getIndex());
int childIndex = v.getViewIndex(pos, Position.Bias.Forward);
if (attribute == TextAttribute.FONT) {
return getFont(childIndex);
} else if( attribute == TextAttribute.RUN_DIRECTION ) {
return
v.getDocument().getProperty(TextAttribute.RUN_DIRECTION);
}
return null;
}
COM: <s> returns the value of the named attribute for the current character </s>
|
funcom_train/41822384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillRecordList(String ssn){
PatientRecord p;
ArrayList<PatientRecord> pa = new ArrayList<PatientRecord>();
recordListModel.removeAllElements();
for(int i = 0; i<recordsList.size(); i++){
System.out.println(i);
p = recordsList.get(i);
if(p.getSsn().equalsIgnoreCase(ssn)){
recordListModel.addElement(p.getRecordNbr() +". "+p.getSsn());
pa.add(p);
}
}
recordsList = pa;
}
COM: <s> only displays the patient records of the patient with social security number ssn </s>
|
funcom_train/13364103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String formatSAXParserExceptionMessage(SAXParseException ex) {
StringBuffer sb = new StringBuffer();
sb.append("[" + ex.getSystemId() + "] : ");
sb.append("line " + ex.getLineNumber() + " : ");
sb.append("column " + ex.getColumnNumber() + " : ");
sb.append(ex.getMessage());
return sb.toString();
}
COM: <s> format a viewable saxparse exception message </s>
|
funcom_train/40885446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNumTaggedJoints (int num) {
// allocate space for joint data in the result keyframe
R.taggedJointPos = new Vector3[num];
for (int i = 0; i < num; i++)
R.taggedJointPos[i] = new Vector3();
R.taggedJoint = new Quaternion[num];
for (int i = 0; i < num; i++)
R.taggedJoint[i] = new Quaternion(0, 0, 0, 0);
}
COM: <s> set the number of tagged joints for allocation </s>
|
funcom_train/31503734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DefaultMutableTreeNode getFatherNode(Task node) {
if (node == null) {
return null;
}
DefaultMutableTreeNode tmp = (DefaultMutableTreeNode) getNode(node
.getTaskID());
if (tmp == null) {
return null;
}
return (DefaultMutableTreeNode) tmp.getParent();
}
COM: <s> returne the mother task </s>
|
funcom_train/45645858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sayFailed(SceneModel scene, SceneMessage message, Reason reason) {
// do not re-send in auction scene
try {
if (!OntologyFactory.FN_BID.equals(((FunctionInstance) message
.getContent()).getName())) {
String wait = "wait";
synchronized (wait) {
try {
wait.wait(1000);
} catch (InterruptedException ignored) {
}
}
scene.say(message);
}
} catch (ClassCastException e) {
// resending the message
String wait = "wait";
synchronized (wait) {
try {
wait.wait(1000);
} catch (InterruptedException ignored) {
}
}
scene.say(message);
}
}
COM: <s> notification of the e institution about a message that has been failed to </s>
|
funcom_train/2610030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkBinding() {
boolean result = false;
try {
BindingLifetimeTest binding = new BindingLifetimeTest(hostname, port);
binding.test();
while (true) {
Thread.sleep(5000);
if (binding.getLifetime() != -1) {
if (binding.isCompleted()) {
return true;
}
} else {
break;
}
}
}
catch (Exception e) {
e.printStackTrace();
}
return result;
}
COM: <s> check a binding with the stun current server </s>
|
funcom_train/4614368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendCmd (byte cmd) {
if (conn != null) {
try {
xdg.reset();
xdg.writeByte(cmd);
conn.send(xdg);
} catch (NoAckException nex) {
connected = false;
updateConnectionStatus(connected);
} catch (IOException ex) {
// ignore any other problems
}
}
}
COM: <s> send a simple command request to the remote spot </s>
|
funcom_train/7653074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof Certificate)) {
return false;
}
Certificate object = (Certificate) obj;
try {
return Arrays.equals(getEncoded(), object.getEncoded());
} catch (CertificateEncodingException e) {
return false;
}
}
COM: <s> compares the argument to this certificate </s>
|
funcom_train/30206580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String convertNodeToString(Node node){
String val = node.getStringValue();
log.debug("Trying to index: "+val);
String result = null;
try{
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
Date date = sdf.parse(val);
Long millis = date.getTime();
result = pad(millis);
}catch (Exception e) {
log.debug("failed to parse date:",e);
}
log.debug("Result of date conversion: "+result);
return result;
}
COM: <s> convert a node containing a date formated as </s>
|
funcom_train/11709424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleAdd() {
AddExternalResourceDialog dialog = new AddExternalResourceDialog(this);
if (dialog.open() == Window.CANCEL)
return;
ExternalResourceDescription xrd = new ExternalResourceDescription_impl();
TreeItem item = new TreeItem(tree, SWT.NONE);
alterExistingXRD(dialog, xrd, item);
getResourceManagerConfiguration().addExternalResource(xrd);
}
COM: <s> add new external resource with no bindings </s>
|
funcom_train/18793408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AlloyExpr visitPowerExpr(PowerExpr powerExpr) {
AlloyExpr body = visit(powerExpr.getExpr());
if (body == null) {
System.err.println("Z2Alloy.getInstance().body of power expr must not be null");
throw new RuntimeException();
}
return body.setOf();
}
COM: <s> recursively calls visit on the sub expression and creates an alloy set of </s>
|
funcom_train/29271404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public short retrieveShortValue(String src) throws InvalidValueException{
Object value = retrieveValue(src);
if(value instanceof Integer)
return ((Integer)value).shortValue();
else if(value instanceof Float)
return ((Float)value).shortValue();
else if(value instanceof Double)
return ((Double)value).shortValue();
else if(value instanceof Long)
return ((Long)value).shortValue();
else if(value instanceof String)
return Short.parseShort((String)value);
else {
throw new InvalidValueException();
}
}
COM: <s> retrieve short value process a retrieved value and return a primative short </s>
|
funcom_train/12179967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedUnit(String unitName) {
if (unitName.equals(FormatConstants.WIDTH_UNITS_VALUE_PIXELS)){
unitName = ResourceUnits.PIXEL.getUnit();
} else if (unitName.equals(FormatConstants.WIDTH_UNITS_VALUE_PERCENT)){
unitName = ResourceUnits.PERCENT.getUnit();
}
super.setSelectedUnit(unitName);
}
COM: <s> set the selected unit using the standard unit name as specialised for </s>
|
funcom_train/28368266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Location randomLocationFor(final SituatedEntity agent) {
Location loc = null;
if (gis != null) {
loc = gis.randomLocationFor(agent);
} else if (grid != null) {
loc = grid.randomLocationFor(agent);
}
// if (loc != null) {
// agent.setLocation(loc);
// }
return loc;
}
COM: <s> random placement of </s>
|
funcom_train/37475578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(Object data){
super.init(data);
skinsDirectory =
TurbinePull.getAbsolutePathToResourcesDirectory() + SKINS_DIRECTORY;
loadSkin();
if (data == null)
{
setInterface();
}
else if (data instanceof RunData)
{
setInterface((RunData) data);
}
else if (data instanceof User)
{
setInterface((User) data);
}
}
COM: <s> overwriting init method of uimanager </s>
|
funcom_train/13273043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void layoutComponents() {
// Add toolbar at top in a flow layout panel to make it centered
JPanel panel = new JPanel();
panel.add(this.toolBar);
add(panel, ProportionalLayout.Constraints.TOP);
// Add printable component at bottom of proportional layout panel
add(this.printableComponent, ProportionalLayout.Constraints.BOTTOM);
}
COM: <s> layouts panel components in panel with their labels </s>
|
funcom_train/4656705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL getCellFeedUrl() {
Link feedLink = this.getLink(Namespaces.CELLS_LINK_REL, Link.Type.ATOM);
try {
return new URL(feedLink.getHref());
} catch (MalformedURLException e) {
throw new RuntimeException("Error in GData server", e);
}
}
COM: <s> gets the url for this worksheets cells feed </s>
|
funcom_train/44223207 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void orderGroup(){
int id = 1;
NodeList nodeList = this.groupEntryNode.getChildNodes();
for(int i = 0; i < nodeList.getLength(); i++){
Node groupNode = nodeList.item(i);
if(groupNode.getNodeName().equals(GroupTagNS.GROUP)){
((Element)groupNode).setAttribute("id", String.valueOf(id));
id++;
}
}
}
COM: <s> to order the group information by re assigning the </s>
|
funcom_train/12162944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAccessKey() {
// Create the renderer
DefaultNumericShortcutEmulationRenderer renderer =
new DefaultNumericShortcutEmulationRenderer(customisation);
// Get the dummy value
String dummy = renderer.getShortcut().getText(TextEncoding.PLAIN);
// Compare retrieved value and constant
assertEquals("Strings should match",
dummy, AccesskeyConstants.DUMMY_ACCESSKEY_VALUE_STRING);
}
COM: <s> this tests retrieving the dummy value </s>
|
funcom_train/7772422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getPnlVendita() {
if (pnlVendita == null) {
pnlVendita = new JPanel();
pnlVendita.setLayout(new BorderLayout());
pnlVendita.add(getJPanelNord(), BorderLayout.NORTH);
pnlVendita.add(getJPanelCentro(), BorderLayout.CENTER);
pnlVendita.add(getJPanelSud(), BorderLayout.SOUTH);
}
return pnlVendita;
}
COM: <s> this method initializes pnl vendita </s>
|
funcom_train/19308971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getBaseFont() {
if (this.fsFont.getFontUse().getFont().isSubsettable()) {
return getPDFDocument().getNextFontSubsetTag() + "+"
+ this.fsFont.getFontUse().getFont().getPostscriptName();
}
return this.fsFont.getFontUse().getFont().getPostscriptName();
}
COM: <s> return the post script name for this font </s>
|
funcom_train/10928854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TypeDefinition getTypeDefinition(CallContext context, String typeId) {
TypeDefinitionContainer tc = types.get(typeId);
if (tc == null) {
throw new CmisObjectNotFoundException("Type '" + typeId + "' is unknown!");
}
return copyTypeDefintion(tc.getTypeDefinition());
}
COM: <s> cmis get type definition </s>
|
funcom_train/11655873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void threadStarted() {
testObject = null;
testCase = null;
methodName = getMethod();
className = getClassname();
protectable = null;
if(!getCreateOneInstancePerSample()) {
// NO NEED TO INITIALIZE WHEN getCreateOneInstancePerSample
// is true cause it will be done in sample
initializeTestObject();
}
}
COM: <s> set up all variables that dont change between samples </s>
|
funcom_train/34565540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private QNm varName() throws QueryException {
check(DOLLAR);
final QNm name = new QNm(qName(NOVARNAME));
if(name.ns()) name.uri = Uri.uri(ctx.ns.uri(name.pref(), false));
ctx.ns.uri(name);
return name;
}
COM: <s> 88 parses a var name </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.