__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/14012164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isInferenceModelValid() throws AcuityException {
ValidityReport validity = getTheModel().validate();
if (validity.isValid()) {
logger.info("Model is consistent.");
return true;
} else {
logger.warn("Model contains conflicts:\n");
for (Iterator i = validity.getReports(); i.hasNext();) {
ValidityReport.Report report = (ValidityReport.Report) i.next();
logger.warn(" - " + report);
}
return false;
}
}
COM: <s> method to check the inference model inf model corresponding </s>
|
funcom_train/12836501 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void activate() {
if (!initialized) {
System.err.println("CPNManager can't start before it is initialized!");
return;
}
theSimulator = new ThreadedSimulator((Net)cpn);
theSimulator.start();
System.out.println("["+cpnAgent.getAgentName()+"] : " + "CPN execution of net "+((Net)cpn).getName()+" is started.");
}
COM: <s> activates the execution of the cpn </s>
|
funcom_train/15601255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void broadcastMessage(IMessage Message) throws EMessageTooLarge {
// Creating a copy of all connection handlers
Collection<CMediatorClientConnectionHandler> connections;
synchronized (m_ConnectionHandlers) { connections = m_ConnectionHandlers.values(); }
for (CMediatorClientConnectionHandler current : connections) {
try { current.sendMessage(Message); }
catch (EMessageSending Ignore) { /* ignore, try to broadcast to the next connection */ }
}
}
COM: <s> p broadcast the message to all client connection handlers </s>
|
funcom_train/39887201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object parseObject(String string) throws ParseException {
ParsePosition position = new ParsePosition(0);
Object result = parseObject(string, position);
if (position.getIndex() == 0) {
throw new ParseException("parse failure", position.getErrorIndex());
}
return result;
}
COM: <s> parses the specified string using the rules of this format </s>
|
funcom_train/18895553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void allocateHeadBlock(int blockId) throws IOException {
if (headBlock != null) {
if (blockId == (int) headBlock.getBlockId()) {
headBlockDirty = false;
return;
}
releaseHeadBlock();
}
headBlock = findBlock(blockId);
if (headBlock == null) {
headBlock = blockFile.allocateBlock(objectPool, blockId);
}
headBlockDirty = false;
}
COM: <s> allocates a buffer from block file to hold the head block </s>
|
funcom_train/31452931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void storeSettings() {
CollaborillaConfiguration collabConfig = new CollaborillaConfiguration(ConfigurationManager.getConfiguration());
collabConfig.setCollaborillaServiceRoot(serviceField.getText());
collabConfig.setProxyServer(proxyServerField.getText());
collabConfig.setProxyPort(proxyPortField.getText());
collabConfig.storeLocations(locationsModel);
collabConfig.setUserNamespace(namespaceField.getText());
saveAgentInformation();
}
COM: <s> stores the settings to the configuration </s>
|
funcom_train/6204783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireChanges(final IResource[] changes) {
Display display = SWTUtil.getStandardDisplay();
if (display != null && !display.isDisposed()) {
display.asyncExec(new Runnable() {
/*
* (non-Javadoc)
* @see java.lang.Runnable#run()
*/
public void run() {
Object[] listeners = markerListeners.getListeners();
for (int i = 0; i < listeners.length; i++) {
IGaijinMarkerListener listener = (IGaijinMarkerListener) listeners[i];
listener.markersChanged(changes);
}
}
});
}
}
COM: <s> fire a change notification to all interested listeners </s>
|
funcom_train/13563443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean init(){
try{
// get root elements from JAXB matsim4urbansim config object
ConfigType matsimParameter = matsimConfig.getConfig();
Matsim4UrbansimType matsim4UrbanSimParameter = matsimConfig.getMatsim4Urbansim();
initGlobalSettings(); // tnicolai: experimental
initMATSim4UrbanSimParameter(matsim4UrbanSimParameter);
initNetwork(matsimParameter);
initInputPlansFile(matsimParameter);
initControler(matsimParameter);
initPlanCalcScore(matsimParameter);
initSimulation();
initStrategy();
}catch(Exception e){
e.printStackTrace();
return false;
}
return true;
}
COM: <s> transferring all parameter from matsim4urbansim config to internal matsim config scenario </s>
|
funcom_train/42751553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void provideCleanedDirectory(String vPath) throws CErrorException {
logger.info("Emptying work directory '" + vPath + "'");
// try to request a garbage collect, hoping for file references to be cleaned up - this is a workaround
// for http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6266377
System.gc();
File vRoot = new File(vPath);
if(vRoot.exists()){
recursiveDelete(vRoot);
}
createDirectoryIfNotExistent(vPath);
}
COM: <s> provides an empty directory by deleting any existing directory at that location </s>
|
funcom_train/29290057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateQuestionChoice(QuestionChoiceCMPData data) throws EJBException {
try {
QuestionChoiceCMPLocal qestionChoiceLocal = getQuestionChoiceCMPLocalHome()
.findByPrimaryKey(data.getChoice_id());
qestionChoiceLocal.setContent(data.getContent());
qestionChoiceLocal.setChoice_mark(data.getChoice_mark());
qestionChoiceLocal.setIscorrect(data.getIscorrect());
qestionChoiceLocal.setPicture(data.getPicture());
} catch (FinderException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
COM: <s> update question choice business method </s>
|
funcom_train/31487640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void disconnect() {
if(isConnecting) {
//so disconnect shows correctly irc_server
isWantingToDisconnect = true;
return;
}
if(threadIRCReceiver!=null)
threadIRCReceiver.stopIRCReceiverThread = true;
if(null != socket)
try {
socket.close();
} catch(Exception e) {}
socket = null;
if(null != fileServerMessages)
try {
fileServerMessages.close();
} catch (Exception e) {}
fileServerMessages = null;
isWantingToDisconnect = false;
}
COM: <s> disconnect us from the irc server </s>
|
funcom_train/34627496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isLikePunctuationMark(char next) {
switch (next) {
case '.':
case ',':
case '!':
case '?':
case ';':
case ':':
case '-':
case ')':
case ']':
case '}':
case '=':
return true;
default:
return false;
}
COM: <s> returns true if i next i is a character that could stand </s>
|
funcom_train/37077197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JMenuBar getMenuBar() {
JMenuBar menuBar = this.getRootPane().getJMenuBar();
if (menuBar == null) {
menuBar = new JMenuBar();
this.getRootPane().setJMenuBar(menuBar);
}
return menuBar;
}
COM: <s> method for easy access to menu bar </s>
|
funcom_train/1238546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SymTabEntry get(QName qname, Class cls) {
Vector v = (Vector) symbolTable.get(qname);
if (v == null) {
return null;
} else {
for (int i = 0; i < v.size(); ++i) {
SymTabEntry entry = (SymTabEntry) v.elementAt(i);
if (cls.isInstance(entry)) {
return entry;
}
}
return null;
}
} // get
COM: <s> get the entry with the given qname of the given class </s>
|
funcom_train/3362416 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String removeSpace(String s) {
s = s.trim();
int j = s.indexOf(' ');
if (j == -1) {
return s;
}
String temp = "";
int k = 0;
while (j != -1) {
s = s.substring(k);
j = s.indexOf(' ');
if (j != -1) {
temp = temp + s.substring(0, j);
} else {
temp = temp + s.substring(0);
}
k = j + 1;
}
return temp;
}
COM: <s> removes any white space from a string </s>
|
funcom_train/37422454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Typology findTypology(long pId) throws ClassNotFoundException, SQLException {
Enumeration tEnum = findTypologyByQuery("select * from typology where id_typology = " + pId).elements();
if (tEnum.hasMoreElements())
return (Typology) tEnum.nextElement();
else
return null;
}
COM: <s> finds a typology in the database </s>
|
funcom_train/15607648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPropertyListToMap(List propertyList, Map returnMap) {
GenomicProperty nextProp = null;
for (Iterator it = propertyList.iterator(); it.hasNext(); ) {
nextProp = (GenomicProperty)it.next();
returnMap.put(nextProp.getName(), nextProp);
} // For all iterations
} // End method: addPropertyListToMap
COM: <s> util function to add props to map keyed by name </s>
|
funcom_train/46640396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createDocument(String atom) {
try {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true); // never forget this!
DocumentBuilder builder = factory.newDocumentBuilder();
document = builder.parse(new InputSource(new StringReader(atom)));
}
catch (Exception e) {
logger.error("Failed to create document from xml string!", e);
throw new RuntimeException("Failed to create document from xml string!", e);
}
}
COM: <s> creates our document from the xml string </s>
|
funcom_train/5395843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDecode() {
System.out.println("decode");
long src = 0L;
boolean signed = true;
FloatPacker instance = null;
float expResult = 0.0F;
float result = instance.decode(src, signed);
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 decode method of class org </s>
|
funcom_train/24637997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getBuilding() {
if (RoomNumber_Type.featOkTst && ((RoomNumber_Type)jcasType).casFeat_building == null)
jcasType.jcas.throwFeatMissing("building", "org.apache.uima.tutorial.RoomNumber");
return jcasType.ll_cas.ll_getStringValue(addr, ((RoomNumber_Type)jcasType).casFeatCode_building);}
COM: <s> getter for building gets building containing this room </s>
|
funcom_train/16316810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadConfig() {
if (!configFile.exists()) {
config = new Filters();
return;
}
try {
Unmarshaller unm = CONFIG_CTX.createUnmarshaller();
config = (Filters) unm.unmarshal(configFile);
} catch (Exception e) {
Log.logErrorRB("FILTERMASTER_ERROR_LOADING_FILTERS_CONFIG");
Log.log(e);
config = new Filters();
}
}
COM: <s> loads information about the filters from an xml file </s>
|
funcom_train/51346027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadSingleThreaded(AbstractTripleStore db, final File dataDir) {
final DataLoader dataLoader = db.getDataLoader();
// load file/directory of files.
try {
dataLoader.loadFiles(dataDir, null/* baseURI */,
null/* rdfFormat */, null, /* defaultGraph */filter);
} catch (IOException ex) {
throw new RuntimeException("Problem loading file(s): " + ex, ex);
}
}
COM: <s> loads the file s </s>
|
funcom_train/17397409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int readToOutputStream(OutputStream output) throws IOException {
int bytesWritten = 0;
final InputStream input = newInputStream(false);
try {
byte[] buffer = new byte[getBufferSize()];
while (true) {
int bytesRead = input.read(buffer);
if (bytesRead < 1) {
break;
}
output.write(buffer, 0, bytesRead);
bytesWritten += bytesRead;
}
} finally {
input.close();
}
return bytesWritten;
}
COM: <s> read the contents of this file to the given output stream </s>
|
funcom_train/7494332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updatePage( int hash, int page, char status){
ContentValues vals = new ContentValues();
vals.put(HASH_ID, hash);
vals.put(PAGE_NUMBER, page);
vals.put(CONVERSION_STATUS, ""+status);
db.replace(PAGE_TABLE, null, vals);
}
COM: <s> used to update the status of the page </s>
|
funcom_train/35304040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Integer getLowestValue() {
Dictionary dictionary = slider.getLabelTable();
if (dictionary == null) {
return null;
}
Enumeration keys = dictionary.keys();
Integer min = null;
while (keys.hasMoreElements()) {
Integer i = (Integer) keys.nextElement();
if (min == null || i < min) {
min = i;
}
}
return min;
}
COM: <s> returns the smallest value that has an entry in the label table </s>
|
funcom_train/26453228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateRow(int CollectionID, int Matches) {
for (int i=0; i<getRowCount(); i++) {
if (Integer.parseInt(getValueAt(i, 0).toString()) == CollectionID) {
tableModel.setValueAt(i, 3, Integer.toString(Matches));
return;
}
}
}
COM: <s> updates the information in a particular row </s>
|
funcom_train/3361734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
//this.sleep(timeout);
TimerAlarmClockNotification notif = new TimerAlarmClockNotification(this);
listener.notifyAlarmClock(notif);
} catch (Exception e) {
TIMER_LOGGER.logp(Level.FINEST, Timer.class.getName(), "run",
"Got unexpected exception when sending a notification", e);
}
}
COM: <s> this method is called by the timer when it is started </s>
|
funcom_train/51783181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Icon getIcon(IconType type) {
if (!iconMap.containsKey(type)) {
String urlstr = urlMap.get(type);
if (urlstr != null) {
iconMap.put(type,
new ImageIcon(getClass().getClassLoader().getResource(urlstr)));
}
}
return iconMap.get(type);
}
COM: <s> returns the icon for the specified icon type </s>
|
funcom_train/43282722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EditPartFactoryIf getEditPartFactory() {
if (factory != null) {
return factory;
}
// using external factory provider???
if (editPartsFactoryProvider != null) {
LOGGER.debug("Using editpart factory provider: "
+ editPartsFactoryProvider);
factory = editPartsFactoryProvider.getEditPartFactory(configuration
.getEditor());
if (factory != null) {
return factory;
}
}
factory = getEditPartFactory(configuration, componentContainer);
return factory;
}
COM: <s> get the edit part factory for the model </s>
|
funcom_train/21849902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() throws FormException {
try {
removeAll();
if (m_delegate != null) {
setLayout(new BorderLayout());
add(m_delegate, BorderLayout.CENTER);
/** tell each custom property to updateBean */
Collection props = m_custom_properties.values();
Iterator iter = props.iterator();
while (iter.hasNext()) {
JETAProperty jprop = (JETAProperty) iter.next();
jprop.updateBean(this);
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> called after instantiation or deserialization </s>
|
funcom_train/46575683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processControlAttributes(Control control, NamedNodeMap nnm) {
String att = getAttribute(nnm, "enabled", "");
if (!att.equals("")) {
control.setEnabled(att.equals("true"));
}
att = getAttribute(nnm, "visible", "");
if (!att.equals("")) {
control.setVisible(att.equals("true"));
}
}
COM: <s> p used by all controls to process the visible enabled attributes p </s>
|
funcom_train/12212701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createUI() {
add(new JLabel("Enlisted Queue Managers"),
"span 2, gapleft 2, shp 10, wrap");
qmsTable.scroll.putClientProperty(
SubstanceLookAndFeel.SCROLL_PANE_BUTTONS_POLICY,
SubstanceConstants.ScrollPaneButtonPolicyKind.MULTIPLE);
add(qmsTable.scroll, "growx, spany, shp 120");
JPanel buttonPanel = new JPanel(new MigLayout("insets 1 1 1 1"));
buttonPanel.add(addRow, "wrap");
buttonPanel.add(removeRow, "wrap");
add(buttonPanel, "top");
}
COM: <s> create the clear panel ui table and buttons </s>
|
funcom_train/5347604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsMe() throws Exception {
assertTrue("localhost should be me",
NetworkUtils.isMe("localhost", 6346));
NetworkUtils.isMe("127.1.2.1", 6346);
assertTrue("localhost bytes should be me",
NetworkUtils.isMe(new byte[] { (byte)127, 0, 0, 0 }, 6346));
}
COM: <s> tests the is me method </s>
|
funcom_train/44446747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean fireChangeListeners(String current, String previous) {
boolean result = true;
for (Iterator i = changeListeners.iterator(); i.hasNext();) {
IPerspectiveChangeListener l = (IPerspectiveChangeListener) i.next();
result = l.perspectiveChange(current, previous);
if (!result) break;
}
return result;
}
COM: <s> the current perspective is changing notify all listeners </s>
|
funcom_train/6332813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void superClass( Object obj, Class objClass ) throws SAXException {
Class superClass = objClass.getSuperclass();
if (superClass == null) {
return;
}
writeSuperClStartTag( superClass.getName() );
getMember( obj, superClass );
writeSuperClEndTag();
}
COM: <s> super class gets the informations about the superclass of the object </s>
|
funcom_train/43903792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLoggerFactory(final LoggerFactory factory) {
synchronized (EMPTY) {
this.factory = factory;
for (int i = 0; i < children.length; i++) {
children[i].setLoggerFactory(factory);
}
sameLoggerFactory = sameLoggerFactory(ALL.children, ALL.factory);
}
}
COM: <s> sets a new logger factory for this </s>
|
funcom_train/17434302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doAction() {
String componentName = servletRequest.getParameter("_ac");
String action = servletRequest.getParameter("_aa");
Component component = (Component) nameTable.get(componentName);
if (component != null) {
component.doAction(action);
} else {
log.warn("Action '" + action + "' on component '" + componentName
+ "' ignored; component does not exist");
}
}
COM: <s> find a component which needs action to be performed </s>
|
funcom_train/41522367 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasInterface(Class cl, String toFind) throws MdnException{
for (Class c : cl.getInterfaces())
try{ if (c.equals(Class.forName(toFind))) return true; }
catch(ClassNotFoundException e){
throw new MdnException(Config.getProp("error.ClassNotFoundException"), e);
}
return false;
}
COM: <s> returns true if the specified </s>
|
funcom_train/16380102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateNegativePointsType2_Min(float negativePointsType2, DiagnosticChain diagnostics, Map<Object, Object> context) {
boolean result = negativePointsType2 >= NEGATIVE_POINTS_TYPE2__MIN__VALUE;
if (!result && diagnostics != null)
reportMinViolation(CTEPackage.Literals.NEGATIVE_POINTS_TYPE2, new Float(negativePointsType2), new Float(NEGATIVE_POINTS_TYPE2__MIN__VALUE), true, diagnostics, context);
return result;
}
COM: <s> validates the min constraint of em negative points type2 em </s>
|
funcom_train/8899551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void recriateTree(){
NodeFormulaTree rootFormula = new NodeFormulaTree("formula", enumType.FORMULA, enumSubType.NOTHING, null);
DefaultMutableTreeNode nodeTree = new DefaultMutableTreeNode(rootFormula);
rootTreeView = new DefaultMutableTreeNode(rootFormula);
contextNode.setFormulaTree(rootFormula);
model = new DefaultTreeModel(rootTreeView);
setModel(model);
updateTree();
}
COM: <s> create a new formula tree </s>
|
funcom_train/32056980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toFront(Object aobj[]) {
if (aobj != null && aobj.length > 0) {
if (isOrdered()) {
CellView acellview[] = getMapping(aobj, false);
GraphViewLayerEdit graphviewlayeredit = new GraphViewLayerEdit(
this, acellview, -1);
graphModel.edit(null, null, null,
new UndoableEdit[] { graphviewlayeredit });
} else {
graphModel.toFront(aobj);
}
}
}
COM: <s> brings code cells code to front </s>
|
funcom_train/8075258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int countPresentClasses(Instances instances) {
HashSet classValueSet = new HashSet();
for (int i = 0; i < instances.numInstances(); i++) {
Instance instance = (Instance) instances.instance(i);
classValueSet.add(new Double(instance.classValue()));
}
return classValueSet.size();
}
COM: <s> a helper function that determines how many classes are actually </s>
|
funcom_train/14463569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNewTextFromVarName(String varname, String typename, String def){
StringBuffer outstr = new StringBuffer(100);
outstr.append("public ");
outstr.append(typename);
outstr.append(" " + varname + " = " + def + ";");
return this.getNewText(outstr.toString());
}
COM: <s> creates new java code for raw varnames </s>
|
funcom_train/1550071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void moveToMRU(LinkEntry<K, V> entry) {
if (entry.after != header) {
modCount++;
// remove
entry.before.after = entry.after;
entry.after.before = entry.before;
// add first
entry.after = header;
entry.before = header.before;
header.before.after = entry;
header.before = entry;
}
}
COM: <s> moves an entry to the mru position at the end of the list </s>
|
funcom_train/33963116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getBlogThemePath() {
String theme = blogThemeResolver.resolveThemeName(actionBeanContext.getRequest());
Theme _theme = blogThemeSource.getTheme(theme);
MessageSource themeMessageSource = _theme.getMessageSource();
return themeMessageSource.getMessage("webpages.public.root", null, actionBeanContext.getLocale());
}
COM: <s> return the current blogs theme path </s>
|
funcom_train/40106019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeConfiguration() {
IDialogSettings s = getDialogSettings();
for (SearchOption so : SearchOption.values())
s.put(so.toString(), searchOptions.contains(so));
int historySize = Math.min(history.size(), HISTORY_SIZE);
s.put(STORE_HISTORY_SIZE, historySize);
for (int i = 0; i < historySize; i++) {
IDialogSettings histSettings = s.addNewSection(STORE_HISTORY + i);
history.get(i).store(histSettings);
}
}
COM: <s> stores it current configuration in the dialog store </s>
|
funcom_train/21105392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getColumnCount() {
try {
return resultSetMetadata.getColumnCount();
} catch (Exception lEx) {
JOptionPane.showMessageDialog(null, lEx.getMessage(), "Exception", JOptionPane.ERROR_MESSAGE);
return -1;
}
}
COM: <s> how many columns is in a query </s>
|
funcom_train/18525106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane gettextResultScrollPane() {
if (textResultScrollPane == null) {
try {
textResultScrollPane = new JScrollPane();
textResultScrollPane.setName("textResultScrollPane");
textResultScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
gettextResultScrollPane().setViewportView(gettextResultTextArea());
} catch (Throwable exc) {
handleException(exc);
}
}
return textResultScrollPane;
}
COM: <s> return the text result scroll pane property value </s>
|
funcom_train/23267869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetFechaEmision() {
System.out.println("setFechaEmision");
String fechaEmision = "";
Giros instance = new Giros();
instance.setFechaEmision(fechaEmision);
// 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 fecha emision method of class capa negocios </s>
|
funcom_train/21172974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void popChangeShare() {
getCurrentContentNotation();
if (!(currentNotation.getString("author").equalsIgnoreCase(getUserName()))) {
JOptionPane.showMessageDialog(new JFrame(),
"You must be the author " + "to edit this Annotation",
"Notation Error", JOptionPane.ERROR_MESSAGE);
return;
}
doChangeShareWith(currentNotation);
}
COM: <s> loads the annotation which was last clicked to browser instance </s>
|
funcom_train/45018488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNXbeamPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NXinstrument_nXbeam_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_NXinstrument_nXbeam_feature", "_UI_NXinstrument_type"),
NexusPackageImpl.Literals.NXINSTRUMENT__NXBEAM,
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the nxbeam feature </s>
|
funcom_train/46635728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
// Match a mouse event on the body, when the left button is clicked
// and the custom cell label is present
CellLabelMouseEventMatcher mouseEventMatcher = new CellLabelMouseEventMatcher(
GridRegion.BODY,
MouseEventMatcher.LEFT_BUTTON,
Rendereing_a_cell_as_a_button.CUSTOM_CELL_LABEL);
// Inform the button painter of the click.
uiBindingRegistry.registerMouseDownBinding(mouseEventMatcher, buttonCellPainter);
}
COM: <s> configure the ui bindings for the mouse click </s>
|
funcom_train/8627056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(SchemaObject obj) {
String objName = obj.getName();
HashMap<String, SchemaObject> map = getMap(obj.getType());
if (SysProperties.CHECK && !map.containsKey(objName)) {
Message.throwInternalError("not found: " + objName);
}
map.remove(objName);
freeUniqueName(objName);
}
COM: <s> remove an object from this schema </s>
|
funcom_train/42061325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeProtocolConfig(ProtocolID pid, boolean removeSensors) throws ConfigurationException, NotFoundException{
//Check if the protocol is still active
if(getComponent(pid)!=null) {
logger.error("Cant remove an active protocol configuration");
throw new ConfigurationException("Configuration cant be removed because the protocol hasnt been removed before");
}
conf.removeProtocol(pid);
if(removeSensors)
conf.removeSensors(pid);
}
COM: <s> this method removes the protocol configuration object from the platform configuration file </s>
|
funcom_train/13137725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int navigate (int targetRow)
{
// nothing to do
if (targetRow == m_currentRow)
return m_currentRow;
log.info ("navigate - Row=" + targetRow);
// Row range check
int newRow = verifyRow(targetRow);
// Check, if we have old uncommitted data
m_mTable.dataSave(newRow, false);
// new position
return setCurrentRow(newRow, true);
COM: <s> navigate absulute goto row zero based </s>
|
funcom_train/45540068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void restoreColumnSettings(IDialogSettings settings, String qualifier) {
fVMList.getTable().layout(true);
restoreColumnWidths(settings, qualifier);
try {
fSortColumn = settings.getInt(qualifier + ".sortColumn"); //$NON-NLS-1$
} catch (NumberFormatException e) {
fSortColumn = 1;
}
switch (fSortColumn) {
case 1:
sortByName();
break;
case 2:
sortByLocation();
break;
case 3:
sortByType();
break;
}
}
COM: <s> restore table settings from the given dialog store using the </s>
|
funcom_train/38595853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAddressString() {
String[] lines = getAddressStrings();
StringBuffer buf = new StringBuffer();
for ( int i = 0; i < lines.length; i++ ) {
if ( i != 0 ) {
buf.append( System.getProperty( "line.separator" ) );
}
buf.append( lines[ i ] );
}
return buf.toString();
}
COM: <s> return the full address in a single string with linefeeds between the lines </s>
|
funcom_train/35324510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int defaultThreadID() {
long tid = Thread.currentThread().getId();
if (tid < MIN_SEQUENTIAL_THREAD_ID) {
return (int) tid;
} else {
Integer id = threadIds.get();
if (id == null) {
id = nextThreadId.getAndIncrement();
threadIds.set(id);
}
return id;
}
}
COM: <s> returns the default value for a new log records thread id </s>
|
funcom_train/12548196 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void redefineSize() {
Dimension d = new Dimension(1, 1);
if (myImage != null) {
d = new Dimension(getImage().getWidth(this), getImage().getHeight(
this));
}
setPreferredSize(d);
setBounds(-myOrigin.x, -myOrigin.y, d.width, d.height);
}
COM: <s> based on the image of this component sets the preferred size </s>
|
funcom_train/21695161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void decrypt(byte[] cipherText, int cipherOff, byte[] clearText, int clearOff) {
squashBytesToShorts(cipherText, cipherOff, tempShorts, 0, 4);
idea(tempShorts, tempShorts, decryptKeys);
spreadShortsToBytes(tempShorts, 0, clearText, clearOff, 4);
}
COM: <s> decrypt a block of eight bytes </s>
|
funcom_train/37146944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DefaultMutableTreeTableNode getFatherNode(Task node) {
if (node == null) {
return null;
}
DefaultMutableTreeTableNode tmp = (DefaultMutableTreeTableNode) getNode(node
.getTaskID());
if (tmp == null) {
return null;
}
return (DefaultMutableTreeTableNode) tmp.getParent();
}
COM: <s> returne the mother task </s>
|
funcom_train/32058073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSize() {
System.out.println("testSize");
ParentMap parentmap = new ParentMap();
Object child = new Object();
Object parent = new Object();
parentmap.addEntry(child, parent);
assertEquals("TestSize Passes\n", parentmap.size(), 1);
}
COM: <s> this function tests size function of parent map class </s>
|
funcom_train/169460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent arg0) {
JOptionPane.showMessageDialog(SystemManager.getPlugin().getPluginPanel(),
new DownloadPanel(),
PluginProperty.getString("Menu.DownloadMatch"),
JOptionPane.PLAIN_MESSAGE);
;
Team selectedTeam = SystemManager.getPlugin().getFilterPanel().getSelectedTeam();
SystemManager.setActiveTeam(selectedTeam);
SystemManager.refresh();
}
COM: <s> action performed event listener show the download dialog </s>
|
funcom_train/36459993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop(LocalStreamListener listener) {
if (deviceStarted) {
if (listener != null) {
listener.removeVideo(cloneEffect);
}
dataSource.disconnect();
sendProcessor.stop();
try {
sendStream.stop();
} catch (IOException e) {
e.printStackTrace();
}
deviceStarted = false;
}
}
COM: <s> stops the device </s>
|
funcom_train/20044627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _removeByName() {
requiredMethod("addNewByName()") ;
oObj.removeByName("XTableCharts");
tRes.tested("removeByName()", !oObj.hasByName("XTableCharts") );
} // removeByName()
COM: <s> removes the chart added before </s>
|
funcom_train/32056287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
try {
int s = Integer.parseInt(JOptionPane.showInputDialog(Translator
.getString("SizeDialog")));
Map map = GraphConstants.createMap();
Map map1 = GraphConstants.createMap();
GraphConstants.setFontSize(map, s);
makeEdit(map1, map);
setSelectionAttributes(map);
} catch (NullPointerException npe) {
// ignore
} catch (Exception ex) {
//ignore this, too
//graphpad.error(ex.toString());
}
}
COM: <s> allows the user to change the font size when an action is initiated </s>
|
funcom_train/14378613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ensureCapacity(int length) {
if (v.length < length) {
Vector3D[] newV = new Vector3D[length];
System.arraycopy(v, 0, newV, 0, v.length);
for (int i = v.length; i < newV.length; i++) {
newV[i] = new Vector3D();
}
v = newV;
}
}
COM: <s> ensures this polgon has enough capacity to hold the specified number of </s>
|
funcom_train/21848147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stateChanged(ChangeEvent e) {
if (isEventsEnabled()) {
if (m_change_listeners == null)
return;
Component comp = (Component) e.getSource();
ChangeListener listener = (ChangeListener) m_change_listeners
.getListener(comp.getName());
if (listener != null) {
listener.stateChanged(e);
}
JETAContainer view = getView();
if (view != null) {
UIDirector uidirector = view.getUIDirector();
if (uidirector != null)
uidirector.updateComponents(e);
}
}
}
COM: <s> forwarded from the view when a change event occurs </s>
|
funcom_train/13902293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initContextMenu(IMenuListener menuListener, String popupId, IWorkbenchPartSite viewSite) {
MenuManager menuMgr= new MenuManager();
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(menuListener);
Menu menu= menuMgr.createContextMenu(getTable());
getTable().setMenu(menu);
viewSite.registerContextMenu(popupId, menuMgr, this);
}
COM: <s> attaches a contextmenu listener to the table </s>
|
funcom_train/18751283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTransition(GraphTransition transition) {
if (isStoreTransitions()) {
reporter.start(ADD_TRANSITION_STOP);
// add (possibly isomorphically modified) edge to LTS
if (transition.source().addTransition(transition)) {
transitionCount++;
fireAddEdge(transition);
} else {
spuriousTransitionCount++;
}
reporter.stop();
}
}
COM: <s> adds a transition to the gts under the assumption that the source </s>
|
funcom_train/37598001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void undeploy() throws Exception {
if (deployed == null || deployed.size() <= 0) return;
DeploymentResult deployResult = null;
while ((deployResult = deployed.peek()) != null) {
String r0 = deployResult.getDeploymentId();
deployer_.undeployRemove(r0);
deployed.pop();
}
}
COM: <s> undeploy all the modules </s>
|
funcom_train/98593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int checkOS() {
if(System.getProperty("os.name").toLowerCase().contains("linux")) {
return 0;
} // end if linux
if(System.getProperty("os.name").toLowerCase().contains("windows")) {
return 1;
}
return 2;
} // end checkOS()
COM: <s> finds out what os we are running </s>
|
funcom_train/20612407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addReturnedTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Services_returnedType_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Services_returnedType_feature", "_UI_Services_type"),
GCLACSPackage.Literals.SERVICES__RETURNED_TYPE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the returned type feature </s>
|
funcom_train/4921905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BufferSquirtElement sliceWriteBufferForReading() {
// Obtain the write buffer squirt usage and buffer
BufferSquirtUsage usage = this.tail.squirt.usage;
ByteBuffer buffer = this.tail.squirt.getBuffer();
// Add remaining buffer content as squirt
ByteBuffer appendBuffer = buffer.slice();
BufferSquirtElement writeElement = new BufferSquirtElement(
new ManagedBufferSquirt(usage, appendBuffer));
BufferSquirtElement readElement = this.tail;
this.tail.next = writeElement;
this.tail = writeElement;
// Setup content for reading
buffer.flip();
// Return the read element
return readElement;
}
COM: <s> slices the write buffer to allow reading </s>
|
funcom_train/19259467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void PointToUTM( int horiz, int vert, UTMCoord theCoord ) {
int zone = northWest.getZone();
double easting = xRes*horiz + rotation*vert + northWest.getEasting();
double northing = translation*horiz + nYRes*vert + northWest.getNorthing();
// Set the UTM coordinates.
theCoord.setUTM( zone, easting, northing );
}
COM: <s> p converts a cell pixel location into a corresponding utm </s>
|
funcom_train/50576178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doPlayDisc() {
System.out.println("doPlayDisc");
try {
TuneologyPlayer player = cfg.getPlayer();
if (player != null)
player.playFile(contents);
else {
Tuneology.getApp().log.addMessage("no disc player defined");
}
} catch (Exception ex) {
Tuneology.logException(ex, "playDisc");
}
}
COM: <s> this does not play any extra tracks </s>
|
funcom_train/41212949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void exitPressed() {
int result = JOptionPane.showConfirmDialog(this, "Are you sure you want to quit?", "Confirm exit", JOptionPane.YES_NO_OPTION);
if(result == JOptionPane.YES_OPTION) {
close(0);
}
}
COM: <s> this method is called whenever the exit button is pressed </s>
|
funcom_train/10351688 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OWLDescription getEditedObject() {
try {
if (!editor.isWellFormed()) {
return null;
}
String expression = editor.getText();
if (editor.isWellFormed()) {
return editorKit.getOWLModelManager().getOWLDescriptionParser()
.createOWLDescription(expression);
}
else {
return null;
}
}
catch (OWLException e) {
return null;
}
}
COM: <s> gets the object that has been edited </s>
|
funcom_train/2537150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeCluster(Cluster selection){
//Remove the Selection Polygon of the now empty former selection from the canvas
this.removeClusterPolyFromCanvas(selection.getClusterPolygon());
//mark the remaining components from the deleted slection as not selected
for (int i = 0; i < selection.getChildCount(); i++) {
MTComponent comp = selection.getChildByIndex(i);
if (comp instanceof ILassoable)
((ILassoable)comp).setSelected(false);
}
if (this.containsCluster(selection))
childObjects.remove(selection);
}
COM: <s> removes the cluster from the cluster manager and </s>
|
funcom_train/3829556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MathTransform getTransform( String src, String dest ) throws Exception {
Debug.debugMethodBegin( this, "getTransform(String,String)" );
CoordinateSystem src_cs = csFactory.getCSByName( src );
CoordinateSystem dest_cs = csFactory.getCSByName( dest );
MathTransform tr = getTransform( src_cs, dest_cs );
Debug.debugMethodEnd();
return tr;
}
COM: <s> returns a tt transform tt object thats able to perform a coordinate </s>
|
funcom_train/15867261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ListTerm getCommittedAgents(Goal g) {
ListTerm lCommittedBy = new ListTermImpl();
ListTerm tail = lCommittedBy;
for (Player p: getPlayers()) {
for (Goal mg: spec.getMission(p.getTarget()).getGoals()) {
if (mg.equals(g))
tail.append(new Atom(p.getAg()));
}
}
return lCommittedBy;
}
COM: <s> returns a list of agents committed to a particular goal </s>
|
funcom_train/7294617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeElements(int startIndex, int endIndex) {
if (!isValid) validate();
System.arraycopy(dataArray,endIndex,dataArray,startIndex,count - endIndex);
for (int i = count - (endIndex - startIndex); i < count;++i)
dataArray[i] = null; // free up storage
count -= (endIndex - startIndex);
}
COM: <s> removes elements at indices start index and end index </s>
|
funcom_train/51073179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Player getNextPlayer() {
int playersSize = players.size();
if (playersSize == 0) {
throw new RuntimeException(java.util.ResourceBundle.getBundle(Globals.selected_lang).getString("There_are_no_players."));
}
selectNextPlayer();
fireSelectedPlayerChangedEvent();
return players.get(curPlayerIndex);
}
COM: <s> selects next player and returns it </s>
|
funcom_train/8088607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isIncludedIn(Rule otherRule) {
Iterator iter = this.enumerateLiterals();
while (iter.hasNext()) {
Literal current = (Literal) iter.next();
if (!otherRule.bodyContains(current)
&& !otherRule.headContains(current.getNegation())) {
return false;
}
}
return true;
}
COM: <s> test if this body is included in a rule </s>
|
funcom_train/28345803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double calcTotalSeqLength(AcceleratorSeq seq) {
double total = 0.d;
double seql = seq.getLength();
List<AcceleratorSeq> subSeqs = seq.getSequences();
if (!subSeqs.isEmpty() & seql == 0.d) {
Iterator<AcceleratorSeq> ssit = subSeqs.iterator();
while (ssit.hasNext()) {
AcceleratorSeq subseq = ssit.next();
total += calcTotalSeqLength(subseq);
}
return total;
}
return seql;
}
COM: <s> calculates the total length of sequence including subsequences </s>
|
funcom_train/18104259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void defineCollisionRectangle(int x, int y, int width, int height) {
if (width < 0 || height < 0) {
throw new IllegalArgumentException();
}
collisionRectX = x;
collisionRectY = y;
collisionRectWidth = width;
collisionRectHeight = height;
// call set transform with current transformation to
// update transformed sprites collision rectangle
setTransformImpl(t_currentTransformation);
}
COM: <s> defines the sprites bounding rectangle that is used for collision </s>
|
funcom_train/36228638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean openUserJournal() {
if (app.openLogBookUser()) {
LogEntryList logEntries = app.getLogBook().getLogEntries();
if (!logEntries.isEmpty() && app.getCurrentLogEntry() == null)
app.setCurrentLogEntry(logEntries.get(logEntries.size() - 1));
return true;
}
return false;
}
COM: <s> opens the users log book </s>
|
funcom_train/12812164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getUserKeyword(String user_kw) {
for( int i=0 ; i<args.length ; i++ ) {
if( args[i] .startsWith("-ukw")) {
if( i <= (args.length -2) && args[i+1] .startsWith(user_kw)) {
return getArgsValue(args[i+1]);
}
}
}
return null;
}
COM: <s> returns the attribute mapping the user keyword user kw ukw user kw attt </s>
|
funcom_train/9584079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void invokeActivity(MethodInvocation invocation) throws Throwable{
Method method = activity.getClass().getMethod("execute", Object.class);
Object payload = invocation.getArguments()[0];
String[] facts = (String[]) method.invoke(activity, payload);
for (String fact : facts) {
ProcessFactRegistry factRegistry = ProcessFactRegistryUtil.getFactRegistry(payload);
//Register fact under the name of the current activity
factRegistry.registerFact(fact);
}
}
COM: <s> invokes activity and registers facts returned by the activity with the </s>
|
funcom_train/23998734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLongitudeAsString() {
DecimalFormat df1 = new DecimalFormat("000");
DecimalFormat df2 = new DecimalFormat("00.000");
String prefix = "E";
if (getLongitude() < 0)
prefix = "W";
int degree = (int) Math.abs(getLongitude());
double minutes = (double) Math
.round((Math.abs(getLongitude()) - degree) * 60 * 1000) / 1000;
return prefix + " " + df1.format(degree) + "\u00B0 "
+ df2.format(minutes) + "\u0027";
}
COM: <s> gets the longitude </s>
|
funcom_train/46523766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawLine(int x1, int y1, int x2, int y2, Color color, int width) {
Shape s = new Line2D.Float((float)x1,(float)y1,(float)x2,(float)y2);
drawShape(s, color, width);
}
COM: <s> draw line of given color between two points </s>
|
funcom_train/16296008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initNew(){
super.initNew();
abc[0]=ActiveBagContent.initNew(3, 2, 'A');
abc[1]=ActiveBagContent.initNew(3, 2, '1');
//abc[2]=ActiveBagContent.initNew(3, 2, 'a');
}
COM: <s> initialisation method for newly created activities </s>
|
funcom_train/18575433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent event) {
// read out the numbers
startTime = Double.parseDouble(edtStartTime.getText());
endTime = Double.parseDouble(edtEndTime.getText());
numPoints = Integer.parseInt(edtNumPoints.getText());
// hide the dialog
dlgFrame.setVisible(false);
}
COM: <s> handler to deal with action events i </s>
|
funcom_train/38513492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AbstractItem getObjectFromPoint(int x, int y) {
for (Iterator it = hotspots.keySet().iterator(); it.hasNext();) {
Rectangle r = (Rectangle) it.next();
if (r.contains(x, y)) {
return (AbstractItem) hotspots.get(r);
}
}
return null;
}
COM: <s> returns the corresponding item of a coordinate pair </s>
|
funcom_train/3335169 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSQLKeywords() throws java.sql.SQLException {
return "AUTO_INCREMENT,BINARY,BLOB,ENUM,INFILE,LOAD,MEDIUMINT,OPTION,OUTFILE,REPLACE,SET,TEXT,UNSIGNED,ZEROFILL";
}
COM: <s> get a comma separated list of all a databases sql keywords that are </s>
|
funcom_train/45246932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JNumberFloatField getJNumberFloatFieldProporcaoHKY() {
if (jNumberFloatFieldProporcaoHKY == null) {
jNumberFloatFieldProporcaoHKY = new JNumberFloatField();
jNumberFloatFieldProporcaoHKY.setLocation(new Point(345, 153));
jNumberFloatFieldProporcaoHKY.setSize(new Dimension(65, 20));
}
return jNumberFloatFieldProporcaoHKY;
}
COM: <s> this method initializes j number float field proporcao hky </s>
|
funcom_train/17269388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEditorSave() {
System.out.println("editorSave");
/*
* GUI Code
*
Editor editor = null;
DocumentManager instance = null;
instance.editorSave(editor);
// TODO review the generated test code and remove the default call to fail.
fa il("The test case is a prototype.");
*/
}
COM: <s> test of editor save method of class com </s>
|
funcom_train/24376666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ParameterItem (ParameterItem item) {
Name = item.Name;
Type = item.Type;
Description = item.Description;
ID = item.ID;
SearchString = item.SearchString;
ValuesString = item.ValuesString;
ValueStringChanged = true;
Platform = item.Platform;
SelectedAltValue = item.SelectedAltValue;
}
COM: <s> construct a new instance by copying from an existing one </s>
|
funcom_train/14012379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireIntervalAdded(int index0, int index1) {
ListDataEvent e = new ListDataEvent(this, ListDataEvent.INTERVAL_ADDED, index0, index1);
EventListener[] listeners = listenerList.getListeners(ListDataListener.class);
for (int index = 0; index < listeners.length; ++index) {
((ListDataListener) listeners[index]).intervalAdded(e);
}
}
COM: <s> notifies listeners that an interval of items was added </s>
|
funcom_train/19454345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Object o1, Object o2) {
Player p1 = (Player) o1;
Player p2 = (Player) o2;
if(p1.getAllPoints() > p2.getAllPoints()) {
return -1;
}
else if(p1.getAllPoints() < p2.getAllPoints()) {
return 1;
}
else {
if(p1.getBerger() > p2.getBerger()) {
return -1;
}
else if(p1.getBerger() < p2.getBerger()) {
return 1;
}
else {
return 0;
}
}
}
COM: <s> compares the points of two players used to make the results table </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.