__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/19408635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void cmdGraph() {
System.out.println("Command is not available in this version.");
// try {
// if ( ! fDaVinci.isRunning() )
// fDaVinci.start();
// fDaVinci.send("graph(new_placed(" + fSystem.state().getDaVinciGraph()
// + "))");
// } catch (IOException ex) {
// Log.error(ex.getMessage());
// }
}
COM: <s> show object diagram with da vinci </s>
|
funcom_train/9987713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void downloadDocument(String resourceId, String filepath, String format) throws Exception {
if (resourceId == null || filepath == null || format == null) {
throw new DocumentListException("null passed in for required parameters");
}
String[] parameters = { "docID=" + resourceId, "exportFormat=" + format };
URL url = buildUrl(URL_DOWNLOAD + "/documents" + URL_CATEGORY_EXPORT, parameters);
downloadFile(url, filepath);
}
COM: <s> downloads a document </s>
|
funcom_train/2325714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DenseLargeFComplexMatrix2D getIfftColumns(final boolean scale) {
if (content instanceof DenseLargeFloatMatrix2D) {
if (this.isNoView == true) {
return ((DenseLargeFloatMatrix2D) content).getIfftColumns(scale);
} else {
return ((DenseLargeFloatMatrix2D) copy()).getIfftColumns(scale);
}
} else {
throw new IllegalArgumentException("This method is not supported");
}
}
COM: <s> returns new complex matrix which is the inverse of the discrete fourier </s>
|
funcom_train/46737806 | /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(SETTINGLOGS_INSERTUSERREFID), oldinsertUserRef, insertUserRef);
}
}
COM: <s> user that created this setting </s>
|
funcom_train/49138435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public boolean hasTurnPassedThisRound(Actor actor) {
//if the position of the actor is greater than the current turn then it's turn hasn't come yet
int passed = allTheActors.indexOf(actor, currentTurn);
//not found from current to end, so must have passed
if (passed == -1) {
return true;
} else {
return false;
}
}
COM: <s> checks to see if a speicified actor has taken their turn this round </s>
|
funcom_train/41736243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void warning(String message, String sourceName, int line, String lineSource, int lineOffset) {
if (line < 0) {
log.warn(message);
} else {
log.warn("[" + filename + ":" + line + "] " + message);
}
}
COM: <s> reports a warning </s>
|
funcom_train/36756450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetName() {
System.out.println("getName");
Degree instance = null;
String expResult = "";
String result = instance.getName();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get name method of class csis543 tfinal project </s>
|
funcom_train/2445129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void encrypt(File clearText, File output, Key encryptionKey) throws IOException, CryptoException {
try {
prepareWorker(clearText);
byte[] encrypted = worker.encrypt(FileUtils.readFileToByteArray(clearText), encryptionKey, armor);
FileUtils.writeByteArrayToFile(output, encrypted);
} finally {
KongaIoUtils.close(encryptionKey);
}
}
COM: <s> encrypts the given clear text file </s>
|
funcom_train/8631731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long readVarLong() {
long x = data[pos++];
if (x >= 0) {
return x;
}
x &= 0x7f;
for (int s = 7;; s += 7) {
long b = data[pos++];
x |= (b & 0x7f) << s;
if (b >= 0) {
return x;
}
}
}
COM: <s> read a variable size long </s>
|
funcom_train/800747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected EObject createInitialModel() {
EClass eClass = ExtendedMetaData.INSTANCE.getDocumentRoot(mzdataPackage);
EStructuralFeature eStructuralFeature = eClass.getEStructuralFeature(initialObjectCreationPage.getInitialObjectName());
EObject rootObject = mzdataFactory.create(eClass);
rootObject.eSet(eStructuralFeature, EcoreUtil.create((EClass)eStructuralFeature.getEType()));
return rootObject;
}
COM: <s> create a new model </s>
|
funcom_train/8461336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSharpDominant() {
return ((keyIndex == 1 && m_keyAccidental.isSharp())
|| keyIndex == 2 || keyIndex == 4
|| (keyIndex == 6 && m_keyAccidental.isSharp())
|| keyIndex == 7 || keyIndex == 9 || (keyIndex == 11 && m_keyAccidental.isNatural()));
}
COM: <s> returns tt true tt if the key without exotic accidentals has only </s>
|
funcom_train/38415264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean save() {
ResourceManager rManager = ClientDirector.getResourceManager();
if( !rManager.saveObject(this, rManager.getExternalConfigsDir()+CLIENT_CONFIG_FILENAME ) ) {
Debug.signal( Debug.ERROR, null, "Failed to save client configuration.");
return false;
}
return true;
}
COM: <s> to save this client configuration </s>
|
funcom_train/4125766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(Locatable locatable) {
if (locatable instanceof Unit) {
units.remove(locatable);
firePropertyChange(UNIT_CHANGE, getUnitCount() + 1, getUnitCount());
} else {
logger.warning("Tried to remove an unrecognized 'Locatable' from a europe.");
}
}
COM: <s> removes a code locatable code from this location </s>
|
funcom_train/8311896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAttribute(Object object) {
return ((object instanceof Node) && ((((Node) (object)).getNodeType()) == (Node.ATTRIBUTE_NODE))) && (!("http://www.w3.org/2000/xmlns/".equals(((Node) (object)).getNamespaceURI())));
}
COM: <s> test if a node is an attribute </s>
|
funcom_train/36180797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override public int read() throws IOException {
if (closed) throw new IOException("Reader closed");
int r = -1;
while (r == -1){
Reader in = getCurrentReader();
if (in == null){
if (doneAddingReaders) return -1;
try {
Thread.sleep(100);
} catch (InterruptedException iox){
throw new IOException("Interrupted");
}
} else {
r = in.read();
if (r == -1) advanceToNextReader();
}
}
return r;
}
COM: <s> read a single character </s>
|
funcom_train/9698174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List listNewTests() {
final List newTests = new LinkedList();
for (final Iterator i = currentReport.getTests().iterator(); i.hasNext(); ) {
final TestReportTest test = (TestReportTest) i.next();
if (lastReport.getTest(test.getName()) == null) {
newTests.add(test);
}
}
return newTests;
}
COM: <s> lists tests that are new </s>
|
funcom_train/32791043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String handleCollCount(String collection, Guide guide, String object) {
assert(guide != null) : "count(): guide may not be null";
guide.reset();
Template template = templateEngine.getTemplate("feature_call_count");
template.setAttribute("source", guide.getFrom());
template.setAttribute("element", guide.getSelect());
template.setAttribute("collection", collection);
template.setAttribute("object", object);
return template.toString();
}
COM: <s> generates a code fragment for a count operation </s>
|
funcom_train/21996473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Hashtable getMap() throws RpcException {
try {
authorize(SettingListener.GET_MAP);
RedratSettingCache cache = RedratSettingCache.getInstance();
return cache.getMap();
}
catch (JRecSecurityException e) {
throw new RpcException("security-problem getting settings", e);
}
catch (MalformedURLException e) {
throw new RpcException("url-problem getting settings", e);
}
}
COM: <s> return a map of driver setting recs </s>
|
funcom_train/31905221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rightTextChanged(String text) throws DOMException {
text = "rect(" +
getValue().getTop().getCssText() + ", " +
text + ", " +
getValue().getBottom().getCssText() + ", " +
getValue().getLeft().getCssText() + ")";
textChanged(text);
}
COM: <s> called when the right value text has changed </s>
|
funcom_train/3841089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String submitJobForStaging(Job job) throws GridsterException {
try {
String s = gridster.submitJobForStaging(job);
return s;
} catch (Exception e) {
try {
refreshGridster();
String s = gridster.submitJobForStaging(job);
return s;
} catch (Exception e2) {
System.out.println("unable to stage job: " + e2);
throw new GridsterException(e2);
}
}
}
COM: <s> stage a job for processing this prepares the job at availabile clients </s>
|
funcom_train/2287014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void includeExternal(ServletRequest req, ServletResponse res) throws ServletException, IOException {
// This is an external include, probably to a JSP page, dispatch with system dispatcher
if (LOG.isInfoEnabled()) {
LOG.info(Messages.get().getBundle().key(
Messages.LOG_FLEXREQUESTDISPATCHER_INCLUDING_EXTERNAL_TARGET_1,
m_extTarget));
}
m_rd.include(req, res);
}
COM: <s> include an external non open cms file using the standard dispatcher </s>
|
funcom_train/37558063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addToMedicines(Medicine medicine) {
medicineComboBox.addItem(medicine.getName());
// medicines.add(medicine.getName());
medicineObjects.add(medicine);
System.out.println("MedicineTab: " + medicineComboBox.getItemCount() + ", " +
medicines.size() + ", " + medicineObjects.size() );
}
COM: <s> adds an option to the medicine combo box </s>
|
funcom_train/20232690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void get(URL url, HttpResponse result) {
if (debug) System.out.println("[Checkweb: get] started");
String method = "GET";
this.sendRequest(url, method, result);
if (debug) System.out.println("[Checkweb: get] ended");
}
COM: <s> sends a get request to the specified url </s>
|
funcom_train/38868383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void testParseMonth() {
// Too low
String grpdata="AA20000820022000800 ";
sao.setGrpData(grpdata);
Assert.assertEquals(1, sao.parseGrp());
// Too high
grpdata="AA20000821322000800 ";
sao.setGrpData(grpdata);
Assert.assertEquals(1, sao.parseGrp());
}
COM: <s> test parse grp for sao group 3 month exceptions </s>
|
funcom_train/28296202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDataPropertyNullData() throws Exception {
Entry entry =
dvm.new Entry(Package.class, Sphere.class, Package.NAME,
Sphere.NAME);
dvm.set(entry);
DataConversion<Integer, Color3f> conversion = createConversion();
dvm.setProperty(entry.getDataClass(), Package.CLASSES_ATTR,
Sphere.COLOR_ATTRIBUTE, conversion);
try {
dvm.getDataProperty(null, Sphere.COLOR_ATTRIBUTE);
} catch (IllegalArgumentException e) {
assertTrue(true);
}
}
COM: <s> test get data property null data </s>
|
funcom_train/15732028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addMidletToDoc(String midlet, int i){
String name = midlet.substring( midlet.lastIndexOf('.') + 1, midlet.length());
doc.append("MIDlet-").append(i);
doc.append(": ").append(name);
doc.append(", "); //.append(iconDir).append(name).append(".png");
doc.append(", ").append(midlet).append("\n");
}
COM: <s> adds a midlet entry to the document </s>
|
funcom_train/47826624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyEvent(Event event) {
logger.debug("Agent::notifyEvent " + event);
Task task = findTaskForEvent(event.getType());
if (task != null)
task.notifyEvent(event);
else
logger.debug("ERROR, can not find task for event type " + event.getType());
}
COM: <s> receives an event from another agent or from the pac itself </s>
|
funcom_train/17255323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void applyRenderState(Stack[] states) {
if (batchList != null)
for (int i = 0, cSize = getBatchCount(); i < cSize; i++) {
GeomBatch batch = getBatch(i);
if (batch != null && batch.isEnabled())
batch.updateRenderState(states);
}
}
COM: <s> code apply render state code determines if a particular render state </s>
|
funcom_train/46755574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeSelectedModels() {
if (table.getSelectedRowCount() > 0) {
int[] selected = table.getSelectedRows();
for (int i=selected.length-1; i>=0; i--) {
int selectedRow = selected[i];
((ISTableModel)table.getModel()).removeRow(selectedRow);
}
table.clearSelection();
}
}
COM: <s> remove the selected models setting delete indicator </s>
|
funcom_train/22555010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void marshall(RatingType ratingElement, String serverPath){
ratingElement.setComment(comment);
ratingElement.setHref(serverPath+String.valueOf(id));
Calendar cal = Calendar.getInstance();
if (published != null){
cal.setTime(published);
ratingElement.setPublished(cal);
}
if (updated != null){
cal.setTime(updated);
ratingElement.setUpdated(cal);
}
ratingElement.setRating(rating);
AuthorType author = ratingElement.addNewAuthor();
author.setName(authorname);
if (authorurl != null){
author.setUrl(authorurl);
}
ratingElement.setAuthor(author);
ratingElement.setSubject(subject);
}
COM: <s> populate a supplied xml rating type with the </s>
|
funcom_train/7618168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getPosTan(float distance, float pos[], float tan[]) {
if (pos != null && pos.length < 2 ||
tan != null && tan.length < 2) {
throw new ArrayIndexOutOfBoundsException();
}
return native_getPosTan(native_instance, distance, pos, tan);
}
COM: <s> pins distance to 0 distance get length and then computes the </s>
|
funcom_train/49574178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IDataSource newDataSource() throws InfoException {
try {
return new DataSource(getColumnNames());
//return DataSourceBuilder.buildDataSource(getColumnNames(), getReportGeneratorConfiguration(), getReportSpec().getSourceId());
} catch (InfoException e) {
throw new InfoException(LanguageTraslator.traslate("79"), e);
}
}
COM: <s> obtiene y devuelve un datasource </s>
|
funcom_train/4546705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MinfAtom cut(long time) {
MinfAtom cutMinf = new MinfAtom();
cutMinf.setMhd(mhd.cut());
cutMinf.setDinf(dinf.cut());
cutMinf.setStbl(stbl.cut(time));
cutMinf.recomputeSize();
return cutMinf;
}
COM: <s> cut the atom at the specified time </s>
|
funcom_train/7758696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int read() throws IOException {
if (isClosed()) {
return -1;
}
checkState();
if (isStream) {
return ris.read();
}
int result = -1;
InputStream in = getCurrentStream();
if(in != null) {
result = in.read();
if(result == -1) {
closeCurrentStream();
result = read();
}
}
return result;
}
COM: <s> performs on behalf of jxta socket input stream </s>
|
funcom_train/47162951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refresh() throws RefreshFailedException {
String data = "";
try
{
data = RuntimeBoostUtils.getCommandStandardOutput(uptimeCommand);
refresh( data);
}
catch ( Exception ex)
{
RefreshFailedException exception = new RefreshFailedException("Pattern ok, but evaluation failed'" + data + "'; pattern '" + uptimeRegex + "'");
exception.initCause(ex);
throw exception;
}
}
COM: <s> updates all information </s>
|
funcom_train/17794381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int fileExistsInCache(String filename) {
File f = new File(filename);
String mhash = "" + f.length() + "" + f.lastModified() + filename;
int mcode = mhash.hashCode();
int i = 0, t = cache.length;
while (i < t) {
if (cache[i].hash == mcode) {
return i;
}
i++;
}
return -1;
}
COM: <s> private method that checks if a file already exists in cache </s>
|
funcom_train/2418393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open(IntegrationEntity entity) {
ApplicationUiUtils.logIfNotOnEDT(getClass(), "open");
logRequest(entity);
WaitLock waitLock = view.getWindow().startWait();
Job job = new Job(entity, waitLock);
job.run();
}
COM: <s> opens the page for the requested entity synchronously </s>
|
funcom_train/39176853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFile(File file) {
this.serviceDefinitionFile = file;
if(file == null) {
this.setTitle(WINDOW_TITLE);
saveAction.setEnabled(false);
}
else {
this.setTitle(file.getName() + " - " + WINDOW_TITLE);
saveAction.setEnabled(true);
}
}
COM: <s> set the file name and enable the save action </s>
|
funcom_train/46066990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isSessionInvalid(HttpServletRequest httpServletRequest) {
String sid = httpServletRequest.getRequestedSessionId();
log.info("sid: " + sid);
log.info(httpServletRequest.isRequestedSessionIdValid());
boolean ret = (sid == null)
|| !httpServletRequest.isRequestedSessionIdValid();
return ret;
}
COM: <s> checks the validity of the session </s>
|
funcom_train/33511689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print() {
int i = 0; //a counter
try {
while (readNextEntry() != -1) {
System.out.println(
""
+ (i * DocumentIndex.entryLength)
+ ", "
+ docid
+ ", "
+ docLength
+ ", "
+ docno
+ ", "
+ endOffset
+ ", "
+ endBitOffset);
i++;
}
} catch (IOException ioe) {
System.err.println(
"Input/Output exception while reading the document " +
"index input stream. Stack trace follows.");
ioe.printStackTrace();
System.exit(1);
}
}
COM: <s> prints out to the standard error stream </s>
|
funcom_train/15628943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean doCut(final boolean performAction) {
final MapView<G, A, R> mapView = currentMapView;
if (mapView == null) {
return false;
}
final Rectangle selectedRec = mapView.getMapGrid().getSelectedRec();
if (selectedRec == null) {
return false;
}
if (performAction) {
copyBuffer.cut(mapView, selectedRec);
}
return true;
}
COM: <s> executes the cut action </s>
|
funcom_train/37519686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visitCharLiteral(/*@non_null@*/ JCharLiteral self ) {
Character chValue = (Character) self.getValue();
char value;
if( chValue != null) {
value = chValue.charValue();
} else {
value = self.image().charAt(0); // !!! false
}
switch (value) {
case '\b':
print("'\\b'");
break;
case '\r':
print("'\\r'");
break;
case '\t':
print("'\\t'");
break;
case '\n':
print("'\\n'");
break;
case '\f':
print("'\\f'");
break;
case '\\':
print("'\\\\'");
break;
case '\'':
print("'\\''");
break;
case '\"':
print("'\\\"'");
break;
default:
print("'" + value + "'");
}
}
COM: <s> prints a character literal </s>
|
funcom_train/40700807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertTab(String text, boolean asHTML, int beforeIndex) {
if ((beforeIndex < 0) || (beforeIndex > getTabCount())) {
throw new IndexOutOfBoundsException();
}
TabItemWidget item = new TabItemWidget(this, text, asHTML);
item.setStyleName("gwt-TabBarItem");
item.setTabItemWidgetEventListener(this);
panel.insert(item, beforeIndex + 1);
}
COM: <s> inserts a new tab at the specified index </s>
|
funcom_train/40931665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void event(CometEvent event) throws IOException, ServletException {
if (event.getEventType() == CometEvent.EventType.ERROR) {
end(event);
} else if (event.getEventType() == CometEvent.EventType.END) {
end(event);
} else if (event.getEventType() == CometEvent.EventType.BEGIN) {
begin(event);
} else if (event.getEventType() == CometEvent.EventType.READ) {
read(event);
}
}
COM: <s> process the given comet event </s>
|
funcom_train/3891012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fillContextMenu(IMenuManager manager) {
manager.add(_actionNewItem);
manager.add(_actionNewChildItem);
manager.add(new Separator());
manager.add(_actionDelete);
manager.add(new Separator());
manager.add(_actionMoveUp);
manager.add(_actionMoveDown);
manager.add(new Separator());
manager.add(_actionSelectFile);
manager.add(_actionViewItem);
manager.add(_actionEditItem);
manager.add(_actionMetadata);
}
COM: <s> fill the right click menu </s>
|
funcom_train/29723719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JToggleButton getJtbShowServerOutput() {
if (jtbShowServerOutput == null) {
jtbShowServerOutput = new JToggleButton();
jtbShowServerOutput.setMaximumSize(new Dimension(24, 24));
jtbShowServerOutput.setPreferredSize(new Dimension(24, 24));
jtbShowServerOutput.setMnemonic(KeyEvent.VK_UNDEFINED);
jtbShowServerOutput.setMinimumSize(new Dimension(24, 24));
}
return jtbShowServerOutput;
}
COM: <s> this method initializes jtb show server output </s>
|
funcom_train/31071296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String hashString() {
if (hashStr != null) return hashStr;
StringBuffer sbuf = new StringBuffer();
sbuf.append(sign.getOrthography()).append(" :- ").append(sign.getCategory().hashString());
hashStr = sbuf.toString();
return hashStr;
}
COM: <s> returns a hash string for this edge </s>
|
funcom_train/31908635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean nodeAncestorOf(Node node1, Node node2) {
if (node2 == null || node1 == null) {
return false;
}
Node parent = node2.getParentNode();
while (parent != null && parent != node1) {
parent = parent.getParentNode();
}
return (parent == node1);
}
COM: <s> returns true if node1 is an ancestor of node2 </s>
|
funcom_train/8048508 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void hideCursorInFrame(){
int[] pixels = new int[16 * 16];
Image image = Toolkit.getDefaultToolkit().createImage(
new MemoryImageSource(16, 16, pixels, 0, 16));
Cursor transparentCursor =
Toolkit.getDefaultToolkit().createCustomCursor
(image, new Point(0, 0), "invisibleCursor");
app.frame.setCursor(transparentCursor);
}
COM: <s> hides the mousecursor in multiple mice mode </s>
|
funcom_train/27762805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setImage(Image anImage) {
this.image = anImage;
smallIcon = new ImageIcon(image.getScaledInstance(smallIconSize, smallIconSize, Image.SCALE_SMOOTH));
largeIcon = new ImageIcon(image.getScaledInstance(largeIconSize, largeIconSize, Image.SCALE_SMOOTH));
}
COM: <s> sets the image of the object </s>
|
funcom_train/25295059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void put(String name) {
if (name == null || name.isEmpty())
return;
SortedSet<String> existing = classes.remove(name.charAt(0));
if (existing == null)
existing = new TreeSet<String>();
existing.add(name);
classes.put(name.charAt(0), existing);
}
COM: <s> add a class name to the map lt character set gt </s>
|
funcom_train/37837454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireChangedAdded(final RPObject object, final RPObject changes) {
/*
* Walk each slot
*/
for (final RPSlot cslot : changes.slots()) {
if (cslot.size() != 0) {
fireChangedAdded(object, cslot);
}
}
/*
* Call after children have been notified
*/
listener.onChangedAdded(object, changes);
userListener.onChangedAdded(object, changes);
}
COM: <s> notify listeners that an object added changed attribute s </s>
|
funcom_train/33601602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isDecideSetted(int acceptor) {
//******* EDUARDO BEGIN **************//
return decide[this.manager.getCurrentViewPos(acceptor)] != null;
//******* EDUARDO END **************//
}
COM: <s> informs if there is a decided value from a replica </s>
|
funcom_train/26490506 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendMessage(String username, String to, String subject, String body) {
if (NOMAIL) return;
try {
if (DEBUG)
sendSimpleMail(username, body, DEBUGEMAIL , subject);
else
sendSimpleMail(username, body, to, subject);
} catch (Exception e) {
System.out.println("Exception: "+e.toString());
}
}
COM: <s> send an email </s>
|
funcom_train/24262163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFieldValidationN9() {
try {
User user = (User) jenineHawthorn.clone();
user.setPhone("");
curationService.addUser(admin, user);
fail();
}
catch(MacawException exception) {
int totalNumberOfErrors
= exception.getNumberOfErrors();
assertEquals(1, totalNumberOfErrors);
int numberOfErrors
= exception.getNumberOfErrors(MacawErrorType.INVALID_USER);
assertEquals(1, numberOfErrors);
}
}
COM: <s> ensure that the phone of the address has a value </s>
|
funcom_train/1602528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAppointmentScheduledForWholeDays(AppointmentDataModel appointment) {
if(appointment.getStartDate().get(Calendar.HOUR_OF_DAY) == 0 &&
appointment.getStartDate().get(Calendar.MINUTE) == 0 &&
appointment.getEndDate().get(Calendar.HOUR_OF_DAY) == 23 &&
appointment.getEndDate().get(Calendar.MINUTE) == 59) {
return true;
} else {
return false;
}
}
COM: <s> checks if an appointment is scheduled to use whole days or not </s>
|
funcom_train/10591139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cancel(OutputStream stream) throws SourceException {
if (stream instanceof WebDAVSourceOutputStream) {
WebDAVSourceOutputStream wsos = (WebDAVSourceOutputStream) stream;
if (wsos.source == this) {
try {
wsos.cancel();
}
catch (Exception e) {
throw new SourceException("Failure cancelling Source", e);
}
}
}
throw new IllegalArgumentException("The stream is not associated to this source");
}
COM: <s> cancel the data sent to an code output stream code returned by </s>
|
funcom_train/34357033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getSinglePredicateInformation(SSWAPPredicate predicate, Property informationProperty) {
String result = null;
Resource resource = ontModel.getResource(predicate.getURI().toString());
StmtIterator it = ontModel.listStatements(resource, informationProperty, (RDFNode) null);
if (it.hasNext()) {
Statement statement = it.next();
if (statement.getObject().isURIResource()) {
result = ((Resource) statement.getObject()).getURI();
}
}
it.close();
return result;
}
COM: <s> gets information about the predicate </s>
|
funcom_train/18110922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getReplaceButtonsPanel() {
if (replaceButtonsPanel == null) {
FlowLayout flowLayout21 = new FlowLayout();
replaceButtonsPanel = new JPanel();
replaceButtonsPanel.setLayout(flowLayout21);
flowLayout21.setAlignment(java.awt.FlowLayout.RIGHT);
replaceButtonsPanel.add(getReplaceButton(), null);
replaceButtonsPanel.add(getReplaceSearchNextButton(), null);
replaceButtonsPanel.add(getReplaceAllButton(), null);
}
return replaceButtonsPanel;
}
COM: <s> this method initializes replace buttons panel </s>
|
funcom_train/13847268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void renderBoard() {
glClear(GL_COLOR_BUFFER_BIT);
// TODO: the glViewPort Calls should be size relative and not hard coded
// Board Scene
glViewport(200, 50, 250, 500);
glMatrixMode(GL_PROJECTION); // Select The Projection Matrix
glLoadIdentity(); // Reset The Projection Matrix
glOrtho(0.0, 10.0, 0.0, 20.0, -1.0, 1.0);
glCallList(dp_board);
}
COM: <s> render the board </s>
|
funcom_train/22477467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(String name) {
for (Iterator iter = this.namedPropertyHandlers.iterator(); iter.hasNext();) {
NamedPropertyHandler handler = (NamedPropertyHandler) iter.next();
if (handler.has(name, this)) {
handler.delete(name, this);
return;
}
}
if (this.getters.containsKey(name)) {
this.getters.remove(name);
} else {
super.delete(name);
}
}
COM: <s> deletes the property with the specified name </s>
|
funcom_train/14099023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean restoreBackup() {
if (pixel.length != backupPixel.length)
return false;
if ((width < 1) || (height < 1))
return false;
int x,y;
for(y=0; y<height; y++) {
for(x=0; x<width; x++) {
setColor(x,y,backupPixel[x][y]);
}
}
return true;
}
COM: <s> restores the pixel array from the copied backup pixel array </s>
|
funcom_train/10938988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(HttpSession session, T value, Map<String, Object> expandContext) {
AttributeAccessor<T> aa = new AttributeAccessor<T>(name, expandContext, this.attributeName, this.fma, this.needsExpand);
aa.put(session, value);
}
COM: <s> based on name put in http session or from list in http session </s>
|
funcom_train/31626692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void populateFromTransitionData(final DefaultTreeNode viewTreeNode, final ModelVisitable src) {
try {
Transition viewTransition = src.getViewTrans();
populateFromTransitionData(viewTreeNode, viewTransition);
} catch (DBException ex) {
throw new ViewVisitorException("Error visiting type: " + src.getClass(), ex);
}
}
COM: <s> populates node common data from teh view transition and adapts exceptions </s>
|
funcom_train/34620385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TreeNode getCommentTree() {
TreeNode tnCu = new TreeNode("CompilationUnit");
for (Comment c : comments) {
String name = c.getClass().getSimpleName();
TreeNode tn = null;
if (name.equals("Javadoc")) {
tn = convertTokenString("JAVADOC", c);
} else {
tn = convertTokenString("COMMENT", c);
}
tnCu.addChild(tn);
}
return tnCu;
}
COM: <s> returns a degenerated tree containing the comments </s>
|
funcom_train/48422945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addUserBlogEntry(UserBlogEntry userBlogEntry) {
//mapper.insertUserBlogEntry(userBlogEntry);
SqlSession session = sqlSessionFactory.openSession();
try {
UserBlogEntryMapper mapper = session.getMapper(UserBlogEntryMapper.class);
mapper.insertUserBlogEntry(userBlogEntry);
session.commit();
} finally {
session.close();
}
}
COM: <s> adds a user blog entry </s>
|
funcom_train/26099191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButton getJRadioButton1() {
if (jRadioButton1 == null) {
jRadioButton1 = new JRadioButton();
jRadioButton1.setText("Response");
jRadioButton1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
getJRadioButton().setSelected(false);
getJRadioButton1().setSelected(true);
}
});
}
return jRadioButton1;
}
COM: <s> this method initializes j radio button1 </s>
|
funcom_train/1169773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void skipTurn(Player player) {
// skipping turn without having extras is equivalent to giving your opponent an extra turn
if (extraTurns.isEmpty())
addExtraTurn(player.getOpponent());
else {
int pos = extraTurns.lastIndexOf(player);
if (pos == -1)
addExtraTurn(player.getOpponent());
else
extraTurns.remove(pos);
}
}
COM: <s> p skip turn </s>
|
funcom_train/13409612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FileDialog getFileDialog() {
if (fileDialog == null) {
String[] filterExtensions = ApplicationProperties.getLoadModelFormats();
fileDialog = new FileDialog(Display.getCurrent().getActiveShell(), SWT.OPEN);
fileDialog.setText("File Opener");
fileDialog.setFilterPath(ApplicationProperties.getInstance().getWorkspacePath());
fileDialog.setFilterExtensions(filterExtensions);
}
return fileDialog;
}
COM: <s> will return an instance of the file dialog </s>
|
funcom_train/15685115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void replace(Object oldData, Object newData) {
TableItem[] items = tableViewer.getTable().getItems();
for (int i = 0; i < items.length; i++) {
if (items[i].getData().equals(oldData)) {
tableViewer.replace(newData, i);
}
}
}
COM: <s> replace old data by new data in the mtable </s>
|
funcom_train/30176321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void textFound(ParserEvent e) {
// Ignore text if there isn't a tag
if (tagStack.empty()) {
return;
}
LangElement le = (LangElement) tagStack.peek();
Tag tag = (Tag) le.getTag();
debug ("Can't add text for " + tag.name);
debug (" text is >"+e.getText()+"<");
}
COM: <s> a continous block of text was parsed </s>
|
funcom_train/45773945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeAllProperties(int windowRole, String windoName, String filePath, String printForm) {
try {
AccessibilityTools.printAccessibleTree(AccessibilityTools.getXAccessible(getHelper().getTopWindows(), windoName, (short) windowRole), filePath, printForm);
} catch (com.sun.star.uno.Exception ex) {
}
}
COM: <s> write the xaccessible tree properties in file </s>
|
funcom_train/7929097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String replaceSuffix( String value, String toReplace, String changeTo ) {
String vvalue ;
// be-safe !!!
if ((value == null) ||
(toReplace == null) ||
(changeTo == null) ) {
return value ;
}
vvalue = removeSuffix(value,toReplace) ;
if (value.equals(vvalue)) {
return value ;
} else {
return vvalue + changeTo ;
}
}
COM: <s> replace a string suffix by another </s>
|
funcom_train/1265159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateBPELVariableName_Pattern(String bpelVariableName, DiagnosticChain diagnostics, Map<Object, Object> context) {
return validatePattern(ExecutablePackage.eINSTANCE.getBPELVariableName(), bpelVariableName, BPEL_VARIABLE_NAME__PATTERN__VALUES, diagnostics, context);
}
COM: <s> validates the pattern constraint of em bpel variable name em </s>
|
funcom_train/12179470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInvokeWithNumericPredicateDefaUlt() throws Exception {
// parse the expression
Expression expression = parser.parse(getFunctionQName() +
"('name', 'default')[1]");
addSingleValueExpectations("name", null);
// evaluate the expression
Value result = expression.evaluate(expressionContext);
// ensure that the correct value was returned
assertEquals("Unexpected value returned",
"default",
result.stringValue().asJavaString());
}
COM: <s> test that the function returns the default argument when a 1 predicate </s>
|
funcom_train/32762216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BPM_Element getBPM(String name) {
BPM_Element bpmElm = null;
Enumeration bpm_enum = listModel.elements();
while(bpm_enum.hasMoreElements()) {
BPM_Element bpmElm1 = (BPM_Element) bpm_enum.nextElement();
if(bpmElm1.getName().equals(name)) {
bpmElm = bpmElm1;
}
}
return bpmElm;
}
COM: <s> returns the b pm attribute of the bpms table object </s>
|
funcom_train/10016888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newXMLinputEvent(EventAbstract evt)
{
if(!isPruned(evt)){
if(evt.getEventType().equals(EventType.NS))
{
listNS.add(evt);
nameSpace = true;
}
else
{
processXMLinputEvent(evt);
}
needNewGrammar(evt);
}//if(!isPruned(evt))
}
COM: <s> received form the xml parser </s>
|
funcom_train/49630720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void waitFor() throws Exception {
final Method method = method(0);
final TypeAdapter typeAdapter = getTypeAdapter(Long.class);
final long maxTime = (Long) typeAdapter.parse(cells.more.more.text());
final long sleepTime = getSleepTime(typeAdapter);
final WaitForResult waitForResult = new WaitForResult(method, actor, maxTime);
waitForResult.setSleepTime(sleepTime);
waitForResult.repeatInvokeWithTimeout();
writeResultIntoCell(waitForResult);
}
COM: <s> waits until a method returns true </s>
|
funcom_train/26167248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCookie( String cookieName ) {
Cookie[] cookies = getRequest().getCookies();
for ( int i = 0; i < cookies.length; i++ ) {
if ( cookies[i].getName().equalsIgnoreCase( cookieName ) ) {
return ( cookies[i].getValue() );
}
}
return ( null );
}
COM: <s> gets the cookie attribute of the cookie screen object </s>
|
funcom_train/27944249 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void urlReceived( int nURLId, String strFolderPath, String strHttpAddress ) {
EMailHandler email = new EMailHandler( getUserId(), strPasswd, hProfileNotification, hEmailNotification, nURLId, strFolderPath, strHttpAddress );
System.err.println( "JMSNPlugin.urlReceived() - " + email.toString() );
}
COM: <s> notification for request service url </s>
|
funcom_train/45608815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createPrincipalWindow() {
createWindowCenter(windowPrincipal, 880, 530, constants.helpMenu());
windowPrincipal.addItem(loadManual());
configurePrincipalWindow();
windowPrincipal.addCloseClickHandler(new CloseClickHandler() {
public void onCloseClick(CloseClientEvent event) {
windowPrincipal.destroy();
}
});
canvasPrincipal.addChild(windowPrincipal);
canvasPrincipal.show();
}
COM: <s> configure the principal window by adding the help page </s>
|
funcom_train/3174029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getOptionFromUser(String msg, String[] actions) {
Action[] as = new Action[actions.length];
for (int i=0;i<as.length;i++)
as[i] = new Action2(actions[i]);
return DialogHelper.openDialog(getName(), DialogHelper.QUESTION_MESSAGE, msg, as, owner);
}
COM: <s> helper method that queries the user for yes no input </s>
|
funcom_train/51534506 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkReceivePermission() throws InterruptedIOException {
// Check for permission to receive.
if (readPermission == false) {
try {
midletSuite.checkForPermission(Permissions.MMS_RECEIVE,
"mms:receive");
readPermission = true;
} catch (InterruptedException ie) {
throw new InterruptedIOException("Interrupted while trying " +
"to ask the user permission.");
}
}
}
COM: <s> checks the internal setting of the receive permission </s>
|
funcom_train/3151861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerSwitch(Component comp, String compIdentifier, int eventId) {
if( this.eventToPanel == null)
this.eventToPanel = new HashMap();
this.eventToPanel.put( String.valueOf( eventId), compIdentifier);
this.register( eventId, this.switchProcessor);
this.add( comp, compIdentifier);
}
COM: <s> add a component to this panel with an string identifier </s>
|
funcom_train/19455027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object convertValue(Object filterableValue) {
Object result = null;
Class fromType = filterableValue.getClass();
Class toType = getValueAccessor().getReturnType();
IValueConverter converter =
getConverterRegistry().findConverter(fromType, toType);
if (converter != null) {
result = converter.convertValue(filterableValue, fromType, toType);
}
return result;
}
COM: <s> converts the object instance using this filterable property </s>
|
funcom_train/26226886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public QVar getVariable(SSAVar var) {
int index = var.getUniqueIndex();
//we also create a new variable if the type has changed
if (variables[index] == null ||
variables[index].getType() != var.getType()) {
variables[index] = new QVar(var.getColor(), var.getType());
}
return variables[index];
}
COM: <s> get the variable associated with a ssa variable after coloring </s>
|
funcom_train/17773377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkHeader(RandomAccessFile raf) throws IOException {
boolean retval = false;
if (raf.length() > TAG_SIZE) {
raf.seek(raf.length() - TAG_SIZE);
byte[] buf = new byte[3];
raf.readFully(buf);
String result = new String(buf, "ISO-8859-1");
retval = result.equals(TAG_START);
}
return retval;
}
COM: <s> checks whether a header for the id3 tag exists yet </s>
|
funcom_train/23285331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setZoneGroupTrackPosition(String groupID, String trackPosition) throws JanosWebException, NumberFormatException, IOException, UPNPResponseException {
if (groupID == null) {
missingParameterException("groupID");
}
if (trackPosition == null) {
missingParameterException("trackPosition");
}
setZoneCurrentTrackPosition(getZoneGroup(groupID).getCoordinator(), trackPosition);
}
COM: <s> make a zone group skip to a position in a song </s>
|
funcom_train/46360640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createBoard(int boardSizeX, int boardSizeY, int blockSizeX, int blockSizeY, int xLocation, int yLocation) {
playingBoard = new Board(boardSizeX,boardSizeY,blockSizeX,blockSizeY,xLocation,yLocation);
}
COM: <s> create new board for the game </s>
|
funcom_train/18657168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsValue(java.lang.Object value) {
Collection collection;
Collection values;
collection = hashtable.values();
while(collection.iterator().hasNext()){
values =(Collection)collection.iterator().next();
if(values.contains(value)){
return true;
}
}
return false;
}
COM: <s> checks if the specified object is associated by any key </s>
|
funcom_train/6489062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueChanged(TreeSelectionEvent ev) {
TreePath path = ev.getNewLeadSelectionPath();
if (path == null) return;
AdapterNode jnode = (AdapterNode)path.getLastPathComponent();
Node node = _adapter.getRankingNode(jnode);
notifyListeners(new NodeSelectionEvent(node, _uiGenerated));
}
COM: <s> tree node selection notification handler </s>
|
funcom_train/28374986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMetadataToSearchIndex(IndexedDocument indexDocument, Map<String, Object> metadataMap) {
for (String key : metadataMap.keySet()) {
Object val = metadataMap.get(key);
if (val instanceof String) {
indexDocument.add(key, (String) val);
}
// For the time being, we won't try to index non-String values :(
}
}
COM: <s> utility method for putting the standard map string object api arg </s>
|
funcom_train/3156802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setColor(Color color) {
if (!ObjectUtils.equalObjects(_color, color)) {
if (color != null) {
_color = color;
} else {
_color = _DEFAULT_COLOR;
}
fireProductNodeChanged(PROPERTY_NAME_COLOR);
setModified(true);
}
}
COM: <s> sets the color of this bitmask definition </s>
|
funcom_train/20642395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTitle(String msgId) {
ApelMsg am = getApelMsg(msgId);
if (am == null) {
return "Internal Error: Message title is not found for ID : " + msgId;
}
if (am.getTitle() == null) {
return DEFAULT_TITLE;
}
return am.getTitle();
}
COM: <s> returns title for the message id </s>
|
funcom_train/9869676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParts(Integer newVal) {
if ((newVal != null && this.parts != null && (newVal.compareTo(this.parts) == 0)) ||
(newVal == null && this.parts == null && parts_is_initialized)) {
return;
}
this.parts = newVal;
parts_is_modified = true;
parts_is_initialized = true;
}
COM: <s> setter method for parts </s>
|
funcom_train/18458921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateGUID(AnimationFrame frame) {
Long oldID = frame2guid.get(frame);
frame2guid.remove(frame);
if (oldID != null) {
guid2frame.remove(new Long(oldID));
}
frame2guid.put(frame, frame.getGuid());
guid2frame.put(frame.getGuid(), frame);
add(frame);
if (frame.getGuid() >= guid) {
guid = frame.getGuid() + 1;
}
}
COM: <s> updates a frames id </s>
|
funcom_train/51788002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDrivingPartPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Interaction_drivingPart_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Interaction_drivingPart_feature", "_UI_Interaction_type"),
RAMPackage.Literals.INTERACTION__DRIVING_PART,
true,
false,
false,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the driving part feature </s>
|
funcom_train/47747248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("InfService".equals(portName)) {
setInfServiceEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/40526619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void quoteLooseWords(AncestorChain<? extends CssTree> t) {
if (t.node instanceof CssTree.Expr) {
combineLooseWords(t.cast(CssTree.Expr.class).node);
}
for (CssTree child : t.node.children()) {
quoteLooseWords(AncestorChain.instance(t, child));
}
}
COM: <s> turn a run of unquoted identifiers into a single string where the property </s>
|
funcom_train/8520211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
GL gl = drawable.getGL();
// set projection
gl.glMatrixMode(GL.GL_PROJECTION);
gl.glLoadIdentity();
glu.gluPerspective(30., 1., 0.1, 100.);
gl.glMatrixMode(GL.GL_MODELVIEW);
}
COM: <s> called on a reshape event </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.