__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/46736861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInsertUserRef(DisplayModel insertUserRef) {
if (Converter.isDifferent(this.insertUserRef, insertUserRef)) {
DisplayModel oldinsertUserRef= new DisplayModel(this);
oldinsertUserRef.copyAllFrom(this.insertUserRef);
this.insertUserRef.copyAllFrom(insertUserRef);
setModified("insertUserRef");
firePropertyChange(String.valueOf(TERMDETAILS_INSERTUSERREFID), oldinsertUserRef, insertUserRef);
}
}
COM: <s> user that created this term detail </s>
|
funcom_train/3026575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void standardFieldIndent(PrintData printData) {
printData.space();
if (printData.isFieldNameIndented()) {
int currentLength = printData.getLineLength();
int desiredLength = printData.getFieldNameIndent();
for (int ndx = currentLength; ndx < desiredLength; ndx++) {
printData.space();
}
}
}
COM: <s> the standard field indent </s>
|
funcom_train/1907219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean fuzzyContainsToken(String token, int maxDistance) {
token = SnowballStemmer.stem(token.trim().toLowerCase());
if (maxDistance == 0) return this.tokens.contains(token);
else if (this.tokens.contains(token)) return true;
Iterator<String> tokenIter = this.tokens.iterator();
while (tokenIter.hasNext())
if (getLevenshteinDistance(token, tokenIter.next(), maxDistance, true, 1, 1) <= maxDistance) return true;
return false;
}
COM: <s> does a fuzzy lookup for a token </s>
|
funcom_train/11008230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testOpenFromInputStream() throws Exception {
String originalFile = OpenXML4JTestDataSamples.getSampleFileName("TestPackageCommon.docx");
FileInputStream finp = new FileInputStream(originalFile);
OPCPackage p = OPCPackage.open(finp);
assertNotNull(p);
assertNotNull(p.getRelationships());
assertEquals(12, p.getParts().size());
// Check it has the usual bits
assertTrue(p.hasRelationships());
assertTrue(p.containPart(PackagingURIHelper.createPartName("/_rels/.rels")));
}
COM: <s> checks that we can open read a package from a </s>
|
funcom_train/41530752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void logClientLineSecurely(String line) {
if (!log.isDebugEnabled())
return;
if (line.toUpperCase(Locale.US).startsWith("PASS ")) {
line = line.substring(0, 5) + "*****";
}
log.debug("Client: " + line);
}
COM: <s> it logs the line but masks out any clear text passwords </s>
|
funcom_train/12782917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInit4() throws Exception {
ClassLoader parent = getClass().getClassLoader();
IRunConfigData config = new RunConfigData();
config.setTargetClasspath("");
testObj = new InstrumentingClassLoader(parent, config);
assertEquals(createURLs(IRunConfigData.DEFAULT_CLASSPATH), testObj.getClasspath().getClasspath());
assertEquals(new URL[0], testObj.getTargetClasspath());
}
COM: <s> classpath not set target classpath set to empty value </s>
|
funcom_train/5787976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String s = getClass().getName();
String message = getLocalizedMessage();
return (message != null) ? (s + "[" + mErrorStrings[mID - 1] + "]: "
+ message) : s + "[" + mErrorStrings[mID - 1] + "]";
}
COM: <s> prints out the id and the optional detailed message </s>
|
funcom_train/20896531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setDirtyStatus(boolean dirty) {
// if the dirty status is true then
// enable the save and cancel buttons
// and disable the edit buttons
if (dirty) {
cbSave.setEnabled(true);
cbCancel.setEnabled(true);
cbEdit.setEnabled(false);
} else {
cbSave.setEnabled(false);
cbCancel.setEnabled(false);
cbEdit.setEnabled(true);
}
}
COM: <s> the code set dirty status code method sets the dirty status for this </s>
|
funcom_train/11677140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Entry getEntryDefinition(String key) {
Object o = localRegistry.get(key);
if (o == null || o instanceof Entry) {
if (o == null) {
// this is not a local definition
Entry entry = new Entry(key);
entry.setType(Entry.REMOTE_ENTRY);
addEntry(key, entry);
return entry;
}
return (Entry) o;
} else {
handleException("Invalid local registry entry : " + key);
return null;
}
}
COM: <s> get the entry object mapped to the given key </s>
|
funcom_train/1930104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIndConstraintHelperMethods() {
int[] index_depths = curTraceMatch.getIndexingDepths();
for (int i = 0; i < index_depths.length; i++) {
addIndConstraintLookupMethod(index_depths[i]);
addIndConstraintOverwriteMethod(index_depths[i]);
addIndConstraintQueueMethod(index_depths[i]);
}
addIndConstraintUnindexedQueueMethod();
}
COM: <s> adds small helper methods like lookup lookup2 overwrite and queue </s>
|
funcom_train/35226025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void undoLastAction() {
// NOTE: that the try/catch block shouldn't be necessary...
try {
if (undoManager.canUndo())
undoManager.undo();
}
catch (CannotUndoException f) {
JOptionPane.showMessageDialog(this, "Error doing Undo: " + f +
"\nPlease report this at " +
"http://sourceforge.net/projects/rtext",
"rtext - Error", JOptionPane.ERROR_MESSAGE);
}
}
COM: <s> attempt to undo an action done in this text area </s>
|
funcom_train/4786131 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void layoutControlHolder() {
if (myHeader != null) {
layoutHeaderOrRow(myHeader);
}
for (Iterator rowsIter = rows.iterator(); rowsIter.hasNext();) {
TableRow row = (TableRow) rowsIter.next();
layoutHeaderOrRow(row.getRowControl());
}
updateVisibleRows();
}
COM: <s> layout the child controls within the control holder composite </s>
|
funcom_train/32753867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void monitorBeamEvents() {
if ( _beamEventChannel == null && _sequence != null ) {
final TimingCenter timingCenter = _sequence.getAccelerator().getTimingCenter();
if ( timingCenter != null ) {
_beamEventChannel = timingCenter.findChannel( TimingCenter.SLOW_DIAGNOSTIC_EVENT_HANDLE );
if ( _beamEventChannel != null ) {
_bpmCorrelator.addBeamEvent( _beamEventChannel );
}
}
}
}
COM: <s> monitor beam events which indicate that a new beam pulse has been generated </s>
|
funcom_train/25102818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visit(Activation n) {
n.f0.accept(this);
n.f1.accept(this);
n.f2.accept(this);
n.f3.accept(this);
n.f4.accept(this);
n.f5.accept(this);
n.f6.accept(this);
n.f7.accept(this);
n.f8.accept(this);
}
COM: <s> f0 activation trigger </s>
|
funcom_train/19745551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getGroupsAsString() {
StringBuffer groups = new StringBuffer();
if ( this.groups != null && this.groups.size() > 0 ) {
for ( Iterator i = this.groups.iterator(); i.hasNext(); ) {
Group group = (Group) i.next();
groups.append(group.getTitle());
if ( i.hasNext() ) {
groups.append(", ");
}
}
}
return groups.toString();
}
COM: <s> gets all user groups represented as string groups are separated with commas </s>
|
funcom_train/2711741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int listCalendar(String path) throws IOException {
//now let's try and get it, make sure it's there
GetMethod get = getMethodFactory().createGetMethod();
get.setPath(path);
try {
client.executeMethod(getHostConfiguration(), get);
} catch (HttpException e) {
logger.error(e);
} catch (IOException e) {
logger.error(e);
}
int statusCode = get.getStatusCode();
return ( statusCode == WebdavStatus.SC_OK) ? 0 : statusCode;
}
COM: <s> list file and folder in path </s>
|
funcom_train/20659696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JFrame getIP2IP() {
if (IP2IP == null) {
IP2IP = new JFrame();
IP2IP.setSize(new Dimension(289, 353));
IP2IP.setLocationRelativeTo(null);
IP2IP.setTitle("IP to IP");
IP2IP.setContentPane(getPortForwardingPanel());
IP2IP.setResizable(false);
IP2IP.addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent e) {
//chainsList.setSelectedItem("INPUT");
}
});
}
return IP2IP;
}
COM: <s> this method initializes ip2 ip </s>
|
funcom_train/13515653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeLatestDataPage(int docid, int treeId, int pgNo, Integer txnId) throws ChaiDBException {
PageNumber p = new PageNumber(pgNo);
p.setTreeId(treeId);
removeLatestDataPage(docid, treeId, p, txnId);
}
COM: <s> this is called by btree new page log record </s>
|
funcom_train/34040797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void go() {
System.out.println("* " + href);
//getBrowser().eventq(HTML.SET_URL, this.target_);
viewerObject.eventBeforeAfter(new SemanticEvent(this, HTML.SET_URL, href), null) ;
}
COM: <s> when click with target set search for named frame or create new window </s>
|
funcom_train/21612342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isEndCDATAinContentBuffer() {
if(contentBuffer.size() == 0) {
return false;
}
String last = contentBuffer.get( contentBuffer.size() - 1 );
return
last.length() >= CDATA_END.length()
&&
last.substring( last.length() - CDATA_END.length() ).equals(CDATA_END);
}
COM: <s> checks if content buffer contains cdata closing sequence </s>
|
funcom_train/26483621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doStartPage() {
// Apparently beginpage isn't allowed just anywhere
if (pageNumber > 1)
out.println("<beginpage pagenum=\"" + pageNumber + "\">");
out.println("<!-- ======== Page " + pageNumber + " ======== -->");
}
COM: <s> this override starts a new page </s>
|
funcom_train/29712032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node getCommonAncestor(Node node1, Node node2) {
if (node1 == null || node2 == null) {
return null;
}
for (Node na = node1; na != null; na = na.getParentNode()) {
for (Node ta = node2; ta != null; ta = ta.getParentNode()) {
if (ta == na)
return ta;
}
}
return null; // not found
}
COM: <s> get two nodes lowest common ancestor </s>
|
funcom_train/48493855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addItem(SparkMenuItem item) {
int id = item.getGroup();
for (int i = subItems.size() - 1; i >= 0; i--) {
int id2 = subItems.get(i).getGroup();
if (id >= id2) {
insertAfter0(subItems.get(i), item, id != id2);
subItems.add(i + 1, item);
return;
}
}
insertAfter0(null, item, true);
subItems.add(0, item);
}
COM: <s> adds a new item into the menu </s>
|
funcom_train/29018050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMinimum (int value) {
checkWidget();
if (value < 0) return;
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
int /*long*/ hwnd = hwndScrollBar ();
int type = scrollBarType ();
info.fMask = OS.SIF_RANGE | OS.SIF_DISABLENOSCROLL;
OS.GetScrollInfo (hwnd, type, info);
if (info.nMax - value - info.nPage < 1) return;
info.nMin = value;
SetScrollInfo (hwnd, type, info, true);
}
COM: <s> sets the minimum value </s>
|
funcom_train/30006288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public User getCreator(TestBaseLog baseLog) {
for (Log log : MainController.getInstance().getProject().getLog()) {
if (log.getTestSequneceLog() != null && contains(log.getTestSequneceLog(), baseLog)) {
return log.getCreator();
}
}
return null;
}
COM: <s> returns the creator of a test sequence log or a test case log </s>
|
funcom_train/37104408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ArticleUniqId getIdFromMedlineMap(MedlineMap onearticle) {
ArticleUniqId id = new ArticleUniqId ( );
id.setIssnEssnLookUpTable ( lookup );
id.setTitle(onearticle.getFirst("TI"));
id.setIssn(onearticle.getIssn( ));
id.setPageStart(onearticle.getFirst("PG"));
return id;
}
COM: <s> get hashmap key based on available medline tags from a medline map </s>
|
funcom_train/47921756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Mod getMod(String name, String version) {
for (int i = 0; i < mods.size(); i++) {
if (mods.get(i).getName().equalsIgnoreCase(name) && controller.compareModsVersions(mods.get(i).getVersion(), version)) {
return mods.get(i);
}
}
return null;
}
COM: <s> retrives a mod with the name and version passed by parameter </s>
|
funcom_train/18223520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void perform() {
try {
if (task == null) {
task = simpleServerObject.request();
Graphics g = this.getGraphics();
g.setClip(this.getX(), this.getY(), this.getWidth(), this.getHeight());
task.setGraphics(g);
(new Thread(this)).start();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
COM: <s> perform music playing and scoring </s>
|
funcom_train/45865496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSequenceFactory() throws Exception {
AbstractSequence seq = SequenceFactory.createSequence(CVCTagEnum.CV_CERTIFICATE);
assertTrue("seq not instance of CVCertificate", (seq instanceof CVCertificate));
try {
SequenceFactory.createSequence(CVCTagEnum.EXPIRATION_DATE);
throw new Exception("A datafield-type tag should throw IllegalArgumentException");
}
catch( IllegalArgumentException e){
// This is expected
}
}
COM: <s> check validate sequence factory </s>
|
funcom_train/10907898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkId(String id) throws ValidationException {
if (!inMarker() && !id.equals("")) {
Set idrefs = getBuilderContext().getIDReferences();
if (!idrefs.contains(id)) {
idrefs.add(id);
} else {
getFOValidationEventProducer().idNotUnique(this, getName(), id, true, locator);
}
}
}
COM: <s> setup the id for this formatting object </s>
|
funcom_train/29019418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void subtract (int x, int y, int width, int height) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (width < 0 || height < 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
int /*long*/ rectRgn = OS.CreateRectRgn (x, y, x + width, y + height);
OS.CombineRgn (handle, handle, rectRgn, OS.RGN_DIFF);
OS.DeleteObject (rectRgn);
}
COM: <s> subtracts the given rectangle from the collection of polygons </s>
|
funcom_train/23206366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleInform(Performative perf, MessageTemplate[] possibleReplies) {
System.out.println(perf.getReceiver()+": OBTAINED "+perf.toString());
System.out.println(eBookContractToString((EBookContract)perf.getContent().getConcept()));
}
COM: <s> handles the last message of the protocol i </s>
|
funcom_train/37609033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set3DOn(boolean state) {
d3don = state;
if (!state) {
int itct, lgct;
OIntersection tint = null;
itct = this.getIntrsCount();
for (int kkk = 0; kkk < itct; kkk++) {
tint = this.useIntrs(kkk);
lgct = tint.getLegCount();
for (int jjj = 0; jjj < lgct; jjj++)
tint.useLeg(jjj).clearLamps();
}
}
} // end set3DOn()
COM: <s> sets the 3 d display state to active </s>
|
funcom_train/10844285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onWarning(String msg, String sourceFile, int line, int position) {
if ( !this.ignoreWarnings ) {
if ( warnings == null ) {
warnings = new ArrayList<CompilerMessage>();
}
warnings.add(new CompilerMessage(sourceFile, line, position, msg));
}
}
COM: <s> notification of a warning </s>
|
funcom_train/48527680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writePrimitive(char c, String field) throws IOException {
writer.start("primitive");
if (field != null)
writer.attribute("field", field);
writer.attribute("type", "char");
writer.attribute("value", c);
writer.end("primitive");
}
COM: <s> method which writes a char to the stream as the given field name </s>
|
funcom_train/28147375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ZBDD getOrderZBDD(String cnfFileName, String ordFileName) {
this.fileNameControl(cnfFileName, ".cnf");
// No specific extension for order files.
//this.fileNameControl(ordFileName, ".ord");
this.fileNameControl(ordFileName);
Parser parser = new Parser(this, cnfFileName);
return parser.ZBDDMaker(parser.formatCnf(), ordFileName);
}
COM: <s> method get order zbdd </s>
|
funcom_train/14327981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getIndexAttributObject(String attributName) {
if (attributName == null) return -1;
String[] attributs = getAttributs();
for (int i = 0; i < attributs.length; i++) {
if (attributs[i].equals(attributName)) {
return i;
}
}
return -1;
}
COM: <s> look for and return the attribut index from openbexi object </s>
|
funcom_train/5406639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Module loadModule(String module) {
try {
Class modClass = loader.loadClass(module);
Module mod = (Module) modClass.newInstance();
this.modules.put(modClass, mod);
return mod;
}
catch (Exception e) {
e.printStackTrace();
Log.error(LocaleUtils.getLocalizedString("admin.error"), e);
return null;
}
}
COM: <s> loads a module </s>
|
funcom_train/4237330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetIdUsuario() {
System.out.println("getIdUsuario");
Mesa instance = new Mesa();
instance.setIdUsuario(new Usuario("mesero1"));
Usuario expResult = new Usuario("mesero1");
Usuario result = instance.getIdUsuario();
assertEquals(expResult, result);
}
COM: <s> test of get id usuario method of class data </s>
|
funcom_train/28363457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public void removeAllSources() {
Collection<String> sourceNames = new ArrayList<String>( getNamesOfSources() );
Iterator<String> sourceIter = sourceNames.iterator();
while ( sourceIter.hasNext() ) {
String sourceName = sourceIter.next();
removeSource(sourceName);
}
}
COM: <s> stop managing all registered sources </s>
|
funcom_train/8930867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void goInto() {
IStructuredSelection sel = (IStructuredSelection) fChildTree.getSelection();
Object element = sel.getFirstElement();
if (RoleQuery.INSTANCE.getNodeType((Node) element) == RoleQuery.ROOT_FEATURE) {
Feature selected = (Feature) element;
ProxyItemProvider root = new ProxyItemProvider(adapterFactory, selected.eContainer(), selected);
goInto(root);
}
}
COM: <s> sets the input for the tree to the current selection </s>
|
funcom_train/14328151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getDate(final String dateS, String dateFormatOut) throws ParseException {
if (dateFormatOut == null) {
dateFormatOut = FDC_defaultFormatDate;
}
final SimpleDateFormat sdfInput;
sdfInput = new SimpleDateFormat(dateFormatOut.trim());
final Date date = sdfInput.parse(dateS.trim());
return date.getTime();
}
COM: <s> return date according date s and date format out </s>
|
funcom_train/37126680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showTree(Element node) {
removeAll();
configureJTree(createTreeModel(node));
DefaultTreeCellRenderer renderer = new DefaultTreeCellRenderer();
renderer.setLeafIcon(null);
_tree.setCellRenderer(renderer);
_tree.setVisible(true);
add(_tree);
}
COM: <s> display some xml as a jtree </s>
|
funcom_train/3175847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PropertyXRef addChild(Indi newChild) throws GedcomException {
// Remember Indi who is child
PropertyChild pc = new PropertyChild();
pc.setValue(newChild.getId());
addProperty(pc);
// Link !
try {
pc.link();
} catch (GedcomException ex) {
delProperty(pc);
throw ex;
}
return pc;
}
COM: <s> adds another child to the family </s>
|
funcom_train/31357614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopDrivers() {
// Variables
Iterator iterator;
DriverCollection collection;
Integer ID;
// Signal Unload
event(1, "Stop drivers");
// stop request queue
requestQueue.stop();
// Retrieve Every Driver Collection from Driver Pool
iterator = new HashSet(driverPool.keySet()).iterator();
while (iterator.hasNext() == true) {
// Get Driver Collection
ID = (Integer) iterator.next();
// Stop Driver
stopDriver(ID.intValue());
} // while
} // stopDrivers()
COM: <s> stops all the drivers from the manager </s>
|
funcom_train/303495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected CompoundFilterWhereClause getFilterWhere() {
List l = new ArrayList();
if(userId != null && userId.trim().length() > 0) {
l.add(new LikeFilterWhereClause("pk.userCodeId",userId,true));
}
return new CompoundFilterWhereClause("AND",l);
}
COM: <s> returns the filter where clause </s>
|
funcom_train/25706981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButton getTruststate_RBchosed() {
if( truststate_RBchosed == null ) {
truststate_RBchosed = new JRadioButton();
truststate_RBchosed.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(final java.awt.event.ItemEvent e) {
trustState_RBitemStateChanged();
}
});
}
return truststate_RBchosed;
}
COM: <s> this method initializes j radio button5 </s>
|
funcom_train/23875542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createDesignPage() {
fDesignViewer = new NewBPELEditor(getEditDomain());
loadModel();
try
{
addPage(0, fDesignViewer, getEditorInput());
//FIXME I18N
setPageText(0, "Design");
} catch (PartInitException e) {
ErrorDialog.openError(getSite().getShell(), "Error creating Design page", null, e.getStatus()); //$NON-NLS-1$
}
showBPElementsView(getProcess());
showBPStartWSView(getProcess());
}
COM: <s> creates the design page of the multi page editor </s>
|
funcom_train/4174154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAutoIncremented(String column) throws SQLException {
if (index.containsKey(column)) {
return autoInc[index.get(column).intValue()];
} else {
final SQLExceptionState state = SQLExceptionState.COLUMN_NOT_FOUND;
throw new SQLException("Column " + column + " does not exist in dataset.", state.name(), state.code());
}
}
COM: <s> indicates whether the designated numeric column is automatically incremented </s>
|
funcom_train/36900126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startPlayCheckers(Player[] players){
for(int i =0; i< players.length;i++){
if(!players[i].isHuman()){
int opponent = 0;
if(i==0){
opponent= 1;
} else if (i==1){
opponent = 0;
}
AIPlayer aiPlayer = new AIPlayer(players[i],players[opponent],this);
addObserver(aiPlayer);
aiPlayers.add(aiPlayer);
}
}
System.out.println("gui created");
game = new Checkers(players, data);
game.addObserver(this);
System.out.println("observer added");
}
COM: <s> method initialized domain </s>
|
funcom_train/5859590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print() {
if (ll.isEmpty()) {
// System.out.println("empty");
return;
}
ListIterator li = ll.listIterator(ll.indexOf(ll.getFirst()));
while (li.hasNext()) {
System.out.println(((MotuEvent) li.next()).toString());
}
}
COM: <s> prints on system </s>
|
funcom_train/44464838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
Runtime r = Runtime.getRuntime();
long used = (r.totalMemory() - r.freeMemory()) / (1024*1024);
System.out.println("Loading "+systemId+" (memory used: "+used+"M)");
return super.resolveEntity(publicId, systemId);
}
COM: <s> called by the sax parser when new external entity is found </s>
|
funcom_train/26031296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEventDeleteByFind() {
Graph g = getAndRegister(L);
if (g.getCapabilities().iteratorRemoveAllowed()) {
Triple toRemove = triple("remove this triple");
g.add(toRemove);
ExtendedIterator<Triple> rtr = g.find(toRemove);
assertTrue("ensure a(t least) one triple", rtr.hasNext());
rtr.next();
rtr.remove();
rtr.close();
L.assertHas(new Object[] { "add", g, toRemove, "delete", g,
toRemove });
}
}
COM: <s> ensure that triples removed by calling </s>
|
funcom_train/7660494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSubmitNPE2() {
ExecutorService e = Executors.newCachedThreadPool();
ExecutorCompletionService ecs = new ExecutorCompletionService(e);
try {
Runnable r = null;
ecs.submit(r, Boolean.TRUE);
shouldThrow();
} catch (NullPointerException success) {
} finally {
joinPool(e);
}
}
COM: <s> submitting a null runnable throws npe </s>
|
funcom_train/27762806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
final BufferedReader reader = new BufferedReader(new InputStreamReader(is));
String line;
while ((line = reader.readLine()) != null) {
Log.severe(line);
}
} catch (IOException e) {
Log.severe("Error while handling error output.", e);
}
}
COM: <s> performs the reading and logging operations </s>
|
funcom_train/28261911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() {
// Push extra register first, if 32 bit instruction
// Double word will be stored as [si[LSB][MSB] esi[LSB][MSB]] because
// stack is counting backwards in memory
if (cpu.doubleWord) {
cpu.setWordToStack(cpu.esi);
}
// Get word at SI and assign to SS:SP
cpu.setWordToStack(cpu.si);
}
COM: <s> this pushes the word in si onto stack top ss sp </s>
|
funcom_train/22665077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connect() {
try {
socket = new Socket(ipaddr, port);
} catch (UnknownHostException e) {
JOptionPane.showMessageDialog(null, "Unknown host.", "Error",
JOptionPane.ERROR_MESSAGE);
} catch (IOException e) {
JOptionPane.showMessageDialog(null, "Unable to connect to server.",
"Error", JOptionPane.ERROR_MESSAGE);
}
}
COM: <s> connects the socket to its destination </s>
|
funcom_train/47985092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWfsLayers(ArrayList<WFSLayer> layers){
// set layers
wfsLayers = layers;
// get server extent by merging layer extents
wfsExtent = layers.get(0).getLayerExtent();
for (int i = 1; i < layers.size(); i++){
wfsExtent.mergeExtent(layers.get(i).getLayerExtent());
}
}
COM: <s> set layers of the wfs server </s>
|
funcom_train/34342559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getPregunta33() {
if (pregunta33 == null) {//GEN-END:|114-getter|0|114-preInit
// write pre-init user code here
pregunta33 = new TextField("estas seguro que deseas enviar el mensaje?", null, 32, TextField.ANY);//GEN-LINE:|114-getter|1|114-postInit
// write post-init user code here
}//GEN-BEGIN:|114-getter|2|
return pregunta33;
}
COM: <s> returns an initiliazed instance of pregunta33 component </s>
|
funcom_train/49199343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addConnectionsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MapElement_connections_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_MapElement_connections_feature", "_UI_MapElement_type"),
VspacemapsPackage.Literals.MAP_ELEMENT__CONNECTIONS,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the connections feature </s>
|
funcom_train/49092399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void insertText(AxedInterval iv) {
// TODO elegance
if (line < iv.p1.line) {
return;
}
if (line == iv.p1.line) {
if (col <= iv.p1.col) {
return;
}
line += iv.p2.line - iv.p1.line;
col += iv.p2.col - iv.p1.col;
axed.moveCursor(this, AxedEvent.MOVETYPE_FOLLOWUP);
return;
}
assert line > iv.p1.line;
line += iv.p2.line - iv.p1.line;
axed.moveCursor(this, AxedEvent.MOVETYPE_FOLLOWUP);
}
COM: <s> a portion from the document is deleted </s>
|
funcom_train/20361606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadEntity(Object id) {
Class valueClass;
try {
valueClass = Class.forName(classField.getValue());
Object entity = getEntityManager().find(valueClass, id);
setValueObject(entity);
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
COM: <s> load form value from entity </s>
|
funcom_train/5810635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetv3ConfigInRange() throws UnknownHostException {
SnmpAgentConfig agentConfig = SnmpPeerFactory.getInstance().getAgentConfig(InetAddress.getByName("1.1.1.50"));
assertNotNull(agentConfig);
assertEquals(SnmpAgentConfig.VERSION3, agentConfig.getVersion());
assertEquals("opennmsRangeUser", agentConfig.getSecurityName());
}
COM: <s> this tests for ranges configured for v3 node and security name </s>
|
funcom_train/48713704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pixel2world(PixelXY px, PointXY pt){
double pxa[] = {px.x, px.y};
double pta[] = {0.0, 0.0};
AffineTransform af = new AffineTransform();
af.translate(wOrigin.x, wOrigin.y);
af.scale(1.0/zoomXfactor, 1.0/zoomYfactor);
af.transform(pxa,0,pta,0,pxa.length/2);
pt.x = pta[0];
pt.y = pta[1];
}
COM: <s> convert a screen position measured in pixels to </s>
|
funcom_train/31208721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getURL() throws SQLException {
try {
if(Trace.isEnabled()) Trace.trace(getId());
checkClosed();
String url=conn.url;
if(Trace.isEnabled()) Trace.traceResultQuote(url);
return url;
} catch(Throwable e) {
throw convertThrowable(e);
}
}
COM: <s> returns the database url jdbc ldbc </s>
|
funcom_train/28755767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProctypeid(Long newVal) {
if ((newVal != null && this.proctypeid != null && (newVal.compareTo(this.proctypeid) == 0)) ||
(newVal == null && this.proctypeid == null && proctypeid_is_initialized)) {
return;
}
this.proctypeid = newVal;
proctypeid_is_modified = true;
proctypeid_is_initialized = true;
}
COM: <s> setter method for proctypeid </s>
|
funcom_train/20645738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void changeIconPerformed() {
Image i = ImageFileChooser.chooseImage(null,
(JFrame) SwingUtilities.getAncestorOfClass(JFrame.class, this));
if (i == null) return;
m_tarification.getHeader().changeIcon(
new ImageIcon(ImageUtils.fitInBox(i,32,32,true))
);
m_icon.setIcon(m_tarification.getHeader().getIcon());
}
COM: <s> change the icon of the tarification </s>
|
funcom_train/45422168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(ServletConfig config) throws ServletException {
super.init(config);
try {
if (!EbssServer.configured()) {
String param = config.getInitParameter("properties");
String properties = getServletContext().getRealPath(param);
String path = getServletContext().getRealPath("") + File.separator;
EbssServer.configure(path, properties);
}
} catch (EbssException e) {
throw new ServletException(e);
}
}
COM: <s> load the ebss server configuration file xml properties from the servlet config </s>
|
funcom_train/3327699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object resolve(String idref) {
if (_mapping == null) return null;
for (int i = 0; i < _mapping.getClassMappingCount(); i++) {
ClassMapping clsMap = _mapping.getClassMapping(i);
if (idref.equals(clsMap.getName()))
return clsMap;
}
return null;
} //-- resolve
COM: <s> returns the object whose id matches the given idref </s>
|
funcom_train/8374185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printData(){
try {
while (bfread.read(buffer) >= 0) {
temp = 0;
temp = buffer[1];
temp <<= 8;
temp |= (0x000000FF & buffer[0]);
bfwrite.write(temp + "\n");
}
bfwrite.flush();
bfwrite.close();
} catch (IOException ex) {
System.err.println(ex.getMessage());
}
}
COM: <s> method to record the data section of a wav file </s>
|
funcom_train/15867724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRole(String roleId) throws MoiseConsistencyException {
Role r = ss.getRoleDef(roleId);
if (r == null) {
throw new MoiseConsistencyException("Failed to add the role "+roleId+" to the GrSpec "+getId()+", the role "+roleId+" was not defined!");
}
r.setAbstract(false);
roles.add(r);
}
COM: <s> adds the role id role into the playable roles in this group </s>
|
funcom_train/32137788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createFieldEditors() {
LogManager.logDebug("Start createFieldEditors:", this);
addField(new BooleanFieldEditor(
PreferenceConstants.P_WINDOW_STATE,
Localization.getString("SystemTapPreferencePage.RememberWindowState"),
getFieldEditorParent()));
LogManager.logDebug("End createFieldEditors:", this);
}
COM: <s> sets up the field editors for optional change by the user </s>
|
funcom_train/4299526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInvalidHaving() throws SQLException {
String sql = "select avg(salary), max(id) from employee "
+ "group by lastname "
+ "having (max(id) > 1) and (superior_id > 1) " + "";
Object[][] expected = new Object[][]{};
compareResults(sql, expected, -Trace.NOT_IN_AGGREGATE_OR_GROUP_BY);
}
COM: <s> tests an invalid b having b clause that contains columns not in </s>
|
funcom_train/18273574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset(ActionMapping mapping, HttpServletRequest request) {
try {
super.reset(mapping, request);
CompanyService companyService = new CompanyServiceImpl();
request.setAttribute(WebKeys.COMPANY_LIST, companyService.getCompanys());
addBtn = null;
} catch (ServiceException e) {
logger.error(e);
}
}
COM: <s> resets form and sets company list into the request </s>
|
funcom_train/38996282 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void kick(User user, String reason) throws ChannelException {
if (!isHalfop() && !isOperator()) {
throw new ChannelException("Must be an operator to kick.");
}
String text = "KICK " + getName() + " " + user.getNick();
if (reason != null) {
text += " :" + reason;
}
server.sendQueue(text);
}
COM: <s> attempts to kick the given user </s>
|
funcom_train/8148811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void logToFile(String file) throws IOException {
FileHandler ch = new FileHandler(file+"Log.txt");
SimpleFormatter sf = new SimpleFormatter();
ch.setFormatter(sf);
log.addHandler(ch);
ch.setLevel(Level.FINEST);
log.setLevel(Level.FINEST);
statusFile(file);
}
COM: <s> save log to a file </s>
|
funcom_train/12160126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLPDMNamespace() {
Namespace ns = MCSNamespace.LPDM;
// check that the prefix is correct
assertEquals("prefix not as ", "lpdm", ns.getPrefix());
// check that the namespace URI is correct
assertEquals("namespaceURI not as ",
PolicySchemas.MARLIN_LPDM_2006_02.getNamespaceURL(),
ns.getURI());
}
COM: <s> test that the lpdm namespace has the correct prefix and uri </s>
|
funcom_train/5505257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close()
{
open=false;
java.util.Vector<Receiver> res=new java.util.Vector<Receiver>(this.receivers);
java.util.Vector<Transmitter> tra=new java.util.Vector<Transmitter>(this.transmitters);
for(Receiver r:res) r.close();
for(Transmitter t:tra) t.close();
}
COM: <s> closes the device indicating that the device should now release </s>
|
funcom_train/45623062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSecureScopingPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_VjcType_secureScoping_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_VjcType_secureScoping_feature", "_UI_VjcType_type"),
MSBPackage.eINSTANCE.getVjcType_SecureScoping(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the secure scoping feature </s>
|
funcom_train/11734697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasItemState(ItemId id) {
// check ChangeLog first
try {
ItemState state = changes.get(id);
if (state != null) {
return true;
}
} catch (NoSuchItemStateException e) {
// item has been deleted, but we still might return true by asking base
}
return base.hasItemState(id);
}
COM: <s> returns code true code if there exists a </s>
|
funcom_train/50434212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean linkOnScreen(int link){
int top, bottom;
Object obj = _links.get( new Integer(link));
if( null == obj) return false;
Tag tag = (Tag)obj;
top = Integer.parseInt( tag.getParm("__top"));
bottom = Integer.parseInt( tag.getParm("__bottom"));
return (!( (bottom + _vertical) < 0 ||
(top + _vertical) > SCREENHEIGHT));
}
COM: <s> check if a specified link is displayed on the screen </s>
|
funcom_train/31343890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pauzeAll() {
mPauzed = true;
for (IDownload lDownload : mDownloadList) {
int lState = lDownload.getState();
if (lState == DOWNLOADING || lState == QUEUED
|| lState == CONNECTING || lState == RETRYING) {
lDownload.setState(PAUZED);
NetTask.getInstance().notifyNetworkEvent(
new NetTaskEvent(lDownload,
NetTaskEvent.DOWNLOAD_STATUS_CHANGED));
}
}
}
COM: <s> change the status of all downloads to pauze </s>
|
funcom_train/15567899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeLong(String _name) {
if(!longNames.containsKey(_name))
return;
removeLong(longNames.get(_name));
/*Object _o = longNames.get(_name);
if (_o!=null) {
removeLong(((Integer)_o).intValue());
}*/
}
COM: <s> code remove long code removes a long field by its name </s>
|
funcom_train/13864015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DRSUserAuthenticationToken createDRSUserAuthenticationToken(DRSUser user, String clientUri, Model model, long validTimeMilliseconds) {
return createDRSUserAuthenticationToken(user, clientUri, model, SecurityManager.generateSecureRandomString(SecurityManager.USER_AUTHENTICATION_TOKEN_BITS), validTimeMilliseconds);
}
COM: <s> re create drsuser authentication token for user </s>
|
funcom_train/28294624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getSelectStatus() {
if (_Debug) {
System.out.println(" :: SeqActivity --> BEGIN - " +
"getSelectStatus");
System.out.println(" ::--> " + mSelectStatus);
System.out.println(" :: SeqActivity --> END - " +
"getSelectStatus");
}
return mSelectStatus;
}
COM: <s> retrieves the value of the select count status sequencing definition model </s>
|
funcom_train/22783080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void drawImageToCenter(BufferedImage img, Graphics g) {
if (img == null) {
return; // FIXME
}
// center image
Dimension size = getSize();
int x = (size.width - img.getWidth()) / 2;
int y = (size.height - img.getHeight()) / 2;
g.drawImage(img, x, y, this);
}
COM: <s> draws the image to the center of this component </s>
|
funcom_train/36184542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJTextFieldContextID() {
if (jTextFieldContextID == null) {
jTextFieldContextID = new JTextField();
jTextFieldContextID.setBounds(new Rectangle(93, 17, 273, 20));
}
return jTextFieldContextID;
}
COM: <s> this method initializes j text field context id </s>
|
funcom_train/36107098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Data loadData(String moduleKey, String path, boolean list){
MutableComparableData request = receiver.getParent().createData(DataProtocol.GET_DATA, null, moduleKey);
if(path!=null){ //the absence of fields (except "module") means loading the main module data
request.set(path, "path");
if(list) request.set(Boolean.TRUE, "list");
}
receiver.initReceiving(request);
return receiver.getData();
}
COM: <s> loads either module data or data with list field data finder </s>
|
funcom_train/24641221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void exportKnowledgebaseToLatex(KnowledgebaseFile file) throws ParsingException, IOException {
if(file == null) {
throw new IllegalArgumentException("file may not be null.");
}
KreatorMain.getUserInterface().showLaTeXWindow(file.toLatex(), file.getName());
}
COM: <s> exports the given latex able file to latex </s>
|
funcom_train/3379273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object other) {
if (!(other instanceof GeneralSubtree))
return false;
GeneralSubtree otherGS = (GeneralSubtree)other;
if (this.name == null) {
if (otherGS.name != null) {
return false;
}
} else {
if (!((this.name).equals(otherGS.name)))
return false;
}
if (this.minimum != otherGS.minimum)
return false;
if (this.maximum != otherGS.maximum)
return false;
return true;
}
COM: <s> compare this general subtree with another </s>
|
funcom_train/2840592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean commit(int assumedValue, int newValue) {
logger.debug("commit(assumedValue={}, newValue={}) - start", String.valueOf(assumedValue), String.valueOf(newValue));
synchronized(lock_) {
boolean success = (assumedValue == value_);
if (success) value_ = newValue;
return success;
}
}
COM: <s> set value to new value only if it is currently assumed value </s>
|
funcom_train/48338758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getQueueSize() {
synchronized (monitor) {
if (TERMINATED == status) {
throw new IllegalStateException("Event loop terminated");
}
if (-1 == tail) {
return 0;
} else if (head == tail) {
return handlers.length;
} else if (tail > head) {
return (tail - head);
} else {
return (handlers.length - (head - tail));
}
}
}
COM: <s> get the current size of this event loops queue </s>
|
funcom_train/46993128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String generateDDI(){
StringBuilder sb = new StringBuilder();
sb.append(generateDDISection1());
//sb.append(generateDDISection2());
sb.append(generateDDISection3());
sb.append(generateDDISection4());
return sb.toString();
}
COM: <s> renders the given code sdiometadata code object as a code string code </s>
|
funcom_train/119284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics g) {
Dimension size = getSize();
// Then the icon.
if (editingIcon != null) {
int yLoc = 0;
int xLoc = 0;
editingIcon.paintIcon(this, g, xLoc, yLoc);
}
// Border selection color
Color background = getBorderSelectionColor();
if (background != null) {
g.setColor(background);
g.drawRect(0, 0, size.width - 1, size.height - 1);
}
super.paint(g);
}
COM: <s> overrides code container </s>
|
funcom_train/10863620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Float getFloat(String param) {
String val = get(param);
try {
return val==null ? null : Float.valueOf(val);
}
catch( Exception ex ) {
throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, ex.getMessage(), ex );
}
}
COM: <s> returns the float value of the param or null if not set </s>
|
funcom_train/24625017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeField(String fieldName) {
if (fieldName == null || fields == null)
return;
Enumeration<LemansysSQLFormField> enm = fields.elements();
LemansysSQLFormField fld = null;
while (enm.hasMoreElements()) {
fld = enm.nextElement();
if (fld.getName().equals(fieldName)) {
fields.remove(fld);
hFields.remove(fieldName);
}
}
}
COM: <s> remove selected field name </s>
|
funcom_train/17279014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setTagFromType() {
int index = listType.getSelectedIndex();
if(index > 5) {
listTag = HTML.Tag.UL.toString();
}
else if(index > 0) {
listTag = HTML.Tag.OL.toString();
}
else {
listTag = null;
}
}
COM: <s> translate list types as per css attribute list style type into list </s>
|
funcom_train/4237364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetEfectivo() {
System.out.println("getEfectivo");
ImplNotaDeConsumo instance = new ImplNotaDeConsumo();
instance.setEfectivo(1000.00);
Double expResult = 1000.00;
Double result = instance.getEfectivo();
assertEquals(expResult, result);
}
COM: <s> test of get efectivo method of class restaurante </s>
|
funcom_train/8088058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Attribute getFieldDef(String attName) {
Attribute returnV = null;
for (int i = 0; i < m_fieldDefs.size(); i++) {
if (m_fieldDefs.get(i).name().equals(attName)) {
returnV = m_fieldDefs.get(i);
break;
}
}
return returnV;
}
COM: <s> return the named attribute from the list of reference fields </s>
|
funcom_train/20463142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onLogout(PrincipalCollection principals) {
super.onLogout(principals);
Collection<Realm> realms = getRealms();
if (realms != null && !realms.isEmpty()) {
for (Realm realm : realms) {
if (realm instanceof LogoutAware) {
((LogoutAware) realm).onLogout(principals);
}
}
}
}
COM: <s> first calls code super </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.