__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/10979740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setActionContextClass(Class actionContextClass) {
this.actionContextClass = actionContextClass;
if (actionContextClass != null) {
this.servletActionContextConstructor =
ConstructorUtils.getAccessibleConstructor(actionContextClass,
SERVLET_ACTION_CONTEXT_CTOR_SIGNATURE);
} else {
this.servletActionContextConstructor = null;
}
}
COM: <s> p set and cache action context class </s>
|
funcom_train/17819114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BufferedImage createImage(int width, int height) {
BufferedImage bi = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
Graphics graph = bi.getGraphics();
graph.setColor( new Color( 255, 255, 255, 0 ) );
graph.fillRect( 0, 0, bi.getWidth(), bi.getHeight() );
return bi;
}
COM: <s> creates a new argb image with the specified dimension </s>
|
funcom_train/18859428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Servlet getControllerServlet() {
Servlet servlet = null;
WebApp webApp = getWebApp();
List servlets = webApp.getServlets();
for (Iterator iter = servlets.iterator(); iter.hasNext();) {
servlet = (Servlet) iter.next();
if (servlet.getWebType().isServletType()) {
JavaClass clazz = servlet.getServletClass();
if (isControllerServletClass(clazz)) {
break;
} else {
servlet = null;
}
}
}
return servlet;
}
COM: <s> returns the controller servlet </s>
|
funcom_train/17781730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Feed getFeed(Object entity, PersistenceUtil persistenceUtil) {
logger.debug("Retrieving feed for object " + entity);
String feedKey = getFeedKey(entity, persistenceUtil);
Feed feed = (Feed)persistenceUtil.getSession().get(Feed.class, feedKey);
logger.debug("Returning " + feed);
return feed;
}
COM: <s> return the feed for passed entity </s>
|
funcom_train/9445077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ZipEntry getEntry(String entryName) {
checkNotClosed();
if (entryName == null) {
throw new NullPointerException();
}
ZipEntry ze = mEntries.get(entryName);
if (ze == null) {
ze = mEntries.get(entryName + "/");
}
return ze;
}
COM: <s> gets the zip entry with the specified name from this </s>
|
funcom_train/36130810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(final FilterConfig filterConfig) {
this.filterConfig = filterConfig;
try {
restartCompletelyWhenRequired();
} catch (Exception e) {
// not throwing the exception here in order to init the filter laziy (when the error condition is over and keep the app meanwhile blocked)
logLocal("Unable to initialize security filter", e);
}
}
COM: <s> init method for this filter </s>
|
funcom_train/1549588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNodeToCache(Node<E> node) {
if (isCacheFull()) {
// don't cache the node.
return;
}
// clear the node's contents and add it to the cache.
Node<E> nextCachedNode = firstCachedNode;
node.previous = null;
node.next = nextCachedNode;
node.setValue(null);
firstCachedNode = node;
cacheSize++;
}
COM: <s> adds a node to the cache if the cache isnt full </s>
|
funcom_train/26201833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void printClassInfo(ClassDoc cd) {
if (cd.isOrdinaryClass()) {
print("class ");
} else if (cd.isInterface()) {
print("interface ");
} else if (cd.isException()) {
print("exception ");
} else { // error
print("error ");
}
printPreQualifiedClassLink(cd);
print('.');
}
COM: <s> what is the classkind print the classkind class interface exception </s>
|
funcom_train/32733229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getLength() {
if (length == null || length.length()==0) {
return 0;
}
String[] parts = length.split(":");
if (parts.length == 1) {
int seconds = Integer.parseInt(parts[0]);
return seconds;
} else if (parts.length == 2) {
int minutes = Integer.parseInt(parts[0]);
int seconds = Integer.parseInt(parts[1]);
return minutes*60 + seconds;
} else {
// Incorrect format
return 0;
}
}
COM: <s> return the length of the track in seconds </s>
|
funcom_train/10632507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Name add(String comp) throws InvalidNameException {
if (!componentIsOk(comp)) {
// jndi.30={0} can't be used as a component for DNS name
throw new InvalidNameException(Messages.getString("jndi.30", comp));//$NON-NLS-1$
}
components.addElement(comp);
return this;
}
COM: <s> adds the given component to the end of the current name </s>
|
funcom_train/1169863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSeparator getJSeparator4() {
if (jSeparator4 == null) {
jSeparator4 = new JSeparator();
jSeparator4.setPreferredSize(new java.awt.Dimension(138, 8));
jSeparator4.setLayout(null);
jSeparator4.setBounds(0, 19, 137, 7);
}
return jSeparator4;
}
COM: <s> p getter for the field code j separator4 code </s>
|
funcom_train/34899630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String mapRemote () {
String parentDir = FileUtils.getRootParentDir(this.getSRMPath(), File.separatorChar);
String matchingDir = getMatchingRemoteDir (parentDir);
if (matchingDir == null) return this.getSRMPath();
String remotePath = matchingDir+
File.separatorChar+
this.getSRMPath().replaceFirst(parentDir, "");
return remotePath;
}
COM: <s> returns the full path for this file on the server running srm tools </s>
|
funcom_train/33662775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void executeCurrentActivity() {
while (!(currentActivity.equals(flowOwner))) {
ActivityComponent monitoredActivity = prepareActivityToMonitor();
if (monitoredActivity != null) notifayMonitor(monitoredActivity);
boolean isNewCurrentActivitySet = currentActivity.doActivity();
if (!isNewCurrentActivitySet) {
return;
}
}
flowOwner.flowCompleted();
}
COM: <s> thiss the core of blite engine execution model </s>
|
funcom_train/1996915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void example(com.crosslogic.strata.htmlobject.Document aDoc) {
aDoc.textCr("Call the DatePicker JSP example page... ");
aDoc.textCr(
"See the c:\\htmlobjects\\example\\datepicker.jsp for details on how to use HTMLObjects in JSP.");
Link aLink = new Link("datepicker.jsp", "/datepicker.jsp");
aDoc.add(aLink);
}
COM: <s> generates an example body </s>
|
funcom_train/40769259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setGridStyle(String row, String col, String Style) {
int irow = Integer.parseInt(row);
int icol = Integer.parseInt(col);
calGrid.getCellFormatter().setStyleName(irow, icol, Style);
//RootPanel.get().add(new Label("grid: " + row + " " + col + " s: " + Style));
}
COM: <s> set grid style to cell in grid </s>
|
funcom_train/37738715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSortCriteria (List criteria) {
if (sortCriteria == null) {
sortCriteria = new ArrayList();
} else {
sortCriteria.clear();
}
for (Iterator i = criteria.iterator(); i.hasNext();) {
sortCriteria.add(new SortCriterion ((String)i.next()));
}
}
COM: <s> set all sort criteria from the given list of strings </s>
|
funcom_train/40432748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Number getDataPointValue(TimePeriod timePeriod) throws TelemetryDataModelException {
TelemetryDataPoint dataPoint = this.dataPoints.get(timePeriod);
if (dataPoint == null) {
throw new TelemetryDataModelException("No data for the period " + timePeriod.toString());
}
return dataPoint.getValue();
}
COM: <s> gets the value associated with the specified time period </s>
|
funcom_train/11695702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private long getTimeoutValueForCommand(int aCommand) {
switch (aCommand) {
case AsynchAEMessage.Process:
return getCasProcessTimeout();
case AsynchAEMessage.GetMeta:
return getGetMetaTimeout();
case AsynchAEMessage.CollectionProcessComplete:
return getCpcTimeout();
default:
return -1;
}
}
COM: <s> returns a timeout value for a given command type </s>
|
funcom_train/135714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void print(boolean print_labels) throws java.awt.print.PrinterException {
ComponentPagePrinter cpp = null;
if (print_labels) {
cpp = new ComponentPagePrinter(mapsplitter);
} else {
cpp = new ComponentPagePrinter(can_panel);
}
cpp.print();
cpp = null; // for garbage collection
}
COM: <s> prints this component </s>
|
funcom_train/6433959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeProps(){
try {
FileOutputStream fileOut = new FileOutputStream(configFileName);
propertyMap.store(fileOut, "Gnubert Properties");
fileOut.close();
} catch (IOException ie) {System.err.println("\nIO Error writing to cofig file");}
}
COM: <s> writes all of the properties to the config file </s>
|
funcom_train/11112809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isTextNode(String namespaceURI, String localName) {
if (TEXT_NS.equals(namespaceURI)) {
return true;
}
if (SVG_NS.equals(namespaceURI)) {
return "title".equals(localName) ||
"desc".equals(localName);
}
return false;
}
COM: <s> check if a node is a text node </s>
|
funcom_train/49438791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseProxiesHeader(String str) {
str = HTTPUtils.extractHeaderValue(str);
if (_rfd.getPushAddr()==null || str==null || str.length()<12)
return;
try {
PushEndpoint.overwriteProxies(_rfd.getClientGUID(),str);
}catch(IOException tooBad) {
// invalid header - ignore it.
}
}
COM: <s> parses the header containing the current set of push proxies for </s>
|
funcom_train/16528563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createNullLayout() {
setLayout(new BorderLayout(0, 0));
setBackground(PasColors.qtiAssessmentQuickEditorBackgroundColor);
JLabel messageLabel = new JLabel("This assessment has zero items.");
messageLabel.setOpaque(false);
JPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER));
panel.setBorder(BorderFactory.createEmptyBorder(4, 4, 0, 4));
panel.add(messageLabel);
panel.setOpaque(false);
add(panel, BorderLayout.CENTER);
}
COM: <s> this is a layout with no assessment interactions </s>
|
funcom_train/43245631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetConfAddressActive() {
System.out.println("setConfAddressActive");
boolean confAddressActive = true;
AddlDemographicsDG1Object instance = new AddlDemographicsDG1Object();
instance.setConfAddressActive(confAddressActive);
// 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 conf address active method of class org </s>
|
funcom_train/37086310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean addWindowBorder(String name, Point border) {
boolean modified = false;
if (name != null && border != null) {
modified |= addProperty("Jnet.windowBorder." + name + ".x", "" + border.x);
modified |= addProperty("Jnet.windowBorder." + name + ".y", "" + border.y);
}
return modified;
}
COM: <s> adds the window border to the history </s>
|
funcom_train/3167934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String stripQuotes(String psValue) {
if ((psValue.startsWith("\"") && psValue.endsWith("\""))
|| (psValue.startsWith("\'") && psValue.endsWith("\'"))) {
return new String(psValue.substring(1, psValue.length() - 1));
} else {
return psValue;
}
}
COM: <s> removes single or double quotes from around a string </s>
|
funcom_train/28492899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFailingTransform() throws IOException {
System.out.println("failingTransform");
// log everything to console
Logger logger = Logger.getLogger("ch.unifr.nio.framework");
logger.setLevel(Level.FINEST);
ConsoleHandler consoleHandler = new ConsoleHandler();
consoleHandler.setLevel(Level.FINEST);
logger.addHandler(consoleHandler);
testHeaderLength(1);
}
COM: <s> test that the forwarder continues to work even when other forwarders </s>
|
funcom_train/303275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean onUpdateRecord(ServerCommand sc, Object o) {
((WAGDefaultTableFields)o).setUserIdUpdate(sc.getUsername());
((WAGDefaultTableFields)o).setLastUpdate(new java.sql.Timestamp(System.currentTimeMillis()));
return true;
}
COM: <s> called before a record update </s>
|
funcom_train/22178342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public char readChar() throws IOException {
int c1, c2;
if ((c1 = super.read()) == -1) {
throw new EOFException();
}
if ((c2 = super.read()) == -1) {
throw new EOFException();
}
return (char)((c1 << 8) | (c2 & 0xff));
}
COM: <s> reads an input code char code and returns the code char code value </s>
|
funcom_train/25423577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void collectExistingSourceURIs(RequestContext context, HrRecord repository, final SourceUriArray sourceUris) throws SQLException {
CollectSourceUrisRequest request = new CollectSourceUrisRequest(context, repository) {
@Override
protected void onSourceUri(String sourceUri, String uuid) {
sourceUris.add(new String[]{sourceUri, uuid});
}
};
request.execute();
}
COM: <s> collects existing source uris for the given repository </s>
|
funcom_train/24514865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOverwriteRendererIcons(boolean overwrite) {
if (overwriteIcons == overwrite) {
// System.out.println("overwrite true. returning... ");
return;
}
// System.out.println("overwrite different. setting... " + overwriteIcons);
boolean old = overwriteIcons;
this.overwriteIcons = overwrite;
}
COM: <s> property to control whether per tree icons should be </s>
|
funcom_train/10801504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getRequiresExtent() {
if (_owner != null || isEmbeddedOnly())
return false;
if (_extent == null) {
ClassMetaData sup = getPCSuperclassMetaData();
if (sup != null)
_extent = (sup.getRequiresExtent()) ? Boolean.TRUE
: Boolean.FALSE;
else
_extent = Boolean.TRUE;
}
return _extent.booleanValue();
}
COM: <s> whether the type requires extent management </s>
|
funcom_train/10634117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEndsWith() throws InvalidNameException {
log.setMethod("testEndsWith()");
CompositeName end = new CompositeName("");
assertTrue(name.endsWith(end));
end = new CompositeName("12345");
assertFalse(name.endsWith(end));
try {
name.endsWith(null);
} catch (Throwable e) {
log.log("end with null?", e);
}
try {
assertFalse(name.endsWith(new CompoundName("", props)));
} catch (Throwable e) {
log.log("end with compoundName?", e);
}
}
COM: <s> test ends with include exceptional case of null and compound name </s>
|
funcom_train/50296946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Writer setCharacterStream(long position) throws SQLException {
String encoding = wrappedBlob.gdsHelper.getJavaEncoding();
OutputStream outputStream = wrappedBlob.setBinaryStream(position);
if (encoding == null) {
return new OutputStreamWriter(outputStream);
} else {
try {
return new OutputStreamWriter(outputStream, encoding);
} catch (UnsupportedEncodingException ioe) {
throw new FBSQLException(ioe);
}
}
}
COM: <s> create a writer to add character data to this clob </s>
|
funcom_train/40730513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIncludedCategories(final String categories) {
propertyValidators.add(new PropertyValidator() {
void validate() {
includedCategoryIds = parseCategories(categories, "all,searchable");
if (LOGGER.isLoggable(Level.CONFIG))
LOGGER.config("INCLUDED CATEGORIES: " + includedCategoryIds);
}
});
}
COM: <s> sets the categories to include </s>
|
funcom_train/31163506 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CursorData createCursorData() {
int start = tc.getSelectionStart();
int end = tc.getSelectionEnd();
if (start == end)
start = Math.max(0, start-length);
return new CursorData(getColor(), getID(), start, end);
}
COM: <s> creates cursor data that will set the cursors highlight </s>
|
funcom_train/35996376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ValuePair lookupScope(KVariable val){
Iterator<Map<KVariable, ValuePair>> it = _tableQueue.iterator();
while(it.hasNext()){
Map<KVariable, ValuePair> cScope = it.next();
if( cScope.containsKey(val)){
return (ValuePair) cScope.get(val);
}
}
return null;
}
COM: <s> utility method to check the scoped queue for a kvariable </s>
|
funcom_train/12810576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int frequencyBelow (int key) {
int f = 0;
Integer keyBelow;
Integer value;
for (Iterator i = values.keySet().iterator (); i.hasNext ();) {
keyBelow = (Integer) i.next();
if (keyBelow.doubleValue () < key) {
value = (Integer) values.get(keyBelow);
f += value.intValue ();
} else {
return f;
}
}
return f;
}
COM: <s> returns the total number of values below a given value </s>
|
funcom_train/5075540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeConnection() {
try {
if (serverSocket != null) {
serverSocket.close();
}
} catch (IOException e) {
log.debug(e.toString());
}
try {
if (passiveModeSocket != null) {
passiveModeSocket.close();
}
} catch (IOException e) {
log.debug(e.toString());
}
}
COM: <s> closes the ftp connection </s>
|
funcom_train/48983677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void performValidationAdd() {
// verifies if the video is null
if (exam == null) {
addActionError(getText("exam.input.validation.requiredExam"));
}
// verifies if the title is empty
if (!StringUtils.hasText(exam.getTitle())) {
addActionError(getText("exam.input.validation.requiredTitle"));
}
}
COM: <s> perform a validation to add an exam </s>
|
funcom_train/44011540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetCustLastName() {
System.out.println("setCustLastName");
String custLastName = "";
CustomerBO instance = null;
instance.setCustLastName(custLastName);
// 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 cust last name method of class edu </s>
|
funcom_train/37476543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkStdEvents(WorkflowTemplate wfTemp, WorkflowReadResult result) {
if (wfTemp.getParentTemplate() != null &&
!wfTemp.getWaitingForEvents().contains(Event.PARENTWORKFLOW_FINISHED)){
result.addWarning("Subworkflow does not handle " + Event.PARENTWORKFLOW_FINISHED + ".");
}
}
COM: <s> check for standard events for example parentwf finished for subworkflows </s>
|
funcom_train/50878974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getStringFromDashArray(float[] inDashArray){
StringBuffer sb = new StringBuffer();
if (inDashArray != null){
for (int i=0; i<inDashArray.length; i++){
if (i>0) sb.append("|");
sb.append(inDashArray[i]);
}
}
return sb.toString();
}
COM: <s> construct the string for saving the dash array from the array sent in </s>
|
funcom_train/24648514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean compare(User user) {
if (!checkEquals(user.getRemoteUser(), getRemoteUser())) return false;
if (!checkEquals(user.getIdP(), getIdP())) return false;
if (!compare(user.getIDPName(), user.getFirstName(), user.getLastName(), user.getEmail())) return false;
return true;
}
COM: <s> this compares the 6 major keys of the given user to this </s>
|
funcom_train/34128288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getTagCompletionPropertiesList() {
Vector result = new Vector();
Vector list = getProperties( TagCompletionProperties.TAGCOMPLETION);
for ( int i = 0; i < list.size(); i++) {
TagCompletionProperties props = new TagCompletionProperties( (Properties)list.elementAt(i));
if ( !StringUtilities.isEmpty( props.getLocation())) {
result.addElement( props);
}
}
return result;
}
COM: <s> returns the list of tag completion properties </s>
|
funcom_train/11344673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addProvidedServiceSpecification(String serviceSpecification) {
String[] newSs = new String[m_providedServiceSpecification.length + 1];
System.arraycopy(m_providedServiceSpecification, 0, newSs, 0, m_providedServiceSpecification.length);
newSs[m_providedServiceSpecification.length] = serviceSpecification;
m_providedServiceSpecification = newSs;
}
COM: <s> adds a provided service to the component type </s>
|
funcom_train/4942524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getInteger(String key) {
String val = prop.getProperty(key);
try {
return Integer.valueOf(val);
} catch(NumberFormatException e) {
e.printStackTrace();
JOptionPane.showMessageDialog(null,
res.getString("commons.error.number.format"),
res.getString("commons.error"),
JOptionPane.ERROR_MESSAGE);
log.error("Galaxy Picture Factory cannot convert " + val + " to integer!");
return -1;
}
}
COM: <s> gets integer from custom files </s>
|
funcom_train/32062724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeFile() {
for(Object o:list.getSelectedValues()) {
try {
fileList.removeFile((String)o);
} catch (NonexistentFileException e) {
JOptionPane.showMessageDialog(OmniConFrame.singleton,
"An error occured when attempting to remove the file: "+
e.getMessage(), "Could not remove file", JOptionPane.WARNING_MESSAGE);
}
}
generateFilePanels();
l.fine("Successfully removed files");
}
COM: <s> removes a file from the list </s>
|
funcom_train/49627626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element addFilter(final BitSet filter, final String elementName) {
Element filterElement = new Element(elementName);
for (int count = 0; count < filter.length(); count++) {
if (filter.get(count)) {
filterElement.addContent(new Element("setBit").setAttribute(
"position", Integer.toString(count)));
}
}
return filterElement;
}
COM: <s> de serialises the given </s>
|
funcom_train/2877878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean evaluate() throws RemoteException, SmartFrogException {
Throwable thrown;
try {
getTarget().sfPing(this);
return false;
} catch (SmartFrogException e) {
thrown = e;
} catch (RemoteException e) {
thrown = e;
}
setFailureCause(thrown);
if (sfLog().isDebugEnabled()) {
sfLog().debug("liveness failure", thrown);
}
return false;
}
COM: <s> ping the target </s>
|
funcom_train/18953297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int doStartTag() {
if (logger.isDebugEnabled()) {
logger.debug("doStartTag() - start");
}
// just add the format to the formatter...
formatter.add(format);
// no body for this tag
if (logger.isDebugEnabled()) {
logger.debug("doStartTag() - end - return value = " + SKIP_BODY);
}
return SKIP_BODY;
}
COM: <s> p this method is called when the jsp engine encounters the start tag </s>
|
funcom_train/44136206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getThemeType(Node node) {
int type = -1;
NamedNodeMap map = node.getAttributes();
if(map.getLength() > 0) {
Node n = map.getNamedItem(OSMFile.OSMTHM_ATTTYPE);
if(n != null)
type = parseInt(n.getNodeValue());
}
return type;
}
COM: <s> it returns the type of the theme </s>
|
funcom_train/40300786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void validateSampleData(double[][] x, double[] y) {
if ((x == null) || (y == null) || (x.length != y.length)) {
throw MathRuntimeException.createIllegalArgumentException(
"dimension mismatch {0} != {1}",
(x == null) ? 0 : x.length,
(y == null) ? 0 : y.length);
}
}
COM: <s> validates sample data </s>
|
funcom_train/3331382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addCodeStatement(JCodeStatement jcs) {
short indent = (short)(jcs.getIndent()+ currentIndent - jcs.DEFAULT_INDENTSIZE);
source.addElement(new JCodeStatement(jcs.getStatement(), indent));
} //-- addCodeStatement(JCodeStatement)
COM: <s> adds the given jcode statement to this jsource code </s>
|
funcom_train/50392795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handlePending() throws ProcessingException{
if(logger.isTraceEnabled())logger.trace("Handling PENDING state for Action "+action.getUUID());
ApplicationExecutionStatus aes=action.getProcessingContext().get(ApplicationExecutionStatus.class);
if(aes==null){
aes=new ApplicationExecutionStatus();
action.getProcessingContext().set(aes);
action.setDirty();
}
switch(aes.get()){
case ApplicationExecutionStatus.CREATED:
setupPreCommand();
break;
case ApplicationExecutionStatus.PRECOMMAND_EXECUTION:
handlePreCommandRunning();
break;
case ApplicationExecutionStatus.PRECOMMAND_DONE:
submitMainExecutable();
break;
default:
throw new IllegalStateException("Illegal state PENDING.");
}
}
COM: <s> handle pending state </s>
|
funcom_train/41621435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processBaseframe() throws IOException {
this.baseframe = new BaseFrame(this.idHierarchy.length, this.parentHierarchy);
int pointer = -1;
int jointIndex = -1;
while(this.reader.nextToken() != '}') {
switch(this.reader.ttype) {
case '(':
while(this.reader.nextToken() != ')') {
this.baseframe.setTransform(jointIndex, pointer, (float)this.reader.nval);
pointer++;
}
break;
case StreamTokenizer.TT_EOL:
pointer = 0;
jointIndex++;
break;
}
}
COM: <s> process information to construct the base frame </s>
|
funcom_train/31782127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: //private void receivedINF (IncomingMessage incomingMessage) {
/* >>> USR [number] MD5 I [userName] */
// OutgoingMessage msg = new OutgoingMessage (Message.USR, getTransactionID());
// msg.addArgument ("MD5"); msg.addArgument ("I"); msg.addArgument (userName);
// sc.sendMSNPMessage (msg);
//}
COM: <s> called when an inf message is </s>
|
funcom_train/25665378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private InputStream createRestoreStream() throws IOException {
Backup.debug("Creating backup stream");
try {
return m_fileFactory.openBackupFileForRead(this);
} catch (IOException e) {
if (Backup.DEBUG) {
// some debug info on screen
m_fileFactory.debugRestoreFile(this);
}
throw e;
}
}
COM: <s> try to create and return a stream onto the backup restore file </s>
|
funcom_train/1212599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setClassType(String path) throws CajuScriptException {
if (path.length() != 0) {
Class c = cajuScript.getContext().findClass(path);
if (c == null) {
throw CajuScriptException.create(cajuScript, context, "Class \"".concat(path).concat("\" not found "));
}
setClassType(c);
}
}
COM: <s> set the class type from a class path </s>
|
funcom_train/10748473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsNativeMethod() {
StackTraceElement ste = new StackTraceElement("class", "method", null, -2);
assertTrue("method should be native", ste.isNativeMethod());
ste = new StackTraceElement("class", "method", "file", 1);
assertFalse("method should not be native", ste.isNativeMethod());
}
COM: <s> method under test boolean is native method </s>
|
funcom_train/8048633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Vector3D getWidthVectorLocal(){
if (this.getReferenceComp().hasBounds()){
return this.getReferenceComp().getBounds().getWidthXYVectLocal();
}else{
// return new Vector3D(Vector3D.ZERO_VECTOR);
throw new RuntimeException("Couldnt extract the width vector from the svg shape: '" + svgComp.getName() + "'. We need a component or boundingshape that defines the method getWidthXYVectObjSpace()");
}
}
COM: <s> gets the width obj space vector </s>
|
funcom_train/28960757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public void testVicinity() {
// System.out.println("vicinity");
// IndexedDocumentAnnotationManager instance = new IndexedDocumentAnnotationManager();
// List<TIntIntHashMap> expResult = null;
// List<TIntIntHashMap> result = instance.vicinity();
// 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 vicinity method of class indexed document annotation manager </s>
|
funcom_train/23393746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSenderPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CommunicativeAct_sender_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CommunicativeAct_sender_feature", "_UI_CommunicativeAct_type"),
FactPackage.Literals.COMMUNICATIVE_ACT__SENDER,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the sender feature </s>
|
funcom_train/9277018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testOnlyTransactionWasRollbacked() throws SQLException {
rollback();
assertShutdownOK();
Statement st = createStatement();
JDBC.assertSingleValueResultSet(st.executeQuery("select " + "count(*) "
+ "from " + "TEST_TABLE "), "0");
st.close();
}
COM: <s> tests shutdown with the only transaction was rollbacked </s>
|
funcom_train/1683113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void append(String str) {
if (str == null) {
str = "null";
}
int strlen = str.length();
int newlen = this.len + strlen;
if (newlen > this.buffer.length) {
expand(newlen);
}
str.getChars(0, strlen, this.buffer, this.len);
this.len = newlen;
}
COM: <s> appends chars of the given string to this buffer </s>
|
funcom_train/14652500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void textMsg(@NotNull final String msg) throws IOException {
final OutputStream out = this.out;
assert out != null;
final byte[] data = msg.getBytes("utf-8");
out.write(0xFF & data.length >> 8);
out.write(0xFF & data.length);
out.write(data);
out.flush();
}
COM: <s> sends a simple text message </s>
|
funcom_train/23269489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void destroyInternal(final LogAnnotation.Message logMessage) {
for (Channel channel : CollectionUtil.mkNotNull(channels)) {
if ((channel == null) || (!(channel.getDefinition() instanceof ContentManager.LocalChannelDefinition<?>))) continue;
try {
channel.destroy();
} catch (Exception e) {}
}
return;
}
COM: <s> take this code page code out of active service </s>
|
funcom_train/326441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized private void removeAllMenuItems(JMenu menu) {
JMenuItem menuItem;
int nItems = menu.getMenuComponentCount();
for (int i = 0; i < nItems; i++) {
menuItem = menu.getItem(i);
if (menuItem == null) {
continue;
}
if (JMenu.class.isAssignableFrom(menuItem.getClass())) {
removeAllMenuItems((JMenu) menuItem);
}
removeMenuItem(menuItem);
}
}
COM: <s> iterate through the menu and its menu items </s>
|
funcom_train/43922764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List attributesFormList(List dtoList, FeatureType schema) {
List list = new ArrayList();
for (Iterator i = dtoList.iterator(); i.hasNext();) {
AttributeTypeInfoConfig config = (AttributeTypeInfoConfig) i.next();
list.add(new AttributeForm(config, schema.getAttributeType(config.getName())));
}
return list;
}
COM: <s> create a list of attribute form based on attribute type info dto </s>
|
funcom_train/36206548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setMessageApproveDisapprove(ControllerBean controllerBean, BasicDTO dto) {
Approval approval = (Approval) dto;
if (approval.getStatus().equals(Approval.Status.APPROVED)){
controllerBean.addMessage("msgRequestItemApproved", new String[]{""}, Message.TYPE_INFO);
}
else if (approval.getStatus().equals(Approval.Status.NOT_APPROVED)){
controllerBean.addMessage("msgRequestItemDisapproved", new String[]{""}, Message.TYPE_INFO);
}
}
COM: <s> insert a message telling if the approval was approved or disapproved </s>
|
funcom_train/25859541 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean searchOptimal() {
long T1, T2;
T1 = System.currentTimeMillis();
SelectChoicePoint select = new SimpleSelect(vars.toArray(new Variable[1]), null,
new IndomainMin());
search = new DepthFirstSearch();
boolean result = search.labeling(store, select, cost);
if (result)
store.print();
T2 = System.currentTimeMillis();
//System.out.println("\n\t*** Execution time = " + (T2 - T1) + " ms");
return result;
}
COM: <s> it specifies a standard way of modeling the problem </s>
|
funcom_train/19422474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(ActionServlet servlet, ModuleConfig config) throws ServletException {
// invoke Eaasy Street init() process
try {
EaasyStreet.init(servlet.getServletConfig());
} catch (Exception e) {
throw new ServletException(e);
}
EaasyStreet.logInfo("Initialization complete for system \"" + EaasyStreet.getProperty(Constants.CFG_SYSTEM_NAME) + "\".");
}
COM: <s> p receive notification that the specified module is being </s>
|
funcom_train/31686879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValid(boolean bValid) {
if(!bValid) {
this.m_comboBox.setBorder(BorderFactory.createLineBorder(Color.RED));
this.m_errorLabel.setIcon(IconManager.getInstance().getIcon("16-message-error.gif"));
} else {
this.m_comboBox.setBorder(BorderFactory.createLineBorder(Color.BLACK));
this.m_errorLabel.setIcon(IconManager.getInstance().getIcon("16-message-confirm.gif"));
}
this.revalidate();
this.repaint();
}
COM: <s> sets whether this components value is valid </s>
|
funcom_train/15400169 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String createMeasurementText() {
String unit = ((_spacing == null) ? "pixel " : "mm");
double distance = getDistance((Point2D)_points.get(0), (Point2D)_points.get(1), _spacing);
String distStr = TWO_DIGITS_FMT.format(distance) + unit;
return(distStr);
}
COM: <s> creates string representation of measurement </s>
|
funcom_train/22536225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeAffectedConnections(){
// Remove outgoing connections of the shape to be deleted.
List<Connection> outgoingConnections = shape.getSourceConnections();
Iterator<Connection> i = outgoingConnections.iterator();
Connection conn = null;
while (i.hasNext()){
conn = (Connection)i.next();
conn.disconnect();
}
// Remove incoming connections of the shape to be deleted.
List<Connection> incomingConnections = shape.getTargetConnections();
Iterator<Connection> j = incomingConnections.iterator();
conn = null;
while (j.hasNext()){
conn = (Connection)j.next();
conn.disconnect();
}
}
COM: <s> remove the connections that are connected to the deleted </s>
|
funcom_train/34526404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Properties getRowProperties(int rowIdx) {
reload();
if ((rowIdx < 0) || (rowIdx >= getNumRows())) {
String msg = "The row idx (" + rowIdx + ") " +
"doesn't exist in the table template '" + name + "'.";
throw new IllegalArgumentException(msg);
}
return rowProperties.get(rowIdx);
}
COM: <s> gets the properties of the specified table row </s>
|
funcom_train/3124395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cancelOnError(CProgressMonitor monitor) {
// update bar-components
CStatusBar.getStatusBar().bar_TaskLabel.setText(
TEXT_TASK_CANCELLEDONERROR
+(TEXT_TASK_CANCELLEDONERROR.endsWith(":") ? " " : ": ")
+ monitor.mMessage
);
// cancel showUp-Timer
if (CProgressGUI.getInstance().showUpTimer != null)
CProgressGUI.getInstance().showUpTimer.cancel();
hideDialogPanel(0);
resetAll();
}
COM: <s> update all gui components if the cancelled on error status is reached </s>
|
funcom_train/19628918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeXMLDeclaration() throws IOException {
String xmlDecl = "<?xml version=\"1.0\" encoding=\"" + getEncodingName() + "\"?>\n";
byte[] xmlDeclBytes = xmlDecl.getBytes("US-ASCII");
// flush to ensure correct sequence
flush();
os.write(xmlDeclBytes);
}
COM: <s> writes xml delcaration using version 1 </s>
|
funcom_train/36769724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleMouseEvent(MouseEvent e) {
if (eventsAreDisabled()) {
return;
}
if (e.getSource() == userList) {
if (e.isPopupTrigger()) {
enableUserMenuItems();
popupMenu.show(e.getComponent(), e.getX(), e.getY());
}
}
}
COM: <s> event handler called to process mouse events in the user list </s>
|
funcom_train/12662942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadFrameworkConfigFiles() {
final String[] files = Constants.FRAMEWORK_CONFIG_PROPERTIES;
for (int i = 0; i < files.length; i++) {
final File propFile = new File(framework.getConfigDir(), files[i]);
if (propFile.exists())
loadPropertyFile(project, propFile);
}
}
COM: <s> standard ctl configuration properties </s>
|
funcom_train/45708136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void enumAllChildren() {
for (UID l_uid : m_types.get(EltType.MDX_LEVEL)) {
Level l_elt = (Level)m_cache.get(l_uid);
ArrayList<UID> path =
new ArrayList<UID>();
for (UID m_uid : l_elt.getMembers()) {
enumRecChildren(path, m_uid);
}
}
}
COM: <s> internal function which enumerates children for all members </s>
|
funcom_train/23969831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAddress(String address) {
checkRunning(false);
if (org.hsqldb.lib.StringUtil.isEmpty(address)) {
address = ServerConstants.SC_DEFAULT_ADDRESS;
}
printWithThread("setAddress(" + address + ")");
serverProperties.setProperty(ServerProperties.sc_key_address, address);
}
COM: <s> sets the inet address with which this servers server socket will be </s>
|
funcom_train/7772449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getPnlRicerca() {
if (pnlRicerca == null) {
lblRicerca = new JLabel();
lblRicerca.setBounds(new Rectangle(8, 8, 80, 16));
lblRicerca.setText("Ricerca per..");
pnlRicerca = new JPanel();
pnlRicerca.setLayout(null);
pnlRicerca.setPreferredSize(new Dimension(0, 110));
pnlRicerca.add(lblRicerca, null);
pnlRicerca.add(getPnlRicercaData(), null);
}
return pnlRicerca;
}
COM: <s> this method initializes pnl ricerca </s>
|
funcom_train/29017721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public static int registerType(String formatName) {
// Look name up in the registry
// If name is not in registry, add it and return assigned value.
// If name already exists in registry, return its assigned value
TCHAR chFormatName = new TCHAR(0, formatName, true);
return OS.RegisterClipboardFormat(chFormatName);
}
COM: <s> registers a name for a data type and returns the associated unique identifier </s>
|
funcom_train/9032527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setResultOut() throws IOException {
File wekaResultOut = null;
if (useSMO) {
wekaResultOut = new File(testingDataFileName + ".smo.result");
} else if (useBayesNet) {
wekaResultOut = new File(testingDataFileName + ".bayesnet.result");
} else {
wekaResultOut = new File(testingDataFileName + ".naive.result");
}
resultOut = new BufferedWriter(new FileWriter(wekaResultOut));
System.out
.println("Result goes to: " + wekaResultOut.getAbsolutePath());
}
COM: <s> set result output </s>
|
funcom_train/41446205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
switch (value) {
case ADDRESS_PRESENTATION_UNDEFINED: return UNDEFINED_STRING;
case ADDRESS_PRESENTATION_ALLOWED: return ALLOWED_STRING;
case ADDRESS_PRESENTATION_RESTRICTED: return RESTRICTED_STRING;
case ADDRESS_PRESENTATION_ADDRESS_NOT_AVAILABLE: return ADDRESS_NOT_AVAILABLE_STRING;
default: return "AddressPresentation in Unknown and Invalid State";
}
}
COM: <s> get the textual representation of the address presentation object </s>
|
funcom_train/45758100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void after() {
// delete the constructed files.
for (int i=0; i<iExportDocCount; i++) {
File f = new File(sTempDir + "DocExport" + i + ".pdf");
f.delete();
}
File f = new File(sProcessIdCommand);
f.delete();
f = new File(sOfficeMemoryCommand);
f.delete();
}
COM: <s> delete all created files on disk </s>
|
funcom_train/38318637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute () throws BuildException {
BuildInfoFactory.checkBuildInfoType(getBuildType());
BuildInfo buildInfo= BuildInfoFactory.readBuildInfo(
getBuildFile(), getBuildType(), getBuildModule(), getBuildPrefix()
);
addProperty("date", buildInfo.getBuildDate());
addProperty("build", buildInfo.getBuildId());
addProperty("version", buildInfo.getBuildMasterId());
}
COM: <s> executes the build information task </s>
|
funcom_train/41858200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void _doCreateNewMappingOntology(List<RelationInfo> relInfos) {
createNewBase();
// create data with only the given RelationInfos for the ontologyInfo
MappingOntologyData mappingOntologyData = new MappingOntologyData();
mappingOntologyData.setRelationInfos(relInfos);
mappingOntologyData.setBaseOntologyData(null);
mappingOntologyData.setMappings(null);
ontologyInfo.setOntologyData(mappingOntologyData);
// create dataPanel
dataPanel = new DataPanel(false);
dataPanel.updateWith(null, ontologyInfo, false);
dataDisclosure.setContent(dataPanel);
enable(true);
}
COM: <s> prepares the panel for creation of an ontology using the vine style </s>
|
funcom_train/39974044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AudioBuffer loadBuffer(String fileName) {
AudioBuffer result = null;
try {
WAVData wd = WAVLoader.loadFromFile(fileName);
AudioBuffer[] tmp = generateBuffers(1);
result = tmp[0];
result.configure(wd.data, wd.format, wd.freq);
} catch (IOException e) {
logger.severe(e.getMessage());
} catch (UnsupportedAudioFileException e) {
logger.severe(e.getMessage());
}
return result;
}
COM: <s> loads a wav file mono stereo from the specified file name </s>
|
funcom_train/17672297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CmdBitSet getCmds() {
final CmdBitSet bitSet = new CmdBitSet(jmd);
bitSet.addPlus(cmd);
if (filter != null) {
doCmdDependency(filter, bitSet);
}
if (orders != null) {
for (int i = 0; i < orders.length; i++) {
doCmdDependency(orders[i], bitSet);
}
}
return bitSet;
}
COM: <s> this will return the cmd bit set filled with the class metadatas </s>
|
funcom_train/30225718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cleanup() {
try {
simpleJdbcTemplate.getJdbcOperations().execute("SHUTDOWN");
if (LOGGER.isInfoEnabled()) {
LOGGER.info("HSQLDB shutdown completed");
}
} catch (DataAccessException e) {
LOGGER.error("HSQLDB shutdown failed: ", e);
}
}
COM: <s> when application context is destroyed database is close as well </s>
|
funcom_train/51604806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(new BorderLayout());
jContentPane.add(getJSplitPane(), BorderLayout.CENTER);
jContentPane.add(getJCheckBoxShowAtStartup(), BorderLayout.SOUTH);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/45749938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addConclusionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DerivationRule_conclusion_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DerivationRule_conclusion_feature", "_UI_DerivationRule_type"),
URMLPackage.Literals.DERIVATION_RULE__CONCLUSION,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the conclusion feature </s>
|
funcom_train/22498093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getProtocol() {
String prot = null;
try {
final String protName = linkType.getSelectedItem().toString();
if (!protName.equalsIgnoreCase(LINK_TYPE_RELATIVE)) {
prot = transformProtocol(linkTypes.get(protName).toString());
}
}
catch (final Exception e) {
}
return prot;
}
COM: <s> get the chosen protocol </s>
|
funcom_train/22277844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setContentView(View aView) {
if (contentView != null) {
// contentView.setWantsAutoscrollEvents(false);
contentView.removeFromSuperview();
}
contentView = aView;
if (contentView != null) {
contentView.moveTo(0, 0);
addSubview(contentView);
// contentView.setWantsAutoscrollEvents(true);
}
updateScrollBars();
}
COM: <s> sets the view scrolled by the scroll view to b a view b </s>
|
funcom_train/50911482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RealArray getXorY(Axis2 axis) {
double[] f = new double[size()];
for (int i = 0; i < size(); i++) {
f[i] = (axis.value == 0) ? getReal2(i).getX() : getReal2(i).getY();
}
return new RealArray(f);
}
COM: <s> get a single coordinate array for example all x coordinates </s>
|
funcom_train/3928233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deactivateBehavior( BehaviorBean bb ) {
int numberBehaviors = behaviors.size();
for ( int i = 0; i < numberBehaviors; i++ ) {
HumanBeanBehavior hbb = (HumanBeanBehavior)behaviors.elementAt( i );
BehaviorBean test = hbb.getBehaviorBean();
if ( test == bb ) {
hbb.deactivate();
return;
}
}
}
COM: <s> deactivate a specific behavior </s>
|
funcom_train/21042918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFill(Paint paint) {
boolean paintMatches = this.backgroundFill == null ? paint == null : this.backgroundFill.equals(paint);
if (!this.isGradientFill && paintMatches) return;
this.cacheValid = false;
this.isGradientFill = false;
this.backgroundFill = paint;
}
COM: <s> sets the paint used to fill the background none used if null </s>
|
funcom_train/23872911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object visit(IfExp host, Object data) {
String result = "if ";
//--- Compute result ---
result += host.getCondition().accept(this, data) + " then ";
result += host.getThenExpression().accept(this, data) + " else ";
result += host.getElseExpression().accept(this, data) + " endif ";
return result;
}
COM: <s> visit class if exp </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.