__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/41726875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void destroyAllStops() {
PersistenceManager pm = PMF.get().getPersistenceManager();
String query = "select from " + StopDB.class.getName();
List<StopDB> stopsList = (List<StopDB>) pm.newQuery(query).execute();
if (!stopsList.isEmpty()) {
try {
pm.deletePersistentAll(stopsList);
} finally {
pm.close();
}
}
}
COM: <s> destroy all stops </s>
|
funcom_train/5669622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWrap(boolean wrap) {
_wrap = wrap;
if (!_xRangeGiven) {
if (_xBottom > _xTop) {
// have nothing to go on.
setXRange(0, 0);
} else {
setXRange(_xBottom, _xTop);
}
}
_wrapLow = _xlowgiven;
_wrapHigh = _xhighgiven;
}
COM: <s> specify whether the x axis is wrapped </s>
|
funcom_train/43245702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetExpirationDate() {
System.out.println("getExpirationDate");
SponsorDemographicDG1Object instance = new SponsorDemographicDG1Object();
Calendar expResult = null;
Calendar result = instance.getExpirationDate();
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 expiration date method of class org </s>
|
funcom_train/9373535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerForSIMReady(Handler h, int what, Object obj) {
Registrant r = new Registrant (h, what, obj);
synchronized (mStateMonitor) {
mSIMReadyRegistrants.add(r);
if (mState.isSIMReady()) {
r.notifyRegistrant(new AsyncResult(null, null, null));
}
}
}
COM: <s> any transition into sim ready </s>
|
funcom_train/26484110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeReportFile(String fileName) {
URLConnection conn = null;
try {
URL url = new URL(fileName);
conn = url.openConnection();
conn.setDoOutput(true);
sendData(conn);
// I don't know why, but we have to read the response from the
// server, even if it's empty.
receiveResponse(conn);
}
catch (Exception e) {
ErrorHandler.error(e);
}
// Don't forget this.
commandHistory.setBaseline();
}
COM: <s> writes the current report to the specified file </s>
|
funcom_train/29024753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map getLocationTypeChoices() {
final Map<String, SourceTemplate.Type> choices = new HashMap<String, SourceTemplate.Type>();
for (final SourceTemplate.Type type : SourceTemplate.Type.values()) {
choices.put(type.name(), type);
}
return choices;
}
COM: <s> provide all choices from the color type enum </s>
|
funcom_train/12193570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ChoiceDefinition getChoiceDefinition(String name) {
ChoiceDefinition choiceDefinition = null;
Iterator iterator = choiceDefinitions.iterator();
while (iterator.hasNext()) {
ChoiceDefinition choiceDefinitionCandidate =
(ChoiceDefinition) iterator.next();
if (choiceDefinitionCandidate.getName().equals(name)) {
choiceDefinition = choiceDefinitionCandidate;
}
}
return choiceDefinition;
}
COM: <s> returns choice definition for given name or null of not found </s>
|
funcom_train/10980763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCheckCircularInheritance() {
ActionConfig child = new ActionConfig();
child.setPath("/child");
child.setExtends("/base");
ActionConfig grandChild = new ActionConfig();
grandChild.setPath("/grandChild");
grandChild.setExtends("/child");
config.addActionConfig(child);
config.addActionConfig(grandChild);
assertTrue("Circular inheritance shouldn't have been detected",
!grandChild.checkCircularInheritance(config));
}
COM: <s> basic check that shouldnt detect circular inheritance </s>
|
funcom_train/50313303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector readTasksForProject(int projectId, int tasktype, String orderBy, String sort) throws CmsException {
return (m_rb.readTasksForProject(m_context.currentUser(), m_context.currentProject(), projectId, tasktype, orderBy, sort));
}
COM: <s> reads all tasks for a project </s>
|
funcom_train/20769818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ClosestCluster getFirstContainingCluster(BasicEvent event){
float minDistance=Float.MAX_VALUE;
Cluster closest=null;
float currentDistance=0;
for(Cluster c:clusters){
if((currentDistance=c.distanceTo(event))<c.getRadius()){
closest=c;
minDistance=currentDistance;
break;
}
}
return new ClosestCluster(minDistance, closest);
}
COM: <s> given ae returns first cluster that event is within </s>
|
funcom_train/26595094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean moveForward(_Iterator iterator, Object value, _Reference[] references, int reverse) throws DException {
while (iterator.next()) {
SuperComparator comparator = reverse == 1 ? leftComparator : rightComparator;
if (comparator.compare(iterator.getColumnValues(references), value) != 0) {
return true;
}
}
return false;
}
COM: <s> this method moves the iterator to the next distinct record </s>
|
funcom_train/51413360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refreshTable() {
TableAspectTeamClass.getTable().refresh();
TableAspectRoleClass.getTable().refresh();
TableAspectRoleMethod.getTable().refresh();
TableAspectRoleMethodParameter.getTable().refresh();
TableAspectRoleBinding.getTable().refresh();
TableAspectRoleBindMapping.getTable().refresh();
TableAspectMappingDef.getTable().refresh();
TableAspectRoleClassImpl.getTable().refresh();
TableAspectRoleVarAccess.getTable().refresh();
TableConfigBindingType.getTable().refresh();
TableAspectAttribute.getTable().refresh();
}
COM: <s> reloads all table rows that are related to this panel components </s>
|
funcom_train/44451268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paintComponent(Graphics g) {
if (thumbnail == null) {
loadImage();
}
if (thumbnail != null) {
int x = getWidth()/2 - thumbnail.getIconWidth()/2;
int y = getHeight()/2 - thumbnail.getIconHeight()/2;
if (y < 0) {
y = 0;
}
if (x < 5) {
x = 5;
}
thumbnail.paintIcon(this, g, x, y);
}
}
COM: <s> repaints this component </s>
|
funcom_train/5376774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dictionary getHeaders(String localeString) {
framework.checkAdminPermission(this, AdminPermission.METADATA);
try {
initializeManifestLocalization();
} catch (BundleException e) {
framework.publishFrameworkEvent(FrameworkEvent.ERROR, this, e);
// return an empty dictinary.
return new Hashtable();
}
if (localeString == null)
localeString = Locale.getDefault().toString();
return manifestLocalization.getHeaders(localeString);
}
COM: <s> returns this bundles manifest headers and values </s>
|
funcom_train/3749085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getTitleArgs() {
if (logger.isDebugEnabled()) {
logger.debug("getTitleArgs() - start");
}
if (logger.isDebugEnabled()) {
logger.debug("getTitleArgs() - end - return value = " + titleArgs);
}
return titleArgs;
}
COM: <s> p arguments used in localized title string </s>
|
funcom_train/18745750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EdgeSignature getEdgeSignature(Shape to, EdgeSignature esFrom) {
return to.getEdgeSignature(
esFrom.getDirection(),
this.getNode(esFrom.getNode()),
esFrom.getLabel(),
to.getEquivClassOf(this.getNode(esFrom.getEquivClass().iterator().next())));
}
COM: <s> returns an edge signature in the given target shape </s>
|
funcom_train/14660980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButton getNonlinRadioButton() {
if (nonlinRadioButton == null) {
nonlinRadioButton = new JRadioButton();
nonlinRadioButton.setText("nonlinear estimation");
nonlinRadioButton.setPreferredSize(new Dimension(150, 24));
nonlinRadioButton
.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent e) {
manageEnabledDisabledFilterSel();
}
});
}
return nonlinRadioButton;
}
COM: <s> this method initializes nonlin radio button </s>
|
funcom_train/44458144 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private FunctionResult doGetVersion() {
FunctionResult builder = new FunctionResult();
builder.param("java.version", System.getProperty("java.version"));
builder.param("xmlenc.version", org.znerd.xmlenc.Library.getVersion());
builder.param("xins.version", Library.getVersion());
builder.param("api.version", _apiVersion);
return builder;
}
COM: <s> returns the xins version </s>
|
funcom_train/40000239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onLeaveLevel(int numberOfCoinsCollected, List<MoneyBagDTO> collectedMoneyBags) {
this.saveLevelProgress(collectedMoneyBags, numberOfCoinsCollected);
Intent dataIntent = new Intent(MyGameActivity.this, LevelSelectionGameActivity.class);
dataIntent.putExtra(CommonDataManager.NR_OF_COINS_COLLECTED_IN_LEVEL_KEY, "" + numberOfCoinsCollected);
this.setResult(RESULT_OK, dataIntent);
this.spawnExitLevelMenu();
//this.finish();
}
COM: <s> leaves the current level and returns to the menu selection screen activity </s>
|
funcom_train/38514037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseProjects(Element pNode) {
int start = getIntAttribute(pNode, XMLConstants.START_YEAR, Util.getCurrentYear());
String searchPath = getAttribute(pNode, XMLConstants.SEARCHPATH, Config.getSearchPath());
projects.setStartYear(start);
Config.setSearchPath(searchPath);
}
COM: <s> reads project container attributes out of a xml node </s>
|
funcom_train/47998142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setupButtonActions() {
closeButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
closeButtonClicked();
}
});
previousButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
previousButtonClicked();
}
});
nextButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
nextButtonClicked();
}
});
}
COM: <s> this method creates the eventhandlers for all the buttons </s>
|
funcom_train/42963131 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Collection getAllSkills(User user) {
Set allSkills = new HashSet();
for (Iterator iter = user.getSkills().iterator(); iter.hasNext();) {
Skill item = (Skill) iter.next();
allSkills.add(item.getSkillID());
}
return allSkills;
}
COM: <s> get all skills </s>
|
funcom_train/7756809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Hashtable getServiceParams() {
Hashtable copy = new Hashtable();
Enumeration keys = serviceParams.keys();
while (keys.hasMoreElements()) {
ID key = (ID) keys.nextElement();
Element e = (Element) serviceParams.get(key);
Element newDoc = StructuredDocumentUtils.copyAsDocument(e);
copy.put(key, newDoc);
}
return copy;
}
COM: <s> returns the sets of parameters for all services </s>
|
funcom_train/35492593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPlayer(Player player) throws JoinGameException {
if(this.state == GAMEPLAY)
throw new JoinGameException("Cannot join, game has already started.");
if(this.state == GAMEOVER)
throw new JoinGameException("Connot join, game is over.");
this.core.addPlayer(player);
}
COM: <s> adds a player to the game </s>
|
funcom_train/927435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getUp() {
double pd = 1;
if (getParentProductNode()!=null) {
pd = getParentProductNode().getDemand();
}
double demand = getDemand();
double qty = getQty();
if (demand==0 || qty == 0 || pd == 0 ) {
return 0;
}
double up = getDemand() / getQty() / pd * 100;
return up;
}
COM: <s> usage in one product </s>
|
funcom_train/35841194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPackage(Object newPackage) {
if (!isInDiagram(newPackage)) {
if (currentGM.canAddNode(newPackage)) {
FigPackage newPackageFig =
new FigPackage(currentGM, newPackage);
currentLayer.add(newPackageFig);
currentGM.addNode(newPackage);
currentLayer.putInPosition(newPackageFig);
}
}
}
COM: <s> add a package to the current diagram </s>
|
funcom_train/20891265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeLinkState(int nodeID1, int nodeID2, long startTime, MonitorParam mp) {
this.myNetState.changeLinkState(nodeID1, nodeID2, startTime, mp);
if (!mp.getParamName().equalsIgnoreCase("drop")) {
System.out.println("LinkState will be dropped, Node1: " + nodeID1 + " Node2: " + nodeID2);
}
}
COM: <s> call change link state function </s>
|
funcom_train/22208961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Topic resolve() {
String href = this.getHref();
if (!href.startsWith("#")) {
throw new TopicMapRuntimeException(
"External references not yet supported.");
} else {
String id = href.substring(href.lastIndexOf("#") + 1);
TopicMap topicMap = (TopicMap) this.getOwnerDocument()
.getDocumentElement();
return topicMap.getTopicByID(id);
}
}
COM: <s> resolves a topic ref to its corresponding topic </s>
|
funcom_train/18743391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel createButtonPanel() {
JPanel buttonPanel = new JPanel();
buttonPanel.add(getDefaultButton());
buttonPanel.add(getStartButton());
buttonPanel.add(getExploreButton());
buttonPanel.add(getCancelButton());
return buttonPanel;
}
COM: <s> creates the button panel </s>
|
funcom_train/11341163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Permission permission) {
if (!(permission instanceof DmtPermission))
throw new IllegalArgumentException(
"Cannot add permission, invalid permission type: "
+ permission);
if (isReadOnly())
throw new SecurityException(
"Cannot add permission, collection is marked read-only.");
// No need to synchronize because all adds are done sequentially
// before any implies() calls
perms.add(permission);
}
COM: <s> adds a permission to the dmt permission collection </s>
|
funcom_train/3424210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillXMLAttributes(Attributes att) {
fAttributes.removeAllAttributes();
final int len = att.getLength();
for (int i = 0; i < len; ++i) {
fillXMLAttribute(att, i);
fAttributes.setSpecified(i, true);
}
}
COM: <s> fills in the xmlattributes object </s>
|
funcom_train/18594581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testKeyCodeParsing() {
assertEquals("key 'A'", KeyEvent.VK_A,
AWT.getKeyCode("VK_A"));
assertEquals("key '0'", KeyEvent.VK_0,
AWT.getKeyCode("VK_0"));
}
COM: <s> check virtual keycode parsing </s>
|
funcom_train/40676554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void pushFilters(List<FilterPredicate> componentFilters) {
List<FilterPredicate> baseFilters = filtersStack.peek();
List<FilterPredicate> filters =
new ArrayList<FilterPredicate>(baseFilters.size() + componentFilters.size());
filters.addAll(baseFilters);
filters.addAll(componentFilters);
filtersStack.push(filters);
}
COM: <s> pushes a components filters onto the stack </s>
|
funcom_train/51392973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Capabilities parseCapabilities( WMService service, InputStream inStream ) throws IOException {
if ( WMService.WMS_1_1_1.equals( service.getVersion() )
|| WMService.WMS_1_1_0.equals( service.getVersion() ) ){
return parseCapabilities_1_1_1(service, inStream);
}
return parseCapabilities_1_0_0(service, inStream);
}
COM: <s> parses the wmt ms capabilities xml from the given input stream into </s>
|
funcom_train/31356863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int size() {
int size;
XMLObject xml;
try {
// send request for data set size
xml = new XMLObject("GETSIZE");
synchronized(out) {
out.writeObject(xml);
out.flush();
}
// get result
//size = in.readInt();
size = psapQueue.getInt();
} catch (Exception e) {
size = 0;
}
// return result to client
return size;
}
COM: <s> returns the number of binary data items streams received in the last request </s>
|
funcom_train/12174576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SAXParseException adjust(SAXParseException e) {
int colNo = e.getColumnNumber() - ROOT_ELEMENT.length() - 2;
return new ExtendedSAXParseException(e.getLocalizedMessage(), null, null,
e.getLineNumber(), colNo);
}
COM: <s> adjusts a saxparse exception so that its column number does not </s>
|
funcom_train/24138002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isBarCodeAlreadyExisting(String code) {
boolean ret = false;
try {
connectDB();
ResultSet res = stat.executeQuery("Select * from Customer WHERE Barcode='" + code + "'");
if(res.next()) { ret = true; }
closeDB();
}
catch(Exception e) { e.printStackTrace();}
return ret;
}
COM: <s> this function checks if given barcode is already existing in database or not </s>
|
funcom_train/4257789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRemainingPart() {
String result = null;
String all = toString(true, false);
if (getBaseRef() != null) {
String base = getBaseRef().toString(true, false);
if ((base != null) && all.startsWith(base)) {
result = all.substring(base.length());
}
} else {
result = all;
}
return result;
}
COM: <s> returns the part of the resource identifier remaining after the base </s>
|
funcom_train/3724183 | /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 instanceof ATMKey)
return (((ATMKey) obj).getATLASElement() == ae && ((ATMKey) obj).getHeaderObject() == headerObject);
else
throw new IllegalArgumentException("Must compare an ATMKey with another ATMKey");
}
COM: <s> needs to be implemented in order to work it out </s>
|
funcom_train/7598834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasPropertyValue(Resource s, Resource p, RDFNode o) {
if(s.isAnon() || (o instanceof Resource && ((Resource)o).isAnon())) {
// TODO create a query object from ABox
// each bnode in the abox becomes an (undistinguished) var in the
// query and a boolean query with no dist, vars is created
return false;
}
return kb.hasPropertyValue(node2term(s), node2term(p), node2term(o));
}
COM: <s> checks is a triple s p o exists in the knowledge base </s>
|
funcom_train/3461355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object initPath(String name) {
// check if this entry is a zip-file
String suffix = FilenameUtil.getExtension(name);
if (DEBUG) {
System.out.println("suffix = " + suffix);
}
if (suffix.equalsIgnoreCase("zip") || suffix.equalsIgnoreCase("jar")) {
return initZipFile(name, suffix);
} else { // if not, assume it is a directory
return initDirectory(name);
}
}
COM: <s> initializes a path entry </s>
|
funcom_train/2328051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fftRows() {
if (content instanceof DenseLargeDComplexMatrix2D) {
if (isNoView == true) {
((DenseLargeDComplexMatrix2D) content).fftRows();
} else {
DenseLargeDComplexMatrix2D copy = (DenseLargeDComplexMatrix2D) copy();
copy.fftRows();
assign(copy);
}
} else {
throw new IllegalArgumentException("This method is not supported");
}
}
COM: <s> computes the discrete fourier transform dft of each row of this matrix </s>
|
funcom_train/8607436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopProtectionActiveTask() {
cancelTask(TaskId.PROTECTION_ACTIVE);
Player player = getOwner();
if (player != null && player.isSpawned()) {
player.unsetVisualState(CreatureVisualState.BLINKING);
PacketSendUtility.broadcastPacket(player, new SM_PLAYER_STATE(player), true);
}
}
COM: <s> stops protection active task after first move or use skill </s>
|
funcom_train/48090192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public VideoMode detectVideoMode() throws IOException {
int [] vm = new int[3];
nativeGrabber.detectVideoMode(vm);
if (vm[0] != 0 && vm[1] != 0) {
videoMode = new VideoMode(vm[0], vm[1], vm[2]);
} else {
videoMode = null;
}
return videoMode;
}
COM: <s> detects video mode </s>
|
funcom_train/3813880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAncestorOf(Node node) {
if (descendants != null) {
return descendants.contains(node);
}
if (this.equals(node)) {
return true; // node is its own ancestor
}
Set<Node> seenNodes = new HashSet<Node>();
seenNodes.add(this);
return isAncestorHelper(this.getChildNodes(), node, seenNodes);
}
COM: <s> check whether this node is an ancestor of another node </s>
|
funcom_train/41114303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isPointAfterScrollThumb(Point point) {
int mousePosition = fOrientation.getPosition(point);
int thumbPosition = fOrientation.getPosition(getThumbBounds().getLocation())
+ fOrientation.getLength(getThumbBounds().getSize());
return mousePosition > thumbPosition;
}
COM: <s> true if the given point is after the end of the scroll thumb </s>
|
funcom_train/33515463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean possiblyAppliesToIndex(IndexSpecification indexSpec, Put put) {
for (List<KeyValue> familyPuts : put.getFamilyMap().values()) {
for (KeyValue kv : familyPuts) {
if (indexSpec.containsColumn(kv.getColumn())) {
return true;
}
}
}
return false;
}
COM: <s> ask if this put could apply to the index </s>
|
funcom_train/16483451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveSessionToFile() {
FileOutputStream fout;
try
{
fout = new FileOutputStream (SESSION_FILENAME);
new PrintStream(fout).println (getKey() + "," + getTimestamp() + "," + getCounter());
fout.close();
} catch (IOException e) {
logger.severe(e.getMessage());
}
}
COM: <s> saves the session details to disk </s>
|
funcom_train/17201995 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getStaticHelper(Instruction s, BasicBlock b) {
LocationOperand locOp = GetStatic.getLocation(s);
FieldReference field = locOp.getFieldRef();
registerUse(s, field);
if (uphi) {
registerDef(s, b, field);
}
}
COM: <s> record the effects of a getstatic instruction on the heap array </s>
|
funcom_train/10680788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNextValueAsByte(byte val) {
int new_data_size = data.length + BYTE_SIZE;
byte data_temp[] = data;
data = new byte[new_data_size];
System.arraycopy(data_temp, 0, data, 0, new_data_size - BYTE_SIZE);
data[new_data_size - BYTE_SIZE] = val;
}
COM: <s> sets the next value of the data of the packet as byte </s>
|
funcom_train/42401601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void onDragMouseOut(final MouseOutEvent event) {
Checker.notNull("parameter:event", event);
final Element element = this.getElement();
final Element eventTarget = event.getTarget();
if (false == element.isOrHasChild(eventTarget)) {
this.addStyleName(this.getOutOfBoundsStyle());
}
event.cancelBubble(true);
}
COM: <s> this method is called when mouse dragging is active and the mouse moves </s>
|
funcom_train/40221930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane getLobbyScrollbarPanel() {
if (lobbyScrollbarPanel == null) {
lobbyScrollbarPanel = new JScrollPane();
lobbyScrollbarPanel.setBounds(new Rectangle(11, 419, 581, 226));
lobbyScrollbarPanel.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
lobbyScrollbarPanel.setViewportView(getLobbyOutput());
lobbyScrollbarPanel.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
}
return lobbyScrollbarPanel;
}
COM: <s> this method initializes lobby scrollbar panel </s>
|
funcom_train/5165841 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sortByFitness() {
// The following construction could be cached but wrt that the
// evaluator registered with the configuration could change
// --> Don't cache it!
sort(new GPProgramFitnessComparator(getGPConfiguration().
getGPFitnessEvaluator()));
setChanged(false);
setSorted(true);
m_fittestProgram = m_programs[0];
}
COM: <s> sorts the programs within the population according to their fitness </s>
|
funcom_train/7959499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mousePressed(MouseEvent e) {
if (SwingUtilities.isLeftMouseButton(e)) {
startDrag = true;
ignoreDrag = false;
} else {
if (dragPoint != null) { // we were dragging
cancelDrag();
} else {
ignoreDrag = true; // ignore drag gesture with other than left button 2008/04/15
}
}
}
COM: <s> process mouse pressed on dockable drag source prepares a drag operation </s>
|
funcom_train/510804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(Element root, OutputStream out) throws IOException {
Writer wri = new OutputStreamWriter(out, "UTF8");
wri.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
write(root, wri, 0, " ");
wri.flush();
}
COM: <s> writes a dom tree to a stream in utf8 encoding </s>
|
funcom_train/28978320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Properties generateConnectionProperties() {
Properties p = new Properties();
p.setProperty(ConnectionFactory.KEY_USERNAME_PROPERTIE, getUserName());
p.setProperty(ConnectionFactory.KEY_DATABASE_PROPERTIE,
getDatabaseName());
p.setProperty(ConnectionFactory.KEY_HOST_PROPERTIE, getHostName());
p.setProperty(ConnectionFactory.KEY_TYPE_PROPERTIE, getType());
p.setProperty(ConnectionFactory.KEY_PASSWORD_PROPERTIE, getPassword());
logger.info(p);
return p;
}
COM: <s> generate the standard </s>
|
funcom_train/888199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ImageView createImageView (int fadeTime) {
//Create ImageView object.
ImageView imageView = new ImageView(this.getRoot(), 0, 0, this.getRoot().getWidth(), this.getRoot().getHeight());
imageView.setFadeTime(fadeTime);
return imageView;
}
COM: <s> create image view object </s>
|
funcom_train/5460594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadCrawlerHandler() {
try {
apertureServerCrawlerHandler = new DrupalCrawlerHandler(this.apertureRegistries,
configurationModelSet.getModel(APERTURESERVER_CRAWLERHANDLERCONTEXTURI), this);
log.log(Level.CONFIG, "Loaded crawler handler configuration.");
} catch (Exception x) {
log.log(Level.WARNING, "Cannot initialize Crawler Handler: "+x, x);
}
}
COM: <s> load the crawler handler </s>
|
funcom_train/39819336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SessionFactory buildSessionFactory() throws HibernateException {
log.debug( "Preparing to build session factory with filters : " + filterDefinitions );
secondPassCompile();
validate();
Environment.verifyProperties( properties );
Properties copy = new Properties();
copy.putAll( properties );
Settings settings = buildSettings();
return new SessionFactoryImpl( this, mapping, settings, sessionEventListenerConfig.shallowCopy() );
}
COM: <s> instantiate a new tt session factory tt using the properties and </s>
|
funcom_train/15810273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPortServer(int portS) throws InvalidArgumentException {
if (portS < 0)
throw new InvalidArgumentException(
"JAIN-SIP "
+ "Exception, SecurityClient, setPortServer(), the port-s parameter is <0");
setParameter(ParameterNamesIms.PORT_S, portS);
}
COM: <s> set server port port s parameter </s>
|
funcom_train/31096911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasNonSpaceChildren() {
if (this.children.size() > 0) {
java.util.Enumeration childIter = children.elements();
while (childIter.hasMoreElements()) {
if (! (childIter.nextElement() instanceof DisplaySpace)) {
return true;
}
}
}
return false;
}
COM: <s> tell whether this area contains any children which are not </s>
|
funcom_train/668400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void mapItem(Object key, Object item, TreeMap map) {
Vector list = (Vector) map.get(key);
if (list == null) {
list = new Vector();
map.put(key, list);
}
list.add(item);
/*
* the following list is not optimal for performance To do: change
* vectors to sorted list for optimal performance
*/
Collections.sort(list);
}
COM: <s> this method add an item in a map of vectors </s>
|
funcom_train/47999382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMapName() {
if (!mapNameTextField.getText().equals("")) {
mapName = mapNameTextField.getText();
gmap.setMapName(mapName);
mapNameTextField.setBackground(new java.awt.Color(255, 255, 255));
// MapName##############################################################
} else {
mapName = "";
mapNameTextField.setBackground(new java.awt.Color(255, 255, 0));
}
}
COM: <s> method saves map name in variable </s>
|
funcom_train/28899090 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean deleteRecord (String id) {
boolean res = false;
String rec = getRecordText(id);
if (! DataStoreDriver.NOT_FOUND.equals(rec)) {
try {
dataStoreDriverImpl.deleteAnnotation(id);
res = true;
}
catch (AnnoteaException ex) {
ex.printStackTrace();
}
}
return res;
}
COM: <s> deletes a record </s>
|
funcom_train/7275864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void populate(LimeXMLDocument doc) {
title = doc.getValue(LimeXMLNames.VIDEO_TITLE);
year = doc.getValue(LimeXMLNames.VIDEO_YEAR);
comment = doc.getValue(LimeXMLNames.VIDEO_COMMENTS);
language = doc.getValue(LimeXMLNames.VIDEO_LANGUAGE);
license = doc.getValue(LimeXMLNames.VIDEO_LICENSE);
}
COM: <s> populates the fields with the values from the lime xmldocument </s>
|
funcom_train/18486938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeString(String sessionId, String content, boolean close) {
try {
sessionListener.write(sessionId, content.getBytes(), close);
} catch (Exception ex) {
outError.fireOutPin("" + JavaUtils.stackToString(ex));
}
}
COM: <s> take content as string and write it to clients browser </s>
|
funcom_train/32964420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Account findAccountTemplate(Account account) {
Account templateAccount = account.getAccountTemplate();
if (templateAccount == null) {
AccountTemplate accountTemplate = em.find(AccountTemplate.class, account.getAccountType().getKnownType());
templateAccount = accountTemplate.getAccount();
}
return templateAccount;
}
COM: <s> given an account return its account template the account containing </s>
|
funcom_train/22077415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DirContext destroyAndCreate(DirContext ctxToDestroy ) throws MapperTechnicalException {
try {
factory.disconnect(ctxToDestroy);
} catch (Exception e) {
log.warn("Error in disconnecting for destroy" + ctxToDestroy, e);
}
try {
return factory.connect();
} catch (Exception e) {
throw new MapperTechnicalException(
"Error in creating connection from factory", e);
}
}
COM: <s> destroyes the given dir context and retrieves a new one </s>
|
funcom_train/36003609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelection(int selection) {
int lastSelection = this.selection;
this.selection = Math.min(MathFP.ONE, Math.max(0, selection));
if (this.selection != lastSelection) {
if (horizontal) {
barLayoutData.width = this.selection;
barLayoutData.height = -1;
} else {
barLayoutData.width = -1;
barLayoutData.height = this.selection;
}
barHidden = this.selection == MathFP.ONE || this.selection == 0;
bar.invalidate();
}
}
COM: <s> define the scroll bar selection </s>
|
funcom_train/35724011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(TestCaseModel testCase) {
checkNotNull(testCase);
String key = testCase.getKey();
checkNotNull(key);
TestStoreItem storeItem = itemStore.get(key);
checkArgument(storeItem instanceof TestCaseModel);
itemStore.put(key, testCase);
applyFilter(testCase);
}
COM: <s> updates the test case </s>
|
funcom_train/20394595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setChildrenSupported(boolean childrenSupported) {
if (this.childrenSupported != childrenSupported) {
this.childrenSupported = childrenSupported;
if (!childrenSupported) {
for (int i = 0; i < getChildren().size(); i++) {
remove((JSTreeNode) children.get(i));
}
}
}
}
COM: <s> sets whether this node supports child nodes or not </s>
|
funcom_train/16619369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void draw(Cgview cgview, double radius, float thickness) {
Iterator i = ranges.iterator();
while (i.hasNext()) {
FeatureRange currentFeatureRange = (FeatureRange) i.next();
currentFeatureRange.draw(cgview, radius, thickness);
//remove once drawn
//i.remove();
}
}
COM: <s> draws this feature and creates labels if necessary </s>
|
funcom_train/15942170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JComponent createView(Iterator<MemoryLogModel> memoryLogModels) {
JTabbedPane tabPane = new JTabbedPane();
while (memoryLogModels.hasNext()) {
MemoryLogModel memoryLogModel = memoryLogModels.next();
tabPane.addTab(getTabTitle(memoryLogModel),
createTabForSession(memoryLogModel));
}
return tabPane;
}
COM: <s> creates a tab pane containing one or more tabs </s>
|
funcom_train/38828606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void calcOrdinateForward(double x, Ordinate o) {
// Uncambered ordinate.
double sqrtx = Math.sqrt(x);
double x2 = x*x;
o.y = a0*sqrtx + a1*x + a2*x2 + a3*x2*x;
o.yp = 0.5*a0/sqrtx + a1 + 2*a2*x + 3*a3*x2;
o.ypp = -0.5*0.5*a0/Math.sqrt(x2*x) + 2*a2 + 3*2*a3*x;
}
COM: <s> method to calculate the ordinates of the uncambered airfoil </s>
|
funcom_train/26525756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeMetrics(Object key){
//TODO: fill in.
MetricsMetaData data = (MetricsMetaData)m_myMetrics.get(key);
fireMetricsEvent(key, data.getMetrics(), null, MetricsListener.METRICS_REMOVE);
m_myMetrics.remove(key);
m_metricsTimeouts.remove(key);
}
COM: <s> removes metrics from the manager </s>
|
funcom_train/21619934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetOrigTrans() throws Exception {
System.out.println("setOrigTrans");
TransactionBO t2 = new TransactionBO(GUID.generate(), cust.getId(), store.getId(), emp.getId());
trans.setOrigTrans(t2);
assertEquals("Unable to get or set original transaction.", true, trans.getOrigTrans() == t2);
}
COM: <s> test of set orig trans method of class edu </s>
|
funcom_train/13993336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValueAt(Object value, int rowIndex, int columnIndex) {
if (columnIndex == STATE_COLUMN_INDEX) { throw new IllegalArgumentException(
"state column is not editable"); }
model.setValue(model.getValueObject(rowIndex),
getPropertyName(columnIndex), value);
}
COM: <s> sets the value at code row index code and code column index code </s>
|
funcom_train/7620846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean performLongClick() {
boolean handled = false;
if (mOnLongClickListener != null) {
handled = mOnLongClickListener.onLongClick(View.this);
}
if (!handled) {
handled = showContextMenu();
}
if (handled) {
performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
}
return handled;
}
COM: <s> call this views on long click listener if it is defined </s>
|
funcom_train/2420559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SortStatus getSortStatus() {
if (sortKeys.isEmpty()) {
return null;
}
SortKey key = sortKeys.get(0);
OperationLogTableColumn column = treeModel.getColumnDescriptor(key.getColumn());
return new SortStatus(column, key.getSortOrder());
}
COM: <s> returns the curernt code sort status code </s>
|
funcom_train/13506993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Simulation findSimulation(ResultI root) {
Simulation sim;
ResultI r1 = root.getLeaf(ParaOptimal.type);
if( r1 == null ) r1 = root.getLeaf(Parameters.type);
if( r1 != null ) {
sim = (Simulation)r1.getLeaf(Simulation.type);
if( sim != null ) {
subTitle = " - optimized";
return sim;
}
}
sim = (Simulation)root.getLeaf(Simulation.type);
if( sim != null ) subTitle = " - simulated";
return sim;
}
COM: <s> search for simulation in para optimal result then in parameters </s>
|
funcom_train/41862627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getButtonParar() {
if (buttonParar == null) {
buttonParar = new JButton();
buttonParar.setAction(getPararServidorAction());
buttonParar.setText("Parar");
buttonParar.setEnabled(false);
getPararServidorAction().putValue(
IniciarServidorAction.BOTAO_INICAR_SERVIDOR,
getButtonIniciar());
getPararServidorAction().putValue(
IniciarServidorAction.BOTAO_PARAR_SERVIDOR,
getButtonParar());
getPararServidorAction().putValue(
IniciarServidorAction.LABEL_STATUS_SERVIDOR, labelStatus);
}
return buttonParar;
}
COM: <s> this method initializes button parar </s>
|
funcom_train/12670732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setButtons(boolean onoff, boolean chooseall) {
copyItem.setEnabled(onoff);
copyfileItem.setEnabled(onoff);
zoomInItem.setEnabled(onoff);
zoomOutItem.setEnabled(onoff);
zoomExtentsItem.setEnabled(onoff);
refreshItem.setEnabled(onoff);
errboxItem.setEnabled(onoff);
zoomInButton.setEnabled(onoff);
zoomOutButton.setEnabled(onoff);
zoomExtentsButton.setEnabled(onoff);
refreshButton.setEnabled(onoff);
copyButton.setEnabled(onoff);
if (chooseall) {
closeItem.setEnabled(onoff);
dragButton.setEnabled(onoff);
}
}
COM: <s> enable disable just the usable needed buttons </s>
|
funcom_train/45250028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVisible(boolean visible) {
if (fTrim.getControl() != null && !fTrim.getControl().isDisposed()) {
fTrim.getControl().setVisible(visible);
}
if (fDockingHandle != null && fDockingHandle.getControl() != null
&& !fDockingHandle.getControl().isDisposed()) {
fDockingHandle.getControl().setVisible(visible);
}
}
COM: <s> update the visibility of the trim controls </s>
|
funcom_train/32158451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int write(byte... bytes) throws IOException, BufferOverflowException, ClosedChannelException {
ensureStreamIsOpenAndWritable();
if (bytes.length > 0) {
writeQueue.append(DataConverter.toByteBuffer(bytes));
onWriteDataInserted();
return bytes.length;
} else {
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("warning length of byte array to send is 0");
}
return 0;
}
}
COM: <s> writes bytes to the data sink </s>
|
funcom_train/34342318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getCodcuenta() {
if (codcuenta == null) {//GEN-END:|33-getter|0|33-preInit
// write pre-init user code here
codcuenta = new TextField("Codigo Cuenta", null, 9, TextField.NUMERIC);//GEN-LINE:|33-getter|1|33-postInit
// write post-init user code here
}//GEN-BEGIN:|33-getter|2|
return codcuenta;
}
COM: <s> returns an initiliazed instance of codcuenta component </s>
|
funcom_train/43526286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double wordProb(String word) {
Value<State> alpha = initial(1.0);
for (int t = 0; t < word.length(); ++t) {
alpha = forward(alpha, word.charAt(t));
}
return alpha.getValue(I) * I.prRestart(EOW);
}
COM: <s> the probability that the hmm generates a word </s>
|
funcom_train/2580438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CategoryItemRenderer getRendererForDataset(CategoryDataset dataset) {
CategoryItemRenderer result = null;
for (int i = 0; i < this.datasets.size(); i++) {
if (this.datasets.get(i) == dataset) {
result = (CategoryItemRenderer) this.renderers.get(i);
break;
}
}
return result;
}
COM: <s> returns the renderer for the specified dataset </s>
|
funcom_train/3813157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BatchItem getBatchItem(File file) throws IOException {
List<String> list = BatchFile.getLines(file.getPath());
if (list.size() != 1) {
throw new IOException("Bad batch file size");
}
String line = list.get(0);
return new BatchItem(BatchFile.getFilename(line),
BatchFile.getReference(line));
}
COM: <s> given a file parse the contents of the file into a batch item </s>
|
funcom_train/40225996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void toAddCheck(final IValidator validator) throws IllegalArgumentException {
if(validator == null) throw new IllegalArgumentException("A validator must be specified.");
for(final IValidator v : validators) {
if(v == validator || v.getClass() == validator.getClass()) {
throw new IllegalArgumentException("This validator or one of the same type already exists.");
}
}
}
COM: <s> ensures that only one validator of the given type exists </s>
|
funcom_train/5713465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetBytes(){
KeypadFacility kf = new KeypadFacility();
kf.setKeypadInformation("hallo".toCharArray());
KeypadFacility test = new KeypadFacility(kf.getBytes());
assertEquals("check keypadInformation", "hallo", String.valueOf(test.getKeypadInformation()));
}
COM: <s> tests the correct getting of bytes </s>
|
funcom_train/11316953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Handler createHandler() {
ServletContextHandler boshContext = new ServletContextHandler(ServletContextHandler.SESSIONS);
boshContext.setContextPath(contextPath);
BoshServlet boshServlet = new BoshServlet();
boshServlet.setServerRuntimeContext(serverRuntimeContext);
boshServlet.setAccessControlAllowOrigin(accessControlAllowOrigin);
boshContext.addServlet(new ServletHolder(boshServlet), "/");
return boshContext;
}
COM: <s> create handler for bosh </s>
|
funcom_train/20400315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addException(String id, Exception exception) {
List<Exception> el = null;
if (allExceptions.containsKey(id)) {
el = (List<Exception>) allExceptions.get(id);
} else {
el = new java.util.ArrayList<Exception>();
allExceptions.put(id, el);
}
el.add(exception);
chronologicalErrorMessages.add(exception.getMessage());
}
COM: <s> adds the specified exception to the exception map </s>
|
funcom_train/12803617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Vector getRowData( Object anObject ) {
Vector rowData = new Vector();
if ( rowBuilder == null ) {
performer.setObject( anObject );
String accessor;
for ( Iterator iter=accessors.iterator();iter.hasNext(); ) {
accessor = (String) iter.next();
rowData.add( performer.getPropertyValue( accessor ) );
}
}
else {
rowData = rowBuilder.getRowData( anObject );
}
return rowData;
}
COM: <s> get the data for an object </s>
|
funcom_train/47296977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void xferToBean(ActionForm form, ProgramDTO program, String action, TwistUserDTO user) throws ModuleException {
program.setOrig_dol_apprhrs_cert_cd((String) ((DynaValidatorForm) form).get("orig_dol_apprhrs_cert_cd"));
program.setDol_apprhrs_cert_cd((String) ((DynaValidatorForm) form).get("dol_apprhrs_cert_cd"));
}
COM: <s> transfer data from form to bean </s>
|
funcom_train/3155612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Parameter createParameter(String name, String value) throws RequestElementFactoryException {
Guardian.assertNotNullOrEmpty("value", value);
Parameter param;
try {
param = createParamWithDefaultValueSet(name);
param.setValueAsText(value, null);
} catch (IllegalArgumentException e) {
throw new RequestElementFactoryException(e.getMessage());
}
return param;
}
COM: <s> creates a code parameter code given the parameter name and value </s>
|
funcom_train/18744725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeStartGraphs(Set<String> names) throws IOException {
if (names != null) {
if (this.startGraphs.removeAll(names)) {
this.startGraphModel = null;
this.externalStartGraph = false;
getProperties().setStartGraphNames(this.startGraphs);
getStore().putProperties(getProperties());
invalidate();
}
}
}
COM: <s> removes the given names from the start graphs and propagates the change </s>
|
funcom_train/21913434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLabelWidthPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_UIMField_labelWidth_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_UIMField_labelWidth_feature", "_UI_UIMField_type"),
UIMPackage.Literals.UIM_FIELD__LABEL_WIDTH,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the label width feature </s>
|
funcom_train/50463042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeExtensionPart(URL extURL, String version, String[] parts) throws IOException {
if(parts == null) return;
for(int i=0;i<parts.length;i++) {
removeExtensionPart(extURL, version, parts[i]);
}
}
COM: <s> remove a list of extenions parts </s>
|
funcom_train/38740798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean closeSession(){
try{
return port.closeSession(this.session.getSessionId());
}catch(Exception ex){
this.error = (ex instanceof SOAPFaultException)? ex.getMessage() : ex.getClass().getSimpleName()+": "+ ex.getMessage();
return false;
}
}
COM: <s> this method closes the current session </s>
|
funcom_train/30033671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Double getCurrentTime()
{
LRCState rtiReference = (LRCState) getFederate().getFederateReference();
int federateHandle = getFederate().getFederateHandle();
// Return value
Double retval = 0.0;
try
{
// Get TimeManager instance
TimeManager manager = rtiReference.getTimeManager();
// Get Federate current time
retval = manager.getCurrentTime( federateHandle );
}
catch( Exception e )
{
// Throw federate variables unavailable exception
throw new FederateVariablesUnavailableException( e.getMessage() );
}
return retval;
}
COM: <s> returns the current time for a federate with a given federate handle </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.