__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/42519941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void defineTactics() {
try {
this.tactics = new Tactics(getNumberByTL(Constants.DEFENDER), getNumberByTL(Constants.MIDFIELDER), getNumberByTL(Constants.FORWARD));
} catch (TacticsException te) {
System.out.println("Invalid tactics");
}
}
COM: <s> define tactics based on the selected lineup </s>
|
funcom_train/777392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBadConfigNoCfg() {
try {
//JadePlatform platformMBeans[] =
jadeRuntime.platformsFromConfigResource(
BAD_CONFIG_RESOURCE_NOCFG);
fail("didn't raise exception trying to use bad config with zero jademx-config elements");
}
catch ( JademxException e ) {
assertTrue(true);
}
}
COM: <s> test trying to use a configuration with bad xml zero configurations </s>
|
funcom_train/10595797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() throws Exception {
if (!this.format.containsKey(OutputKeys.ENCODING) && this.defaultEncoding != null) {
this.format.put(OutputKeys.ENCODING, this.defaultEncoding);
}
this.cachingKey = createCachingKey(format);
initTransformerFactory();
initNamespacePipe();
}
COM: <s> initialize logger caching key transformer handler and namespace pipe </s>
|
funcom_train/18427802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkDefaultCategoriesCreated() {
if (usedDefaultCategories < 0) // we don't know if we used default categories
getAll();
if (usedDefaultCategories > 0) { // we used categories
RecordStore rs = Utilities.openRecordStore("categories");
if (rs != null) {
for (int i = 0, count = DEFAULT_CATEGORIES.length; i < count; i++)
Utilities.writeRecord(rs, DEFAULT_CATEGORIES[i]);
Utilities.closeRecordStore(rs);
}
}
}
COM: <s> ensures the defualt categories are created if needed </s>
|
funcom_train/10010447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void format(List<Alignment> alignmentList) {
writer.println("<html>");
writer.println("<head>");
writer.println("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>");
writer.println("</head>");
writer.println("<body>");
writer.println("<table border=\"1\" cellpadding=\"5\">");
for (Alignment alignment : alignmentList) {
writer.println("<tr>");
formatStrings(alignment.getSourceSegmentList());
formatStrings(alignment.getTargetSegmentList());
writer.println("</tr>");
}
writer.println("</table>");
writer.println("</body>");
writer.println("</html>");
}
COM: <s> formats the alignment into full html page containing a table with </s>
|
funcom_train/43647026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bell(final SessionPane session) {
if (resource.getBooleanValue(Resource.USE_CUSTOM_BELL)) {
try {
java.applet.Applet.newAudioClip(
new File(resource
.getStringValue(Resource.CUSTOM_BELL_PATH))
.toURI().toURL()).play();
} catch (final MalformedURLException e) {
e.printStackTrace();
}
} else {
java.awt.Toolkit.getDefaultToolkit().beep();
}
if (!isTabForeground(session)) {
session.setState(SessionPane.STATE_ALERT);
}
}
COM: <s> sound an alert from certain session </s>
|
funcom_train/3815387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Edge linkNodes(Node sourceNode, Node destinationNode) {
Edge newLink = new Edge(sourceNode, destinationNode);
sourceNode.addOutgoingEdge(newLink);
destinationNode.addIncomingEdge(newLink);
if (!isNodeInGraph(sourceNode)) {
addNode(sourceNode);
}
if (!isNodeInGraph(destinationNode)) {
addNode(destinationNode);
}
addEdge(newLink);
return newLink;
}
COM: <s> link two nodes </s>
|
funcom_train/18239673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics2D graphics){
graphics2D = graphics;
AffineTransform oldTransform = graphics.getTransform();
//scale by altitude
graphics.scale(scaleFactor, scaleFactor);
//now paint our glyphs
rootGlyph.paint(this);
//return to old transform
graphics.setTransform(oldTransform);
}
COM: <s> sets the this graphics2 d field to the </s>
|
funcom_train/25300503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getRemoveButton() {
if (removeButton == null) {
removeButton = new JButton();
removeButton.setText("Remover Feature");
removeButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
getBaseTable().removeFeature();
}
});
}
return removeButton;
}
COM: <s> this method initializes remove button </s>
|
funcom_train/25056833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void spinOffExternalIdBatchWriter() {
if (dmaArgs.doExternalEntityImport()) {
externalIdsBatchWriterThread = new DmaThreads("EEId BatchWriter", ExternalEntityIdBatchWriter.class.getName(), this, false, false);
externalIdsBatchWriterThread.execute();
}
}
COM: <s> spin off external entity id retrieval from external entity scratch table </s>
|
funcom_train/5725694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteBookmarksOfUniversity(final Long universityId) {
logger.debug("----------> BEGIN method deleteBookmarksOfUniversity <----------");
Validate.notNull(universityId, "The universityId cannot be null.");
try {
desktopService2.unlinkAllFromUniversity(universityId);
} catch (DesktopException de) {
logger.error(de.getMessage());
}
logger.debug("----------> End method deleteBookmarksOfUniversity <----------");
}
COM: <s> delete bookmarks of the given university from all users </s>
|
funcom_train/3990257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTetnicePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BadanieOkresowe_tetnice_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BadanieOkresowe_tetnice_feature", "_UI_BadanieOkresowe_type"),
PrzychodniaPackage.Literals.BADANIE_OKRESOWE__TETNICE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the tetnice feature </s>
|
funcom_train/10632167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RefAddr get(String type) {
Enumeration<RefAddr> elements = addrs.elements();
RefAddr refAddr = null;
while (elements.hasMoreElements()) {
refAddr = elements.nextElement();
if (type.equals(refAddr.getType())) {
return refAddr;
}
}
return null;
}
COM: <s> gets an address where the address type matches the specified string </s>
|
funcom_train/44224266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean mostlyOverlapping(Rectangle r) {
// Every dimension must intersect. If any dimension
// does not intersect, return false immediately.
for (int i = 0; i < DIMENSIONS; i++) {
float mid = (r.max[i] + r.min[i]) / 2.0f;
if (max[i] < mid || min[i] > mid ) {
return false;
}
}
return true;
}
COM: <s> determine whether this rectangle intersects the passed rectangle with </s>
|
funcom_train/927177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertNode(DefaultMutableTreeNode newNode, DefaultMutableTreeNode parent) {
//Don't add product as product's child
if (newNode instanceof ProductNode) {
parent = getConfigurationNode();
}
m_TreeModel.insertNodeInto(newNode, parent, parent.getChildCount());
m_Tree.setSelectionPath(new TreePath(newNode.getPath()));
m_Tree.scrollPathToVisible(new TreePath(newNode.getPath()));
}
COM: <s> insert new node to jtree </s>
|
funcom_train/48709677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void transferTo(Account to,int amount) throws NotEnoughMoneyException {
if (balance-amount < -limit) {
throw new NotEnoughMoneyException(this);
}
Transaction.getBuilder().setType(TType.transfer).setAccounts(this, to).setAmount(amount).build();
}
COM: <s> make a transfer of money from your account to another account </s>
|
funcom_train/12836647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void findRemoteAgents(String goal, RemoteAgent agent){
// look for the unique name of the agent
String agentName = getAgentName(agent);
// build the message
String[] goalName = new String[1];
goalName[0] = goal;
Message message = new Message(Message.REQUEST);
message.setSender(agentName);
message.setAttributes(FIND_AGENTS,goalName);
message.setReceiverName("RemoteSystemAgentLoader");
//TODO broadcast request
this.transport.sendMessage(message);
}
COM: <s> this class broadcasts a request to each recheable platform for agents matching </s>
|
funcom_train/34523681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BigDecimal toBigDecimal() {
BigDecimal n = new BigDecimal(numer);
BigDecimal d = new BigDecimal(denom);
MathContext mc = new MathContext((int)Math.min(n.precision() +
(long)Math.ceil(10.0*d.precision()/3.0),
Integer.MAX_VALUE),
RoundingMode.HALF_EVEN);
return n.divide(d, mc);
}
COM: <s> convert this rational number to a code big decimal code </s>
|
funcom_train/29829363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void maybeUpdateResultPresence(String groupName, BSPresenceInfo pi) {
if (rosterBean == null || pi == null) return;
Enumeration jidEnum = rosterBean.getJIDsInGroup(groupName);
while (jidEnum.hasMoreElements()) {
JID jid = (JID) jidEnum.nextElement();
maybeUpdateResultPresence(jid, pi);
}
}
COM: <s> if given presence is stronger updates the resultant presence for jid </s>
|
funcom_train/8327228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConnectionPropsCannotBeOverridden() {
Set<RolapConnectionProperties> overrideableProps = Util.enumSetOf(
RolapConnectionProperties.Catalog,
RolapConnectionProperties.Locale);
for (RolapConnectionProperties prop :
RolapConnectionProperties.class.getEnumConstants())
{
if (!overrideableProps.contains(prop)) {
// try to override prop
assertSetPropertyFails(prop.name(), "Connection");
}
}
}
COM: <s> tests that non overrideable properties cannot be overridden in a </s>
|
funcom_train/40620066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TextBox addTextField(String field) {
TextBox box = new TextBox();
box.setTitle(field);
booking.setText(curRow, 0, field + ":");
booking.setWidget(curRow, 1, box);
++curRow;
return box;
}
COM: <s> create a boring text field </s>
|
funcom_train/18885377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void syncState() {
// check the stack to see if the layer has changed
if (mControler.getStack() != null && mControler.getStack().getSelectedLayer() != null) {
mLayerSlider.setNumberOfSlices(mControler.getStack().getLayers().length);
mLayerSlider.setSelectedLayer(mControler.getStack().getSelectedLayerIdx());
}
mViewPort.repaint();
}
COM: <s> checks to see that the current menu and stack view </s>
|
funcom_train/3416341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(char cbuf[], int off, int len) throws IOException {
if (sink == null) {
throw new IOException("Pipe not connected");
} else if ((off | len | (off + len) | (cbuf.length - (off + len))) < 0) {
throw new IndexOutOfBoundsException();
}
sink.receive(cbuf, off, len);
}
COM: <s> writes code len code characters from the specified character array </s>
|
funcom_train/9520719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Position oppositeRanks() {
Position result = (Position) clone();
for (int i = 0; i < board.length; i++) {
for (int j = 0; j < board[i].length; j++) {
int oppositeRank = CoordinatesUtil.getOppositeRank(i);
result.setInternal(oppositeRank, j, get(i, j));
}
}
result.removeCaching();
return result;
}
COM: <s> position formed if all of the ranks became their opposite </s>
|
funcom_train/38324906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Fact createNSFact(Object data, Defclass dclass, long id) {
Deftemplate dft = (Deftemplate) getCurrentFocus().getTemplate(dclass);
NSFact fact = new NSFact(dft, dclass, data, dft.getAllSlots(), id);
return fact;
}
COM: <s> convienance method for creating a non shadow fact </s>
|
funcom_train/51376513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected CrontabEntry findCronById(Crontab crontab, long id) {
List l = crontab.getAllEntries();
if (l.size() == 0) {
return null;
}
for (Iterator i = l.iterator(); i.hasNext();) {
CrontabEntry entry = (CrontabEntry) i.next();
if (entry.getCounter() == id) {
return entry;
}
}
return null;
}
COM: <s> make sure cron manager is synchronized before calling this function </s>
|
funcom_train/42278088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isBitSet(char[] key, int bitIndex) {
int iter=0;
while (bitIndex>=LENGTH){
bitIndex-=LENGTH;
iter++;
}
if (iter>key.length-1) return false;
return (key[iter] & BITS[bitIndex]) != (char)0;
}
COM: <s> checks whether the given key has 1 at bit index position </s>
|
funcom_train/36125097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Resource getResource(String resourceName) throws NoActionException {
validateNonNullParameter(resourceName, "resourceName");
if (!getResources().containsKey(resourceName)) {
if (getResources().containsKey("")) {
resourceName = "";
} else {
throw new NoActionException(resourceName);
}
}
Resource result = getResources().get(resourceName);
assert result != null : "result shouldn't be null";
return result;
}
COM: <s> returns the resource with specified name defined defined in this </s>
|
funcom_train/34009582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ConfigurationManager(final String xmlFile) {
getLog().debug(
String.format("Starting public constructor for "
+ "ConfigurationManager with %s as argument.", xmlFile));
if (!xmlFile.equals(ConfigurationManager.CANNOT_FIND_XML_FILE)) {
loadConfigurationFromXml(xmlFile);
}
}
COM: <s> constructor for configuration mediator accepts the xml </s>
|
funcom_train/46055389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateDefaultOrg(int index) {
Element[] orgs = getOrganizationList();
String newDefault = orgs[index].getAttributeValue(SCORM12_Core.IDENTIFIER);
_sequencerModel.setDefaultOrg(newDefault);
try {
_sequencerModel.saveDocument();
} catch (IOException ex) {
throw new OLATRuntimeException(this.getClass(), "Could not save changes to default organization. ", ex);
}
}
COM: <s> method to change the default organization in the navigation file </s>
|
funcom_train/21901025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load() {
try {
Roma.schema().getSchemaClass(search);
setSelectedAvailableClassName(search);
loadClasses();
ObjectContext.getInstance().fieldChanged(this, "availableClassNames");
Roma.aspect(FlowAspect.class).forward(new MessageOk("", "", null, "The Class is now available in list!"));
}
catch (Exception e) {
Roma.aspect(FlowAspect.class).forward(new MessageOk("", "", null, "Class not found"));
}
}
COM: <s> load a class given the name </s>
|
funcom_train/44011492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetTransTax() {
System.out.println("getTransTax");
TransactionBO instance = new TransactionBO();
double expResult = 0.0;
double result = instance.getTransTax();
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 trans tax method of class edu </s>
|
funcom_train/27784897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isGraphing(String name) {
Vector levels = chart.getLevels();
Iterator levelsIterator = levels.iterator();
name = name.toUpperCase();
while(levelsIterator.hasNext()) {
Vector graphs = (Vector)levelsIterator.next();
Iterator graphIterator = graphs.iterator();
while(graphIterator.hasNext()) {
Graph graph = (Graph)graphIterator.next();
if(name.equals(graph.getSourceName()))
return true;
}
}
// If we got here it wasnt found
return false;
}
COM: <s> return if we graphing the given symbol portfolio </s>
|
funcom_train/33060362 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildTestSecurities(){
Hashtable hSecurities = new Hashtable();
// first security
TreeBond firstBond = new TreeBond();
firstBond.dCouponRate = 0.04;
firstBond.dPrice = 100;
hSecurities.put(new Integer(2), firstBond);
TreeBond secondBond = new TreeBond();
secondBond.dCouponRate = 0.045;
secondBond.dPrice = 100;
hSecurities.put(new Integer(3), secondBond);
hSecurityList = hSecurities;
}
COM: <s> builds and returns a hashtable holding a simple collection of test </s>
|
funcom_train/41163433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(CoScoreExercises2 entity) {
EntityManagerHelper.log("deleting CoScoreExercises2 instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(CoScoreExercises2.class, entity.getId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent co score exercises2 entity </s>
|
funcom_train/13815373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void valueFieldEnterPressed() {
if (!valueField.isEditValid()) {
//The text is invalid.
Toolkit.getDefaultToolkit().beep();
valueField.selectAll();
} else try { //The text is valid,
valueField.commitEdit(); //so use it.
} catch (java.text.ParseException exc) {
}// TODO add your handling code here:
}
COM: <s> event handler that is called when user presses enter in value field </s>
|
funcom_train/28108300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toJPEG(BufferedImage img, OutputStream out) throws Exception {
// set to maximum jpeg quality, so no compression artefacts occur
float quality = 1;
// Creating JPEG encoder
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam( img );
param.setQuality( quality, true );
encoder.encode(img, param);
}
COM: <s> exports the buffered image to output stream in jpeg format </s>
|
funcom_train/22401235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void interact(int type, GraphControl.GraphElementFacade e, GraphCanvas gc, GraphControl.Cluster root) {
canvas = gc;
rootCluster = root;
//call the specific interaction for each type
if(type == NODE){
interact((GraphControl.Node)e);
} else if(type == EDGE){
interact((GraphControl.Edge)e);
} else if(type == CLUSTER){
interact((GraphControl.Cluster)e);
}
}
COM: <s> this method is called from graph control in response to a </s>
|
funcom_train/50499468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void verticalScroll( int val ) {
// move all the controls up/down.
Control child;
Rect r;
Control[] children = contentPane.getChildren();
for ( int index = 0; index < children.length; index++ ) {
child = children[ index ];
r = child.getRect();
r.y += ( offset.y - val );
child.setRect( r.x, r.y, r.width, r.height );
}
offset.y = val;
contentPane.repaint();
}
COM: <s> must move all if its children up or down the appropriate </s>
|
funcom_train/11362901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MarketSummaryDataBean getMarketSummaryInternal() throws Exception {
if (Log.doActionTrace()) {
Log.trace("TradeAction:getMarketSummaryInternal()");
}
MarketSummaryDataBean marketSummaryData = null;
marketSummaryData = tradeServicesList[TradeConfig.getRunTimeMode().ordinal()].getMarketSummary();
return marketSummaryData;
}
COM: <s> compute and return a snapshot of the current market conditions this </s>
|
funcom_train/43568202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element getDefine(Document grammar, String name) {
Elements defines = grammar.getRootElement().getChildElements(Constants.DEFINE, Constants.RNG_NS);
for (int i = 0; i < defines.size(); i++) {
Element define = defines.get(i);
if(define.getAttributeValue(Constants.NAME).equals(name)) {
return define;
}
}
return null;
}
COM: <s> get a named define being a child of root </s>
|
funcom_train/31361133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void select(boolean selected) {
this.selected = selected;
//update ActionEvent
if (selected) cardLayer.removeActionListener(CardSet.getInstance());
else cardLayer.addActionListener(CardSet.getInstance());
//draw Selection
//if (selected) setPane.add(this.selectLayer, new Integer(30));
//else setPane.remove(this.selectLayer);
if (selected) cardLayer.setEnabled(false);
else cardLayer.setEnabled(true);
}
COM: <s> method to select a card </s>
|
funcom_train/7635091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showDialog(boolean keyguardShowing, boolean isDeviceProvisioned) {
mKeyguardShowing = keyguardShowing;
mDeviceProvisioned = isDeviceProvisioned;
if (mDialog == null) {
mStatusBar = (StatusBarManager)mContext.getSystemService(Context.STATUS_BAR_SERVICE);
mDialog = createDialog();
}
prepareDialog();
mStatusBar.disable(StatusBarManager.DISABLE_EXPAND);
mDialog.show();
}
COM: <s> show the global actions dialog creating if necessary </s>
|
funcom_train/9538801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean showSource(String url, int lineNumber, Object timeStamp) {
if(url != null && url.endsWith(".clj"))
logger.log(Level.INFO,"Trying to show source for :"+url);
return proxy().showSource(url, lineNumber, timeStamp);
}
COM: <s> shows source with given url on given line number </s>
|
funcom_train/47998530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reshape(GLAutoDrawable gld, int x, int y, int width, int height) {
viewWidth = width;
viewHeight = height;
gl.glViewport(0, 0, width, height);
gl.glMatrixMode(GL.GL_PROJECTION);
gl.glLoadIdentity();
gl.glOrtho(0.f, fieldWidth, 0.f, fieldHeight, -100.0f, 2000.0f);
gl.glMatrixMode(GL.GL_MODELVIEW);
gl.glLoadIdentity();
}
COM: <s> the method is called whenever the size the window has changed </s>
|
funcom_train/3315027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsAll(Collection<?> c){
boolean reply = false;
if (useMerge(c)){
reply = !SortedCollectionFilter.exclusiveIterator(
asE(c).iterator(), this, comparator()).hasNext();
} else {
reply = super.containsAll(c);
}
return reply;
}
COM: <s> returns code true code if this set contains all of the elements </s>
|
funcom_train/11372103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateCurrentThreadName(String status) {
StringBuilder sb = new StringBuilder();
sb.append("DataXceiver for client ").append(remoteAddress);
if (status != null) {
sb.append(" [").append(status).append("]");
}
Thread.currentThread().setName(sb.toString());
}
COM: <s> update the current threads name to contain the current status </s>
|
funcom_train/51749851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rotateRight() {
if(!isBusy()) {
active--;
if(active < 0)
active+=this.getFramesPerGroup();
AbstractLogWriter.getInstance().write(this, "activating frame "+active+" containing "+this.getActiveFile() , AbstractLogWriter.OK);
alpha[1].setStartTime(System.currentTimeMillis());
}
}
COM: <s> rotates the group clockwise </s>
|
funcom_train/36109377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Component getPathNameComponent(DataWrapper type) {
switch(type.getId()) {
case TYPE_JAVA_LIBRARY: return new JLabel(bundle.getString("ExternalModuleEditor.fullPathToJavaLibrary"));
case TYPE_PROGRAM: default: return new JLabel(bundle.getString("ExternalModuleEditor.fullPathToProgram"));
}
}
COM: <s> getting name component for path </s>
|
funcom_train/45697805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void incrementSizeAndDepth(final int childIncSize, final int depth) {
invalidate();
size += childIncSize;
if (maxDepth < depth) {
maxDepth = depth;
}
if (parent != null) {
parent.incrementSizeAndDepth(childIncSize, depth + 1);
}
}
COM: <s> increment the size and depth </s>
|
funcom_train/50078310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void destroyComponent(String logicalComponentName) {
if (log.isTraceEnabled()) {
log.trace("destroying component: " + logicalComponentName);
}
LifecycleInterceptor requestedComponent;
// remove the component from the componentMap but maintain a
// reference to it in order to call its destroy lifecycle method
requestedComponent =
(LifecycleInterceptor) removeComponent(logicalComponentName);
if (requestedComponent != null) {
requestedComponent.destroyComponent();
}
}
COM: <s> p destroys the component specified by the name parameter </s>
|
funcom_train/3593727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void transform(org.jdom.Document input, String xslfilename) {
if ((xslfilename != null) && (xslfilename.length() > 0)) {
//do the first stage of the transformation
transformStepOne(input, xslfilename);
source_doc = input;
// System.out.println("Done; Now transform XML\n");
transformStepTwo(input);
}
}
COM: <s> the transform method for simple corpora </s>
|
funcom_train/25289882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIncreasingAlphaRampDuration(long increasingAlphaRampDuration) {
increasingAlphaRamp = increasingAlphaRampDuration;
incAlphaRampInternal = (float) increasingAlphaRampDuration * .001f;
if (incAlphaRampInternal > (0.5f * increasingAlpha)) {
incAlphaRampInternal = 0.5f * increasingAlpha;
}
VirtualUniverse.mc.sendRunMessage(Ding3dThread.RENDER_THREAD);
}
COM: <s> set this alphas increasing alpha ramp duration to that specified </s>
|
funcom_train/37836896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void hilite(Graphics graphics, JComponent button) {
graphics.setColor(style.getHighLightColor());
Insets insets = button.getInsets();
// -1 to avoid right and bottom lines ending under the border
int width = button.getWidth() - insets.right - insets.left - 1;
int height = button.getHeight() - insets.top - insets.bottom - 1;
graphics.drawRect(insets.left, insets.top, width, height);
}
COM: <s> draws the mouse focus highlighting </s>
|
funcom_train/2639729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean forEachEntry(TShortLongProcedure procedure) {
byte[] states = _states;
short[] keys = _set;
long[] values = _values;
for (int i = keys.length; i-- > 0;) {
if (states[i] == FULL && ! procedure.execute(keys[i],values[i])) {
return false;
}
}
return true;
}
COM: <s> executes tt procedure tt for each key value entry in the </s>
|
funcom_train/4362692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setString( String s ) {
strValue=s;
hasHashCode=false;
hasIntValue=false;
hasLongValue=false;
hasDateValue=false;
if (s == null) {
hasStrValue=false;
type=T_NULL;
} else {
hasStrValue=true;
type=T_STR;
}
}
COM: <s> set the content to be a string </s>
|
funcom_train/39333262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addColumnPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_HManyToOne_column_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_HManyToOne_column_feature", "_UI_HManyToOne_type"),
MetaPackage.Literals.HMANY_TO_ONE__COLUMN,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the column feature </s>
|
funcom_train/11701869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float toFloat() {
try {
return UTFConverter.convertUTFToFloat(data);
} catch (UTFDataFormatException e) {
throw new LeafCastException(NOT_UTF8_ERROR);
} catch (NumberFormatException e) {
throw new LeafCastException("Not a float: " + toString());
}
}
COM: <s> converts the utf 8 data to a java float type </s>
|
funcom_train/17203933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unschedule(Instruction i) {
if (!SchedulingInfo.isScheduled(i)) {
throw new InternalError("Not scheduled");
}
OperatorClass opc = i.operator().getOpClass();
int[] ru = opc.masks[SchedulingInfo.getAlt(i)];
unschedule(ru, SchedulingInfo.getTime(i));
SchedulingInfo.resetInfo(i);
}
COM: <s> frees resources for given instruction </s>
|
funcom_train/41187696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parseConvertDocument(final XHtmlPDFWinProcess process, final String doc, final String outputPath, final boolean hasLaunchProcess) {
final CreatePDFDelegate delegate = new CreatePDFDelegate();
delegate.setAdobePathExe(this.adobePathExe);
delegate.parseConvertDocument(process, doc, outputPath, hasLaunchProcess, stylesRootText.getText());
}
COM: <s> parse and convert to pdf the document </s>
|
funcom_train/4461764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean verify() {
/*
if(false) {
MessageBox mb = new MessageBox(
matrix.getFrame(),
"Error in Nexus 'Interleave At' value",
"You specified an invalid or un-understandable value for the Nexus 'Interleave at' argument.\n\nI am going to set it to interleave at 1000bp instead. Is this okay?",
MessageBox.MB_YESNO);
if(mb.showMessageBox() == MessageBox.MB_YES)
//tf_nexusOutputInterleaved.setText("1000");
;
else
// MB_NO
return false;
}
*/
return true;
}
COM: <s> check to make sure that all input makes sense </s>
|
funcom_train/39045456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getAboutMenuItem() {
JMenuItem aboutMenuItem = getItem("ABOUT", helperMenu);
if (aboutMenuItem == null) {
aboutMenuItem = new JMenuItem(Language.MENU_HELPER_ITEM_ABOUT);
aboutMenuItem.setName("ABOUT");
aboutMenuItem.setIcon(new ImageIcon(Resource.getInstance().loadImage(ImageResourcePath.MENU_APPLICATION_ICON)));
aboutMenuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
new AboutDialog();
}
});
}
return aboutMenuItem;
}
COM: <s> this method initializes about menu item </s>
|
funcom_train/36062374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SiteGroupDescriptor getGroupDescriptor( String groupName ) throws SQLException, InputValidationException, NoDatabaseConnectionException, NotFoundException{
// 0 -- Precondition check
// The preconditions will be checked in the getGroupDescriptor(long) and getGroupId methods.
// 1 -- Retrieve the user ID
int groupId = getGroupID( groupName );
// 2 -- Get the group descriptor
return getGroupDescriptor( groupId );
}
COM: <s> get the site group associated with the given name </s>
|
funcom_train/18548561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private AreaTO populateBeanByResultSet(ResultSet rs) throws DataAccessException{
AreaTO response = new AreaTO();
response.setId(getString(rs, "ID"));
response.setName(getString(rs, "NAME"));
response.setDescription(getString(rs, "DESCRIPTION"));
return response;
}
COM: <s> return an area to filled with data from result set </s>
|
funcom_train/38940523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean deleteDirectoryWebSite(File path) throws WebSiteRemovalException {
getDataAccessLogger().debug("Remove directory: " +path);
if(path.exists()) {
File[] files = path.listFiles();
for(int i=0; i<files.length; i++) {
if(files[i].isDirectory()) {
deleteDirectoryWebSite(files[i]);
}
else {
files[i].delete();
}
}
}
return(path.delete());
}
COM: <s> delete the web site directory recursively </s>
|
funcom_train/7273161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopPlugin(Plugin p) {
//Make sure its not in RUNNING_PLUGINS any more.
if (RUNNING_PLUGINS!=null &&
RUNNING_PLUGINS.containsKey(p.getName())) {
RUNNING_PLUGINS.remove(p.getName());
}
//In case a download for this plugin was happening
tryCancellingPreviousPluginDownload(p);
//Have the PluginLoader tell the PyObject to stop before we destroy him
PluginLoader.getInstance().stopPlugin(p);
} //stopPlugin
COM: <s> stops a plugin </s>
|
funcom_train/38542494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(final Object o) {
int result = -2;
if (o != null) {
if (!(o instanceof Enumeration)) {
throw new ClassCastException("Objects of type "
+ o.getClass().getName()
+ " cannot be compared to objects of type Enumeration.");
}
result = this.getName().compareTo(((Enumeration) o).getName());
}
return result;
}
COM: <s> this method enables to compare two enmerated values </s>
|
funcom_train/46817784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void revokeClaim() throws ErrorMessage {
logger.debug("nulling owner");
((Task) object).getPeopleLinks().setOwner(null);
logger.debug("update the state change");
((Task) object).setState(TaskTool.STATE_READY);
logger.debug("commit changes");
commit();
}
COM: <s> execute the revoke claim use case </s>
|
funcom_train/18303082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void hookContextMenu() {
MenuManager menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager manager) {
NavigatorView.this.fillContextMenu(manager);
}
});
Menu menu = menuMgr.createContextMenu(viewer.getControl());
viewer.getControl().setMenu(menu);
getSite().registerContextMenu(menuMgr, viewer);
}
COM: <s> fills the context menu for this view does nothing special </s>
|
funcom_train/43110051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertBeanInTarget(String oldName) {
assertTargetPresent();
if (UuahHierarchicalBeanDefinitionParserDelegate.testFlag(getBean()
.getBeanDefinition(),
UuahHierarchicalBeanDefinitionParserDelegate.UUAH_POST_CHILDREN)) {
insertDefinitionAsMap(oldName);
} else {
// called for the first time, so set the flag and store this
// assembler for
// later processing
UuahHierarchicalBeanDefinitionParserDelegate
.setFlag(
getBean().getBeanDefinition(),
UuahHierarchicalBeanDefinitionParserDelegate.UUAH_POST_CHILDREN);
store.saveBeanAssembler(this);
}
}
COM: <s> we overwrite this method to populate a map instead of inserting the </s>
|
funcom_train/26492459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Hashtable getOneOfAllPrefs( BigDecimal owner) throws SQLException{
Hashtable prefs = new Hashtable();
try{
con = allocateConnection(tableName);
ps = con.prepareStatement("select * from user_Preferences where owner=?");
ps.setBigDecimal(1,owner);
rs = con.executeQuery(ps,null);
while(rs.next()){
prefs.put(rs.getString("name"),new PrefsDO(rs));
}
}catch(SQLException e){
if(DEBUG)
e.printStackTrace();
throw e;
}finally{
release();
}
return prefs;
}
COM: <s> gets one instance of all preferences for a user </s>
|
funcom_train/28296737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fill3DRect(int x, int y, int width, int height, boolean raised) {
Color originalColor = getColor();
if (raised) {
setColor(originalColor.brighter().brighter());
} else {
setColor(originalColor.darker().darker());
}
draw(new Rectangle(x, y, width, height), "fill");
setColor(originalColor);
draw3DRect(x, y, width, height, raised);
}
COM: <s> fills a 3 d rectangle </s>
|
funcom_train/7620309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bindInput(InputBinding binding) {
mInputBinding = binding;
mInputConnection = binding.getConnection();
if (DEBUG) Log.v(TAG, "bindInput(): binding=" + binding
+ " ic=" + mInputConnection);
InputConnection ic = getCurrentInputConnection();
if (ic != null) ic.reportFullscreenMode(mIsFullscreen);
initialize();
onBindInput();
}
COM: <s> handle a new input binding calling </s>
|
funcom_train/34999168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Pagination forNewMessages(int totalRecords) {
this.recordsPerPage = this.config.getInt(ConfigKeys.TOPICS_PER_PAGE);
this.totalRecords = totalRecords;
this.totalPages = this.calculeTotalPages();
this.thisPage = this.calculeThisPage(this.start);
this.start = this.calculeStart(this.start, this.recordsPerPage);
this.baseUrl = String.format("/%s/%s", Domain.FORUMS, Actions.NEW_MESSAGES);
this.id = 0;
return this;
}
COM: <s> create pagination for new messages </s>
|
funcom_train/15891924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasTag(String tag) {
if(tagCnt == 0) return false;
int hash = tag.hashCode();
for(int i = 0; i < tagCnt; i++) {
if(i < TAGBASE) {
if(tags[i] == hash) return true;
} else {
if(((Integer)moreTags.elementAt(i-TAGBASE)).intValue() == hash) return true;
}
}
return false;
}
COM: <s> check if this element has the supplied tag </s>
|
funcom_train/34246340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOriginalFmmObject(FmmObject aFmmObject) {
getDataEditorSupport().initializeMasterObject(aFmmObject);
if (defaultDirectoryField != null) {
defaultDirectoryField.refresh(this);
SwingUtilities.invokeLater(new Runnable() {
public void run() { defaultDirectoryField.selectAll(); } });
}
updateTitle();
updateObjectContext();
}
COM: <s> sets the original fmm object </s>
|
funcom_train/43245554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetRegisteringEmpoyeeDUZNumber() {
System.out.println("setRegisteringEmpoyeeDUZNumber");
String registeringEmpoyeeDUZNumber = "";
ApplicationObject instance = new ApplicationObject();
instance.setRegisteringEmpoyeeDUZNumber(registeringEmpoyeeDUZNumber);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set registering empoyee duznumber method of class org </s>
|
funcom_train/43829341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parseRow(String inLine) throws Exception {
String[] splitLine;
int tmpArrayId;
splitLine = inLine.split(DELIMITER,-1);
tmpArrayId = Integer.parseInt(splitLine[arrayIDIndex]);
if (myRepository != null) {
myRepository.NewRow(
arrayIdCollection.get(tmpArrayId).parseRow(splitLine));
}
}
COM: <s> attempt parse of an individual row </s>
|
funcom_train/46735456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFacilityLocationRef(DisplayModel facilityLocationRef) {
if (Converter.isDifferent(this.facilityLocationRef, facilityLocationRef)) {
DisplayModel oldfacilityLocationRef= new DisplayModel(this);
oldfacilityLocationRef.copyAllFrom(this.facilityLocationRef);
this.facilityLocationRef.copyAllFrom(facilityLocationRef);
setModified("facilityLocationRef");
firePropertyChange(String.valueOf(TERMS_FACILITYLOCATIONREFID), oldfacilityLocationRef, facilityLocationRef);
}
}
COM: <s> facility owning these terms </s>
|
funcom_train/8680240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int classifyTag(int nameCode) {
int r = 0;
String tag = getNamePool().getDisplayName(nameCode);
if (inlineTable.contains(tag)) {
r |= IS_INLINE;
}
if (formattedTable.contains(tag)) {
r |= IS_FORMATTED;
}
return r;
}
COM: <s> classify an element name as inline formatted or both or neither </s>
|
funcom_train/18037301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTextStringValue(Object object) {
if (debugging) {
System.out.println("getTextStringValue() :" +
((XMLEvent) object).toString());
}
if (isText(object)) {
return ((Characters) object).getData();
} else {
return null;
}
}
COM: <s> get the string value of text </s>
|
funcom_train/48406777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBaseConfigurationPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MethodConfiguration_baseConfiguration_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_MethodConfiguration_baseConfiguration_feature", "_UI_MethodConfiguration_type"),
SpemxtcompletePackage.eINSTANCE.getMethodConfiguration_BaseConfiguration(),
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the base configuration feature </s>
|
funcom_train/25710182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int runDivergencematrix() {
String[] command = {
binaryDirectory + "divergencematrix" + binaryExtension,
workingDirectory + "correctpcr.out",
workingDirectory + "identitymatrix.dat",
Boolean.toString(masterVariables.getDebug())
};
return runApplication("Divergence Matrix", command, true);
}
COM: <s> run the divergencematrix program </s>
|
funcom_train/35724497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String executeAction(final int code) throws IOException {
if (code < 0 || code > 14) {
throw new IllegalArgumentException("Unknown action <"+code+">; must be in the range 1-14");
}
return executeAPICommand("action="+String.valueOf(code));
}
COM: <s> executes an action </s>
|
funcom_train/23636087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addUsagePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BOMEntry_usage_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BOMEntry_usage_feature", "_UI_BOMEntry_type"),
CescsmodelPackage.Literals.BOM_ENTRY__USAGE,
true,
false,
false,
ItemPropertyDescriptor.REAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the usage feature </s>
|
funcom_train/169384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setMyKeeper(int line) {
JPanel m_clTorwart;
constraints.gridx = 0;
constraints.gridy = line;
constraints.gridwidth = 4;
m_clTorwart = mainPanel.getMyTeam().getKeeperPanel();
m_clTorwart.setOpaque(false);
layout.setConstraints(m_clTorwart, constraints);
centerPanel.add(m_clTorwart);
}
COM: <s> sets a lineup line in the proper line on the grid bag grid </s>
|
funcom_train/4231413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void circle(Collection vertices) {
Dimension d = getMaxSize(vertices);
double max = Math.max(d.width, d.height);
Object[] v = vertices.toArray();
double r = v.length * max / Math.PI * circleRadiusFactor;
double phi = 2 * Math.PI / vertices.size();
for (int i = 0; i < v.length; i++)
setLocation(v[i], r + r * Math.sin(i * phi), r + r
* Math.cos(i * phi));
}
COM: <s> arrange the specified vertices into a circular shape with a regular </s>
|
funcom_train/4692094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getB_start() {
if (b_start == null) {
b_start = new JButton();
b_start.setText("Start");
b_start.setBounds(new Rectangle(240, 30, 75, 29));
b_start.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
logica.iniciarRiego();
}
});
}
return b_start;
}
COM: <s> this method initializes b start </s>
|
funcom_train/1165964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JSONObject showFriendships(String source_id,String target_id) throws WeiboException {
return get(getBaseURL() + "friendships/show.json?target_id="+target_id+"&source_id="+source_id+"&source="+CONSUMER_KEY, true).asJSONObject();
}
COM: <s> return the details of the relationship between two users </s>
|
funcom_train/569183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException
{
final OperationMonitor wrapper = new OperationMonitor(monitor);
try { Main.getApplication().getArchive().delete(filenames, wrapper); }
catch (CancelException e)
{
// ...
}
catch (Exception e)
{
Main.getApplication()
.showError("An error occurred while trying to delete from the archive.", e);
}
}
COM: <s> runs the operation that deletes files from an archive </s>
|
funcom_train/45692153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addEmptyPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SongPattern_empty_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SongPattern_empty_feature", "_UI_SongPattern_type"),
EsxPackage.Literals.SONG_PATTERN__EMPTY,
false,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the empty feature </s>
|
funcom_train/47735021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private AttachingConnector getConnector() {
VirtualMachineManager vmManager = Bootstrap.virtualMachineManager();
for (Connector connector : vmManager.attachingConnectors()) {
writ.writer("Preparing connector: " + connector.name());
if ("com.sun.jdi.SocketAttach".equals(connector.name())) {
return (AttachingConnector) connector;
}
}
throw new IllegalStateException();
}
COM: <s> prepare connector to attempted to attach to traceable process </s>
|
funcom_train/36684565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void endFrame() {
// TODO Auto-generated method stub
// System.out.println(this+" position: "+getVelocity()+" | angularPosition "+getAngularPosition());
// System.out.println("lastCollideSet:"+lastCollideSet);
// System.out.println("collideSet:"+collideSet);
}
COM: <s> called every time update position is called for the body </s>
|
funcom_train/37584352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JVMBuilder environment(Map<? extends String, ? extends String> env) {
return new JVMBuilder(_javaCommand, _jvmArgs, _classPath, _dir, _properties,
(_environment == null) ? null : snapshot(env), true);
}
COM: <s> produce a jvmbuilder setting the environment to the given mapping may be </s>
|
funcom_train/23411165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNormIDPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Norm_normID_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Norm_normID_feature", "_UI_Norm_type"),
OMPackage.Literals.NORM__NORM_ID,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the norm id feature </s>
|
funcom_train/2630681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PNode removeChild(final int index) {
if (children == null) {
return null;
}
final PNode child = (PNode) children.remove(index);
if (children.size() == 0) {
children = null;
}
child.repaint();
child.setParent(null);
invalidateFullBounds();
firePropertyChange(PROPERTY_CODE_CHILDREN, PROPERTY_CHILDREN, null, children);
return child;
}
COM: <s> remove the child at the specified position of this group nodes children </s>
|
funcom_train/1106671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleMessageFromServer(Object msg) {
Message message = Message.parse(msg.toString());
switch (message.getContenttype()) {
case TEXT:
clientUI.display(message.getContent().toString());
break;
case FILE:
clientUI.display(message.getContent().toString());
break;
case LIST:
clientUI.display(message.getContent().toString());
case ACKNOWLEDGE:
break;
default:
break;
}
}
COM: <s> this method handles all data that comes in from the server </s>
|
funcom_train/50915844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public void sortEnumerations() {
// TreeSet<CMLEnumeration> treeSet = new TreeSet<CMLEnumeration>();
// for (CMLEnumeration enumeration : this.getEnumerationElements()) {
// treeSet.add(enumeration);
// enumeration.detach();
// }
// Iterator<CMLEnumeration> iterator = treeSet.iterator();
// while (iterator.hasNext()) {
// CMLEnumeration enumeration = (CMLEnumeration) iterator.next();
// this.appendChild(enumeration);
// }
// }
COM: <s> sort enumerations in each entry </s>
|
funcom_train/10942248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GenericValue getRelatedOneEmbeddedCache(String relationName) throws GenericEntityException {
if (relatedOneCache == null) relatedOneCache = FastMap.newInstance();
GenericValue value = relatedOneCache.get(relationName);
if (value == null) {
value = getRelatedOne(relationName);
if (value != null) relatedOneCache.put(relationName, value);
}
return value;
}
COM: <s> get the named related entity for the generic value from the persistent </s>
|
funcom_train/24629998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void repaint(long ms) {
// repaint(ms, 0,0, bbox.width+1,bbox.height+1); => NOT THIS
// repaint(ms, dx(),dy(), bbox.width+1,bbox.height+1); => AND NOT THIS
INode p = getParentNode();
if (p != null)
p.repaint(ms, bbox.x, bbox.y, bbox.width + 1, bbox.height + 1);
}
COM: <s> repaint node itself not in content coordinates </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.