__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/23703747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void menuHelpAbout_actionPerformed(ActionEvent e) {
AboutBox dlg = new AboutBox(this);
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width - dlgSize.width) / 2 + loc.x, (frmSize.height - dlgSize.height) / 2 + loc.y);
dlg.setModal(true);
dlg.show();
}
COM: <s> menu help about action performed </s>
|
funcom_train/45112522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String controlGetText(String title, String text, String controlId) throws Exception {
Map<?, ?> result = runRemoteScript(commandCreate("ControlGetText", title, text, controlId));
processResult("Get text from control: " + title, result);
return String.valueOf(result.get(STDOUT));
}
COM: <s> retrieves text from a control </s>
|
funcom_train/50120121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean add_object(Object o) {
if (o == null)
return false;
( (basic) o).set_location(this.query_id());
add_object_reference( ( (basic_container_obj) o).query_id(),
( (basic) o).query_alias_str());
return true;
}
COM: <s> this method will move an object inside this one </s>
|
funcom_train/22183656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Short getShort(int offset) {
try{
return u.mergeToShort(this, offset, 2);
}catch(NdmnException e){
System.err.println(e);
return null;
}catch(ArrayIndexOutOfBoundsException e){
System.err.println(e);
return null;
}
}
COM: <s> get a short value from offset of the internal byte array </s>
|
funcom_train/25428428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReceiveAttackA1D0() throws InvalidUnitException {
Fleet defenders = new Fleet();
Fleet attackers = new Fleet();
Unit attackUnit = createMock(Unit.class);
attackers.addUnit(attackUnit);
FightResult result = defenders.fight(attackers, 0, 0);
assertEquals("The attackers should be the winners", attackers, result.getWinners());
assertEquals("The defenders should be the loosers", defenders, result.getLoosers());
}
COM: <s> result of executing an attack with one attack unit and 0 defenders </s>
|
funcom_train/25365697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIsItemtakenPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RoomEvent_isItemtaken_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_RoomEvent_isItemtaken_feature", "_UI_RoomEvent_type"),
LeveleditorPackage.Literals.ROOM_EVENT__IS_ITEMTAKEN,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the is itemtaken feature </s>
|
funcom_train/48105314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PackageDao getInitPackage(String filePath) {
Document doc = XmlAnalyzer.read(filePath);
PackageDao packageDao = new PackageDao();
String elementName = "//slime-app/name";
packageDao.setName(doc.selectSingleNode(elementName).getText());
packageDao.setStates(descriptor.getStates(doc));
packageDao.setEvents(descriptor.getEvents(doc));
packageDao.setParams(descriptor.getParams(doc));
return packageDao;
}
COM: <s> get init package is used for get configuration from xml package </s>
|
funcom_train/20885079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWithSimpleElements() {
ListWithSimpleElements list = new ListWithSimpleElements();
list.list = new ArrayList<Object>();
for (int i = 0; i < 10; i++) {
list.list.add("stringValue" + i);
list.list.add(i);
}
JSefaTestUtil.assertRepeatedRoundTripSucceeds(XML, list);
}
COM: <s> tests a list with code string code and code integer code elements </s>
|
funcom_train/34593702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showSplashScreen() {
splash = SplashScreen.getSplashScreen();
if (splash == null) {
logger.error("SplashScreen.getSplashScreen() returned null");
return;
}
splashGraphics = splash.createGraphics();
if (splashGraphics == null) {
logger.error("splashGraphics is null");
return;
}
}
COM: <s> shows the splash screen </s>
|
funcom_train/35210084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printDFAStruct() {
System.out.println("-DFA--" + regex + "-");
for (int row = 0; row < dfaAdjacencyMatrix.length; row++) {
for (int col = 0; col < dfaAdjacencyMatrix[row].length; col++) {
System.out.print(dfaAdjacencyMatrix[row][col] + "\t");
}//end for loop
System.out.println();
}//end for loop
System.out.println("-----------------------------------");
}//end printNFAStruct
COM: <s> print out the dfa struct </s>
|
funcom_train/32886559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initActions() {
final Action suspendResumeAction = ActionBuilder.getActionForName(
this.getClass(), this, "task.suspend-resume");
final Action terminateAction = ActionBuilder.getActionForName(
this.getClass(), this, "task.terminate");
this.mPauseBtn.setAction(suspendResumeAction);
this.mCancelBtn.setAction(terminateAction);
} // end
COM: <s> create suspend resume and terminate actions </s>
|
funcom_train/7353416 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void invalidatePath(TreePath path) {
if (path != null) {
for (int i = 0; i < path.getPathCount(); i++) {
Node node = (Node) path.getPathComponent(i);
node.invalidateChildren();
}
// Always invalidate root
if (path.getPathComponent(0) != root) {
root.invalidateChildren();
}
}
}
COM: <s> invalidates the provided path </s>
|
funcom_train/3443653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getFullSize() {
JViewport viewport = scrollPane.getViewport();
Dimension viewSize = viewport.getViewSize();
double scale = getScale();
int width = (int) Math.ceil(viewSize.width * scale);
int height = (int) Math.ceil(viewSize.height * scale);
return new Dimension(width, height);
}
COM: <s> returns the full size </s>
|
funcom_train/40532462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTabbedPane getJTabbedPaneSelections() {
if (jTabbedPaneSelections == null) {
jTabbedPaneSelections = new JTabbedPane();
jTabbedPaneSelections.setPreferredSize(new Dimension(0, 0));
jTabbedPaneSelections.setVisible(true);
jTabbedPaneSelections.addTab("CPU Map", null, getTreeMapPanel(), null);
jTabbedPaneSelections.addTab("Memory Map", null, getTreeMapFreeMemoryPanel(), null);
}
return jTabbedPaneSelections;
}
COM: <s> this method initializes j tabbed pane selections </s>
|
funcom_train/31890340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean close() {
if (response == null) // user doesn't select anything and close() was called on the widow
response = createResponseMessage(sender, null, msgId);
// send response message
try {
ab.sendMessage(response);
} catch (SendMessageBeeException e) {
ab.log.severe("Cannot send message to " + sender);
}
return super.close();
}
COM: <s> send response message and close the window </s>
|
funcom_train/9057095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteFile(String file, String extension) throws FileNotFoundException, FileCouldNotBeDeletedException, FilePermissionException{
String filename = file + "." + extension;
if(!exists(file, extension)) {
throw new FileNotFoundException(file + "." + extension);
}
File f = new File(filename);
if(!f.canWrite())
throw new FilePermissionException("write");
if(!f.delete())
throw new FileCouldNotBeDeletedException(file + "." + extension);
}
COM: <s> same as calling delete file file plan </s>
|
funcom_train/8097919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean findNextValidMatch (Matcher m) {
if (!m.find ())
return false;
String sgml = m.group();
int start = m.start ();
int first = 1;
int last = sgml.length() - 1;
if (sgml.charAt(1) == '/')
first = 2;
sgml = sgml.substring (first, last);
if (allowedTags.contains (sgml)) {
m.find (start);
return true;
}
else return findNextValidMatch (m);
}
COM: <s> finds the next match contained in code allowed tags code </s>
|
funcom_train/18218217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addRpcServerURLPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_QualityModel_rpcServerURL_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_QualityModel_rpcServerURL_feature", "_UI_QualityModel_type"),
QualityModelPackage.Literals.QUALITY_MODEL__RPC_SERVER_URL,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the rpc server url feature </s>
|
funcom_train/23234329 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getMaximumLevel(ConfigurableFactoryContext ctx) throws IllegalArgumentException {
String s;
int level;
if ((s = ctx.getAttribute("maximum-level")) != null) {
try {
level = Integer.parseInt(s);
} catch (NumberFormatException ex) {
throw new IllegalArgumentException("Invalid maximum-level: " + s);
}
} else {
level = LevelCheckingPortal.DEFAULT_MAX;
}
return level;
}
COM: <s> extract the maximum player level from a context </s>
|
funcom_train/24121562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(OutputStream out) throws IOException {
int size = this.getSize();
WMFConstants.writeLittleEndian(out, size);
WMFConstants.writeLittleEndian(out, WMFConstants.WMF_RECORD_LINETO);
WMFConstants.writeLittleEndian(out, y);
WMFConstants.writeLittleEndian(out, x);
}
COM: <s> writes the lineto record to a stream </s>
|
funcom_train/40827716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String readLine(long aBytePosition) {
String lResult = "";
try {
raf.seek(aBytePosition);
lResult = raf.readLine();
} catch (IOException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}
return lResult;
}
COM: <s> reads a single line from the indexed file by giving the byte position </s>
|
funcom_train/3771684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String parseLockToken(String lockTokenValue) {
int semi = lockTokenValue.indexOf(":");
String result = null;
try {
result = lockTokenValue.substring(semi + 1,
lockTokenValue.length() - 1);
} catch (Exception e) {
token.getLogger().log(e,LOG_CHANNEL,Logger.ERROR);
}
return result;
}
COM: <s> returns the lock token value from the lock token header </s>
|
funcom_train/9289006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PreparedStatement wrapStatement(PreparedStatement ps, String sql, Object generatedKeys) throws SQLException {
ps = super.wrapStatement(ps,sql,generatedKeys);
XAStatementControl sc = new XAStatementControl(this, ps, sql, generatedKeys);
return (PreparedStatement) sc.applicationStatement;
}
COM: <s> wrap and control a prepared statement </s>
|
funcom_train/36859320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point getMinimapLocation() {
final int cX = Bot.getClient().getBaseX() + (c.getX() / 32 - 2) / 4;
final int cY = Bot.getClient().getBaseY() + (c.getY() / 32 - 2) / 4;
return Calculations.worldToMinimap(cX, cY);
}
COM: <s> gets the minimap location of the character </s>
|
funcom_train/12330206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AnnotatedDataCollection start(AnnotatedDataCollection dumpedData) {
// extractor.initialize(preferences);
AnnotatedDataCollection coll = new AnnotatedDataCollection(dumpedData
.getInputSpecification(), dumpedData.getPosition());
coll.putAll(extractor.start(dumpedData));
return lastOutput = coll;
}
COM: <s> start the analysis on basis of the </s>
|
funcom_train/32057066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetItemListCellRenderer() {
GPGraphpad gp = new GPGraphpad();
AbstractActionListImpl aa = new AbstractActionListImpl(gp);
aa.getItemListCellRenderer();
//getItemListCellRenderer() automatically returns null, so this test will just pass
assertTrue( true );
}
COM: <s> test of get item list cell renderer method of class abstract action list </s>
|
funcom_train/14275074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void seekVFSFile(FileReference file, char origin, int offset) throws ConduitHandlerException, NotConnectedException {
try {
jHotSync.seekVFSFile(file, origin, offset);
} catch (DLPFunctionCallException e) {
throw new ConduitHandlerException(e.toString(), e);
} // end-catch
} // end-method
COM: <s> seeks to the specified position in the specified vfs file </s>
|
funcom_train/35048725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLanguage(InputStream is) throws LanguageDetectorException {
ByteArrayList input = new ByteArrayList();
DataInputStream dis = null;
List<?> languages = null;
dis = new DataInputStream(new FastBufferedInputStream(is , buffer_size));
try {
while (true){
input.add(dis.readByte());
}
}
catch (EOFException e){
/*do nothing*/
}
catch (IOException e){
try {
dis.close();
}
catch (IOException e1) { /*do nothing*/ }
}
languages = lc.findLanguage(input);
return _analyzeResult(languages);
}
COM: <s> returns the language of the document received as input stream </s>
|
funcom_train/2686352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getMessageSize() throws IOException {
int size = 0;
InputStream in = null;
try {
in = getInputStream();
int read = 0;
byte[] data = new byte[1024];
while ((read = in.read(data)) > 0) {
size += read;
}
} finally {
try {
if (in != null) {
in.close();
}
} catch (IOException ioe) {
// Exception ignored because logging is
// unavailable
}
}
return size;
}
COM: <s> return the size of all the data </s>
|
funcom_train/50501883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getDisabledPlugins() {
synchronized(plugins) {
List result = new LinkedList();
Iterator iter = plugins.iterator();
while(iter.hasNext()) {
IPlugin plugin = (IPlugin) iter.next();
if(!plugin.isEnabled()) {
result.add(plugin);
}
}
return result;
}
}
COM: <s> gets the disabled tasks attribute of the task manager object </s>
|
funcom_train/33480264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Ticker getTicker() {
if (ticker == null) {//GEN-END:|48-getter|0|48-preInit
// write pre-init user code here
ticker = new Ticker("POMA (c) 2009 BkitMobile");//GEN-LINE:|48-getter|1|48-postInit
// write post-init user code here
}//GEN-BEGIN:|48-getter|2|
return ticker;
}
COM: <s> returns an initiliazed instance of ticker component </s>
|
funcom_train/6263348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void down() {
int jobNum = getTemplateList().getSelectedIndex();
if ( jobNum != -1 && jobNum != mt.numTemplates() - 1 ) {
mt.swapTemplate( jobNum, jobNum + 1 );
refreshList();
hasChanged = true;
getTemplateList().setSelectedIndex( jobNum + 1 );
}
}
COM: <s> move a template down in the list </s>
|
funcom_train/24049898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isNodeEdgeAreaLabelsConsistent() {
for (Iterator nodeIt = nodeGraph.getNodeIterator(); nodeIt.hasNext();) {
RelateNode node = (RelateNode) nodeIt.next();
if (!node.getEdges().isAreaLabelsConsistent(geomGraph)) {
invalidPoint = (Coordinate) node.getCoordinate().clone();
return false;
}
}
return true;
}
COM: <s> check all nodes to see if their labels are consistent </s>
|
funcom_train/11741803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeBlob(Blob blob, byte[] value) {
try {
OutputStream out = blob.setBinaryStream(0);
try {
out.write(value);
out.flush();
}
finally {
out.close();
}
}
catch (Exception e) {
throw new CayenneRuntimeException(
"Error processing BLOB.",
Util.unwindException(e));
}
}
COM: <s> writing of lobs is not supported prior to jdbc 3 </s>
|
funcom_train/26207904 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAttribute(FzyAttribute attrib) {
if (!getKB().containsAttribute(attrib.getName())){
if (getKB().addAttribute(attrib)){
setAttribute(attrib);
FSEvent alevt = new FSEvent(this, "ATTR:created", getAttribute());
chgsOutstanding = true;
notifyObservers(alevt);
}
}
}
COM: <s> method to add a newly created fzy attribute to the knowledgebase </s>
|
funcom_train/35845460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CR representationFor(int nIdx) {
if ((nIdx < 0) || (nIdx >= theMAlConstraints.size())) {
return null;
}
Object mc = theMAlConstraints.get(nIdx);
if (mc != null) {
return new CR(mc, nIdx);
}
return new CR(nIdx);
}
COM: <s> create a representation adapter for the given constraint </s>
|
funcom_train/23938983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
initActions();
initWiring();
setDefaultLookAndFeelDecorated(true);
setTitle(getMsg("title", title));
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setMinimumSize(new Dimension(500, 300));
JPanel p = new JPanel();
p.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
getContentPane().add(p);
p.setLayout(new BorderLayout());
createComponent(p);
JMenuBar menu = createMenu();
menuManager = new MenuManager(menu);
initMenu();
setJMenuBar(menu);
onStart();
setVisible(true);
}
COM: <s> start the application ui </s>
|
funcom_train/22206523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getTopics() {
/*
SetChain ret = new SetChain();
Iterator it = m_topicMaps.iterator();
while (it.hasNext()) {
TopicMap tm = (TopicMap) it.next();
ret.addSet((Set) tm.getTopics());
}
return ret;
*/
return getUnifiedTopics();
}
COM: <s> returns the raw topics in all of the underlying topic maps </s>
|
funcom_train/7419027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setProcessForPool(PoolCompartment pool) {
for (BpmnDiagram dia : this.definitions.getDiagram()) {
if (!(dia instanceof ProcessDiagram))
continue;
for (LaneCompartment lane : ((ProcessDiagram) dia)
.getLaneCompartment()) {
for (LaneCompartment poolLane : pool.getLane()) {
if (lane.equals(poolLane)) {
pool.getParticipantRef().setProcessRef(
((ProcessDiagram) dia).getProcessRef());
return;
}
}
}
}
}
COM: <s> based on the passed pool it searches for the appropriate process </s>
|
funcom_train/46739396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOwnerUserRef(DisplayModel ownerUserRef) {
if (Converter.isDifferent(this.ownerUserRef, ownerUserRef)) {
DisplayModel oldownerUserRef= new DisplayModel(this);
oldownerUserRef.copyAllFrom(this.ownerUserRef);
this.ownerUserRef.copyAllFrom(ownerUserRef);
setModified("ownerUserRef");
firePropertyChange(String.valueOf(APPLICATIONCONTROLVALUES_OWNERUSERREFID), oldownerUserRef, ownerUserRef);
}
}
COM: <s> owner of these template values </s>
|
funcom_train/49325531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteAddressBookAction() {
try {
List<Contact> contacts = addressDelegate
.getContacts(currentAddressBook);
contactDelegate.deleteAllContacts(contacts);
addressDelegate.deleteAddressBook(currentAddressBook);
reloadAddressBookList();
BeanUtil.getContactBean().removeContacts(currentAddressBook);
} catch (Exception e) {
logger.error("error in deleting addressbook", e);
}
}
COM: <s> delete address book action </s>
|
funcom_train/29272065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(IAction action) {
/*
* MessageDialog.openInformation( window.getShell(), "Statistics
* Plug-in", "Hello, Eclipse world");
*/
try {
window.getActivePage().showView(outputViewName);
} catch (PartInitException e) {
// TODO Logging
MessageDialog.openInformation(window.getShell(),
"ElexisStatistics Plug-in",
"Error while opening output view.");
}
}
COM: <s> the action has been activated </s>
|
funcom_train/47708098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ListBox createColorList(String caption) {
ListBox lb = new ListBox();
lb.addChangeHandler(handler);
lb.setVisibleItemCount(1);
lb.addItem(caption);
lb.addItem(strings.white(), "white");
lb.addItem(strings.black(), "black");
lb.addItem(strings.red(), "red");
lb.addItem(strings.green(), "green");
lb.addItem(strings.yellow(), "yellow");
lb.addItem(strings.blue(), "blue");
return lb;
}
COM: <s> creates the color list </s>
|
funcom_train/40359234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void newContext(Properties properties) throws Exception {
PropertiesUtils.storeToFile(properties, propFile, "Test Props");
Context.refresh();
context = Context.getInstance();
context.setStandaloneContext(APPLICATION_CONTEXT,
Context.DEFAULT_JUNIT_COMMON_DIR_PATH);
context.setFeeding(false);
}
COM: <s> creates a new context based upon the supplied properties </s>
|
funcom_train/10749107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDestroy_TwoChildren() {
ThreadGroup group = new ThreadGroup("group");
new ThreadGroup(group, "group1");
new ThreadGroup(group, "group2");
assertEquals(2, group.activeGroupCount());
group.destroy();
assertEquals(0, group.activeGroupCount());
}
COM: <s> checks the destroy method for a group with 2 subgroups </s>
|
funcom_train/24162671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendFinishCmd() throws Exception {
// Form command to send
String cmd = "FINISH";
// Send command
SocketData.write(outStream, cmd.getBytes(), cmd.length());
sendCommandTerminator();
// Verbose output?
if (verbose) {
System.out.print("Sent: " + cmd + " -> Received: ");
}
// Handle any response
handleResponse(inStream);
}
COM: <s> stop asr server </s>
|
funcom_train/24194829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getMove() {
List<ModelTask> parentsChildren = this.parent.getModelTask().getChildren();
Iterator<ModelTask> iterator = parentsChildren.iterator();
ModelTask thisModelTask = this.getModelTask();
for (int i = 0; i < parentsChildren.size(); i++) {
if (iterator.next() == thisModelTask) {
return i;
}
}
return 0;
}
COM: <s> returns the index that the model task associated to this execution task </s>
|
funcom_train/13849527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private long nextReadAheadLog(long readCount) {
// Normalize event count in case we were called due to a problem with
// one of the log files
long remainder = readCount % eventsPerLogFile;
readCount += (eventsPerLogFile - remainder);
printControlData(persistenceLogger, "EventLog::nextReadAheadLog");
return readCount;
}
COM: <s> advance the temporary read state to the next available log </s>
|
funcom_train/34564239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
focused = null;
// run zooming
while(zoomStep > 1) {
Performance.sleep(zoomSpeed);
zoomStep--;
repaint();
}
// wait until current painting is finished
while(gui.painting) Performance.sleep(zoomSpeed);
// remove old rectangle and repaint map
zoomStep = 0;
gui.updating = false;
focus();
repaint();
}
COM: <s> starts the zooming thread </s>
|
funcom_train/15826707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object executeGetValue(Object pvObject) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException {
Object lvReturnValue = null;
AccessController.doPrivileged(new AccessiblePrivilegedAction(accessibleObject));
if (propertyType == PROPERTY_TYPE_METHOD) {
lvReturnValue = ((Method) accessibleObject).invoke(pvObject, null);
} else {
lvReturnValue = ((Field) accessibleObject).get(pvObject);
}
return lvReturnValue;
}
COM: <s> call the getter method or get value from field </s>
|
funcom_train/28657179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parse() {
int b;
try{
while ((b = in.read()) != -1 && !canceled) {
append(b);
if (checkBoundary()) {
processSegment();
cur = 0;
}
}
}catch(IOException e){
System.out.println(e.getMessage());
}
}
COM: <s> reads from the mjpeg input stream parsing it for jpeg segments </s>
|
funcom_train/25434111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean validateSubject(String data) {
if (!(data != null && !"".equals(data))) {
this.subjectTxtField.focus();
this.setComponentError(new UserError(getEmptySubjectErrrorMessage(), UserError.CONTENT_TEXT, UserError.ERROR));
return false;
}
return true;
}
COM: <s> for validating the subject </s>
|
funcom_train/35640216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDocument(Document doc, Analyzer analyzer) throws CorruptIndexException, IOException {
ensureOpen();
SegmentInfo newSegmentInfo = buildSingleDocSegment(doc, analyzer);
synchronized (this) {
ramSegmentInfos.addElement(newSegmentInfo);
maybeFlushRamSegments();
}
}
COM: <s> adds a document to this index using the provided analyzer instead of the </s>
|
funcom_train/11069948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStatelessModelSimultaneousJexl() throws Exception {
// parse once, use many times
exec01 = SCXMLTestHelper.getExecutor(scxml01jexl);
assertNotNull(exec01);
exec02 = SCXMLTestHelper.getExecutor(scxml01jexl);
assertNotNull(exec02);
assertFalse(exec01 == exec02);
runSimultaneousTest();
}
COM: <s> test the stateless model simultaneous executions jexl expressions </s>
|
funcom_train/8872768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void teleopInit(){
System.out.println("Woot");
Watchdog.getInstance().setEnabled(true);
//Start Compressor
com.start();
//Start Vision Thread
//vision = new Vision(camera, 10, null);
//Thread camThread = new Thread(vision);
//xcamThread.start();
}
COM: <s> this method is called each time the robot enters teleop phase </s>
|
funcom_train/46159239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URI getTextureAttribute(String attributeName, URI defaultURI) {
if (wrappedStyle != null) {
StyleAttribute textureAttribute = wrappedStyle.getStyleAttribute(attributeName);
if (textureAttribute instanceof URIValue) {
return ((URIValue) textureAttribute).getURI();
}
}
return defaultURI;
}
COM: <s> get the specified texture style attribute attribute from the style if it exists </s>
|
funcom_train/3345394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private FSDirectory getParentDirectoryEntry(String file) throws IOException {
if (file == null) {
return null;
}
final FSEntry dirEntry = getEntry(getParentPath(file));
if (dirEntry == null) {
return null;
}
if (!dirEntry.isDirectory()) {
return null;
}
return dirEntry.getDirectory();
}
COM: <s> get the parent entry of a file </s>
|
funcom_train/21963903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testComment() {
String html = "<!--some random <text stuff> -->";
SgmlLexer lex = new SgmlLexer(new StringCharacterStream(html));
String test = "";
int count = 0;
while (lex.hasNext()) {
test += lex.next();
count++;
}
assertEquals(html,test);
assertEquals(1,count);
}
COM: <s> tests a comment with embedded lt and gt symbols </s>
|
funcom_train/11004751 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSlideShow(SlideShow ss) {
_slideShow = ss;
TextRun[] trs = getTextRuns();
if (trs != null) {
for (int i = 0; i < trs.length; i++) {
trs[i].supplySlideShow(_slideShow);
}
}
}
COM: <s> set the slide show were attached to </s>
|
funcom_train/18036817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Hashtable getHashTable(String elements, String key, String value) {
// If the filter as no "arg" element, then the contxt node is null.
if (argNode == null) {
return null;
}
return processor.getHashTable2(argNode, elements, key, value);
}
COM: <s> translate an xml pattern into a hashtable </s>
|
funcom_train/23216741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addReferencePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ActionDescriptionFile_reference_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ActionDescriptionFile_reference_feature", "_UI_ActionDescriptionFile_type"),
ContractPackage.Literals.ACTION_DESCRIPTION_FILE__REFERENCE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the reference feature </s>
|
funcom_train/26618299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected WidgetConfigSegment getCurrentSegment(IWidget widget, IContext context) {
//get how far along we are into this widget
double currentTimePct = InterpolateUtil.interpolate(widget, context.getTime());
//get the current motion segment
return WidgetUtil.getWidgetConfigSegment(m_configSegments, currentTimePct);
}
COM: <s> get the active widget config segment </s>
|
funcom_train/17592071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OperationSet getReachingDefs(Collection rs) {
BitString bs = new BitString(fact.size());
for (Iterator i = rs.iterator(); i.hasNext();) {
Relation r = (Relation) i.next();
bs.or(defs[r.id]);
}
bs.and(fact);
return new OperationSet(bs);
}
COM: <s> get the reaching defs for this collection of relations </s>
|
funcom_train/50872858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetElementAt() {
OMApplication application = new OMApplication();
application.addElement(new OMInteger("1"));
application.addElement(new OMSymbol("a","b"));
application.setElementAt(new OMSymbol("a","b"), 0);
assertTrue(application.getElementAt(0) instanceof OMSymbol);
}
COM: <s> test of set element at method of class omapplication </s>
|
funcom_train/13894279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFrame(JFrame frame) {
if(this.frame != null) {
throw new IllegalStateException("setFrame may only be called once (with a non-null value)");
}
if(frame != null) {
JMenu menu = Plugin.Utils.getMenuNamed(frame.getJMenuBar(), "File", true);
menu.add(manageDirectories);
}
this.frame = frame;
}
COM: <s> registers a menu item file manage data directories </s>
|
funcom_train/22232164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeBranchGraph(BranchGroup branchGroup){
if (universe == null) {
throw new IllegalStateException(J3dI18N.getString("Locale4"));
}
if (! branchGroup.getCapability(BranchGroup.ALLOW_DETACH)) {
throw new CapabilityNotSetException(J3dI18N.getString("Locale1"));
}
universe.resetWaitMCFlag();
synchronized (universe.sceneGraphLock) {
doRemoveBranchGraph(branchGroup, null, 0);
universe.setLiveState.reset(this);
}
universe.waitForMC();
}
COM: <s> removes a branch graph rooted at branch group from </s>
|
funcom_train/7243912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getWhoIsServer() {
String server = null;
if (NetworkUtils.isDottedIPV4(this.name))
server = this.servers.get("0");
else
server = this.servers.get(this.name.substring(this.name.lastIndexOf(".")+1).toLowerCase(Locale.ENGLISH));
return server;
}
COM: <s> returns the appropriate whois server based on the </s>
|
funcom_train/4924868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_getHttpResponse_setStatus() {
this.response.setStatus(203);
this.response.setStatus(500); // not sending message as may not be error
// Test
this.replayMockObjects();
HttpResponse httpResponse = this.connection.getHttpResponse();
httpResponse.setStatus(203);
httpResponse.setStatus(500, "test message");
this.verifyMockObjects();
}
COM: <s> ensure can specify the status </s>
|
funcom_train/5891619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object coerceToBean(Object val, Component comp, BindContext ctx) {
final String format = (String) ctx.getConverterArg("format");
if(format==null) throw new NullPointerException("format attribute not found");
final String number = (String) val;
try {
return number == null ? null : new DecimalFormat(format).parse(number);
} catch (ParseException e) {
throw UiException.Aide.wrap(e);
}
}
COM: <s> convert string to number </s>
|
funcom_train/11344739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProperties(Dictionary dict) {
// Make sure registration is valid.
if (!isValid()) {
throw new IllegalStateException("The service registration is no longer valid.");
}
// Set the properties.
initializeProperties(dict);
// Tell registry about it.
m_registry.servicePropertiesModified(this);
}
COM: <s> add properties to a service registration </s>
|
funcom_train/1746479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createErrorLog(String asProblem, String asTable, String asFormat, String asSubject, String asSeverity){
String sType = "";
if (asSeverity.equalsIgnoreCase(Log.LOW)) sType = Log.INFO;
else if (asSeverity.equalsIgnoreCase(Log.MIDLE)) sType = Log.WARNING;
else sType = Log.ERROR;
log.log(sType, asSeverity, asProblem, asTable, asFormat, asSubject);
}
COM: <s> method to write message without parameters from errors config </s>
|
funcom_train/16082301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int flushBase64() throws IOException {
if (inCount > 0) {
written += decoder.encode3to4(inBuffer, 0, inCount, outBuffer, 0, outBuffer.length);
out.write(outBuffer);
inCount = 0;
}
flush();
return written;
}
COM: <s> writes the padding characters if needed and flashing the </s>
|
funcom_train/20270933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Node collapseReplacements(List<Node> replacements) {
Node expr = null;
for (Node rep : replacements) {
if (rep.getType() == Token.EXPR_RESULT) {
rep = rep.getFirstChild();
rep.detachFromParent();
}
if (expr == null) {
expr = rep;
} else {
expr = new Node(Token.COMMA, expr, rep);
}
}
return expr;
}
COM: <s> merge a list of nodes into a single expression </s>
|
funcom_train/36768194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JSlider getSliderSeek(){
if( sliderSeek == null ){
sliderSeek = new JSlider(SwingConstants.HORIZONTAL,
SEEK_MIN_VAL, SEEK_MAX_VAL,
SEEK_INIT_VAL);
sliderSeek.setBorder(getBorderSeek());
//sliderSeek.setToolTipText("Seek the Audio File");
sliderSeek.setDoubleBuffered(true);
}
return sliderSeek;
}
COM: <s> returns the players seek slider </s>
|
funcom_train/40383645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeFolderHeader(String folderName) {
try {
filewrite.write(" <Folder id=\"layer 0\">\r\n");
filewrite.write(" <name>" + folderName + "</name>\r\n");
filewrite.write(" <open>1</open>\r\n");
} catch (IOException ex) {
ex.printStackTrace();
}
}
COM: <s> writes the folder name for use in google earth </s>
|
funcom_train/5460191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private StatementsPanel getStatementsPanel() {
if (statementsPanel == null) {
statementsPanel = new StatementsPanel();
statementsPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(5,5,5,5));
statementsPanel.setOpaque(false);
}
return statementsPanel;
}
COM: <s> this method initializes statements panel1 </s>
|
funcom_train/20926944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel14() {
if (jPanel14 == null) {
jPanel14 = new JPanel();
jPanel14.setLayout(new BoxLayout(getJPanel14(), BoxLayout.Y_AXIS));
jPanel14.add(getJPanel12(), null);
jPanel14.add(getJPanel15(), null);
jPanel14.add(getJPanel13(), null);
}
return jPanel14;
}
COM: <s> this method initializes j panel14 </s>
|
funcom_train/17544331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validate() throws WizardValidationException {
try {
ValidationUtils.validate(entry, field, getFieldsName(), getFieldsType());
} catch (Exception ex) {
throw new WizardValidationException((FieldVisualPanel1)getComponent(), ex.getMessage(), ex.getMessage());
}
}
COM: <s> validates the data entered </s>
|
funcom_train/50339165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean confirmPaneAll() {
if (log.isDebugEnabled()) log.debug("confirmAllPane starts with "
+varList.size()+" vars, "
+cvList.size()+" cvs "
+indexedCvList.size()+" indexed cvs" );
prepConfirmPane(false);
// start operation
return nextConfirm();
}
COM: <s> invoked by compare full sheet button this sets in motion a </s>
|
funcom_train/31435965 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() {
try {
readFile(jarFileName);
} catch(FileNotFoundException err){
try{
readFile(System.getProperty("user.home")+SEP+DEFAULTFILENAME);
}catch(Exception er){
}
} catch(IOException err){
try{
readFile(System.getProperty("user.home")+SEP+DEFAULTFILENAME);
}catch(Exception er){
}
} finally{
}
}
COM: <s> initializes internal hash tables with jar file resources </s>
|
funcom_train/50465513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element createPermissionElement(Document doc, Permission perm) {
Element permE = doc.createElement("permission");
permE.setAttribute("class", perm.getClass().getName());
permE.setAttribute("name", perm.getName());
permE.setAttribute("actions", perm.getActions());
return permE;
}
COM: <s> create a dom element for a permission object </s>
|
funcom_train/50926496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // private void analyzeMap() {
// for (String key : tempDictRefMap.keySet()) {
// Map<String, ValueCount> map =
// (Map<String, ValueCount>) tempDictRefMap.get(key);
// LOG.debug("\n"+key);
// for (String s : map.keySet()) {
// ValueCount termCount = map.get(s);
// LOG.debug(termCount.count+" ... "+s);
// }
// }
// }
COM: <s> analise the temp dict ref map </s>
|
funcom_train/45450674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toXml() {
StringBuilder xml = new StringBuilder("<user>");
xml.append("<name>").append(getName().getFullName()).append("</name>");
xml.append("</user>");
return xml.toString();
}
COM: <s> returns the xml representation fo this user info </s>
|
funcom_train/6348861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBadFileExplorer() throws Exception {
try {
ExecUtil.runFileExplorer("nowayjose", new Path("/")); //$NON-NLS-1$ //$NON-NLS-2$
fail("should've gotten IOException"); //$NON-NLS-1$
} catch (IOException e) {
}
}
COM: <s> tests an invalid command for file explorer </s>
|
funcom_train/28309864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void selectCounters() {
availableCountersTableModel.clear();
for (Iterator<Counter> counters = counterService.getCounters(getFilter())
.iterator(); counters.hasNext();) {
availableCountersTableModel.add(counters.next());
}
availableCountersTable.repaint();
}
COM: <s> re populate the counters list </s>
|
funcom_train/76973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testParseKnowledgeModuleForXPath() {
try {
preprocessor.parseKnowledgeModuleForXPath(knowledgeModuleFile);
logger.fine("Testing of parseKnowledgeModuleForXPath method was successful");
assertTrue(true);
} catch (Exception e) {
logger.log(Level.WARNING, "Exception in testing preprocessXPath: "
+ e.getMessage(), e);
assertTrue(false);
}
}
COM: <s> tests the xpath preprocessor </s>
|
funcom_train/7972013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draw(int pagenum, IView view) {
try {
_pages.get( pagenum ).draw( view );
}
catch (IndexOutOfBoundsException e) {
throw new BallotBoxViewException(
"You have attempted to draw a page which does not exist:"
+ e.getMessage(), e );
}
}
COM: <s> call this method to draw a given page number to a given view </s>
|
funcom_train/21888420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton() {
if (jButton == null) {
jButton = new JButton();
jButton.setText("OK");
jButton.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
jButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(final java.awt.event.ActionEvent e) {
dispose();
}
});
}
return jButton;
}
COM: <s> this method initializes j button </s>
|
funcom_train/28152382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMinMaxActions(JMenu menu) {
try {
wrap=true;
menuItem(menu, "Minimize", 'M', doMinimize(), iconNo);
menuItem(menu, "Zoom", doZoom(), iconNo);
} finally {
wrap=false;
}
}
COM: <s> this method inserts minimize and maximize entries into a jmenu </s>
|
funcom_train/51788068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLowerPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MultiplicityElement_lower_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_MultiplicityElement_lower_feature", "_UI_MultiplicityElement_type"),
UMLPackage.Literals.MULTIPLICITY_ELEMENT__LOWER,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the lower feature </s>
|
funcom_train/25500517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void typeCheck(String name, Class c) throws OptionManagerException {
if (c != Boolean.class && c != Integer.class && c != Long.class
&& c != Double.class && c != String.class) {
throw new OptionManagerException("Type " + c.toString()
+ " for parameter "
+ name
+ " is not supported.");
}
}
COM: <s> verifies that an options class is supported </s>
|
funcom_train/10207765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String format(final LoggingEvent event) {
// Reset working stringbuffer
if (sbuf.capacity() > MAX_CAPACITY) {
sbuf = new StringBuffer(BUF_SIZE);
}
else {
sbuf.setLength(0);
}
PatternConverter c = head;
while (c != null) {
c.format(sbuf, event);
c = c.next;
}
return sbuf.toString();
}
COM: <s> produces a formatted string as specified by the conversion pattern </s>
|
funcom_train/49995930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getDisplayValue(Object object) {
SimpleDateFormat format = new SimpleDateFormat("MMM", Locale.US);
Calendar cal = Calendar.getInstance();
cal.set(Calendar.DAY_OF_MONTH, 1);
cal.set(Calendar.MONTH, ((Integer) object).intValue());
return format.format(cal.getTime());
}
COM: <s> convert the passed integer to its month name </s>
|
funcom_train/4949061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Component getLoopBodyInputComponent(Loop loop, Port port){
Entry feedbackEntry = loop.getBodyFeedbackEntry();
Component component = null;
if(!feedbackEntry.getDependencies(port).isEmpty()){
Dependency dep = (Dependency)feedbackEntry.getDependencies(port).iterator().next();
component = (Component)dep.getLogicalBus().getOwner().getOwner();
}
return component;
}
COM: <s> returns the component that is connected to the given port of </s>
|
funcom_train/44898311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeExternal(ObjectOutput out) throws IOException {
out.writeUTF(type.getName());
out.writeInt(type.getScope().getValue());
boolean hasSession = (sessionKey != null);
out.writeBoolean(hasSession);
if (hasSession)
out.writeUTF(sessionKey);
}
COM: <s> writes instance for serialization </s>
|
funcom_train/28224742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createInfoLabels(final Composite parent) {
Set<String> infoSet = Agent.getInfoKeys();
Iterator<String> it = infoSet.iterator();
infoLabels = new LabelPair[infoSet.size()];
for (int i = 0; i < infoSet.size(); i++) {
infoLabels[i] = new LabelPair(parent, SWT.NONE, it.next());
}
}
COM: <s> create the labels with the agents info field data </s>
|
funcom_train/9918660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVecParameterBySemantic(String semantic, float x, float y) {
CGparameter p = CgGL.cgGetEffectParameterBySemantic(effect, semantic);
if (p != null)
CgGL.cgSetParameter2f(p, x, y);
else
System.err.println("GLCgFXEffect: 2f semantic is null");
}
COM: <s> sets the vec2 parameter with indicated semantic to the given values </s>
|
funcom_train/1898937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void equalExpression(List<StackCommand> result) throws ParseException {
relationalExpression(result);
while(hasNext(TerminalType.EQ) || hasNext(TerminalType.NE)) {
Token token = nextToken();
relationalExpression(result);
result.add(token.getTerminal().getCommand());
}
}
COM: <s> equal expression relational expression ne relational expression eq relational expression </s>
|
funcom_train/5339704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processMouseEvent(MouseEvent e) {
super.processMouseEvent(e);
// TODO: do not do if we compile with java 1.5
// if(!CommonUtils.isJava15OrLater()) {
if(!e.isConsumed() && POPUP.isPopupTrigger(e)) {
e.consume();
POPUP.show(this, e.getX(), e.getY());
}
// }
}
COM: <s> intercept mouse events if were below java 1 </s>
|
funcom_train/3832079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private OGCWebServiceResponse createCapabilitiesResponse() {
Debug.debugMethodBegin( this, "createCapabilitiesResponse" );
WFSGetCapabilitiesResponse response = null;
// create a new and empty response object that will contain
// the complete response, merged from all responses of different
// data stores
Iterator iterator = handler.values().iterator();
response = (WFSGetCapabilitiesResponse)iterator.next();
Debug.debugMethodEnd();
return response;
}
COM: <s> creates a complete response object from the partial responses </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.