__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/19831425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printBaseSummary(SolutionSet base){
Iterator<Solution> itr = base.iterator();
int w = 0;
while (itr.hasNext()) {
Solution element = itr.next();
int y = 1;
w++;
String sObj = "";
for(double obj: element.getObjectives()) {
sObj = sObj + round(obj,2) + " ";
y++;
}
//logger.trace(sObj);
}
}
COM: <s> prints a summary of the solution set base </s>
|
funcom_train/24621877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addComponent( JComponent component, GridBagConstraints gbc ) {
component.setBorder( BorderFactory.createCompoundBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED), BorderFactory.createEmptyBorder(0, 4, 0, 4)) );
add(component, gbc);
}
COM: <s> adds a component to the status bar </s>
|
funcom_train/44011581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetTransStatus() {
System.out.println("setTransStatus");
String transStatus = "";
TransactionBO instance = new TransactionBO();
instance.setTransStatus(transStatus);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set trans status method of class edu </s>
|
funcom_train/19323416 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DataSource getDateSourceSchema(String type) {
DataSource datasource = null;
List dataSourceList = dataSources.getDatasources();
Iterator iter = dataSourceList.iterator();
while (iter.hasNext()) {
datasource = (DataSource) iter.next();
if (datasource.getType().equals(type)) {
return datasource;
}
}
return datasource;
}
COM: <s> get datasource schema </s>
|
funcom_train/28127574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeDayAndMonthRule(DayAndMonthRule rule, int indent) {
printIndent(indent);
stream.println("Day And Month Rule ("+rule.getDayOfMonth()+", "
+SerialDate.monthToString(rule.getMonth())+"),");
}
COM: <s> writes the specified day and month rule to the output stream </s>
|
funcom_train/12639875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(byte[] b, int off, int len) {
if (b == null) {
throw new NullPointerException();
}
if (off < 0 || len < 0 || off > b.length - len) {
throw new ArrayIndexOutOfBoundsException();
}
adler = updateBytes(adler, b, off, len);
}
COM: <s> updates checksum with specified array of bytes </s>
|
funcom_train/2893586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUTMSearchValues(float utm_northing_max, float utm_northing_min, float utm_easting_max, float utm_easting_min) {
filter.setMinUTMNorthing(utm_northing_min);
filter.setMaxUTMNorthing(utm_northing_max);
filter.setMaxUTMEasting(utm_easting_max);
filter.setMinUTMEasting(utm_easting_min);
}
COM: <s> retain the last utm search parameters </s>
|
funcom_train/50137112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Pattern fwdGet() {
if (validation != getMonitor().isValidation()) {
validation = getMonitor().isValidation();
if (validation) {
getMonitor().setPatterns(validationPatterns);
super.setActiveSynapse(validationSet);
}
else {
getMonitor().setPatterns(trainingPatterns);
super.setActiveSynapse(trainingSet);
}
}
return super.fwdGet();
}
COM: <s> connects the right input synapse depending on the </s>
|
funcom_train/14276552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getValueAsString() throws IllegalArgumentException {
if (!isOptionAsString(code)) {
throw new IllegalArgumentException("DHCP option type ("+ this.code +") is not String");
}
if (this.value == null) {
throw new IllegalStateException("value is null");
}
return DHCPPacket.bytesToString(this.value);
}
COM: <s> returns a dhcp option as string format </s>
|
funcom_train/25222181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOutputDir(String outputDir) {
String oldOutputDir = this.outputDir;
if ( !oldOutputDir.equals(outputDir) ) {
this.outputDir = outputDir;
firePropertyChange(PROP_OUTPUTDIR, oldOutputDir, this.outputDir);
setRunPrepared(false);
}
}
COM: <s> set the value of output dir </s>
|
funcom_train/37518846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getSize() {
int size = 2 + 4 + 1;
for (int i = 0; i < annotations.length; i++) {
size += 2; // u2 num_annotations
for (int j = 0; j < annotations[i].size(); j++) {
size += ((Annotation) annotations[i].get(j)).getSize();
}
}
return size;
}
COM: <s> return the space in bytes used by this attribute in the classfile </s>
|
funcom_train/35682116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LegStarRequest createLsfileaeRequest() throws HostAccessStrategyException {
try {
LegStarAddress address = new LegStarAddress("TheMainframe");
LegStarRequest request = new LegStarRequest("Lsfileae100", address, getLsfileaeRequestMessage());
return request;
} catch (HeaderPartException e) {
throw new HostAccessStrategyException(e);
}
}
COM: <s> create a request to execute lsfileae </s>
|
funcom_train/25217521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTarget(File targetDir) {
if (targetDir == null) {
throw new IllegalArgumentException("Missing target directory");
}
target = targetDir;
for (TreeBuilder base : bases) {
base.setTarget(targetDir);
}
for (SiteMapBuilder map : siteMapList) {
map.setTarget(targetDir);
}
}
COM: <s> setter for the target dir </s>
|
funcom_train/31826063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getAdvanceWidth(char ch) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (OS.IsWinCE) {
SIZE size = new SIZE();
OS.GetTextExtentPoint32W(handle, new char[]{ch}, 1, size);
return size.cx;
}
int tch = ch;
if (ch > 0x7F) {
TCHAR buffer = new TCHAR(getCodePage(), ch, false);
tch = buffer.tcharAt(0);
}
int[] width = new int[1];
OS.GetCharWidth(handle, tch, tch, width);
return width[0];
}
COM: <s> returns the em advance width em of the specified character in </s>
|
funcom_train/19455529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newListing() {
/* Perform the newEntry method. */
Listing aListing = new Listing();
ListingEntry anEntry = null;
if (getEmployeeListingSelected())
{ anEntry = new ListingEmployee();
// anEntry.setEmployee( new Employee());
}
else {
anEntry = new ListingDepartment();
//anEntry.setDepartment( new Employee());
}
aListing.setListingEntry(anEntry);
setSelectedListing( aListing );
getListings().addElement(aListing);
return;
}
COM: <s> perform the new entry method </s>
|
funcom_train/41163816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(CoMatrixQuestion entity) {
EntityManagerHelper.log("saving CoMatrixQuestion instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved co matrix question entity </s>
|
funcom_train/22345271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean createFactory() {
try {
// new client factory
client = new TyDemoClientSocketFactory();
// new server factory
server = new TyDemoServerSocketFactory();
} // end-try
catch (Exception e) {
// say what
msgOut(TyMsg.getMsg(90) + e. toString(), 10);
// get out
return false;
} // end-catch
// good
return true;
} // end-method
COM: <s> create the client and server socket factories </s>
|
funcom_train/31935543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireCancelPerformed(boolean result) {
Object [] array = _listeners.getListeners();
for (int nX = 0; nX < array.length; nX ++) {
IWizardListener listener = (IWizardListener)array[nX];
try {
listener.onPerformCancel(this, result);
}
catch (Throwable t) {
PLUGIN.logError(t);
}
}
}
COM: <s> fires a on perform cancel event to all listeners </s>
|
funcom_train/8528405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void outputResult() throws TransformerException, IOException {
long millis = 0;
int i = 0;
int size = smilTrees.size();
for (; i < size; i++) {
Document doc = smilTrees.get(i);
File file = smilFiles.get(i);
millis = finishSmil(millis, doc);
outputDocument(doc, file);
this.mProgressObserver.reportProgress(1 - domFinalizeTimeProportion * ((size - (i+1)) / size));
}
}
COM: <s> prints the generated smil files to disk </s>
|
funcom_train/28367811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addToSequence(final boolean isSuccess) {
final int theStart = (world.getTime() - duration)
/ world.getVar("time_step").asInt();
final int theDuration = duration / world.getVar("time_step").asInt();
mActivitySequence.add(new TaskActivity(theStart, theDuration, isSuccess));
}
COM: <s> gets the priority </s>
|
funcom_train/9989727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPrefilterOp (String op ) {
if( op.equals("lt") ) return "<";
if( op.equals("gt") ) return ">";
if( op.equals("eq") ) return "=";
if( op.equals("ne") ) return "!=";
return "";
}
COM: <s> this function converts the prefilter op to its sql equivilent </s>
|
funcom_train/46167113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(String filename) throws IOException {
ProductGroup curPg;
DataOutputStream out = new DataOutputStream(new BufferedOutputStream(
new FileOutputStream(filename)));
Iterator<ProductGroup> pgIt = getPgIterator();
while (pgIt.hasNext()) {
curPg = pgIt.next();
Iterator<Product> pIt = curPg.getProductIterator();
while (pIt.hasNext()) {
out.writeUTF(curPg.save() + "\\" + pIt.next().save());
}
}
out.close();
}
COM: <s> saves the complete warehouse into one file </s>
|
funcom_train/42429288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintNormal(Graphics g) {
g.setColor(color);
for (int i = 0; i < thickness; i++)
g.drawRect(x+i, y+i, width-(i*2)-1, height-(i*2)-1);
}
COM: <s> paints the rect object with the given color </s>
|
funcom_train/18722031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPhrases() {
Iterator<BaseCluster> clusterIterator = baseClusters.iterator();
StringBuilder overallPhrase = new StringBuilder(256);
while (clusterIterator.hasNext()) {
BaseCluster b = clusterIterator.next();
overallPhrase.append(b.getPhrase());
if (clusterIterator.hasNext()) overallPhrase.append(", ");
}
return overallPhrase.toString();
}
COM: <s> returns all phrases of alle base clusters </s>
|
funcom_train/11013683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public short getSignature() {
switch (getRecordId()) {
case RECORD_ID_EMF: return SIGNATURE_EMF;
case RECORD_ID_WMF: return SIGNATURE_WMF;
case RECORD_ID_PICT: return SIGNATURE_PICT;
}
log.log(POILogger.WARN, "Unknown metafile: " + getRecordId());
return 0;
}
COM: <s> return the blip signature </s>
|
funcom_train/3378662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(BigInt other) {
if (this == other)
return true;
byte[] otherPlaces = other.toByteArray();
if (places.length != otherPlaces.length)
return false;
for (int i = 0; i < places.length; i++)
if (places[i] != otherPlaces[i])
return false;
return true;
}
COM: <s> returns true iff the parameter is numerically equivalent </s>
|
funcom_train/46311100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String replaceHostnameWildcardWithPublicHostnameInUrl(String url) {
try {
URL asURL = new URL(url);
if (asURL.getHost().equals("*")) {
InetAddress address = Inet4Address.getLocalHost();
String hostname = address.getHostName();
return url.replace("*", hostname);
}
} catch (UnknownHostException e) {
} catch (MalformedURLException e) {
}
return url;
}
COM: <s> if the user has specified a wildcard in their </s>
|
funcom_train/3423531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private XMLAttributes createAttributes(Attributes att) {
xa.removeAllAttributes();
int len = att.getLength();
for (int i = 0; i < len; i++)
xa.addAttribute(
createQName(att.getURI(i), att.getLocalName(i), att.getQName(i)),
att.getType(i),
att.getValue(i));
return xa;
}
COM: <s> creates an xmlattributes object </s>
|
funcom_train/50503627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load() {
// to do taBox.setTransactionType(desc.getTransactionRequirement());
setEnabled(desc.isEnabled());
if(securityIdEditor != null) {
securityIdEditor.load();
}
if(permissionsEditor != null) {
permissionsEditor.load();
}
enabledBox.setSelected(desc.isEnabled());
setEnabled(desc.isEnabled());
}
COM: <s> loads the values from the deployment descriptor into the gui </s>
|
funcom_train/1797592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setKind(String kind) {
// check if setting to existing value
if (this.kind == null ? kind != null : !this.kind.equals(kind)) {
// set to new value for customer parameter
this.kind = kind;
setStringCustomParameter("kind", kind);
}
}
COM: <s> sets the content of a the given kind s </s>
|
funcom_train/50774193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMessage(String message, boolean enableScrolling) {
if (enableScrolling && message != null) {
messageArea.setText(message);
}
else {
if (message != null)
messageField.setText(message);
panel.remove(scrollPane);
panel.add(messageField, BorderLayout.CENTER);
}
autoSize(message);
}
COM: <s> sets the message in the message text field </s>
|
funcom_train/9492078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void declareRule(int aPrecedence, ConsPointer aBody) throws Exception {
// New branching rule.
RuleBranch newRule = new TruePredicateRuleBranch(aPrecedence, aBody);
LispError.check(newRule != null, LispError.CREATING_RULE);
insertRule(aPrecedence, newRule);
}
COM: <s> add a true predicate rule branch to the list of rules </s>
|
funcom_train/25797004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendNotification(String title, String message) throws IOException {
final InetAddress addr = mHostAddress;
if (addr != null) {
PacketNOTIFICATION p;
if (mHasIcon)
p = new PacketNOTIFICATION(title, message, mIconType, mIconData);
else
p = new PacketNOTIFICATION(title, message);
p.send(addr, mHostPort);
}
}
COM: <s> displays a notification window in xbmc </s>
|
funcom_train/10383684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeLocalEjb(String name) {
entries.remove(name);
ContextLocalEjb localEjb = null;
synchronized (localEjbs) {
localEjb = localEjbs.remove(name);
}
if (localEjb != null) {
support.firePropertyChange("localEjb", localEjb, null);
localEjb.setNamingResources(null);
}
}
COM: <s> remove any local ejb resource reference with the specified name </s>
|
funcom_train/51186348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addComplexType(final String key, final Object value) {
final XmlBuildHandler handler = (XmlBuildHandler)conversionHandlerMap.get(value
.getClass());
/**
* Lets handle arbitrary nesting of complexTypes
*/
if (!prefixStack.isEmpty()) {
prefixStack.push(prefixStack.peek() + key + "/");
} else {
prefixStack.push(key + "/");
}
handler.add(this, value);
prefixStack.pop();
}
COM: <s> adds a complex object that has a registered handler </s>
|
funcom_train/31751908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void performSearch() {
final SearchFilterProvider filterProvider = ((FilterProviderTab) filterProviderFolder.getSelection()[0].getData()).getFilterProvider();
Job job = new Job(Messages.getString("org.nightlabs.jfire.base.ui.prop.PropertySetSearchComposite.searchJob.name")) { //$NON-NLS-1$
@Override
protected IStatus run(ProgressMonitor monitor) throws Exception {
resultFetcher.searchTriggered(filterProvider);
return Status.OK_STATUS;
}
};
job.schedule();
}
COM: <s> performs a search with the current filter provider </s>
|
funcom_train/51167475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateAutoSize(CellView view) {
if (view != null && GraphConstants.isAutoSize(view.getAttributes())) {
Rectangle bounds = GraphConstants.getBounds(view.getAttributes());
if (bounds != null) {
Dimension d = getUI().getPreferredSize(this, view);
bounds.setSize(d);
}
}
}
COM: <s> computes and updates the size for code view code </s>
|
funcom_train/2290826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNotificationProject(String notificationProject) {
m_notificationProject = notificationProject;
if (CmsLog.INIT.isInfoEnabled()) {
CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_NOTIFICATION_PROJECT_1, m_notificationProject));
}
}
COM: <s> sets the project in which timestamps for the content notification are read </s>
|
funcom_train/2800974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAtomic(Class pClass) {
boolean atomic = false;
int pos = 0;
while ((pos < ATOMIC_CLASSES.length) && (!atomic)) {
if (ATOMIC_CLASSES[pos].isAssignableFrom(pClass)) {
atomic = true;
} else {
pos++;
}
}
return atomic;
}
COM: <s> checks if this provided class is an atomic element </s>
|
funcom_train/975864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateCandidates() {
if (!mCompletionOn) {
if (mComposing.length() > 0) {
ArrayList<String> list = new ArrayList<String>();
list.add(mComposing.toString());
setSuggestions(list, true, true);
} else {
setSuggestions(null, false, false);
}
}
}
COM: <s> update the list of available candidates from the current composing text </s>
|
funcom_train/1028899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void warmUp() throws Exception {
try {
System.out.print("Warm-up period (10 iterations)");
for (int i = 0; i < 10; i++) {
doOneIteration();
System.out.print(".");
}
System.out.println();
System.out.println("Warm-up period ends");
System.out.println("\nUnits for this test are transactions/sec.");
} catch (Exception ex) {
ex.printStackTrace();
throw ex;
}
}
COM: <s> runs the test 10 times to get jit going and gc going </s>
|
funcom_train/9428640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateAuthDescriptions() {
mAuthDescs = AccountManager.get(this).getAuthenticatorTypes();
for (int i = 0; i < mAuthDescs.length; i++) {
mTypeToAuthDescription.put(mAuthDescs[i].type, mAuthDescs[i]);
}
onAuthDescriptionsUpdated();
}
COM: <s> updates provider icons </s>
|
funcom_train/44715363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Locale getLocale() {
String language = m_doc.get(Document.LANGUAGE);
String country = m_doc.get(Document.COUNTRY);
if ("".equals(language) && "".equals(country)) {
return null;
} else {
return new Locale(language, country);
}
}
COM: <s> returns the locale the content is in </s>
|
funcom_train/38937102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List getNonIntersect8RegionList(int r1, int c1, int r2, int c2) {
StyleRegion A = new StyleRegion(style, this.startRow, this.startColumn,
r1-1, this.endColumn);
ArrayList result = new ArrayList();
result.add(A);
return result;
}
COM: <s> returns non intersecting regions for case 8 </s>
|
funcom_train/21465294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getSimilarity(Actuator otherActuator) {
double similarity = 0.0;
//see if actuators perform the same number of actions
if(this.getNumberOfActions().equals(otherActuator.getNumberOfActions())){
for(Action myAction : this.actionSet){
for(Action otherAction : otherActuator.getActionSet()){
if(myAction.isSimilar(otherAction)){
similarity += 1.0;
}
}
}
}
return similarity == 0.0 ? 0.0 : (similarity / new Double(getNumberOfActions()));
}
COM: <s> gets a similarity measurement between actuators </s>
|
funcom_train/41524949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Study findOrCreateStudy(PatientInfo info, Patient patient){
Study result = null;
boolean saveStudy = false;
if(info != null){
//Search or create Study
result = studyDao.findStudyInPatient(patient.getCode(), info.getStudy());
if(result == null){
saveStudy = true;
result = new Study();
result.setDate(new Date());
result.setHospitalId(info.getStudy());
patient.addStudy(result);
}
//Persist new Patient and/or study only if necessary
if(saveStudy)
studyDao.persist(result);
}
return result;
}
COM: <s> it search study using infos identifiers if study doesnt </s>
|
funcom_train/17631678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean deleteDocument(Document d) {
CouchResponse resp = session.delete(name+"/"+d.getId() + "?rev=" + d.getRev());
if(resp.isOk()) {
return true;
} else {
log.warn("Error deleting document - "+resp.getErrorId()+" "+resp.getErrorReason());
return false;
}
}
COM: <s> deletes a document </s>
|
funcom_train/10911788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FontCache getFontCache() {
if (fontCache == null) {
if (useCache) {
if (cacheFile != null) {
fontCache = FontCache.loadFrom(cacheFile);
} else {
fontCache = FontCache.load();
}
if (fontCache == null) {
fontCache = new FontCache();
}
}
}
return fontCache;
}
COM: <s> returns the font cache instance used by this font manager </s>
|
funcom_train/21975093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copyProperties(EdaPart part) {
setSourceDocument(part.getSourceDocument());
setSubSchematic(part.getSubSchematic());//this may need to be a copy of the subschematic
getAttributeList().copyProperties(part.getAttributeList());
setPartList(part.getPartList());
for(int i = 0; i < part.getSymbolCount(); i++) {
EdaSymbol sym = new EdaSymbol();
sym.copyProperties(part.getSymbol(i));
addSymbol(sym);
}
}
COM: <s> copies the fields of the specified eda part to this one </s>
|
funcom_train/4787409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void locateField(FieldDesc f, int from) {
while ( inputMask.charAt(from) != f.index ) {
from++;
}
f.pos = from;
int l = from + 1;
while ( l < inputMask.length() && inputMask.charAt(l) == f.index ) {
l++;
}
f.curLen = l - from;
}
COM: <s> searches the current start position and length of a given field starting </s>
|
funcom_train/31980921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dumpDatabase() {
try {
System.out.println("Dumping database:");
Collection root = DatabaseManager.getCollection(dbAdapter
.getDatabaseRootUrl(), "admin", null);
Util.displayCollection(root, System.out, 0, serializer);
} catch (XMLDBException e) {
e.printStackTrace();
}
}
COM: <s> displays the database contents </s>
|
funcom_train/18729787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addAll(Collection<? extends Geometric> objects) {
boolean touched = false;
for (Geometric current : objects) {
if (mark.add((Geometric)current)) {
selection.add((Geometric)current);
touched = true;
}
}
if (touched) {
changed();
if (VERIFY) {
verify();
}
return true;
} else {
return false;
}
}
COM: <s> add all elements from collection </s>
|
funcom_train/28347342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dumpConfig( XmlDataAdaptor da ) {
XmlDataAdaptor paramsDA = da.createChild( "PARAMS" );
paramsDA.setValue( "startInd", (int) sampleStart_Text.getValue() );
paramsDA.setValue( "stopInd", (int) sampleStop_Text.getValue() );
paramsDA.setValue( "useLimits", use_Button.isSelected() );
}
COM: <s> dumps information about the configuration of the values graph panel </s>
|
funcom_train/19878807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Mps parse(final String filePath) throws IOException {
Mps resultMps = null;
this.inputStream = new MpsInputStream(new FileInputStream(new File(
filePath)));
resultMps = new MpsImpl();
this.LOG.info(" START PARSING FILE: " + filePath + "\n");
State newState = this.startState.nextState(this.inputStream, resultMps);
while (newState != null) {
newState = newState.nextState(this.inputStream, resultMps);
}
return resultMps;
}
COM: <s> parses an mps file </s>
|
funcom_train/21022227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getUser() {
String user = null;
if (!dataTable.getSelectedRows().isEmpty()) {
int selectedRow = ((Integer) dataTable.getSelectedRows().iterator().next()).intValue();
if (dataTable.isRowSelected(selectedRow)) {
user = dataTable.getHTML(((Integer) dataTable.getSelectedRows().iterator().next()).intValue(),0);
}
}
return user;
}
COM: <s> gets the user </s>
|
funcom_train/31936671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setActionHandler(IAction handler) {
// Run the default behavior.
super.setActionHandler(handler);
// Now update the label and tooltip.
if (handler == null) {
super.setText(defaultText);
super.setToolTipText(defaultToolTipText);
} else {
super.setText(handler.getText());
super.setToolTipText(handler.getToolTipText());
}
}
COM: <s> set the action handler </s>
|
funcom_train/40726555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream fetchQuery(String query) throws IOException {
try {
URL url = new URL(query);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.connect();
int responseCode = connection.getResponseCode();
if (responseCode != HttpURLConnection.HTTP_OK) {
throw new IOException("Could not connect: " + responseCode + " : " + connection.getResponseMessage());
};
return connection.getInputStream();
} catch (MalformedURLException e) {
throw new RuntimeException("MalformedUrl", e);
}
}
COM: <s> fetches a query using java </s>
|
funcom_train/9237438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean handleSend() {
try {
final byte[] data = new byte[blockSize];
int bytesRead = fileIn.read(data);
readSize = readSize + bytesRead;
if (bytesRead > 0) {
out.write(data, 0, bytesRead);
out.flush();
if (!turbo) {
while (bytesRead > 0) {
bytesRead = bytesRead - in.readInt();
}
}
if (readSize == size) {
fileIn.close();
return false;
} else {
return true;
}
} else if (bytesRead < 0) {
fileIn.close();
return false;
}
} catch (IOException e) {
return false;
}
return false;
}
COM: <s> handle the socket as a send </s>
|
funcom_train/21606870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object doConvertTextValue(Object oldValue, String newTextValue, PropertyEditor editor) {
try {
editor.setValue(oldValue);
}
catch (Exception ex) {
if (logger.isDebugEnabled()) {
logger.debug("PropertyEditor [" + editor.getClass().getName() + "] does not support setValue call", ex);
}
// Swallow and proceed.
}
editor.setAsText(newTextValue);
return editor.getValue();
}
COM: <s> convert the given text value using the given property editor </s>
|
funcom_train/3382251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return getClass().getName() + "[hgap=" + hgap + ",vgap=" + vgap +
",rows=" + rows + ",cols=" + cols +
",rowFracs=" +
fracsToString(rowFractions) +
",colFracs=" +
fracsToString(colFractions) + "]";
}
COM: <s> returns the string representation of this variable grid layouts values </s>
|
funcom_train/13720133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setChannel1Exponentiation(Exponentiation mode) throws InterruptedException, IOException {
isActive(true);
try{
// Establish baseline
int val = MathUtilities
.hex2int(getSetting(Exponentiation.CH1COMMANDCODE));
logger.finest("Old setting: " + val);
setSetting(Exponentiation.CH1COMMANDCODE, (val & ~Exponentiation.MASK)
| mode.getCode());
}catch(InterruptedException e){
logger.log(Level.SEVERE, "Unable to setChannel1Exponentiation", e);
throw e;
}catch(IOException e){
logger.log(Level.SEVERE, "Unable to setChannel1Exponentiation", e);
throw e;
}
}
COM: <s> this command allows the changing of the channel 1 exponentiation on the </s>
|
funcom_train/29038401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clearResourceSet(Resource... resource) {
for (int i = 0; i < resource.length; i++) {
if (resource[i] == null)
continue;
final ResourceSet resourceSet = resource[i].getResourceSet();
final Iterator<Resource> resourcesIterator = resourceSet.getResources().iterator();
while (resourcesIterator.hasNext()) {
resourcesIterator.next().unload();
}
resourceSet.getResources().clear();
}
}
COM: <s> this will empty the resource set of the given tt resource tt </s>
|
funcom_train/37515225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void abstractRepBuilder(StringBuffer accum) {
accum.append("[CUn");
if (packageClause != null) {
packageClause.abstractRepBuilder(accum);
}
for (int i = 0; i < imports.length; i++) {
imports[i].abstractRepBuilder(accum);
}
for (int i = 0; i < types.length; i++) {
types[i].abstractRepBuilder(accum);
}
accum.append(']');
}
COM: <s> appends an abstract representation of this node onto the given </s>
|
funcom_train/8091742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRemovedPercentage( int removedPercentage ) throws IllegalArgumentException {
if( removedPercentage < 0 )
throw new IllegalArgumentException( "RemovedPercentage has to be >=0." );
if( removedPercentage >= 100 )
throw new IllegalArgumentException( "RemovedPercentage has to be <100." );
m_RemovedPercentage = removedPercentage;
}
COM: <s> sets the percentage of instance to be removed </s>
|
funcom_train/42181532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open() {
((HomePane)getView()).invokeLater(new Runnable() {
public void run() {
final String homeName = ((HomePane)getView()).showOpenDialog();
if (homeName != null) {
open(homeName);
}
}
});
}
COM: <s> opens a home </s>
|
funcom_train/50141851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndSeparator(String endSeparator) {
if (endSeparator == null) {
throw new IllegalArgumentException("EndSeparatorFlag can not be null.");
}
if (endSeparator.length() == 0) {
throw new IllegalArgumentException("EndSeparatorFlag must al least have 1 char length.");
}
this.endSeparator = endSeparator;
}
COM: <s> set the seperator string denoting the end of a variable </s>
|
funcom_train/38782360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean shutdown() {
boolean result = false;
em.close();
emf.close();
try {
c.close();
result = true;
} catch (SQLException ex) {
Logger.getLogger(DatabaseConnection.class.getName()).log(Level.SEVERE, null, ex);
}
return result;
}
COM: <s> called to close the database properly </s>
|
funcom_train/31545055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void revertState() {
if (LOG.isDebugEnabled()) {
LOG.debug("STATE CHANGE: " + states[nCurrentState] + " to " + states[nLastState] + " (REVERT)");
}
nCurrentState = nLastState;
currentState = states[nCurrentState];
}
COM: <s> reverts the state to the previous state </s>
|
funcom_train/4102395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals( Object o ) {
if ( this == o ) {
return true;
}
if ( o == null || getClass() != o.getClass() ) {
return false;
}
final ValidatorTableRow row = ( ValidatorTableRow ) o;
if ( !file.equals( row.file ) ) {
return false;
}
return true;
}
COM: <s> equals only involved the file never null </s>
|
funcom_train/29784918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printPath(Vertex dest) {
if (dest.getPrevious() != null) {
printPath(dest.getPrevious());
PATH += ",";
//InstantBach.systemArea.append(" to ");
}
PATH += dest.getName();
//InstantBach.systemArea.append(dest.name);
}
COM: <s> only called with the path is known to exist after the unweighted </s>
|
funcom_train/1005582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(double newx, double newy) {
double x1 = Math.min(getMinX(), newx);
double x2 = Math.max(getMaxX(), newx);
double y1 = Math.min(getMinY(), newy);
double y2 = Math.max(getMaxY(), newy);
setRect(x1, y1, x2 - x1, y2 - y1);
}
COM: <s> adds a point specified by the double precision arguments </s>
|
funcom_train/28120051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleText(char[] data, int pos) {
if (getHeadline) {
SyndEntry entry = new SyndEntryImpl();
entry.setLink(String.format("%s/%s",GLOBOVISION_URL, attribute.getAttribute(HTML.Attribute.HREF).toString()));
entry.setPublishedDate(new Date());
entry.setTitle(new String(data));
entries.add(entry);
getHeadline = false;
attribute = null;
}
}
COM: <s> get the headline and also write the rss entry </s>
|
funcom_train/19209414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void postInitGUI() {
System.out.println( "Before" );
String[] readFormats = ImageIO.getReaderMIMETypes();
String[] writeFormats = ImageIO.getWriterMIMETypes();
System.out.println( "Readers: " + Arrays.asList( readFormats ) );
System.out.println( "Writers: " + Arrays.asList( writeFormats ) );
System.out.println( "After" );
}
COM: <s> add your post init code in here </s>
|
funcom_train/32600939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startTimer(int delay) {
// create a new Timertask that calls timerTick() when the timer elapses
timerTask = new TimerTask() {
public void run() {
timerTick();
}
};
// schedule the timer to elapse of delay seconds (given in milliseconds)
timer.schedule( timerTask,delay * 1000);
}
COM: <s> start a new timer to elapse after the specified delay </s>
|
funcom_train/3118175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMemberView(final InteractionElementView memberView) {
memberViews.add(memberView);
memberView.addPropertyChangeListener(PROPERTY_PARENT, parentHandler);
memberView.addPropertyChangeListener(
PNode.PROPERTY_BOUNDS,
boundsTransformHandler);
memberView.addPropertyChangeListener(
PNode.PROPERTY_TRANSFORM,
boundsTransformHandler);
startListeningToAncestors(memberView);
}
COM: <s> adds the specified view as a member of this pattern instance view </s>
|
funcom_train/24137172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Long findAvailableRecordNumber() {
Long availableRecordNumber = Long.valueOf(-1);
for (final Long recNo : table.keySet()) {
if (!table.get(recNo).hasData()) {
availableRecordNumber = recNo;
break;
}
}
if (availableRecordNumber.longValue() < 0) {
availableRecordNumber = Long.valueOf(table.size());
}
return availableRecordNumber;
}
COM: <s> finds an available free record number </s>
|
funcom_train/33626703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createFieldEditors() {
addField(new DirectoryFieldEditor(PreferenceConstants.FOLDER_NAME,
"&Barrio directory", getFieldEditorParent()));
addField(new RadioGroupFieldEditor(PreferenceConstants.P_CHOICE,
"Graph clustering analysis:", 2,
new String[][] {{"&Directed","directed"},{"&Undirected","undirected"}},
getFieldEditorParent()));
}
COM: <s> creates the field editors </s>
|
funcom_train/27761550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getPropertyValue(String propertyName, Object bean) throws BeanException {
// Since the work of finding the indices will happen as this method recurses
// we are going to do it up front and call the other methods below.
JavaBeanTools.IndexHelper ih = JavaBeanTools.removeIndices(propertyName);
return getPropertyValue(ih.propertyName, bean, ih.indices);
}
COM: <s> retrieves the local or nested bean property using the property name the </s>
|
funcom_train/2371255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean selectInterface(NetworkInterface nic, int addressType) {
Enumeration<InetAddress> addrEnum = nic.getInetAddresses();
listenAddress = null;
while (addrEnum.hasMoreElements() && listenAddress == null) {
InetAddress next = addrEnum.nextElement();
switch (addressType) {
case ADDR_TYPE_INET4:
if (next instanceof Inet4Address) {
listenAddress = next;
}
break;
case ADDR_TYPE_INET6:
if (next instanceof Inet6Address) {
listenAddress = next;
}
break;
}
}
return listenAddress != null;
}
COM: <s> select the network interface to start the server on </s>
|
funcom_train/7222139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void aboutMIActionPerformed(ActionEvent e) {
AboutFrame af = (AboutFrame) org.jangband.Jangband.pico.getComponentInstance(
org.jangband.gui.AboutFrame.class
);
//new game and open game buttons should not appear when used as about window
af.getNewGameButton().setVisible(false);
af.getOpenGameButton().setVisible(false);
af.setVisible(true);
af.requestFocus();
}
COM: <s> opens the splash screen which doubles as the about screen </s>
|
funcom_train/38492255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void enableButtons() {
streetButton.setEnabled(info.canBuy(Construction.STREET));
cityButton.setEnabled(info.canBuy(Construction.CITY));
villageButton.setEnabled(info.canBuy(Construction.VILLAGE));
develButton.setEnabled(info.canBuy(Construction.DEVELOPMENT));
}
COM: <s> enables all the buttons construction is allowed when user presses one </s>
|
funcom_train/10257966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void exportDocument(FileExporter exporter) {
if (getCurrentDocument() == null) return;
setStatus(I18n.tr("application.exporting") + I18n.tr("general.threedots"));
setBusy(true);
try {
fileIOManager.export(getCurrentDocument().getData(), exporter);
} catch (FileIOException e) {
mainWindow.showMessage(MainWindow.ERROR, mainWindow,
e.getLocalizedMessage());
}
setStatus(I18n.tr("application.ready"));
setBusy(false);
}
COM: <s> tries to export the current document </s>
|
funcom_train/29667932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void findBooklistStart(BufferedReader in) throws IOException {
String line;
// Skip through the booklist until we reach the beginning indicator
boolean found = false;
while (!found) {
line = in.readLine();
if (line == null)
throw new IOException("Listing Begin marker not found.");
if (line.indexOf(BooklistConverter.LISTING_MARKER) > 0)
found = true;
}
}
COM: <s> sets the input stream where the listings begin in the booklist </s>
|
funcom_train/21846083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void uninstallUI(JComponent c) {
component.removePropertyChangeListener(this);
component.getDocument().removeDocumentListener(this);
rootView.setView(null); // sets inner view of root view to null
component.removeAll();
component.setKeymap(null);
component.setCaret(null);
getEditorUI().uninstallUI(component);
Registry.removeComponent(component);
// Clear the editorUI so it will be recreated according to the kit
// of the component for which the installUI() is called
editorUI = null;
component = null;
}
COM: <s> deinstalls the ui for a component </s>
|
funcom_train/23854889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void makeColumnSticky() {
if(floatingTable.getColumnCount() > 1) {
TableColumn column = floatingTable.getColumn( floatingTable.getColumnName(0) );
if(column.getWidth() < getViewport().getWidth()) {
floatingTable.removeColumn(column);
stickyTable.addColumn(column);
saveTableState();
}
}
}
COM: <s> makes the first floating column in the table sticky </s>
|
funcom_train/3840404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isYAligned() {
boolean yalign = true;
int i, j;
Move m;
m = this.getMove(0);
j = m.getXi();
for (i = 1; i < this.size(); i++) {
m = this.getMove(i);
if (m.getXi() != j) {
yalign = false;
}
}
return yalign;
}
COM: <s> checks if moves are vertically aligned </s>
|
funcom_train/24472431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ComponentPort getOutputPort(int index) {
List<? extends ComponentPort> outs = getOutputPorts();
if (index >= outs.size()) {
throw new IllegalArgumentException("index, " + index
+ ", must be less than " + outs.size() + ".");
}
return outs.get(index);
}
COM: <s> returns the indexth output component port </s>
|
funcom_train/4949078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Map portToBusValues(Map portMap){
final Map busValues = new HashMap();
for (Iterator iter = portMap.keySet().iterator(); iter.hasNext();){
final Port port = (Port)iter.next();
final Bus inputBus = (Bus)inputMap.get(port);
busValues.put(inputBus, portMap.get(port));
}
return busValues;
}
COM: <s> get a map of input bus value of bus pairs from </s>
|
funcom_train/46015259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connectToBank(String bankName) {
//Try to connect to bank
this.bankname = bankName;
try {
bankobj = (Bank) java.rmi.Naming.lookup(bankName);
} catch (Exception e) {
System.out.println("Could not find bank: " + bankName);
System.exit(0);
}
System.out.println("Connected to bank: " + bankName);
}
COM: <s> connect to the bank </s>
|
funcom_train/32092543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setString_data(String s) {
int len = s.length();
int i;
for (i = 0; i < len; i++) {
setElement_data(i, (short)s.charAt(i));
}
setElement_data(i, (short)0); //null terminate
}
COM: <s> fill in the array data with a string </s>
|
funcom_train/27749756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processWindowEvent(WindowEvent e) {
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
questionID = 1;
showQuestionDialog("Do you want to exit the application?", "");
GeneratorGUI.this.repaint();
}
if(questionID != 1)
super.processWindowEvent(e);
}
COM: <s> overridden so we can exit when window is closed </s>
|
funcom_train/5009387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
//return "{"+((val==null)?"<null>;":("levels="+val.size()+";"))+((id==null)?"<null>":("cases="+id.size()))+"}";
StringBuffer sb=new StringBuffer("{levels=(");
if (val==null)
sb.append("null");
else
for (int i=0;i<val.size();i++) {
sb.append((i>0)?",\"":"\"");
sb.append((String)val.elementAt(i));
sb.append("\"");
};
sb.append("),ids=(");
if (id==null)
sb.append("null");
else
for (int i=0;i<id.size();i++) {
if (i>0) sb.append(",");
sb.append((Integer)id.elementAt(i));
};
sb.append(")}");
return sb.toString();
}
COM: <s> displayable representation of the factor variable </s>
|
funcom_train/29829494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void discoverInfoFor(DiscoItem di) {
if (di == null) return;
String jidStr = di.getAttribute("jid");
String nodeStr = di.getAttribute("node");
progressInfo.setText("Sending request...");
discoverInfoFor(jidStr, nodeStr);
}
COM: <s> sends request for disco info for given item </s>
|
funcom_train/44715984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PortletCollection getPortletsForCell(int cellNumber) {
DataAssociation portlets = getPortletsAssociation();
DataAssociationCursor portletsCursor
= portlets.getDataAssociationCursor();
portletsCursor.addEqualsFilter("cellNumber", new Integer(cellNumber));
portletsCursor.addOrder("sortKey");
return new PortletCollection(portletsCursor);
}
COM: <s> return all of this portals portlets for the given cell </s>
|
funcom_train/12119744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connEtoC87(java.awt.event.ActionEvent arg1) {
try {
// user code begin {1}
// user code end
this.stampaJMenuItem_ActionPerformed(arg1);
// user code begin {2}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {3}
// user code end
handleException(ivjExc);
}
}
COM: <s> conn eto c81 stampa jtool bar button </s>
|
funcom_train/7673489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TypeList toRopCatchList() {
int sz = size();
if (sz == 0) {
return StdTypeList.EMPTY;
}
StdTypeList result = new StdTypeList(sz);
for (int i = 0; i < sz; i++) {
result.set(i, get(i).getExceptionClass().getClassType());
}
result.setImmutable();
return result;
}
COM: <s> returns a rop style catches list equivalent to this one </s>
|
funcom_train/39380437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Control add(Control control) {
super.add(control);
String controlName = control.getName();
if (controlName != null) {
// If controls name is set, add control to the model
addModel(controlName, control);
}
if (control instanceof Panel) {
getPanels().add(control);
}
return control;
}
COM: <s> add the control to the panel and return the specified control </s>
|
funcom_train/44706098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeAuthoringKit(PageState state) {
Assert.assertTrue(m_types.isSelected(state));
BigDecimal typeId = new BigDecimal(m_types.getSelectedKey(state).toString());
ContentType type = new ContentType(typeId);
AuthoringKit kit = type.getAuthoringKit();
// kit is null if an authoring kit does not exist for this content type,
m_authoringKit.set(state, kit);
}
COM: <s> sets the m authoring kit request local variable </s>
|
funcom_train/37775948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
Option anotherOption = (Option) obj;
if (anotherOption == null)
return false;
else {
String value = getStringValue();
String anotherValue = anotherOption.getStringValue();
return value != null ? value.equals(anotherValue) : anotherValue == null;
}
}
COM: <s> compares this object to another simple widget model </s>
|
funcom_train/21955045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getUnreadMessageCount() throws MessagingException {
// sigh.
int unreadCount = 0;
for (int i = 0; i < cachedMessages.size(); i++) {
Flags f = getFlags(((Long) cachedMessages.elementAt(i)).longValue(), uidValidity, false);
if (! f.contains(Flags.Flag.SEEN)) {
unreadCount++;
}
}
return unreadCount;
}
COM: <s> this returns the number of unread messages in the cache </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.