__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/10357310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void locateNumeric() throws ParseException {
while (current < endOffset) {
// found a digit? we're done
if (Character.isDigit(source.charAt(current))) {
return;
}
current++;
}
// we've got an error, set the index to the end.
parseError("Number field expected");
}
COM: <s> locate an expected numeric field </s>
|
funcom_train/35189900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() throws MojoExecutionException {
System.setProperty("basedir", basedir.getAbsolutePath());
Locale locale = Locale.getDefault();
try {
JSDocGenerator gen = new JSDocGenerator(tempDir, directory, srcDir, exclude, template, extension, recurse, allFunctions, AllFunctions, privateOption, getLog());
gen.generateReport(locale);
} catch (JSDocException e) {
throw new MojoExecutionException(e.getLocalizedMessage());
}
}
COM: <s> execute the mojo this is what mvn calls to start this mojo </s>
|
funcom_train/26615004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void invoke(Object[] args) throws DelegateInvocationException
{
if (!pairsToInvoke.isEmpty())
{
Exception heldException = null;
Iterator iterator = pairsToInvoke.iterator();
while (iterator.hasNext())
{
try
{
DelegatePair currentPair = (DelegatePair) iterator.next();
Method methodToInvoke = currentPair.getMethodToInvoke();
methodToInvoke.invoke(currentPair.getTargetClass(), args);
}
catch (Exception e)
{
if (continueOnException)
{
heldException = e;
}
else
{
throw new DelegateInvocationException(e);
}
}
}
if (heldException != null)
{
throw new DelegateInvocationException(heldException);
}
}
}
COM: <s> invokes the list of methods stored with the arguments provided </s>
|
funcom_train/28297631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean messageClientAcknowledge(ArrayList al,int clientId) {
al.clear();
String msg=getNextMessage(TransSibNetMessage.netCmdTypeCtrl,
TransSibNetMessage.netCmdParamClAck,clientId);
if (msg!=null) {
al.add(new Integer(clientId));
return true;
}
return false;
}
COM: <s> returns true if a message from a client that acknowledges the connection </s>
|
funcom_train/39059388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNumberFormat(NumberFormat format) throws IllegalArgumentException {
if (_type == LabelType.Numeric) {
_numberFormat = format;
}
else {
throw new IllegalArgumentException(
"GraphTickLabelFormatter object has incorrect LabelType. " +
"The NumberFormat " + format.toString() +
" cannot be set when LabelType is " + _type.toString() + "."
);
}
} // End of property.
COM: <s> sets number format of label label must be of numeric type </s>
|
funcom_train/45464125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void move_current(int position) {
System.out.println(position);
if (player != null) {
player.stop();
player.deallocate();
// Update the position if possible
if (current + position >= 0 && current + position < playList.length) {
current += position;
}
try {
fileURL = playList[current].toURI().toURL();
load(fileURL.toString());
} catch (MalformedURLException e1) {
System.out.println("Mauvaise URL");
e1.printStackTrace();
}
}
}
COM: <s> move at the specified position in the playlist from the current position </s>
|
funcom_train/8208342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createTable() {
// Check whether the table has existed
// If it is the case, delete the old table
if (!eventTable.exists())
// Create a new table
eventTable.create("announce_id", "tag"); // Indicate primary key
// get the bean factory to the table
eventFactory = eventTable.getFactory();
}
COM: <s> create an mapping between announcements and interests </s>
|
funcom_train/42213914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String makeUserInfoXML(User user){
String userInfoXML = "<id>" + user.getUserDetails().getId().toString() + "</id>";
userInfoXML += "<name>" + user.getUserDetails().getUsername().toString() + "</name>";
userInfoXML += "<email>" + user.getUserDetails().getEmailAddress() + "</email>";
return userInfoXML;
}
COM: <s> returns the user info xml containing some information about user </s>
|
funcom_train/41666502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getDomainWicketAppDirectoryPath() {
String domainPackageCode = domainConfig.getPackageCode();
String domainWicketAppPackageCode = domainPackageCode + ".wicket.app";
String domainWicketAppPackageCodeWithSlash = textHandler
.replaceDotWithSlash(domainWicketAppPackageCode);
String domainWicketAppDirectoryPath = sourceDirectoryPath + SEPARATOR
+ domainWicketAppPackageCodeWithSlash;
return domainWicketAppDirectoryPath;
}
COM: <s> gets domain wicket application directory path </s>
|
funcom_train/22384721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ZZCell intersect(String dim, int dir, ZZCell cell2, String dim2, int dir2) {
synchronized(getSpace()) {
// If we knew how to find the shorter one...
Hashtable h = new Hashtable();
ZZCell cur = this;
while(cur!=null) {
h.put(cur,cur);
cur = cur.s(dim,dir);
}
cur = cell2;
while(cur!=null) {
if(h.get(cur) != null) {
return cur;
}
cur = cur.s(dim2,dir2);
}
return null;
}
}
COM: <s> find the next intersection of two ranks </s>
|
funcom_train/18864369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateUI() {
super.updateUI();
if (tree != null) {
tree.updateUI();
}
// Use the tree's default foreground and background colors in the table
LookAndFeel.installColorsAndFont(this, "Tree.background", "Tree.foreground", "Tree.font");
updateEnclosingScrollPaneBackground();
}
COM: <s> overridden to message super and forward the method to the tree </s>
|
funcom_train/14654751 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XYSeries addSeriesEffortsB_WO_DECAY(String name) {
ArrayDoubleList effortsB_WithoutDecay = JDBC_ServerThreadManager
.getInstance().selectTimesValuesFromEffortsB_withoutdecayTable(
session_id, chunkName);
return constructGraph(name,
constructEffortsDataSet(effortsB_WithoutDecay));
}
COM: <s> add xyseries efforts b without decay </s>
|
funcom_train/23949359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createMainPane( JFrame frame ){
JSplitPane pane = new JSplitPane( JSplitPane.HORIZONTAL_SPLIT,
createOutputPane(),
createListPane() );
frame.add( pane, BorderLayout.CENTER );
pane.setOneTouchExpandable( true );
pane.setResizeWeight( 1 );
pane.setDividerLocation( 400 );
}
COM: <s> creates the main pane that contains the output window and the items list </s>
|
funcom_train/32057473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsChildrenSelectable() {
System.out.println("testIsChildrenSelectable");
JGraph jp = new JGraph();
DefaultGraphSelectionModel dg = new DefaultGraphSelectionModel(jp);
dg.setChildrenSelectable(true);
assertTrue(dg.isChildrenSelectable() == true);
}
COM: <s> this function tests is children selectable function of default graph cell class </s>
|
funcom_train/31980942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isCollection(String collectionName) throws XMLDBException {
Collection root = DatabaseManager.getCollection(getDatabaseRootUrl());
Collection child;
try {
child = root.getChildCollection(collectionName);
} catch (XMLDBException e) {
child = null; // No community was found
}
return child != null;
}
COM: <s> checks if a collection exists in the database </s>
|
funcom_train/34127017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireDoubleClicked( MouseEvent event, SchemaNode node) {
// Guaranteed to return a non-null array
Object[] list = listeners.getListenerList();
// Process the listeners last to first, notifying
// those that are interested in this event
for ( int i = list.length-2; i >= 0; i -= 2) {
((TreePanelListener)list[i+1]).doubleClicked( event, node);
}
}
COM: <s> notifies the listeners about a double click on a node </s>
|
funcom_train/43230579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PopupPanel getPopup() {
if (this.myPopup == null) {
this.myPopup = new PopupPanel(false, true);
this.myPopup.add(this);
this.myPopup.setGlassEnabled(true);
this.myPopup.setWidth("400px");
this.myPopup.setStyleName(this.resource.loginWidgetPopup());
this.myPopup.setGlassStyleName(this.resource.loginWidgetGlass());
}
return this.myPopup;
}
COM: <s> gets the pop up of the login view </s>
|
funcom_train/50154982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addExceptionConfiguration(ExceptionConfiguration exception) {
synchronized (globalExceptions) {
ExceptionConfiguration[] _old = this.getExceptionConfigurations();
exception.addPropertyChangeListener(this);
globalExceptions.put(exception.getType(), exception);
getPropertyChangeSupport().firePropertyChange("globalExceptions", _old,
globalExceptions);
}
}
COM: <s> method add exception configuration </s>
|
funcom_train/19421814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void executeGet() {
String queryStatement = "select * from userdata where userId='{key}'";
DynaSqlAccessBean dynaBean = new DynaSqlAccessBean(dataSource, queryStatement);
dynaBean.setParameters(parameters);
dynaBean.setCommand(DataConnector.READ_COMMAND);
dynaBean.execute();
responseCode = dynaBean.getResponseCode();
responseString = dynaBean.getResponseString();
if (responseCode == 0) {
RecordSet rs = (RecordSet) dynaBean.getExecutionResults();
rs.first();
executionResults = buildUserProfile(rs);
}
}
COM: <s> p used to execute the get command after all command parameters </s>
|
funcom_train/10617268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCertificateEncodingException06() {
CertificateEncodingException tE = new CertificateEncodingException(
null, null);
assertNull("getMessage() must return null", tE.getMessage());
assertNull("getCause() must return null", tE.getCause());
}
COM: <s> test for code certificate encoding exception string throwable code </s>
|
funcom_train/19848803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String readString() throws IOException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
int read;
while ((read = read()) != 0) {
out.write(read);
}
try {
return out.toString("UTF-8");
} catch (UnsupportedEncodingException e) {
throw new Error("JVM doesn't support UTF-8");
}
}
COM: <s> reads a zero terminated string </s>
|
funcom_train/40296937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkIfValid(Idea idea) throws SystemException {
/* Check if idea is published. */
if (!idea.getStatus().equals(Idea.STATUS_PUBLISHED)) {
throw new SystemException(
IdeaExchangeErrorCodes.PROJECT_CREATION_FAILURE_UNPUBLISHED_IDEA_EXCEPTION,
IdeaExchangeConstants.Messages.PROJECT_CREATION_FAILURE_UNPUBLISHED_IDEA_MESSAGE);
}
return true;
}
COM: <s> check validity arguments for project creation </s>
|
funcom_train/18365934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setupTable() {
//Create the Library table with headers
tmResults = new STTableModel();
tmResults.addColumn(STGlobal.strLabel("LB_TAB_ID"));
tmResults.addColumn(STGlobal.strLabel("LB_TAB_NAME"));
tmResults.addColumn(STGlobal.strLabel("LB_TAB_TYPE"));
tabResults.setModel(tmResults);
tabResults.repaint();
}
COM: <s> set up the table with headers </s>
|
funcom_train/10415576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deallocate(Servlet servlet) throws ServletException {
// If not SingleThreadModel, no action is required
if (!singleThreadModel) {
countAllocated--;
return;
}
// Unlock and free this instance
synchronized (instancePool) {
countAllocated--;
instancePool.push(servlet);
instancePool.notify();
}
}
COM: <s> return this previously allocated servlet to the pool of available </s>
|
funcom_train/27843499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void disposeAllViews() throws ViewException {
for (Iterator i = _cachedUserViewOptions.keySet()
.iterator(); i.hasNext();) {
View view = (View) i.next();
ViewOptions viewOptions = (ViewOptions) _cachedUserViewOptions.get(view);
uninstallOptions(SETUP_VIEW_OPTION_GROUP, view, viewOptions);
i.remove();
}
}
COM: <s> dispose all the views </s>
|
funcom_train/19798422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ModelAndView doOptimizePhoto(HttpServletRequest req, HttpServletResponse resp){
getCommonModel(req);
String action = req.getParameter(ControllerConfig.ACTION_PARAM_NAME);
Long id = RequestUtils.getLongParam(req, "id");
if (OPTIMIZE_PARAM.equals(action)&&id!=null){
photo_service.optimizePhoto(id);
common.CommonAttributes.addHelpMessage("operation_succeed", req);
}
return doFilteredView(req, resp);
}
COM: <s> generates photo title tags </s>
|
funcom_train/44728052 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddManyChildrenAndRemoveOne() {
for (int cntr = 0; cntr < 20; cntr++) {
root.addChild(new DefaultGenericNode("Test " + cntr));
}
assertEquals(20, root.getChildCount());
root.removeChild("Test 5");
assertEquals(19, root.getChildCount());
}
COM: <s> test that adding many children then removing one shows the correct size </s>
|
funcom_train/32128743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (!(obj instanceof CIMDataType)) {
return false;
}
CIMDataType ct = (CIMDataType) obj;
if ((refClass == null) && (ct.refClass != null)) {
return false;
}
if ((refClass != null) && !refClass.equals(ct.refClass)) {
return false;
}
return ((type == ct.type) && (size == ct.size));
}
COM: <s> checks that the specified object is a cim data type </s>
|
funcom_train/26277090 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setDetails(final TreePath i_p) {
if (i_p == null)
return;
UiBookmarkTreeNode node = (UiBookmarkTreeNode) i_p.getLastPathComponent();
LgBookmarkEntry select = (LgBookmarkEntry) nodes.get(node);
if (select instanceof LgBookmarkItem) {
details.setBookmarkEntry((LgBookmarkItem) select);
} else {
details.setBookmarkEntry(null);
}
}
COM: <s> if the tree selection changes the details </s>
|
funcom_train/3089070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void _constructTable(TableModel newModel) {
scrollableDelegate.setScrollBarPolicy(Scrollable.SCROLLBARS_AUTO);
// some default colors
setBorderColor(DEFAULT_BORDER_COLOR);
setBorderSize(1);
// wrap the model into a sortable one
SortableTableModel sortableModel = _wrapAndSetTableModel(newModel);
// create a table column model if we dont have one
TableColumnModel columnModel = getColumnModel();
if (columnModel == null) {
columnModel = new nextapp.echo.table.DefaultTableColumnModel();
setColumnModel(columnModel);
}
_constructRenderers(sortableModel);
}
COM: <s> called at table construction </s>
|
funcom_train/34340951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCancel() {
if (cancel == null) {//GEN-END:|18-getter|0|18-preInit
// write pre-init user code here
cancel = new Command("cancel", Command.EXIT, 0);//GEN-LINE:|18-getter|1|18-postInit
// write post-init user code here
}//GEN-BEGIN:|18-getter|2|
return cancel;
}
COM: <s> returns an initiliazed instance of cancel component </s>
|
funcom_train/3833136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPlacementType (Feature feature) throws FilterEvaluationException {
int type = TYPE_ABSOLUTE;
if (perpendicularOffset != null) {
String stringValue = perpendicularOffset.evaluate (feature);
if (stringValue.equals ("center")) {
type = TYPE_CENTER;
} else if (stringValue.equals ("above")) {
type = TYPE_ABOVE;
} else if (stringValue.equals ("below")) {
type = TYPE_BELOW;
} else if (stringValue.equals ("auto")) {
type = TYPE_AUTO;
}
}
return type;
}
COM: <s> returns the placement type one of the constants defined in </s>
|
funcom_train/44136252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String saveSlideNumber(OSMSlide slide) {
String str = OSMFile.getTag1(OSMFile.OSM_SLIDE_NUMBER) + "\n";
str += saveProperties(slide.getNumberProperties());
str += OSMFile.getTag2(OSMFile.OSM_SLIDE_NUMBER);
return str;
}
COM: <s> it saves the slide number </s>
|
funcom_train/32231901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean dominates(Fitness fitness, int pop, int a, int b) {
boolean dominates = true;
for(int i = 0; i < fitness.getNumberMetrics(); i++) {
double aFit = fitness.getStandardFitness(i, pop, a);
double bFit = fitness.getStandardFitness(i, pop, b);
if(bFit < aFit) {
dominates = false;
break;
}
}
return dominates;
}
COM: <s> checks if a dominates b </s>
|
funcom_train/1940631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addParam(String name, Object value) {
if (name == null || "".equals(name.trim())) {
throw new IllegalArgumentException("The argument 'name' can not be null or blank.");
}
if (value == null) {
throw new IllegalArgumentException("The argument 'value' can not be null.");
}
this.paramMap.put(name, value);
}
COM: <s> add a new named parameter </s>
|
funcom_train/18186300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getEmboss() {
if (emboss == null) {
emboss = new JMenuItem("Emboss");
emboss.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
optionsPanel.removeAll();
ImageTransformation t = new EmbossingTransformation();
optionsPanel.add(new TransformationEditor(t,img));
optionsPanel.updateUI();
jSplitPane.updateUI();
}
});
}
return emboss;
}
COM: <s> this method initializes emboss </s>
|
funcom_train/39913347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetEh15() {
System.out.println("getEh15");
Page1 instance = new Page1();
TextField expResult = null;
TextField result = instance.getEh15();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get eh15 method of class timesheetmanagement </s>
|
funcom_train/19977686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unZip(String fileName) {
dirsMade = new TreeSet();
try {
zippy = new ZipFile(fileName);
Enumeration all = getZippy().entries();
while (all.hasMoreElements()) {
getFile((ZipEntry) all.nextElement());
}
} catch (IOException err) {
Log.Debug(UnZip.class, "IO Error: " + err);
return;
}
}
COM: <s> for a given zip file process each entry </s>
|
funcom_train/23393870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addQueryPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MatchmakerResponse_query_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_MatchmakerResponse_query_feature", "_UI_MatchmakerResponse_type"),
ActionPackage.Literals.MATCHMAKER_RESPONSE__QUERY,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the query feature </s>
|
funcom_train/6254791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String encode(byte aBuffer[]) {
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
ByteArrayInputStream inStream = new ByteArrayInputStream(aBuffer);
String retVal = null;
try {
encode(inStream, outStream);
// explicit ascii->unicode conversion
retVal = outStream.toString("8859_1");
} catch (Exception IOException) {
// This should never happen.
throw new Error("CharacterEncoder::encodeBuffer internal error");
}
return (retVal);
}
COM: <s> a streamless version of encode that simply takes a buffer of </s>
|
funcom_train/24118731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doNew() {
// remember the old vars
doStoreInitValues();
/** !!! DO NOT BREAK THE TIERS !!! */
// We don't create a new DomainObject() in the frontend.
// We GET it from the backend.
setRight(getSecurityService().getNewSecRight());
doClear(); // clear all commponents
doEdit(); // edit mode
rigType.setSelectedIndex(-1);
btnCtrl.setBtnStatus_New();
}
COM: <s> create a new sec right object </s>
|
funcom_train/16618655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void populateListSites(){
SiteSeasonDB d = Program.getLocalSiteDatabase().getSiteSeasonDB();
org.penguinuri.siteSeasonDatabase.SiteSeasonDBDocument.SiteSeasonDB.Sites.Site[] sites = d.getSites().getSiteArray();
site = null;
dlmSites.clear();
for(int i = 0; i < sites.length; i++){
dlmSites.add(i, sites[i].getName());
}
loadNewSite();
}
COM: <s> populate the list of sites from the local xml file </s>
|
funcom_train/3395498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isError() {
if (isEnum() || isInterface() || isAnnotationType()) {
return false;
}
for (Type t = type; t.tag == TypeTags.CLASS; t = env.types.supertype(t)) {
if (t.tsym == env.syms.errorType.tsym) {
return true;
}
}
return false;
}
COM: <s> return true if this is an error class </s>
|
funcom_train/12775937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addCallerEdges(CGNode n) {
final int num = cg.getNumber(n);
if (!cgNodesWithCallerEdges.contains(num)) {
cgNodesWithCallerEdges.add(num);
ControlFlowGraph<SSAInstruction, T> cfg = getCFG(n);
addInterproceduralEdgesForEntryAndExitBlocks(n, cfg);
}
}
COM: <s> add edges to nodes in callers of n </s>
|
funcom_train/6203301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void endElementProperty() {
currentElement.pop();
// mark the current position as *not* in a property
inProperty = false;
// ignore all properties outside the TMX header
if (!inHeader)
return;
// add the current property to the property map
StringBuffer propertyValue = currentSub.pop();
m_properties.put(currentProperty, propertyValue.toString());
currentProperty = null;
}
COM: <s> handles the end of a property </s>
|
funcom_train/8064899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawEmptyRRect(Graphics g) {
// If there's no fill but a narrow line then just
// draw that line.
if (_lineColor != null && _lineWidth == 1) {
g.setColor(_lineColor);
g.drawRoundRect(_x, _y, _w, _h, _radius, _radius);
}
}
COM: <s> paint an unfilled rounded rectangle with a narrow line or no line </s>
|
funcom_train/27927593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPieceLength(int piece) {
int pieces = getPieces();
if (piece >= 0 && piece < pieces -1)
return piece_length;
else if (piece == pieces -1)
return (int)(length - piece * piece_length);
else
throw new IndexOutOfBoundsException("no piece: " + piece);
}
COM: <s> return the length of a piece </s>
|
funcom_train/16772666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int bitrev( int pJ, int pNu ) {
int j1 = pJ;
int j2;
int k = 0;
for( int i = 0; i < pNu; i++ ) {
j2 = j1 >> 1;
k = ( k << 1 ) + j1 - ( j2 << 1 );
j1 = j2;
}
return k;
}
COM: <s> bit swapping method </s>
|
funcom_train/3703198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBetweenTimes(String strStart, String strEnd) {
Condition cond;
//// 1. Create and add the condition.
cond = TimeOfDayCondition.createBetweenCondition(strStart, strEnd);
cond.setName(COND_BETWEEN_TIMES);
addCondition(cond);
} // of method
COM: <s> set the time between which this service is allowed </s>
|
funcom_train/17904878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireTabDeselected(DockedTabEvent e) {
if (tabListeners == null || tabListeners.isEmpty()) {
return;
}
for (int i = 0, k = tabListeners.size(); i < k; i++) {
tabListeners.get(i).tabSelected(e);
}
}
COM: <s> notifies all registered listeners of a tab deselected event </s>
|
funcom_train/8066564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void redo() {
undoInProgress = true;
do {
Memento memento = pop(redoStack);
redo(memento);
} while (redoStack.size() > 0
&& !((Memento) redoStack.get(redoStack.size() - 1)).startChain);
incrementUndoChainCount();
decrementRedoChainCount();
undoInProgress = false;
}
COM: <s> redo the most recent chain of mementos received by the undo stack </s>
|
funcom_train/3830361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public char getCoordinateSeperator() {
Debug.debugMethodBegin( this, "getCoordinateSeperator()" );
char cs = DEFAULT_CS;
if ( XMLTools.getAttrValue( element, "cs" ) != null ) {
String s = XMLTools.getAttrValue( element, "cs" );
cs = s.charAt( 0 );
}
Debug.debugMethodEnd();
return cs;
}
COM: <s> return the character used as coordinate seperator </s>
|
funcom_train/8047191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IFont createFont(PApplet pa, String fontFileName, int fontSize, boolean antiAliased){
return createFont(pa, fontFileName,fontSize, new MTColor(0,0,0,255), new MTColor(0,0,0,255), antiAliased);
}
COM: <s> creates the font </s>
|
funcom_train/22283681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isChecked() {
String propName = isAttached() ? "checked" : "defaultChecked";
// The 'checked' attribute can come back as 'true' or '-1'. Go figure.
String value = DOM.getAttribute(inputElem, propName);
return value.equals("true") || value.equals("-1");
}
COM: <s> determines whether this check box is currently checked </s>
|
funcom_train/10272624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setColor(Color c) {
Color old = baseColor;
baseColor = c;
newColorPanel.setBackground(baseColor);
rgb = null;
hsb = null;
pcs.firePropertyChange("rgb", old, baseColor);
pcs.firePropertyChange("hsb", old, baseColor);
}
COM: <s> sets the new color to c </s>
|
funcom_train/14519732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IAuthorizationSessionLocal getAuthorizationSession() {
if (authorizationsession == null) {
try {
IAuthorizationSessionLocalHome authorizationsessionhome = (IAuthorizationSessionLocalHome) getLocator().getLocalHome(IAuthorizationSessionLocalHome.COMP_NAME);
authorizationsession = authorizationsessionhome.create();
} catch (CreateException e) {
throw new EJBException(e);
}
}
return authorizationsession;
} //getAuthorizationSession
COM: <s> gets connection to authorization session bean </s>
|
funcom_train/39169454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processRefQueue() {
LabelledSoftReference ref = null;
while((ref = LabelledSoftReference.class.cast(refQueue.poll())) != null) {
// check that the queued ref hasn't already been replaced in the
// map
if(lockObjects.get(ref.label) == ref) {
lockObjects.remove(ref.label);
}
}
}
COM: <s> cleans up the lock objects map by removing any entries whose </s>
|
funcom_train/6462214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getColumnIndex(String id) {
Logger.logMessage("StandardTable: PrimaryKey " + _primaryKey);
Logger.logMessage("StandardTable: Get index of " + id);
Logger.logMessage("StandardTable: Index " + _indices.indexOf(id));
return _indices.indexOf(id);
}
COM: <s> get index number of column </s>
|
funcom_train/4529728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(DataOutput out) throws IOException {
// write a prefix indicating the type of UGI being written
Text.writeString(out, UGI_TECHNOLOGY);
// write this object
Text.writeString(out, userName);
WritableUtils.writeVInt(out, groupNames.length);
for (String groupName : groupNames) {
Text.writeString(out, groupName);
}
}
COM: <s> serialize this object </s>
|
funcom_train/32602304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectionChanged(SelectionChangedEvent event) {
ISelection selection = event.getSelection();
if (selection instanceof IStructuredSelection) {
IStructuredSelection structuredSel = (IStructuredSelection) selection;
Object firstSel = structuredSel.getFirstElement();
if ( firstSel instanceof SourceCodeRange) {
SourceCodeRange callsite = (SourceCodeRange) firstSel;
List callchain = callsite.getCallChain();
setInput(callchain);
} else {
setInput(null);
}
}
}
COM: <s> jedi call chain viewer listens to source range selections </s>
|
funcom_train/49653482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private User forceLoad(User user) {
if (null != user) {
Group group = user.getUserGroup();
if (null != group) {
for (Iterator iter = user.getUserGroup().getPermissionLevels()
.iterator(); iter.hasNext();) {
PermissionLevel permissionLevel = (PermissionLevel) iter
.next();
permissionLevel.getPermission();
}
}
}
return user;
}
COM: <s> force the lazy loader to get the complete user and referenced objects </s>
|
funcom_train/44511774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(String location) throws IllegalStateException, IOException {
// XXX: THIS does not work - for sure [asac]
System.setProperty("net.jxta.tls.principal", this.principal);
System.setProperty("net.jxta.tls.password", this.credential);
log.info("Jxta-Config --> Configuration *XXX:not* [asac] saved to: "
+ location);
}
COM: <s> saves all the jxta configuration to a spec </s>
|
funcom_train/34520302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void emit(edu.arizona.cs.mbel.ByteBuffer buffer, edu.arizona.cs.mbel.emit.ClassEmitter emitter){
// do not call until after setPositions()
for (InstructionHandle iter=handleFirst.next;iter!=handleLast;iter=iter.next){
iter.getInstruction().emit(buffer, emitter);
}
}
COM: <s> write this instruction list out to a buffer </s>
|
funcom_train/49461993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDay(Date date) throws Exception {
if (date == null)
throw new IllegalArgumentException("The date cannot be null");
Calendar cal = DateHelper.newCalendarUTC();
cal.setTime(date);
String datecode = cal.get(Calendar.YEAR)+"-"+(cal.get(Calendar.MONTH)+1)+"-"+cal.get(Calendar.DAY_OF_MONTH);
Date rDate = DateHelper.roundDownLocal(date);
datesTodo.add(rDate);
}
COM: <s> adds a date to the list of processed date day level </s>
|
funcom_train/42897723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetInstanceAttribute(String instanceId, String attribute) throws EC2Exception {
Map<String, String> params = new HashMap<String, String>();
params.put("InstanceId", instanceId);
params.put("Attribute", attribute);
HttpGet method = new HttpGet();
ResetInstanceAttributeResponse response =
makeRequestInt(method, "ResetInstanceAttribute", params, ResetInstanceAttributeResponse.class);
if (!response.isReturn()) {
throw new EC2Exception("Could not reset instance attribute. No reason given.");
}
}
COM: <s> resets an attribute on an instance </s>
|
funcom_train/25332806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetAddXRefs() {
DAFeature instance = new DAFeatureImpl();
List result = instance.getXRefs();
assertTrue(result.isEmpty());
DAXRef expResult = new DAXRef();
List<DAXRef> l = new ArrayList<DAXRef>();
l.add(expResult);
instance.addXRefs(l);
assertTrue(instance.getXRefs().contains(expResult));
}
COM: <s> test of get xrefs method of class dafeature </s>
|
funcom_train/37034386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Context createContext(String path, String docBase) {
if (debug >= 1)
logger.log("Creating context '" + path + "' with docBase '" +
docBase + "'");
StandardContext context = new StandardContext();
context.setDebug(debug);
context.setDocBase(docBase);
context.setPath(path);
ContextConfig config = new ContextConfig();
config.setDebug(debug);
((Lifecycle) context).addLifecycleListener(config);
return (context);
}
COM: <s> create configure and return a context that will process all </s>
|
funcom_train/26281693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectPolygon(double[] points, int selectionMode, boolean antiAlias, boolean feather, double featherRadius) throws JGimpException {
m_App.callProcedure("gimp_free_select", this, points, new Integer(selectionMode), new Boolean(antiAlias), new Boolean(feather), new Double(featherRadius));
}
COM: <s> selects a polygonal region in the image </s>
|
funcom_train/17603875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void transferFlash() {
HttpSession session = request.getSession(false);
if (session != null) {
Map<String, Object> flash = (Map<String, Object>) session.getAttribute(FLASH_KEY);
if (flash != null) {
session.removeAttribute(FLASH_KEY);
request.setAttribute(FLASH_KEY, flash);
}
}
}
COM: <s> moves the flash from the session to the request </s>
|
funcom_train/10364231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ReferenceEntry getEntry(Object key) {
if (key == null) {
return null;
}
int hashCode = hash(key);
ReferenceEntry entry = data[hashIndex(hashCode, data.length)];
while (entry != null) {
if (entry.hashCode == hashCode && (key == entry.getKey())) {
return entry;
}
entry = entry.next;
}
return null;
}
COM: <s> gets the entry mapped to the key specified </s>
|
funcom_train/12179123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected HorizontalRuleAttributes createHorizontalRuleAttributes(String style) {
HorizontalRuleAttributes attributes = new HorizontalRuleAttributes();
Styles styles = StylesBuilder.getCompleteStyles(style, true);
styles.getPropertyValues().setComputedValue(
StylePropertyDetails.DISPLAY, DisplayKeywords.BLOCK);
attributes.setStyles(styles);
return attributes;
}
COM: <s> create horizontal rule attributes with given styling </s>
|
funcom_train/10778945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUserResultQueryWithExplictProjectionOfConstructorArguments() {
CriteriaQuery<Person> q = cb.createQuery(Person.class);
Root<Person> p = q.from(Person.class);
q.multiselect(p.get(Person_.name));
assertResult(q, Person.class);
}
COM: <s> if the type of the criteria query is criteria query x for </s>
|
funcom_train/17434376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File resolveFileURL(String stringUrl) throws MalformedURLException {
if (stringUrl.startsWith("file:")) {
return fileURL(stringUrl);
} else if (stringUrl.startsWith("portal:")) {
return portalURL(stringUrl);
} else {
throw new PortalException("bad protocol on URL: " + stringUrl);
}
}
COM: <s> return a file object for the file identified by the url </s>
|
funcom_train/8899374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSumEquals1() throws InvalidProbabilityRangeException {
float value = this.getProbCellSum();
// (this.leastCellValue/2) is the error margin
if ( (value >= 1f - (this.leastCellValue/2f)) && (value <= 1f + (this.leastCellValue/2f)) ) {
return true;
} else {
return false;
}
}
COM: <s> check if sum of all probability assignment is 1 </s>
|
funcom_train/10822336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getBlockIndexNear(long offset) {
ArrayList<BlockRegion> list = dataIndex.getBlockRegionList();
int idx =
Utils
.lowerBound(list, new ScalarLong(offset), new ScalarComparator());
if (idx == list.size()) {
return -1;
}
return idx;
}
COM: <s> find the smallest block index whose starting offset is greater than or </s>
|
funcom_train/50364209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getIndexOfChild(Object parent, Object child) {
Object childs[] = children(parent);
if (childs == null)
return -1;
for (int i = 0; i < childs.length; i++) {
if (childs[i] == child) {
return i;
}
}
return -1;
}
COM: <s> returns the index of child in parent </s>
|
funcom_train/35027196 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() throws IOException {
if (!isBound) {
tcp.bind(lastTCPAddress);
udp.bind(lastUDPAddress);
}
new Thread(thread = new ConnectionRunnable(tcp, udp)).start();
log.log(Level.INFO, "[{0}][???] Started server.", label);
}
COM: <s> start this server </s>
|
funcom_train/31208195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int findColumn(String columnName) throws SQLException {
columnName=columnName.toUpperCase();
for(int i=0;i<columnCount;i++) {
if(columnName.equals(labels[i])) {
return i+1;
}
}
throw Factory.getSQLException(Messages.COLUMN_NOT_FOUND,columnName);
}
COM: <s> returns the column index for a given column label </s>
|
funcom_train/18001018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isFolderFixupInProgress() {
// Is this thread running?
FixupFolderDefsResults.FixupStatus fixupFolderDefsStatus = m_fixupResults.getStatus();
if ((FixupFolderDefsResults.FixupStatus.STATUS_COMPLETED != fixupFolderDefsStatus) &&
(FixupFolderDefsResults.FixupStatus.STATUS_ABORTED_BY_ERROR != fixupFolderDefsStatus)) {
// Yes! Return true.
return true;
}
// The most recent fixup thread has completed. Forget about
// it.
removeFromSession();
return false;
}
COM: <s> returns true if the folder fixup is ready to be run or is </s>
|
funcom_train/3915197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCopyFolder_SameFolder() {
try {
File folderSrc = FileSupport.getTempFolder("src");
FileUtils.copyFolder(folderSrc, folderSrc);
// Shouldn't reach here
fail("Should have thrown an Exception");
}
catch(IOException ex) {
assertTrue(true);
}
}
COM: <s> dont copy to same folder </s>
|
funcom_train/51296357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getUpdateStorageDefaultSql(Workplace t) {
String sql;
sql = "UPDATE pos SET is_default = false WHERE ref_group = "
+ t.getGroupId() + " ;\n";
sql += "UPDATE pos SET is_default = " + t.isOnDefault()
+ " WHERE id = " + t.getId() + ";\n";
return sql;
}
COM: <s> set default workplace </s>
|
funcom_train/8526488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleExpression(final boolean atEnd) throws IOException {
if (expressionMode) {
final int end = (atEnd) ? inputStream.position() + 1 : inputStream.position();
if (position <= end) {
addParseExpression(inputStream.substring(position, end));
}
}
expressionMode = false;
}
COM: <s> sql expression terminated </s>
|
funcom_train/42717815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getActiveGroup() {
int rows = cLanduseGroups.getSelectedRowCount();
int row = cLanduseGroups.getSelectedRow();
if(rows != 1 || row < 0) {
return ClassesTransferData.NO_GROUP;
}
else {
Integer g = (Integer)cLanduseGroups.getValueAt(row, 0);
if(g == null)
return ClassesTransferData.VACANT_GROUP;
else
return g;
}
}
COM: <s> return currently active group number i </s>
|
funcom_train/10380530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Metadata createConfigAdminProxy(ParserContext context) {
MutableBeanMetadata bean = context.createMetadata(MutableBeanMetadata.class);
bean.setRuntimeClass(CmNamespaceHandler.class);
bean.setFactoryMethod("getConfigAdmin");
bean.setActivation(MutableBeanMetadata.ACTIVATION_LAZY);
bean.setScope(MutableBeanMetadata.SCOPE_PROTOTYPE);
return bean;
}
COM: <s> create a reference to the configuration admin service if not already done </s>
|
funcom_train/50224167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Map getParameters() {
// flush the most recently edited filed
parameterTable.editingStopped(new ChangeEvent(this));
Map map = new HashMap(10);
for (int i = 0; i < parameters.length; i++) {
map.put(parameters[i].getName(), parameters[i].getDefault().toString());
}
return map;
}
COM: <s> return the currently displayed map of parameters </s>
|
funcom_train/3577265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getModuleRunning(String module){
boolean result = true;
int moduleEnd = module.lastIndexOf("_v");
if(moduleEnd != -1){
module = module.substring(0, moduleEnd);
}
String running = properties.getProperty(moduleRunning + "." + module);
//System.out.println("running: " + running);
if(running != null){
if(running.equals("false")){
result = false;
}
}
return result;
}
COM: <s> get module lunning state </s>
|
funcom_train/30217552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop(long timeoutMillisec) {
log.debug("Entered AbstractSingleThreadedServer.stop()");
shutdown = true;
// wait for background thread to shut itself down
synchronized (shutdownMonitor) {
try {
shutdownMonitor.wait(timeoutMillisec);
} catch (InterruptedException ie) {}
if (!shutdownCompleted)
serverThread.interrupt();
shutdownMonitor.notifyAll();
}
// Release objects for garbage collection
serverThread = null;
}
COM: <s> stop the background thread </s>
|
funcom_train/8763452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getLockView() {
if (lockView == null) {
lockView = new JCheckBox();
lockView.setText("Lock Character View");
lockView.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent e) {
if (lockView.isSelected())
angleSlider.setEnabled(false);
else
angleSlider.setEnabled(true);
}
});
}
return lockView;
}
COM: <s> this method initializes lock view </s>
|
funcom_train/10587333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadCharset(String clazz) {
try {
Class c = Class.forName(clazz);
Object o = c.newInstance();
if (o instanceof Charset) {
loadCharset((Charset)o);
}
} catch (Exception exception) {
throw new CharsetFactoryException("Unable to instantiate class \""
+ clazz + "\"", exception);
}
}
COM: <s> instantiate and load a code charset code into this factory </s>
|
funcom_train/4520646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TimeBarRow rowForXY(int x, int y) {
if (_diagramRect.contains(x, y) || _yAxisRect.contains(x, y) || _hierarchyRect.contains(x, y)) {
if (_orientation == Orientation.HORIZONTAL) {
return rowForY(y);
} else {
return rowForY(x);
}
} else {
return null;
}
}
COM: <s> get the row located at x y </s>
|
funcom_train/1549956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsValue(final Object value) {
for (int i = 0; i < buckets.length; i++) {
synchronized (locks[i]) {
Node n = buckets[i];
while (n != null) {
if (n.value == value || (n.value != null && n.value.equals(value))) {
return true;
}
n = n.next;
}
}
}
return false;
}
COM: <s> checks if the map contains the specified value </s>
|
funcom_train/39536114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleBounds(Rectangle2D bounds){
if(isMenuBar){
//computing the size of the parent component
Dimension size=new Dimension(
(int)bounds.getWidth(), (int)bounds.getHeight());
//getting the parent component
((JMenuBar)component).setSize(size);
((JMenuBar)component).setPreferredSize(size);
((JMenuBar)component).setLocation((int)bounds.getX(), (int)bounds.getY());
}
}
COM: <s> handle the bounds of the menu items container </s>
|
funcom_train/4991278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createUIButtonCancel() {
// Create the button
fButtonCancel = new Button(fCompositeLogin, SWT.PUSH);
fButtonCancel.setText("Cancel"); //$NON-NLS-1$
// Configure layout data
GridData data = new GridData(SWT.NONE, SWT.NONE, false, false);
data.widthHint = F_BUTTON_WIDTH_HINT;
data.verticalIndent = 10;
fButtonCancel.setLayoutData(data);
}
COM: <s> creates the ui button cancel </s>
|
funcom_train/1797593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIncludeDeleted(Boolean includeDeleted) {
// check if setting to existing value
if (this.includeDeleted == null ? includeDeleted != null :
!this.includeDeleted.equals(includeDeleted)) {
// set to new value for customer parameter
this.includeDeleted = includeDeleted;
setStringCustomParameter("include-deleted",
includeDeleted == null ? null : includeDeleted.toString());
}
}
COM: <s> sets the include deleted entries </s>
|
funcom_train/7673589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void forEach(Visitor visitor) {
int sz = bytes.size();
int at = 0;
while (at < sz) {
/*
* Don't record the previous offset here, so that we get to see the
* raw code that initializes the array
*/
at += parseInstruction(at, visitor);
}
}
COM: <s> parses each instruction in the array in order </s>
|
funcom_train/31935932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int indexOfComponent(Component component) {
for(int i = 0; i < views.size(); i++) {
Component c = (Component)views.get(i);
if ((c != null && c.equals(component)) ||
(c == null && c == component)) {
return i;
}
}
return -1;
}
COM: <s> returns the index of the tab for the specified component </s>
|
funcom_train/7826267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateNormalArc() {
System.out.println("createNormalArc");
ObjectModel instance = new ObjectModel();
Place from = instance.createPlace();
Transition to = instance.createTransition();
NormalArc result = instance.createNormalArc(from, to);
result.canBeFired();
}
COM: <s> test of create normal arc method of class edu </s>
|
funcom_train/25290093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPlane(int planeNum, Vector4d plane) {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_PLANE_WRITE))
throw new CapabilityNotSetException(Ding3dI18N.getString("ModelClip2"));
if (isLive())
((ModelClipRetained)this.retained).setPlane(planeNum, plane);
else
((ModelClipRetained)this.retained).initPlane(planeNum, plane);
}
COM: <s> sets the specified clipping plane of this model clip node </s>
|
funcom_train/18111902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addStreetPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ContactDetails_Street_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ContactDetails_Street_feature", "_UI_ContactDetails_type"),
BioDBPackage.Literals.CONTACT_DETAILS__STREET,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the street feature </s>
|
funcom_train/44709623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getErrorsString() {
StringBuffer s = new StringBuffer();
for (Iterator i = m_pageState.getAllErrors(); i.hasNext(); ) {
s.append(i.next().toString());
s.append(System.getProperty("line.separator"));
}
return s.toString();
}
COM: <s> return a string with all the errors that occurred in trying to </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.