__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/8264036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTextContent() throws DOMException {
StringBuffer sb = new StringBuffer();
synchronized(this.treeLock) {
ArrayList nl = this.nodeList;
if(nl != null) {
Iterator i = nl.iterator();
while(i.hasNext()) {
Node node = (Node) i.next();
short type = node.getNodeType();
switch(type) {
case Node.CDATA_SECTION_NODE:
case Node.TEXT_NODE:
case Node.ELEMENT_NODE:
String textContent = node.getTextContent();
if(textContent != null) {
sb.append(textContent);
}
break;
default:
break;
}
}
}
}
return sb.toString();
}
COM: <s> gets the text content of this node </s>
|
funcom_train/37854349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Date getWorkingContentsDate() {
if (myLocalContentsDate == null) {
if (getFile() != null && getKind() == SVNNodeKind.FILE) {
myLocalContentsDate = new Date(getFile().lastModified());
} else {
myLocalContentsDate = new Date(0);
}
}
return myLocalContentsDate;
}
COM: <s> returns the last modified local time of the file item </s>
|
funcom_train/15399618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MouseEvent convertMouseEvent(MouseEvent mevt) {
if ((getParent() != null) && getParent() instanceof DICOMImagePanel) {
// Don't use SwingUtilities.convertMouseEvent. The modifiersEx some
// how get changed.
MouseEvent e2 = mevt;
e2.setSource(getParent());
return(e2);
}
return(mevt);
}
COM: <s> changes current mouse event to one provided </s>
|
funcom_train/3923667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString () {
StringBuffer ret = new StringBuffer();
Iterator i = requests.iterator();
while ( i.hasNext() ) {
ret.append(((Request)i.next()).toLogEntry());
ret.append("\n");
}
return ret.toString();
}
COM: <s> returns string representation of request log using request </s>
|
funcom_train/19891081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void ignoreCallAidl() {
try
{
telephonyService.silenceRinger();
telephonyService.endCall();
}
catch (RemoteException e)
{
e.printStackTrace();
Log.e("call prompt","FATAL ERROR: call to service method endCall failed.");
Log.e("call prompt","Exception object: "+e);
}
}
COM: <s> aidl itelephony technique for ignoring calls </s>
|
funcom_train/1550935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void changeAssignmentVar(String oldLabel, String newLabel) {
if (newLabel.equals(oldLabel))
return;
inputVE.setLabel(newLabel);
if (oldLabel != null) {
input = input.replaceFirst(oldLabel, newLabel);
localizedInput = localizedInput.replaceFirst(oldLabel, newLabel);
}
assignmentVar = newLabel;
}
COM: <s> replace old assignment var in input e </s>
|
funcom_train/2903186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Icon getLargeIconMap(Object key){
if(largeImgTable == null){
largeImgTable = new Hashtable(100);
}
if(largeImgTable.containsKey(key)){
return (Icon)largeImgTable.get(key);
}
StringBuffer sb = new StringBuffer(iconPath.toString()).append("48x48").append(File.separator).append(key+".png");
Icon i = ZImageRetriever.getImageIcon(sb.toString());
synchronized(largeImgTable){
largeImgTable.put(key, i);
}
return i;
}
COM: <s> get a large image that represents the type </s>
|
funcom_train/21105560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getMiOperators() {
if (miOperators == null) {
miOperators = new JMenuItem("Users");
miOperators.addActionListener(new OperatorsListener());
miOperators.setMnemonic('U');
miOperators.setEnabled(SessionInfo.userAccessLevel <= 1);
}
return miOperators;
}
COM: <s> this method initializes mi operators </s>
|
funcom_train/25049499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected CurrencyManager getCurrencyManager(String currencyCode) {
CurrencyManager moneyAmountProvider = getCurrencyCode2AmountProvider().get(currencyCode);
if(moneyAmountProvider == null) {
if(log.isWarnEnabled()) {
log.warn("Do not know nothing about currency '" + currencyCode + "'");
}
return null;
}
return moneyAmountProvider;
}
COM: <s> returns currency manager by the currency code </s>
|
funcom_train/2578942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Paint lookupBoxPaint(int series, int item) {
Paint p = getBoxPaint();
if (p != null) {
return p;
}
else {
// TODO: could change this to itemFillPaint(). For backwards
// compatibility, it might require a useFillPaint flag.
return getItemPaint(series, item);
}
}
COM: <s> returns the box paint or if this is code null code the item </s>
|
funcom_train/24446818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean deleteDirectory(File directory)
{
File[] contents = directory.listFiles();
for (int i = 0; i < contents.length; i++)
{
File next = contents[i];
boolean result = deleteFile(next);
if (!result)
return false;
}
return directory.delete();
}
COM: <s> method for deleting a directory </s>
|
funcom_train/22284284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(Object path) {
if (path instanceof String) {
this.path = (path == null) ? "" : (String)path;
} else if (path instanceof URL) {
this.path = ((URL)path).toString();
} else if (path == null) {
this.path = null;
}
textBox.setText(this.path);
}
COM: <s> set the current value of the file browse widget </s>
|
funcom_train/2290696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void startEngine() {
if (m_engineState != CmsPublishEngineState.ENGINE_STARTED) {
m_engineState = CmsPublishEngineState.ENGINE_STARTED;
// start publish job if jobs waiting
if ((m_currentPublishThread == null) && !m_publishQueue.isEmpty()) {
run();
}
}
}
COM: <s> starts the publish engine i </s>
|
funcom_train/3022376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetPositions() {
UMLType[] types = getTypes();
int size = (int)(Math.sqrt(types.length) * 1000);
Random r = new Random();
for (int i = 0; i < types.length; i++) {
types[i].setLocation(r.nextInt(size), r.nextInt(size));
}
}
COM: <s> initialises the positions of all types randomly </s>
|
funcom_train/34673445 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSaveAndLoadConfiguration() throws Exception {
Configuration config;
config=new Configuration();
config.setName("Peter");
config.setVersion("1.0");
loader.saveConfiguration(TestNamespace, config);
Thread.sleep(10);
config=loader.loadConfiguration(TestNamespace, new VersionEffectiveDate());
assertEquals(config.getName(), "Peter");
assertEquals(config.getVersion(), "1.0");
}
COM: <s> test that a sample configuration can be saved and reloaded </s>
|
funcom_train/1007290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
long bits = Double.doubleToLongBits(m00);
bits = bits * 31 + Double.doubleToLongBits(m01);
bits = bits * 31 + Double.doubleToLongBits(m02);
bits = bits * 31 + Double.doubleToLongBits(m10);
bits = bits * 31 + Double.doubleToLongBits(m11);
bits = bits * 31 + Double.doubleToLongBits(m12);
return (((int) bits) ^ ((int) (bits >> 32)));
}
COM: <s> returns the hashcode for this transform </s>
|
funcom_train/43245727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetInsuranceType() {
System.out.println("setInsuranceType");
String insuranceType = "";
InsuranceDG1Object instance = new InsuranceDG1Object();
instance.setInsuranceType(insuranceType);
// 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 insurance type method of class org </s>
|
funcom_train/19077243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initializeBeanFactory(String resourcePath, boolean fromFile) throws IOException {
if (resourcePath == null) {
throw new IOException();
}
Resource res;
if (fromFile) {
res = new FileSystemResource(resourcePath);
} else {
res = new ClassPathResource(resourcePath);
}
beanFactory = new XmlBeanFactory(res);
}
COM: <s> initialize spring xml bean factory using a path to a classpath resource </s>
|
funcom_train/37587256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void textGetLine1() throws BadLocationException {
final String s = "a\n";
_doc.insertString(0, s, null);
_doc.setCurrentLocation(2);
assertEquals("#0.0", 2, _doc.getCurrentLine());
}
COM: <s> test returning second line in a two line document </s>
|
funcom_train/44561289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MatroskaFileFrame getNextFrame() {
if (FrameQueue.isEmpty()) {
_fillFrameQueue();
}
// If FrameQueue is still empty, must be the end of the file
if (FrameQueue.isEmpty()) {
return null;
}
return (MatroskaFileFrame)FrameQueue.removeFirst();
}
COM: <s> get the next matroska file frame </s>
|
funcom_train/28366812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XmlDataAdaptor createChild(String tagName) {
Node node = document.createElement(tagName);
XmlDataAdaptor childAdaptor = newAdaptor(node);
/* NOTE: added 11/21/03 CKA */
this.childNodes.add(childAdaptor.mainNode);
mainNode.appendChild(node);
return childAdaptor;
}
COM: <s> create a new offspring data adaptor given the tag name </s>
|
funcom_train/17988314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EntryMenuPanel getEntryMenuPanel() {
// Scan the vertical panels...
for (Widget w: m_verticalPanels) {
// ...and if we find an entry menu panel...
if ((null != w) && (w instanceof EntryMenuPanel)) {
// ...return it.
return ((EntryMenuPanel) w);
}
}
// If we get here, an entry menu panel isn't defined. Return
// null.
return null;
}
COM: <s> scan the defined tool panels for an entry menu panel and returns </s>
|
funcom_train/12847485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double swe_radnorm(double x) {
double y;
y = x % SwephData.TWOPI;
if (Math.abs(y) < 1e-13) {
y = 0; /* Alois fix 11-dec-1999 */
}
if( y < 0.0 ) {
y += SwephData.TWOPI;
}
return(y);
}
COM: <s> normalizes a double to the range 0 </s>
|
funcom_train/38833432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connect() {
// use memory-Only Database
final String url = "jdbc:hsqldb:mem:toolkit";
try {
Class.forName("org.hsqldb.jdbcDriver").newInstance();
connection = DriverManager.getConnection(url, "sa", "");
} catch (final Exception e) {
throw new RuntimeException(e);
}
}
COM: <s> connect to sql database </s>
|
funcom_train/50112724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getComment(SoapRequest soapRequest) {
String result = " one out of {";
for (int i=0; i<enumList.length; i++)
result += "'" + enumList[i] + "', ";
result = result.substring(0, result.lastIndexOf(',')) + "} ";
return result;
}
COM: <s> creates a comment with all valid values for this enumeration </s>
|
funcom_train/34815900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bubbleSort(ImageData[] images) {
System.out.print("Sorting by BubbleSort...");
for (int end = images.length; end > 1; end --) {
for (int current = 0; current < end - 1; current ++) {
if (images[current].getNumberOfViews() > images[current+1].getNumberOfViews()) {
exchange(images, current, current+1);
}
}
}
System.out.println("done.");
}
COM: <s> sorts an int array using basic bubble sort </s>
|
funcom_train/10874075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTransition(Transition t) {
if (numTransitions == transitionsArray.length) {
final Transition[] newArray = new Transition[ArrayUtil.oversize(1+numTransitions, RamUsageEstimator.NUM_BYTES_OBJECT_REF)];
System.arraycopy(transitionsArray, 0, newArray, 0, numTransitions);
transitionsArray = newArray;
}
transitionsArray[numTransitions++] = t;
}
COM: <s> adds an outgoing transition </s>
|
funcom_train/31702737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void interactionBegin(int iX, int iY, boolean isShiftDown, boolean isControlDown) {
if (isControlDown && isShiftDown) {
alignChangeGlobalFont();
}
else if (isControlDown) {
alignRotateLayer();
}
else if (isShiftDown) {
alignRotateAxisLabels();
}
}
COM: <s> action occurs here when mouse clicked and before mouse released </s>
|
funcom_train/24118332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doHelp(Event event) throws InterruptedException {
ZksampleMessageUtils.doShowNotImplementedMessage();
// we stop the propagation of the event, because zk will call ALL events
// with the same name in the namespace and 'btnHelp' is a standard
// button in this application and can often appears.
// Events.getRealOrigin((ForwardEvent) event).stopPropagation();
event.stopPropagation();
}
COM: <s> opens the help screen for the current module </s>
|
funcom_train/14322892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OpUser getUserById(OpProjectSession session, OpBroker broker, long id) {
OpUser user = (broker.getObject(OpUser.class, id));
if (user != null) {
return user;
}
throw new XServiceException(session.newError(ERROR_MAP, OpUserError.USER_NOT_FOUND));
}
COM: <s> returns the one point user for the given id </s>
|
funcom_train/2537987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private float getWidthXYGlobal() {
Vector3D p = this.getWidthXYVectLocal();
Matrix m = new Matrix(this.peerComponent.getGlobalMatrix());
m.removeTranslationFromMatrix();
p.transform(m);
return p.length();
// Vector3D[] v = this.getVectorsGlobal();
// float[] minMax = ToolsGeometry.getMinXYMaxXY(v);
// return minMax[2] - minMax[0];
}
COM: <s> gets the width xy global </s>
|
funcom_train/21633573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getBoolean(String name, boolean required, boolean defaultValue) {
String str = getString(name,required,null);
if( str==null )
return defaultValue;
if( !str.equalsIgnoreCase("true") && !str.equalsIgnoreCase("false") ) {
throw new EncogError("Property " + name + " has an invalid value of " + str + ", should be true/false.");
}
return str.equalsIgnoreCase("true");
}
COM: <s> get a param as a boolean </s>
|
funcom_train/32308004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Temp calleeReg(int callee_idx) {
assert callee_done;
assert callee_idx < callee_regs.size() && callee_idx >= 0 : "Callee idx=" + callee_idx + " Size=" + callee_regs.size();
return (Temp)callee_regs.get(callee_idx);
}
COM: <s> return the register for this callee saved register index </s>
|
funcom_train/45749914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addConclusionRulePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Conclusion_conclusionRule_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Conclusion_conclusionRule_feature", "_UI_Conclusion_type"),
URMLPackage.Literals.CONCLUSION__CONCLUSION_RULE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the conclusion rule feature </s>
|
funcom_train/35081185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Revision createRevision (User author, String ref, String info) {
Revision re = new Revision();
re.setDate (new Date());
re.setInfo (info);
re.setRef (ref);
re.setAuthor (author);
db.save (re);
return re;
}
COM: <s> factory method used to create a revision associated with this user </s>
|
funcom_train/41582087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void backspace() {
String messageString;
if(mCursorIndex > 0) {
messageString = "Deleted "+
PRONUNCIATION_MAP.get(""+mEnteredText.get(--mCursorIndex));
mEnteredText.remove(mCursorIndex);
} else {
messageString = "You are at the start of your text. There is no " +
"previous character to delete.";
}
PhoneWandActivity.ttsSpeak(messageString, TextToSpeech.QUEUE_FLUSH);
speakCurrentChar();
drawString();
}
COM: <s> removes from the entered text whichever character is before the cursors current index </s>
|
funcom_train/45918747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startScheduler() {
logger.info("Starting Scheduler...");
try {
tubeletLoader.getContainer().getScheduler().start();
logger.info("Scheduler started.");
} catch (SchedulingException se) {
throw new RuntimeException("Error while starting Scheduler.", se);
}
}
COM: <s> starts the scheduler instance </s>
|
funcom_train/27730081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getCalendarDaysAfter(final Date date1, final Date date2) {
Date newDate1 = createDate(getYear(date1), getMonth(date1), getDayOfMonth(date1));
Date newDate2 = createDate(getYear(date2), getMonth(date2), getDayOfMonth(date2));
int daysAfter = (new Double(getDaysAfter(newDate1, newDate2))).intValue();
return daysAfter;
}
COM: <s> returns the number of calendar days date2 is after date1 </s>
|
funcom_train/37981890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NodeProxy parentWithChild(DocumentImpl doc, NodeId nodeId, boolean directParent, boolean includeSelf) {
sort();
lastPart = getPart(doc, false, initalSize);
return lastPart == null ? null : lastPart.parentWithChild(doc, nodeId, directParent, includeSelf);
}
COM: <s> the method code parent with child code </s>
|
funcom_train/46836997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showItems(){
jworkItem = null;
this.removeAll();
Iterator iter = iConfig.aMainList.iterator();
jworkItem = new JLabel[iConfig.aMainList.size()];
int i=0;
while(iter.hasNext()){
oProp = (EBIWorkstationItemsProperties)iter.next();
addWorkstationItem(i,oProp.getClassPath(),oProp.getName(),oProp.getIcon(),
oProp.getLocation(),oProp._getClassName());
i++;
}
updateUI();
}
COM: <s> this method show the items that was reading from the workstation </s>
|
funcom_train/25308211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Property getPropertyFromName(String propertyName) {
Property result = null;
for (Iterator<Property> iterator = getProperties().iterator(); iterator.hasNext() && result == null;) {
Property prop = iterator.next();
if (prop.getName().equals(propertyName)) {
result = prop;
}
}
return result;
}
COM: <s> return a property from its name </s>
|
funcom_train/47978940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public V remove( K mainKey, SK subKey ) {
V obj = null;
if ( this.containsSubKey( mainKey, subKey ) ) {
obj = _innerDoubleMap.get( mainKey ).remove( subKey );
if ( _innerDoubleMap.get( mainKey ).isEmpty() ) {
_innerDoubleMap.remove( mainKey );
}
}
return obj;
}
COM: <s> removes a value </s>
|
funcom_train/4537072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String installPack(File pack) {
if (!containsEmoticonPList(pack)) {
return null;
}
String name = null;
// Copy to the emoticon area
try {
URLFileSystem.copy(pack.toURI().toURL(), new File(
EMOTICON_DIRECTORY, pack.getName()));
File rootDirectory = unzipPack(pack, EMOTICON_DIRECTORY);
name = URLFileSystem.getName(rootDirectory.toURI().toURL());
addEmoticonPack(name);
} catch (IOException e) {
Log.error(e);
}
return name;
}
COM: <s> installs a new adium style emoticon pack into spark </s>
|
funcom_train/42652411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testClassMapNotModifiable() {
ObjectModel model = new ObjectModel(new ApplicationDummy());
try {
model.getAllClasses().put("test", new ObjectClassDummy(model));
fail("Classes map should not be modifiable directly");
} catch(UnsupportedOperationException e) {}
}
COM: <s> checks that the list of classes is empty </s>
|
funcom_train/16951233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MembershipFunction fclTreeFuzzifyTermGenBell(Tree tree) {
if( debug ) Gpr.debug("Tree: " + tree.toStringTree());
Tree child = tree.getChild(0);
double a = Gpr.parseDouble(child);
double b = Gpr.parseDouble(tree.getChild(1));
double mean = Gpr.parseDouble(tree.getChild(2));
MembershipFunction membershipFunction = new MembershipFunctionGenBell(a, b, mean);
return membershipFunction;
}
COM: <s> parse a tree for generilized bell membership function </s>
|
funcom_train/23943268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setKeyStores(Iterable<AdvanceKeyStore> keystores) {
this.keystores.clear();
Iterables.addAll(this.keystores, keystores);
login.setKeyStores(Interactive.select(keystores, new Func1<AdvanceKeyStore, String>() {
@Override
public String invoke(AdvanceKeyStore param1) {
return param1.name;
}
}));
DefaultComboBoxModel model = new DefaultComboBoxModel();
model.addElement("");
for (AdvanceKeyStore ks : keystores) {
model.addElement(ks.name);
}
serverVerify.setModel(model);
}
COM: <s> set the available keystores </s>
|
funcom_train/12148231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLastModified() {
NodeProperty lastModified = getProperty(LAST_MODIFIED);
if (lastModified == null) {
return null;
} else {
if (lastModified.getValue() instanceof Date) {
return format.format((Date) lastModified.getValue());
} else {
return lastModified.getValue().toString();
}
}
}
COM: <s> last modification date accessor </s>
|
funcom_train/38307737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLineDash(float phase, float unitsOn, float unitsOff) {
if (unitsOff > 0.0F) {
cb.setLineDash(unitsOn, unitsOn, phase);
} else if (unitsOn > 0.0F) {
cb.setLineDash(unitsOn, phase);
} else {
cb.setLineDash(phase);
}
}
COM: <s> sets the current line dash </s>
|
funcom_train/22371902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JLabel getStatusBarDeviceLabel() {
if (statusBarDeviceLabel == null) {
statusBarDeviceLabel = new JLabel(context.getBean("deviceIcon", IIconFactory.class).getIcon(lookAndFeelManager.getCurrentLookAndFeel().getPaintForSpecialControls()));
}
return statusBarDeviceLabel;
}
COM: <s> gets the status bar image label </s>
|
funcom_train/32316129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addOwlClassPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ClassAssertion_owlClass_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ClassAssertion_owlClass_feature", "_UI_ClassAssertion_type"),
OdmPackage.Literals.CLASS_ASSERTION__OWL_CLASS,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the owl class feature </s>
|
funcom_train/31071310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize() {
// set start time
startTime = System.currentTimeMillis();
// add initial edges to agenda
for (Iterator it = edgeFactory.createInitialEdges().iterator(); it.hasNext(); ) {
addEdgeToAgenda((Edge)it.next());
}
// sort
Collections.sort(agenda, edgeComparator);
// record
initialEdges.addAll(agenda);
}
COM: <s> initializes the agenda </s>
|
funcom_train/10599295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInternalPipelineDescription(Processor.InternalPipelineDescription desc) {
this.processingPipeline = desc.processingPipeline;
this.pipelinesManager = desc.pipelineManager;
this.lastProcessor = desc.processor;
this.internalPipelineDescription = new Processor.InternalPipelineDescription(this.lastProcessor, this.pipelinesManager, this.processingPipeline);
this.internalPipelineDescription.prefix = desc.prefix;
this.internalPipelineDescription.uri = desc.uri;
}
COM: <s> set the processing pipeline for sub sitemaps </s>
|
funcom_train/26018851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open() throws IOException {
// Open socket connection
socket = getSocketConnection();
// Open I/O stream
inputStream = socket.getInputStream();
outputStream = socket.getOutputStream();
// Create the chunk receiver
receiver = new ChunkReceiver(this, inputStream);
receiver.start();
// Create the chunk sender
sender = new ChunkSender(this, outputStream);
sender.start();
if (logger.isActivated()) {
logger.debug("Connection has been openned");
}
}
COM: <s> open the connection </s>
|
funcom_train/11383011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void render(Class<? extends SubView> cls) {
int saved = context().nestLevel;
getInstance(cls).renderPartial();
if (context().nestLevel != saved) {
throw new WebAppException("View "+ cls.getSimpleName() +" not complete");
}
}
COM: <s> render a sub view </s>
|
funcom_train/21213126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean suspendService() {
serviceError = null;
if(getServiceState() == Service.RUNNING) {
suspendMaxConnection = maxConnection;
suspendMaxConnectionMsg = maxConnectionMsg;
maxConnection = 0;
maxConnectionMsg = "Service is suspended.";
setServiceState(Service.SUSPENDED);
logger.log(Level.INFO, "Service {0} is suspended.", getName());
return true;
}
return false;
}
COM: <s> suspends the service </s>
|
funcom_train/22969533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException {
PortletContext context = getPortletContext();
String language = request.getLocale().getLanguage();
language = languages.indexOf(language) < 0?defaultLanguage:"_" + language;
String url = page + language + ".html";
PortletRequestDispatcher rd = context.getRequestDispatcher(url);
rd.include(request, response);
}
COM: <s> return the page specified in init parameter param page </s>
|
funcom_train/39196040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start(AjaxRequestTarget target) {
setVisible(true);
add(new DynamicAjaxSelfUpdatingTimerBehavior(
Duration.ONE_SECOND) {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
protected void onPostProcessTarget(AjaxRequestTarget target) {
ProgressionModel model = (ProgressionModel) getDefaultModel();
Progression progression = model.getProgression();
if (progression.isDone()) {
// stop the self update
stop();
// do custom action
onFinished(target);
}
}
});
if (getParent() != null) {
target.add(getParent());
} else {
target.add(this);
}
}
COM: <s> start the progress bar </s>
|
funcom_train/32789576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setElementType(String sElementType) {
// Trim to single word
sElementType = sElementType.trim();
int nSpacePos = sElementType.lastIndexOf (' ');
if (nSpacePos > -1) {
sElementType = sElementType.substring (0, nSpacePos);
}
m_sElementType = sElementType;
adjustDocComment (sElementType, ELEMENT);
fireModified();
}
COM: <s> set the contents of the element type tag for the described feature </s>
|
funcom_train/42943979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getEventCount(long timeStart, long timeEnd) {
try {
long count = EventData.getRecordCount(this.getAccountName(), this.getDeviceName(), timeStart,
timeEnd);
return count;
}
catch (DBException dbe) {
dbe.printException();
return -1L;
}
}
COM: <s> get the number of events logged by this device during a time interval </s>
|
funcom_train/35321654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addAll(Collection<? extends E> c) {
Object[] a = c.toArray();
int numNew = a.length;
ensureCapacityInternal(size + numNew); // Increments modCount
System.arraycopy(a, 0, elementData, size, numNew);
size += numNew;
return numNew != 0;
}
COM: <s> appends all of the elements in the specified collection to the end of </s>
|
funcom_train/2585654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstructor() {
// try a null source
CategoryToPieDataset p1 = new CategoryToPieDataset(null,
TableOrder.BY_COLUMN, 0);
assertNull(p1.getUnderlyingDataset());
assertEquals(p1.getItemCount(), 0);
assertTrue(p1.getKeys().isEmpty());
assertNull(p1.getValue("R1"));
}
COM: <s> some tests for the constructor </s>
|
funcom_train/11753797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SubgraphBuilder excludeAttribute(String path) {
StringTokenizer tokens = new StringTokenizer(path, ".");
SubgraphNode node = rootNode;
while (tokens.hasMoreTokens()) {
String token = tokens.nextToken();
if (tokens.hasMoreTokens()) {
node = node.getChild(token, false);
} else {
// last token is the attribute name
node.excludeAttribute(token);
}
}
return new Subgraph<Object>(node);
}
COM: <s> adds the name of the obj attribute to exclude from serialization </s>
|
funcom_train/44704821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean canApplyWorkflow(User user, ContentItem item) {
if ( user == null ) {
return false;
}
if ( !hasPermission(user, CMS_EDIT_ITEM) ) {
return true;
}
if ( Workflow.getObjectWorkflowID(item) != null ) {
return false;
}
return ( hasPermission(user, CMS_NEW_ITEM, item) ||
hasPermission(user, CMS_WORKFLOW_ADMIN) );
}
COM: <s> p check if p </s>
|
funcom_train/44011639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReadAllEmployees() throws Exception {
System.out.println("readAllEmployees");
EmployeeDAO instance = new EmployeeDAO();
ArrayList<EmployeeBO> expResult = null;
ArrayList<EmployeeBO> result = instance.readAllEmployees();
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 read all employees method of class edu </s>
|
funcom_train/9786162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toMathPiperString(ExpressionValue ev, boolean substituteVariables) {
String MathPiperString;
if (!ev.isExpressionNode()) {
ev = new ExpressionNode(kernel, ev);
}
MathPiperString = ((ExpressionNode) ev).getCASstring(ExpressionNode.STRING_TYPE_MATH_PIPER, !substituteVariables);
return MathPiperString;
}
COM: <s> returns the given expression as a string in math piper syntax </s>
|
funcom_train/25505761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getNumbers() {
if (numbers == null) {
numbers = new JComboBox(new String[]{});
numbers.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) {
String old = number;
number = (String) numbers.getSelectedItem();
if (!NullUtils.areEquals(old, number)) {
firePropertyChange(NUMBER_PROPERTY, old, number);
}
}
}
});
}
return numbers;
}
COM: <s> this method initializes numbers </s>
|
funcom_train/18149991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAttachment(Attachment attachment) {
// create the association set if it doesn't exist already
if(_attachment == null) _attachment = new AssociationSetImpl<Attachment>();
// add the association to the association set
getAttachment().add(attachment);
// make the inverse link
attachment.setTransmission(this);
}
COM: <s> adds an association attachment </s>
|
funcom_train/41386570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Prop findProperty(Property p) {
String uri = p.getURI();
Prop prop = getPropertyByURI(uri);
if (prop == null) {
String name = findNameForProperty(p);
prop = getPropertyByURI(uri);
if (prop == null) {
prop = makeProp(uri, name);
uriToProp.put(uri, prop);
}
}
return prop;
}
COM: <s> determine record for a property creating a new </s>
|
funcom_train/35047932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getLimitWarning() {
synchronized (monitor()) {
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue) get_store().find_element_user(LIMITWARNING$4, 0);
if (target == null) {
return false;
}
return target.getBooleanValue();
}
}
COM: <s> gets the limit warning element </s>
|
funcom_train/41405671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object o) {
Pair another = (Pair) o;
int comp = ((Comparable) first()).compareTo(another.first());
if (comp != 0) {
return comp;
} else {
return ((Comparable) second()).compareTo(another.second());
}
}
COM: <s> compares this code pair code to another object </s>
|
funcom_train/25565222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initView() {
JComponent panel = getLayout().initViewsPanel();
getParent().addMultiViews(panel);
String[] formNames = getFormNames();
for (int i = 0; i < formNames.length; i++) {
String formName = formNames[i];
MultiObjectForm form = getMultiForm(formName);
form.initView();
linkFormAndModel(form, formName);
getLayout().addView(i, formName, initMultiView(formName), panel);
}
}
COM: <s> call in editor </s>
|
funcom_train/23216834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addWSDLQueryPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_WSDLLocation_wSDLQuery_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_WSDLLocation_wSDLQuery_feature", "_UI_WSDLLocation_type"),
ContractPackage.Literals.WSDL_LOCATION__WSDL_QUERY,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the wsdl query feature </s>
|
funcom_train/7995043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Unscheduled createUnscheduledObject(Element unscheduledEl) throws Exception {
String id = unscheduledEl.getChildText("id");
//load the associated userstories
Element userstoriesEl = unscheduledEl.getChild("userstories");
List<Element> userstoriesElList = userstoriesEl.getChildren();
ArrayList<UserStory> userstories = new ArrayList<UserStory>();
for (Element element : userstoriesElList) {
userstories.add(createUserStoryObject(element));
}
return new Unscheduled(id,userstories);
}
COM: <s> utility method to parse a unscheduled object out of the given </s>
|
funcom_train/21116454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveCurrentProperties(String dirName) {
try {
File dir = new File(dirName);
File propFile = new File(dir, DATA_FILE_NAME);
propertiesHandler.writePropertiesToFile(properties, propFile);
} catch (Exception e) {
System.err.println("Could not save gallery properties to file");
e.printStackTrace();
}
}
COM: <s> save the current properties to the selected directory </s>
|
funcom_train/24218983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void informSignalListener(Signal signal) {
SignalListener.SignalEvent event = new SignalListener.SignalEvent(this, signal);
Enumeration enumeration = this.vectorSignalListener.elements();
while (enumeration.hasMoreElements()) {
((SignalListener) enumeration.nextElement()).signalReceivedFromStatemachine(event);
}
}
COM: <s> informs all listeners of an event </s>
|
funcom_train/20215853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getChangePingCommand() {
if (changePingCommand == null) {//GEN-END:|141-getter|0|141-preInit
// write pre-init user code here
changePingCommand = new Command("Change pin...", Command.ITEM, 2);//GEN-LINE:|141-getter|1|141-postInit
// write post-init user code here
}//GEN-BEGIN:|141-getter|2|
return changePingCommand;
}
COM: <s> returns an initiliazed instance of change ping command component </s>
|
funcom_train/50911385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isOrthogonal() {
for (int i = 0; i < rows - 1; i++) {
for (int j = i + 1; j < rows; j++) {
double dp = rowDotproduct(i, j);
if (!Real.isZero(dp, Real.getEpsilon())) {
return false;
}
}
}
return true;
}
COM: <s> is matrix orthogonal </s>
|
funcom_train/5346508 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStringConstructorForNotTimestampedLocs() throws Exception {
for(int i=0; i<HugeTestUtils.VALID_NONTIMESTAMPED_LOCS.length; i++) {
try {
AlternateLocation al =
AlternateLocation.create(HugeTestUtils.VALID_NONTIMESTAMPED_LOCS[i]);
} catch(IOException e) {
fail("failed on loc: "+HugeTestUtils.VALID_NONTIMESTAMPED_LOCS[i], e);
}
}
}
COM: <s> tests the constructor that only takes a string argument but in this </s>
|
funcom_train/13669436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWritePosition(long position) {
if (position != this.currentWritePositionInWA) {
this.currentWritePositionInWA = position;
if (currentWriteAction != null) {
addWriteAction(currentWriteAction);
}
this.currentWriteAction = new DefaultWriteAction(position);
} else {
if (currentWriteAction == null) {
this.currentWriteAction = new DefaultWriteAction(position);
this.currentWritePositionInWA = position;
}
}
}
COM: <s> set the write position position in main database file </s>
|
funcom_train/47983125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void requestLogin(Credential credential, boolean singleLogin) {
String networkName = credential.getNetworkName();
Log.i(TAG, "Start logging into " + networkName);
loop.notifyAboutProgress(networkName);
Intent intent = createLoginIntent(credential, singleLogin);
loop.getContext().sendOrderedBroadcast(intent, null);
}
COM: <s> requests the login for a given credential by sending an </s>
|
funcom_train/9736912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(PostmanNetwork probObj_p) throws NotImplementedException {
if (!probObj_p.isDirected())
throw new NotImplementedException ("Only directed graph/network is supported. For mixed and undirected graph/network, use com.jOptima.algorithm.network.postman.LinHeuristicAlgorithm class.");
internalInit(probObj_p);
}
COM: <s> sets the network object to the algorithm </s>
|
funcom_train/17248200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processImage(imageType image) throws Exception {
if (image.hasdata()) {
if (!squelch) {
ErrorManager.getInstance().addError(Level.WARNING,
"Raw data images not supported.");
}
}
if (image.hasinit_from()) {
put(image.getid().toString(), getFileName(image
.getinit_from().toString()));
}
}
COM: <s> process image takes an image type and places the necessary information in </s>
|
funcom_train/23393990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDescriptionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_StateOfWorld_description_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_StateOfWorld_description_feature", "_UI_StateOfWorld_type"),
ActionPackage.Literals.STATE_OF_WORLD__DESCRIPTION,
true,
true,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the description feature </s>
|
funcom_train/20240523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void trainClassifier(File dir, String... args) throws Exception {
for (File file : dir.listFiles()) {
if (file.getName().matches("training-data-\\d+.svmlight")) {
TKSVMlightClassifierBuilder.train(file.getPath(), args);
}
}
}
COM: <s> train the ovasvmtk classifier </s>
|
funcom_train/48415394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() {
if (null == comments) {
comments = SnipSpaceFactory.getInstance().getComments(snip);
}
if (null == users) {
users = new HashSet();
Iterator iterator = comments.iterator();
while (iterator.hasNext()) {
Snip snip = (Snip) iterator.next();
users.add(snip.getCUser());
}
}
}
COM: <s> lazy initialization of containers </s>
|
funcom_train/5618451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void procedures(PyObject qualifier, PyObject owner, PyObject procedure) {
clear();
String q = getMetaDataName(qualifier);
String o = getMetaDataName(owner);
String p = getMetaDataName(procedure);
try {
this.fetch.add(getMetaData().getProcedures(q, o, p));
} catch (SQLException e) {
throw zxJDBC.makeException(e);
}
}
COM: <s> gets a description of the stored procedures available for the qualifier and owner </s>
|
funcom_train/18186415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public User findByLoginAndPassword(String login, String password) {
Session session = getSession();
Query query = session.createQuery("from User where lowercase(login) = :login and "
+ "password = :password");
query.setParameter("login", login.toLowerCase());
query.setParameter("password", passwordEncrypter.encrypt(password));
return (User) query.uniqueResult();
}
COM: <s> finds the user with a given login and password </s>
|
funcom_train/23411103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addConceptNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Role_conceptName_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Role_conceptName_feature", "_UI_Role_type"),
OMPackage.Literals.ROLE__CONCEPT_NAME,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the concept name feature </s>
|
funcom_train/47891569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node toXML(Document document) {
Node result = document.createElement("config");
for(String key : keySet()) {
Property p = properties.get(key);
Element propElem = document.createElement("value");
propElem.setTextContent("" + p.value);
propElem.setAttribute("id", key);
propElem.setAttribute("name", p.prettyName);
propElem.setAttribute("type", p.value.getClass().getSimpleName());
result.appendChild(propElem);
}
return result;
}
COM: <s> saves a property set back to xml </s>
|
funcom_train/7981876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void position(long p) throws IOException {
long blockStart = (input.position() - maxOffset)
/ buffer.length * buffer.length;
long blockEnd = blockStart + maxOffset;
if ((p >= blockStart) && (p < blockEnd)) {
// Desired position is somewhere inside current buffer
long adj = p - blockStart;
offset = (int)adj;
return;
}
positionDirect(p);
}
COM: <s> seeks to the given position </s>
|
funcom_train/19423355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDisplayAccessCountInfo() {
Locale locale = null;
HttpServletRequest req = EaasyStreet.getServletRequest();
if (req != null) {
locale = req.getLocale();
}
MessageResources appResources = EaasyStreet.getApplicationResources();
return appResources.getMessage(locale, "string.accessCountInfo", type, StringUtils.formatInteger(accessCt + ""));
}
COM: <s> p returns the formatted access count information </s>
|
funcom_train/18019164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected long getCurrentVolumeSize() {
if (file == null) {
return -1;// FILE_NOT_AVAILABLE;
}
try {
flush();
} catch (IOException e) {
e.printStackTrace();
}
// create a new instance
file = new File(file.getAbsolutePath());
// not the first volume, just return the actual length
// and add a reserve for overhead and not yet written data
return file.length() + Math.round(0.001 * file.length());
}
COM: <s> returns the size of the current volume </s>
|
funcom_train/9709433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public QName getSimpleSchemaTypeName(String typeName) {
QName qName = (QName) simpleTypetoxsd.get(typeName);
if(qName == null){
if((typeName.startsWith("java.lang")||typeName.startsWith("javax.")) &&
!Exception.class.getName().equals(typeName)){
return ANY_TYPE;
}
}
return qName;
}
COM: <s> return the schema type qname given the type class name </s>
|
funcom_train/15452245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void authenticate(String username, String password) throws UnauthorizedException {
try {
IAccessControlController accessController = getAccessController();
if(accessController != null){
User user = accessController.getUserByLogin(username);
if (!user.getPassword().equals(password)) {
throw new UnauthorizedException(ErrorConstraints.NO_LOGGED_USER);
}
}
} catch (Exception e) {
throw new UnauthorizedException(e);
} finally {
cleanupResources();
}
}
COM: <s> authenticate the user </s>
|
funcom_train/47393026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ResultSet buildResults(Connection conn, String sql) throws SQLException {
System.out.println("building results...");
PreparedStatement st = conn.prepareStatement(sql, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
System.out.println("prepared statement...");
ResultSet results = st.executeQuery();
System.out.println("results complete...");
return results;
}
COM: <s> the creates the result set executes teh sql statement </s>
|
funcom_train/27711259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void endOfInput(int entityName, boolean moreToFollow) throws Exception {
if (fDTDScanner != null && fScanningDTD){
fDTDScanner.endOfInput(entityName, moreToFollow);
}
fDispatcher.endOfInput(entityName, moreToFollow);
}
COM: <s> handle the end of input </s>
|
funcom_train/14520248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HashMap getHardTokenProfileIdToNameMap(Admin admin){
HashMap returnval = new HashMap();
Collection result = null;
try{
result = hardtokenprofilehome.findAll();
Iterator i = result.iterator();
while(i.hasNext()){
HardTokenProfileDataLocal next = (HardTokenProfileDataLocal) i.next();
returnval.put(next.getId(),next.getName());
}
}catch(FinderException e){}
return returnval;
} // getHardTokenProfileIdToNameMap
COM: <s> method creating a hashmap mapping profile id integer to profile name string </s>
|
funcom_train/50479019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkFileExists(String relativePath) {
IResource resource;
if (relativePath.startsWith("/")) {
resource = project.getWorkspace().getRoot().findMember(relativePath);
} else {
resource = project.getFile(relativePath);
}
if (resource == null || !resource.exists()) {
return false;
}
return true;
}
COM: <s> checks if the given pathname existsa for the current project </s>
|
funcom_train/15635063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(Element element) throws IOException {
Clip clip = new WriterClip(0, 0, element.getWidth(), element
.getHeight());
for (y = 0; y < element.getHeight(); y++) {
element.writeLine(clip);
newLine();
}
if (flush == FLUSH_ELEMENT) {
writer.flush();
}
}
COM: <s> write the given element </s>
|
funcom_train/29870350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemCloseAllNotes() {
if (jMenuItemCloseAllNotes == null) {
jMenuItemCloseAllNotes = new JMenuItem();
jMenuItemCloseAllNotes.setText("Close All Notes");
jMenuItemCloseAllNotes.setMnemonic(KeyEvent.VK_C);
jMenuItemCloseAllNotes.addActionListener(getJMenuListener());
}
return jMenuItemCloseAllNotes;
}
COM: <s> this method initializes j menu item close all notes </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.