__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/2294503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getParamTabWpTimewarp() {
String result;
if (m_userSettings.getTimeWarp() == CmsContextInfo.CURRENT_TIME) {
result = "-";
} else {
result = CmsCalendarWidget.getCalendarLocalizedTime(
getLocale(),
getMessages(),
m_userSettings.getTimeWarp());
}
return result;
}
COM: <s> get the user timewparp setting in form of a formatted date string </s>
|
funcom_train/22778920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getOkButton() {
if (okButton == null) {
okButton = new JButton();
okButton.setText("OK");
okButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
taskName = nameTextField.getText();
taskAnnotation = annotationTextArea.getText();
valid = true;
setModalityType(ModalityType.MODELESS);
setVisible(false);
}
});
}
return okButton;
}
COM: <s> this method initializes j button </s>
|
funcom_train/21422922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double secondsValue() {
// return new
// BigDecimal(this.msecValue).divide(BigDecimal.valueOf(1000)).doubleValue();
// //(28/11/2006)PK: BigDecimal#divide(BigDecimal bd) not in java 1.4;
// ZedVal feature
return (double) this.msecValue / 1000;
}
COM: <s> returns clock value in seconds </s>
|
funcom_train/2698981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resatDependencies() {
synchronized (lifecycle_mutex) {
ServiceInstance[] inactiveInstances = (ServiceInstance[]) ((Set) instancesByState
.get(new Integer(INACTIVE)))
.toArray(new ServiceInstance[0]);
for (int i = 0; i < inactiveInstances.length; i++) {
ServiceInstance serviceInstance = inactiveInstances[i];
try {
activate(serviceInstance);
} catch (ServiceLifecycleException e) {
// swallow
}
}
}
}
COM: <s> re satisfies dependencies of services in the </s>
|
funcom_train/10687917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Scanner useRadix(int radix) {
if (radix < Character.MIN_RADIX || radix > Character.MAX_RADIX) {
throw new IllegalArgumentException(Messages
.getString("luni.DF", radix)); //$NON-NLS-1$
}
this.integerRadix = radix;
return this;
}
COM: <s> sets the radix of this </s>
|
funcom_train/12071508 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEquals() {
System.out.println("equals");
Object o = null;
GornAddress instance = null;
boolean expResult = false;
boolean result = instance.equals(o);
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 equals method of class gorn address </s>
|
funcom_train/10628400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGcdBothZeros() {
byte rBytes[] = {0};
BigInteger aNumber = new BigInteger("0");
BigInteger bNumber = BigInteger.valueOf(0L);
BigInteger result = aNumber.gcd(bNumber);
byte resBytes[] = result.toByteArray();
for(int i = 0; i < resBytes.length; i++) {
assertTrue(resBytes[i] == rBytes[i]);
}
assertEquals("incorrect sign", 0, result.signum());
}
COM: <s> gcd both numbers are zeros </s>
|
funcom_train/28720477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispose() {
//fContentBuffer = null;
//fTagPositions = null;
fDDocument = null;
fXMLTagger = null;
if (fDocContentCanvas != null) {
fDocContentCanvas.dispose();
fDocContentCanvas = null;
}
if (fDocXMLCanvas != null) {
fDocXMLCanvas.dispose();
fDocXMLCanvas = null;
}
fDocumentCanvas = null;
fContentContextMenu.dispose();
fContentContextMenu = null;
fDocumentContentListener.dispose();
fDocumentContentListener = null;
fDocumentXMLListener.dispose();
fDocumentXMLListener = null;
}
COM: <s> disposes the resources used by this object </s>
|
funcom_train/24082664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addDataProperty(OWLDataProperty dataProp) {
if (dataProp == null) {
throw new IllegalArgumentException("Null argument.");
}
boolean ret = false;
if (!this.dataPropertyInvMap.containsKey(dataProp)) {
Integer id = this.entityManager.createNamedEntity(
IntegerEntityType.DATA_PROPERTY, dataProp.toStringID(),
false);
this.dataPropertyMap.put(id, dataProp);
this.dataPropertyInvMap.put(dataProp, id);
ret = true;
}
return ret;
}
COM: <s> adds a data property to the repository </s>
|
funcom_train/43514860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void metricsChanged(List<Metric> gmondMetrics ) {
List<Metric> clone = new LinkedList<Metric>( gmondMetrics );
Map<String,String> attributes = new HashMap<String,String>();
for (Metric gmondMetric : clone) {
attributes.put(gmondMetric.getName(), gmondMetric.getValue());
}
WorkerSpec spec = getServiceManager().getDAO(WorkerSpecDAO.class).getWorkerSpec();
spec.putAttributes(attributes);
}
COM: <s> informs to all interested clients that metrics changed </s>
|
funcom_train/8325992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setResultStyle(ResultStyle resultStyle) {
switch (resultStyle) {
case ITERABLE:
// For java4, use LIST
this.resultStyle = (Util.Retrowoven)
? ResultStyle.LIST : ResultStyle.ITERABLE;
break;
case LIST:
case MUTABLE_LIST:
this.resultStyle = resultStyle;
break;
default:
throw ResultStyleException.generateBadType(
ResultStyle.ITERABLE_LIST_MUTABLELIST,
resultStyle);
}
}
COM: <s> a querys result style can only be one of the following </s>
|
funcom_train/46189958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddFilter() {
RefererFilter filter = new RefererFilter("A new filter");
refererFilterManager.addFilter(filter);
assertTrue(refererFilterManager.getFilters().contains(filter));
assertEquals(1, refererFilterManager.getFilters().size());
}
COM: <s> tests that a filter can be added </s>
|
funcom_train/40941444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerParameters(ResultSet rsMapping){
try {
while (rsMapping.next()){
String name = rsMapping.getString(4);
short stereotype = rsMapping.getShort(5);
if (stereotype != RESULT_FUNCTION_STEREOTYPE && ! parametersDefined.contains(name)){
declareParameter(getSqlParam(name, rsMapping.getInt(6), stereotype));
parametersDefined.add(name);
}
}
} catch (Exception ex) {
throw new RegisterParameterProceduresAndFunctionsFailedException(ex);
}
}
COM: <s> register parameter by auto detection </s>
|
funcom_train/44508683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void clearCachedAuthorizationInfo(PrincipalCollection principals) {
if ( principals == null ) {
return;
}
Cache cache = getAuthorizationCache();
//cache instance will be non-null if caching is enabled:
if (cache != null) {
Object key = getAuthorizationCacheKey(principals);
cache.remove(key);
}
}
COM: <s> clears out the authorization info cache entry for the specified account </s>
|
funcom_train/4867891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void turnTowardsAndShoot(Vector2f pos, Vector2f target) {
/* If we have not reached our destination, take a step forward */
Vector2f tmp = new Vector2f();
Vector2fSubtract(target, pos, tmp);
/* Take a Step */
Action nextAction = new TakeStepAction(this.physicsSystem, this.entityController, this.actor, tmp);
nextAction.execute();
//switchToAppropriateWeapon(tmp);
this.entityController.attack();
}
COM: <s> move towards the target </s>
|
funcom_train/1060139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addStartAnglePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Ellipse_startAngle_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Ellipse_startAngle_feature", "_UI_Ellipse_type"),
Di2Package.Literals.ELLIPSE__START_ANGLE,
true,
false,
false,
ItemPropertyDescriptor.REAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the start angle feature </s>
|
funcom_train/1200805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMonth(int month) {
calendar.set(Calendar.MONTH, month);
// Since the day does not change,
// don't fire a day property change, even if alwaysFireDayProperty is true :)
boolean storedMode = alwaysFireDayProperty;
alwaysFireDayProperty = false;
setDay(day);
alwaysFireDayProperty = storedMode;
drawDays();
drawWeeks();
}
COM: <s> sets a specific month </s>
|
funcom_train/12899383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
if (this == o)
return true;
if (!(o instanceof WrapperedPropertyDescriptor))
return false;
WrapperedPropertyDescriptor wo = (WrapperedPropertyDescriptor) o;
return this.fDescriptor.equals(wo.fDescriptor) && this.fSource.equals(wo.fSource) && this.fID.equals(wo.fID);
}
COM: <s> they are equal if the wrapper the same descriptor id and source </s>
|
funcom_train/4138207 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void termEmbedding() {
try {
gre.termEmbedding();
} catch (NullPointerException e) {
throw new XPCOMInitializationException("Must call " +
"Mozilla.getInstance().initialize() before using this method", e);
} finally {
mozilla = null;
gre = null;
xpcom = null;
}
}
COM: <s> terminates lib xul embedding </s>
|
funcom_train/41229768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGet() throws Exception {
// Positive tests
assertEquals("This is foo", (String) map.get("foo"));
assertEquals("And this is bar", (String) map.get("bar"));
assertEquals("We also have baz", (String) map.get("baz"));
// Negative tests
assertNull((String) map.get("bop"));
}
COM: <s> p test the code get code method </s>
|
funcom_train/1568914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void simulate(float dt) {
vel.addTo(force.divide(m).multiply(dt)); // Change in velocity is added to the velocity.
// The change is proportinal with the acceleration (forceScaled / m) and change in time
pos.addTo(vel.multiply(dt)); // Change in position is added to the position.
// Change in position is velocity times the change in time
}
COM: <s> void simulate float dt method calculates the new velocity and new position of </s>
|
funcom_train/10749302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCurrentThread() {
String name = "runThread";
ThreadRunningAnotherThread t = new ThreadRunningAnotherThread(name);
t.start();
waitTime = waitDuration;
while (t.curThread == null && !(expired = doSleep(10))) {
}
assertEquals("incorect current thread name", name, t.curThread.getName());
t.stop = true;
}
COM: <s> verify current thread </s>
|
funcom_train/51180055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireSearchlistenerEvent(String t){
// parse the Search string to words
ArrayList<String> words;
if ((t == null) || (t.isEmpty())) {
words = null;
} else {
words = getSearchwords(t);
}
//fire an event for every listener
for(SearchTextListener s: listeners)s.searchText(words);
}
COM: <s> fires an event if a search was started canceled </s>
|
funcom_train/20239805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getActualTotal(T actual) {
if (!matrix.containsKey(actual)) {
return 0;
} else {
int total = 0;
for (CountObject<T> countObj : matrix.get(actual).getCounts()) {
total += countObj.getCount();
}
return total;
}
}
COM: <s> computes the total number of times the class actually appeared in the data </s>
|
funcom_train/33133358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void generateClassBody() {
cw.visit(V1_4, ACC_PUBLIC + ACC_SUPER
+ (isAbstract() ? ACC_ABSTRACT : 0), classInternalName, null,
parentInternalName, getInterfaces());
cw.visitSource(classBaseName + ".codegen", null);
generateFields();
generateConstructors();
generateMethods();
cw.visitEnd();
}
COM: <s> generate class body </s>
|
funcom_train/869249 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SimpleLink getRoleRef(String uri) throws XBRLException {
List<SimpleLink> refs = getRoleRefs();
for (SimpleLink ref: refs) {
if (ref.getDataRootElement().getAttribute("roleURI").equals(uri))
return ref;
}
throw new XBRLException("The required roleRef is not part of the linkbase.");
}
COM: <s> retrieve an role ref from a linkbase </s>
|
funcom_train/10646829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(final Object item, final Object key) {
Element e = (Element)item;
int offset = ((SearchElement)key).offset;
if (e.getStartOffset() <= offset
&& offset < e.getEndOffset()) {
return 0;
} else if (e.getEndOffset() <= offset) {
return -1;
} else {
return +1;
}
}
COM: <s> it is expected that the first argument is the code element code </s>
|
funcom_train/20966163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double getCurvature(Curve2D curve, double t) {
if (curve instanceof SmoothCurve2D) {
return ((SmoothCurve2D) curve).getCurvature(t);
} else if (curve instanceof CurveSet2D){
CurveSet2D<?> set = (CurveSet2D<?>) curve;
return getCurvature(set.getChildCurve(t),
set.getLocalPosition(t));
} else {
System.err.println("unknown type of curve");
return 0;
}
}
COM: <s> compute the curvature of the curve either on the curve if it is </s>
|
funcom_train/3641004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processControllerStatusChanged() {
ProcessControllerStatus status = getStatus();
Set<ProcessControllerListener> lset = null;
synchronized (listenerSet) {
lset = new HashSet<ProcessControllerListener>(listenerSet);
}
for (Iterator<ProcessControllerListener> i = lset.iterator(); i.hasNext();) {
i.next().processControllerStatusChanged(this, status);
}
}
COM: <s> send a notification to </s>
|
funcom_train/7382699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Subscriber findSubscriber(PartyLine partyLine, String aliasOrName) {
for (Subscriber sub : partyLine.getSubscribers()) {
if (aliasOrName.equals(sub.getAlias())
|| aliasOrName.equals(sub.getUser().getName())) {
return sub;
}
}
return null;
}
COM: <s> finds a subscriber with the given alias or name </s>
|
funcom_train/19097230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane getScpChat() {
if (scpChat == null) {
scpChat = new JScrollPane();
scpChat.setPreferredSize(new Dimension(400, 75));
scpChat.setViewportView(getTxtChat());
scpChat.setBorder(UIGuidelines.brdBottom);
}
return scpChat;
}
COM: <s> this method initializes scp chat </s>
|
funcom_train/3474314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDuration (long duration) {
if (duration >= 0) {
super.setDuration (duration);
setProcTime (duration);
fireValuesChanged ();
} else {
// old "detect duration" mode
super.setDuration (0);
fireValuesChanged ();
setDetectDuration (true);
}
}
COM: <s> sets the start up duration in msec </s>
|
funcom_train/35315710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void restoreComposedText() {
Document doc = getDocument();
try {
doc.insertString(caret.getDot(),
composedTextContent,
composedTextAttribute);
composedTextStart = doc.createPosition(caret.getDot() -
composedTextContent.length());
composedTextEnd = doc.createPosition(caret.getDot());
} catch (BadLocationException ble) {}
}
COM: <s> restores composed text previously saved by </s>
|
funcom_train/50557085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int calculateMinimumBarHeight(int resolution) {
// The height of the bars must be at least .15 times the symbol's length or .25 inches,
// whichever is larger
double point25Inches = resolution * 0.25;
// TODO: Need to get rid of this and do it in the output class
return (int) Math.max((0.15 * getSymbolWidth(resolution)), point25Inches);
}
COM: <s> calculates the minimum allowed barcode height for the barcode </s>
|
funcom_train/6204997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setContextInitMethod(int contextInitMethod) {
if (!radioUseInitListener.isDisposed()) {
if (contextInitMethod == IProjectWorkingCopy.INIT_USE_CONTEXT_LISTENER) {
radioUseInitListener.setSelection(true);
radioUseInitServlet.setSelection(false);
} else {
radioUseInitListener.setSelection(false);
radioUseInitServlet.setSelection(true);
}
}
this.contextInitMethod = contextInitMethod;
}
COM: <s> set the method of spring context initialization </s>
|
funcom_train/3033385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateStatus(GedcomTableRecord rec, String label) {
udebug.dprintln("updateStatus: " + label);
rec.status = label;
final int row = findRow(rec);
if (row < 0)
fireTableDataChanged();
else
fireTableCellUpdated(row, 4);
}
COM: <s> writes a new status string for the given database </s>
|
funcom_train/10809490 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getEncoding() {
if (parser != null) {
return parser.getEncoding();
} else {
if (currentEvent == START_DOCUMENT) {
if (lastNode instanceof OMDocument) {
return ((OMDocument)lastNode).getCharsetEncoding();
} else {
return null;
}
} else {
throw new IllegalStateException();
}
}
}
COM: <s> method get encoding </s>
|
funcom_train/31913574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireLinkActivatedEvent(SVGAElement elt, String href) {
Object[] ll = linkActivationListeners.toArray();
if (ll.length > 0) {
LinkActivationEvent ev;
ev = new LinkActivationEvent(JSVGComponent.this, elt, href);
for (int i = 0; i < ll.length; i++) {
LinkActivationListener l = (LinkActivationListener)ll[i];
l.linkActivated(ev);
}
}
}
COM: <s> fires a link activated event </s>
|
funcom_train/44136904 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void notifyStartPlaying() {
OSMSoundEvent evt = new OSMSoundEvent(this);
for(int i = 0;i < m_ClientList.size();i++) {
OSMSoundListener lster = (OSMSoundListener)m_ClientList.get(i);
lster.onStartPlaying(evt);
}
}
COM: <s> to notify all the osmsound listener that a sound is started playing </s>
|
funcom_train/3153587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSingletonInterface() {
SstRequestElementFactory factory = null;
SstRequestElementFactory factory2 = null;
// we must get something
factory = SstRequestElementFactory.getInstance();
assertNotNull(factory);
// and now we must get the same again
factory2 = SstRequestElementFactory.getInstance();
assertNotNull(factory2);
assertEquals(factory, factory2);
}
COM: <s> tests the correct functionality of the singleton interface </s>
|
funcom_train/38551610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutdown() {
try {
this.dbConnectionThread.kill();
//Only need to commit if autocommit = false
//con.commit();
con.close();
} catch(SQLException e) {
Logger.error(
SyslogSystemCodes.LOG_ENTRY_STORE_SHUTDOWN_SQL_EXCEPTION,
new Object[] {e.getMessage()});
this.dbConnectionThread.resetConnection();
}
}
COM: <s> shuts the store down </s>
|
funcom_train/18849729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String requestRegistryPort() {
if (confirm("Do you want to use the default registry port?")) {
return RegistryHandler.REGISTRY_PORT + "";
}
String value = null;
do {
value = getInput("Please type the registry port that you want to use");
if (!isInteger(value)) {
System.out.println("Invalid port number");
value = null;
}
} while (value == null);
return value;
}
COM: <s> requests the registry port to user </s>
|
funcom_train/25191919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AbstractEventListener (Event event) {
subscriber = new BasicSubscriber ("EventListener-"+event.getType ());
subscriber.addPublicationListener (new MessageListener () {
public void messageAdded (Message msg) {
processMessage (msg);
}
});
Advertisement ad = new EventAdvertisement (event);
logger.info ("Listener Advertisement: "+ad);
subscriber.registerSubscriber (ad);
}
COM: <s> constructor that wraps an event listener as a remote object and will dynamically </s>
|
funcom_train/24000162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCanExitEarly() {
System.out.println("canExitEarly");
Object results = null;
OclCollectionOneIterator instance = null;
boolean expResult = false;
boolean result = instance.canExitEarly(results);
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 can exit early method of class ocl collection one iterator </s>
|
funcom_train/8521892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void ensureDirectoryFor(File targetFile) throws BuildException {
File directory = new File(targetFile.getParent());
if (!directory.exists()) {
if (!directory.mkdirs()) {
throw new BuildException("Unable to create directory: " + directory.getAbsolutePath());
}
}
}
COM: <s> creates directories as needed </s>
|
funcom_train/7754360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void attachDataset( Dataset d ) {
if (dataset.contains (d) )
return;
dataset.addElement(d);
d.xAxis = this;
// set the range of the data
this.setDataRange ();
// adjust the axis Limits
this.setAxisMinLimit ();
this.setAxisMaxLimit ();
// set the range of the axis
this.setAxisRange ();
}
COM: <s> attach a dataset for the horizontal axis to manage </s>
|
funcom_train/16657185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void showChord(int index) {
int[] params = (int[])this.proposalParameters.get(index);
this.dialog.getSelector().adjustWidgets(params[TONIC_INDEX],
params[CHORD_INDEX],
params[ALTERATION_INDEX],
params[BASS_INDEX],
params[PLUSMINUS_INDEX],
params[ADDCHK_INDEX],
params[I5_INDEX],
params[I9_INDEX],
params[I11_INDEX]);
String chordName = this.proposalList.getItem(index);
chordName = chordName.substring(0, chordName.indexOf('(')-1);
this.dialog.getEditor().getChordName().setText(chordName);
this.dialog.getEditor().redraw();
}
COM: <s> sets the current chord to be selected proposal </s>
|
funcom_train/14163937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getPageTopComments(String filename) {
JdbcTemplate jdbc = new JdbcTemplate(ds);
Object[] args = new Object[1];
args[0] = filename;
long pageId = 0;
try {
pageId = jdbc.queryForLong("SELECT id FROM page_node WHERE name = ?", args);
} catch (EmptyResultDataAccessException emptyError) {
// do nothing
}
return getPageTopComments(pageId);
}
COM: <s> get just the comments that are direct children of a page </s>
|
funcom_train/44709247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireActionEvent(PageState state) {
ActionEvent e = null;
if (m_actionListeners == null)
return;
for (int i=0; i < m_actionListeners.size(); i++ ) {
if ( e == null ) {
e = new ActionEvent(this, state);
}
((ActionListener) m_actionListeners.get(i)).actionPerformed(e);
}
}
COM: <s> fires an code action event code which causes all registered </s>
|
funcom_train/22232297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean intersect(Point3d point ) {
int i;
if( boundsIsEmpty ) {
return false;
}
if( boundsIsInfinite ) {
return true;
}
for(i = 0; i < this.planes.length; i++){
if(( point.x*this.planes[i].x +
point.y*this.planes[i].y +
point.z*this.planes[i].z + planes[i].w ) > 0.0 )
return false;
}
return true;
}
COM: <s> test for intersection with a point </s>
|
funcom_train/32057727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetGraphUndoManager() {
System.out.println("testSetGraphUndoManager");
GPGraphpad pad = new GPGraphpad();
GPGraph graph = new GPGraph();
GraphUndoManager undo = new GraphUndoManager();
GPDocument newDoc = new GPDocument(pad, "test", null, graph, null, undo);
try {
newDoc.setGraphUndoManager(undo);
} catch (Exception e) {
fail();
}
}
COM: <s> test of set graph undo manager method of class gpdocument </s>
|
funcom_train/32600801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getElementValue(String name,Element di) {
Element e;
Attribute attr;
String element_value = null;
if ((e = di.getChild(name)) != null)
element_value = e.getText();
else if ((attr = di.getAttribute(name)) != null)
element_value = attr.getValue();
return element_value;
}
COM: <s> get a string value for a named element </s>
|
funcom_train/48115319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String generateConstructor() {
final StringBuilder source = new StringBuilder();
source.append(className + "::" + className + "()\n{\n");
// initialize pointers to all beans
for (final Bean bean : definition.getBeanList()) {
source.append(" " + bean.getId() + " = 0;\n");
}
source.append("}\n\n");
return source.toString();
}
COM: <s> generates body of constructor </s>
|
funcom_train/45354213 | /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.setBounds(380, 51, 80, 25);
jButton.setText("Cancel");
jButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
cancel();
}
});
}
return jButton;
}
COM: <s> this method initializes j button </s>
|
funcom_train/36873821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initAnswerPane() {
answerPane.setVisible(false);
answerPane.setWidth("100%");
TextArea area = new TextArea();
area.setWidth("100%");
Button b = new Button("post answer");
answerPane.add(area);
answerPane.add(b);
}
COM: <s> initializes answer pane </s>
|
funcom_train/4462028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printAllDistances(PrintWriter pw, PairwiseDistribution pd, DelayCallback delay) throws DelayAbortedException, IOException {
if(pw == null)
return;
if(pd == null)
return;
if(delay != null)
delay.begin();
Vector v = pd.getDistancesBetween(0.0, 1.0);
Iterator i = v.iterator();
int count = 0;
int total = v.size();
while(i.hasNext()) {
Float f = (Float)i.next();
pw.println(f);
if(delay != null) {
delay.delay(count, total);
}
count++;
}
if(delay != null)
delay.end();
}
COM: <s> combines all the distances in pd into </s>
|
funcom_train/5380177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void cancelPressed() {
// NOTE: this was previously done from a listener installed on the
// cancel button. On GTK, the listener installed by
// Dialog.createButton is called first and this was throwing an
// exception because the cancel button was already disposed
cancel.setEnabled(false);
progressMonitor.setCanceled(true);
super.cancelPressed();
}
COM: <s> the cancel button has been pressed </s>
|
funcom_train/12157731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeGetSupportedClassMethod () {
// Write the method declaration.
out.println ();
out.println (" // Javadoc inherited from super class.");
out.println (" public Class getSupportedClass () {");
out.println (" return " + objectClassName + ".class;");
out.println (" }");
}
COM: <s> write out the get supported class method </s>
|
funcom_train/28989947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void objectAppears(int id, float x, float y){
if (!this.fingers.containsKey(id))
{
TouchData f = new TouchData(id, x, y, System.currentTimeMillis());
this.fingers.put(id, f);
this.onTouchBegin(id,x, y);
//this.prepareAnalyse(f);
this.publishObjects();
}
}
COM: <s> if an object appears </s>
|
funcom_train/36659679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeChannel() {
removeAllSessions();
dataService.removeServiceBinding(getChannelKey());
dataService.removeObject(this);
if (listenerRef != null) {
ChannelListener maybeWrappedListener = listenerRef.get();
if (maybeWrappedListener instanceof ManagedSerializable) {
dataService.removeObject(maybeWrappedListener);
}
}
EventQueue eventQueue = getEventQueue(coordNodeId, channelId);
dataService.removeServiceBinding(getEventQueueKey());
dataService.removeObject(eventQueue);
}
COM: <s> removes all sessions from this channel removes the channel </s>
|
funcom_train/22165551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addChild (Object child) {
// Return if the child is invalid.
if (child == null) return;
// Check that this node has no children.
if (children == null) return;
// Add the child if it is a string.
if (child instanceof String) {
children.addElement(child);
++numChildren;
return;
}
// Add the child and set its parent if it is an HTMLNode.
if (child instanceof HTMLNode) {
children.addElement(child);
((HTMLNode) child).setParent(this);
return;
}
}
COM: <s> adds an object to the end of this nodes content </s>
|
funcom_train/45691323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Function getTranspose() {
Function transpose;
switch(this.dimension) {
case 2:
/*
* Transpose X and Y
*/
transpose = new Function("TP");
transpose.addArgument(new Argument("hyper", ""));
break;
case 3:
/*
* Transpose X and Z
*/
transpose = new Function("ZTP");
transpose.addArgument(new Argument("hyper", ""));
break;
case 4:
/*
* Tranpose A and X
*/
transpose = new Function("ATP");
transpose.addArgument(new Argument("hyper", ""));
break;
default:
transpose = null;
break;
}
return transpose;
}
COM: <s> should be overriden in the tools executor </s>
|
funcom_train/9344737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop() {
if (serverSocket != null) {
try {
serverSocket.close();
} catch (IOException e) {
logger.warn("Error closing " + name + " intermediare : " + e.getMessage());
}
} else {
logger.debug("Application tried to stop a null server");
}
}
COM: <s> closes this intermediare </s>
|
funcom_train/50029774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Hint checkValidity() {
int oldPriority = lowerPriority();
SingleHintAccumulator accu = new SingleHintAccumulator();
try {
for (WarningHintProducer producer : validatorHintProducers)
producer.getHints(grid, accu);
for (WarningHintProducer producer : warningHintProducers)
producer.getHints(grid, accu);
} catch (InterruptedException willProbablyHappen) {}
normalPriority(oldPriority);
return accu.getHint();
}
COM: <s> get the first available validity warning hint </s>
|
funcom_train/1797878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPlainText() {
switch (getType()) {
case IContent.Type.XHTML:
return getXhtml().getBlob();
case IContent.Type.TEXT:
return getText();
case IContent.Type.HTML:
return HtmlToText.htmlToPlainText(getText());
default:
throw new IllegalStateException("Shouldn't be possible, "
+ "getType can only return TEXT, HTML, or XHTML.");
}
}
COM: <s> returns a plain text representation of this text content </s>
|
funcom_train/39564725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintNode(JGraphPane graphPane, JPowerGraphGraphics g, ClusterNode node, int size, SubGraphHighlighter theSubGraphHighlighter) {
JPowerGraphPoint nodePoint = graphPane.getScreenPointForNode(node);
paintNode(graphPane, g, node, size, theSubGraphHighlighter, nodePoint);
}
COM: <s> paints the supplied node </s>
|
funcom_train/35812406 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean verifyAllSessionsClosed(Database db) {
boolean result = false;
try {
List<DatabaseRecord> allSessions = db.getRecords("syslog_sessions");
assertNotNull(allSessions);
if (allSessions.size() == 0) {
result = true; // no sessions to verify
} else {
boolean ok = true;
for (DatabaseRecord r : allSessions) {
if (r.isNull("end_date")) {
ok = false;
break;
}
}
result = ok;
}
} catch (Exception e) {
fail(StackTraceUtil.toString(e));
}
return result;
}
COM: <s> checks whether all sessions in database are closed </s>
|
funcom_train/25743620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void invoke(String identifier, Object... args) {
Invocable invEngine = getScripts();
try {
invEngine.invokeFunction(identifier, args);
} catch (NoSuchMethodException ex) {
logger.log(Level.WARNING, "No such method: " + identifier, ex);
} catch (ScriptException ex) {
logger.log(Level.WARNING, "ScriptException thrown!", ex);
}
}
COM: <s> invokes a java script function </s>
|
funcom_train/18756635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MerlotDOMNode getSelectedNode() {
MerlotDOMNode node = null;
int selected_row = _table.getSelectedRow();
if (selected_row >= 0) {
node = getNodeForRow(selected_row);
} else {
MerlotDebug.msg("No row is currently selected.");
}
return node;
}
COM: <s> gets the node object that is the current selection in the document tree </s>
|
funcom_train/49688625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IPatState setCurrentState(UUID userId, IPatState state) {
IPatState prevState = (user2CurrentTaskState.containsKey(userId)) ? user2CurrentTaskState.get(userId)
: INIT_STATE;
user2CurrentTaskState.put(userId, state);
logger.info("Setting current state of (" + userId + ") to " + state + "!");
return prevState;
}
COM: <s> sets the current state of the state machine </s>
|
funcom_train/13868670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showError(final String message, final Throwable cause) {
if (null != message) {
final FlowPanel error = new FlowPanel();
final HTML errorMessage = new HTML();
errorMessage.setText(message);
errorMessage.setStyleName("errormessage");
error.add(errorMessage);
if (null != cause) {
final HTML errorDetail = new HTML();
errorDetail.setText(cause.getMessage());
errorDetail.setStyleName("errordetail");
error.add(errorDetail);
}
final RootPanel errorMessagePanel = RootPanel.get("error");
errorMessagePanel.clear();
errorMessagePanel.add(error);
errorMessagePanel.setVisible(true);
}
}
COM: <s> shows an error message </s>
|
funcom_train/1993966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean insertUser(String username, String password, boolean status){
try{
PreparedStatement stmt = conn1.prepareStatement("insert into users(username, password, administrator) values (?,?,?)");
stmt.setString(1, username);
stmt.setString(2, password);
stmt.setBoolean(3, status);
stmt.executeUpdate();
conn1.commit();
return true;
}
catch (SQLException e){
e.printStackTrace();
return false;
}
}
COM: <s> insert a user with a new username and password </s>
|
funcom_train/51377942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getSMTPPassword() {
String myPassword = password;
try {
if (myPassword == null) {
myPassword = Setup.getValueRequired(getDBName(),
"MAILPassword");
}
} catch (DBException dex) {
myPassword = null;
}
password = myPassword;
return myPassword;
} /* getSMTPPassword() */
COM: <s> this method returns the smtp password to use for an authenticated smtp session </s>
|
funcom_train/21087469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLinkObjetPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_Commentaire_linkObjet_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_Commentaire_linkObjet_feature",
"_UI_Commentaire_type"),
SNI_Package.Literals.COMMENTAIRE__LINK_OBJET, true, false,
true, null, null, null));
}
COM: <s> this adds a property descriptor for the link objet feature </s>
|
funcom_train/5472558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Event next () {
while (next == null && this.ds.hasNext())
next = createEvent((String)this.ds.nextToken());
Event current = next;
if (this.ds.hasNext()) {
next = createEvent((String)this.ds.nextToken());
}
else {
next = null;
}
return current;
}
COM: <s> returns the next event object held in this event stream </s>
|
funcom_train/18358517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private VoiceCommsNetworkParticipant findParticipantByCName(String cname) {
VoiceCommsNetworkParticipant retVal = null;
Iterator partyIt = partners.keySet().iterator();
while (partyIt.hasNext() == true) {
VoiceCommsNetworkParticipant vcnp = (VoiceCommsNetworkParticipant) partyIt.next();
if (vcnp.getCName().compareTo(cname) == 0) {
retVal = vcnp;
}
}
return retVal;
}
COM: <s> returns the voice comms network participant with the given cname </s>
|
funcom_train/9494230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Complex parse(String source) throws ParseException {
ParsePosition parsePosition = new ParsePosition(0);
Complex result = parse(source, parsePosition);
if (parsePosition.getIndex() == 0) {
throw MathRuntimeException.createParseException(
parsePosition.getErrorIndex(),
"unparseable complex number: \"{0}\"", source);
}
return result;
}
COM: <s> parses a string to produce a </s>
|
funcom_train/10517357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test14() throws IOException, ManifestException {
executeTarget("test14");
Manifest manifest = getManifest(EXPANDED_MANIFEST);
Manifest.Section mainSection = manifest.getMainSection();
String classpath = mainSection.getAttributeValue("class-path");
assertEquals("Class-Path attribute was not set correctly - ",
"Test1 Test2 Test3 Test4", classpath);
}
COM: <s> inline manifest ok since classpath entries can be duplicated </s>
|
funcom_train/32632042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDateString() {
assertEquals(SAMPLE_DATE_STRING, DateUtil.getDateString(gregorianDate, Locale.US));
assertEquals("", DateUtil.getDateString(gregorianTime, Locale.US));
assertEquals(SAMPLE_DATE_STRING, DateUtil.getDateString(gregorianDateTime, Locale.US));
assertEquals("", DateUtil.getDateString(null));
}
COM: <s> test date formatting </s>
|
funcom_train/20830337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ResultKeysContainer processWhereClause(XQueryFLWOR op) throws XQueryException{
ResultKeysContainer result = null;
if(op.hasWhereClause()){
try {
if(op.getWhereClause().getExpression().evaluate(this).booleanValue()){
result = processReturnClause(op);
}
} catch (XDMIllegalValueException e) {throw new XQueryException(op.getPosition(), FunctionError.INVALID_ARGUMENT_TYPE);}
}
else{
result = processReturnClause(op);
}
return result;
}
COM: <s> method process where clause </s>
|
funcom_train/32802207 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isInAdditions(org.eclipse.jface.text.Position position) {
for (org.eclipse.jface.text.source.Annotation addition : additions.keySet()) {
org.eclipse.jface.text.Position additionPosition = additions.get(addition);
if (position.offset == additionPosition.offset && position.length == additionPosition.length) {
return true;
}
}
return false;
}
COM: <s> checks the offset of the given code org </s>
|
funcom_train/39305448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane buildTable() {
// create the table
TableSorter sorter = new TableSorter(model);
JTable table = new JTable(sorter);
table.setPreferredScrollableViewportSize(new Dimension(300, 100));
// set the sorter table header
sorter.setTableHeader(table.getTableHeader());
// setup the scroll pane
JScrollPane scrollPane = new JScrollPane(table);
// initialize the table column sizes
initColumnSizes(table);
return scrollPane;
}
COM: <s> build the table </s>
|
funcom_train/44011552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetCustCity() {
System.out.println("getCustCity");
CustomerBO instance = null;
String expResult = "";
String result = instance.getCustCity();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get cust city method of class edu </s>
|
funcom_train/48559110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand6() {
if (okCommand6 == null) {//GEN-END:|315-getter|0|315-preInit
okCommand6 = new Command("OK", Command.OK, 0);//GEN-LINE:|315-getter|1|315-postInit
}//GEN-BEGIN:|315-getter|2|
return okCommand6;
}
COM: <s> returns an initiliazed instance of ok command6 component </s>
|
funcom_train/511181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getOptions() {
List<Option> opts = new ArrayList<Option>(shortOpts.values());
// now look through the long opts to see if there are any Long-opt
// only options
for (Option item : longOpts.values()) {
if (!opts.contains(item)) {
opts.add(item);
}
}
return Collections.unmodifiableCollection(opts);
}
COM: <s> p retrieve a read only list of options in this set p </s>
|
funcom_train/7803609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TRANSACTION_DONE exec() {
Transaction t = null;
try {
t = Transaction.current();
Tag tag = OSS_Utilities.fetchTag(tagPath);
if (tag == null)
return error(TRANSACTION.PATH_RESOLUTION_ERROR,
"No such Tag ["+tagPath+"] found");
Root root = OSS_Utilities.fetchRoot();
root.deleteTag(tag);
DELETE_TAG_DONE done = new DELETE_TAG_DONE(id);
done.setSuccessful(true);
done.setRemoved(true);
return done;
} finally {
t.commit();
}
}
COM: <s> removes the specified tag from the odb </s>
|
funcom_train/45228684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteCompiledClasses() {
List<File> classes = null;
try {
classes = locator.listCompiledClasses();
}
catch (Exception e) {
log.error("Error listing compiled classes", e);
}
if (classes != null) {
try {
for (File doomed : classes) {
locator.deleteFile(doomed);
}
}
catch (Exception e) {
log.error("Error deleting class", e);
}
}
}
COM: <s> deletes all compiled classes in the project </s>
|
funcom_train/40762693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void log(String message, Exception e) {
String pluginName = super.getBundle().getSymbolicName();
IStatus status = new Status(IStatus.ERROR, pluginName, 0, message + " " + e.getMessage(), e);
plugin.getLog().log(status);
}
COM: <s> logs out the exception or error message for eclispe sensor plug in </s>
|
funcom_train/50433419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void logMessage(int iSeverity, String strMessage) {
String strOut =
getCurrentDateAndTime() + " " +
getSeverityLevel(iSeverity) + " - " +
strMessage + EOLN;
fWrite.write(strOut);
if (fWrite.checkError()) {
System.err.println("Error in writing to logfile");
}
} // of logMessage
COM: <s> record the specified message to the log </s>
|
funcom_train/2432589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load() throws DataCacheException {
synchronized (lock) {
File file = createFile();
if (!file.exists()) {
return;
}
try {
Collection<DriverDescriptor> drivers = readFromFile(file);
setDrivers(drivers);
hasBeenLoaded = true;
} catch (IOException ex) {
throw new DataCacheException(DatabaseMessages.getString("DatabaseDriverCache.LoadingError"), ex);
}
}
}
COM: <s> loads the cached data into memory </s>
|
funcom_train/777475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testJademxConfigToSLString() throws Exception {
ACLMessage msg = makeMsg();
//System.out.println("slAction:\n"+slAction);
//System.out.println("msg.getContent:\n"+msg.getContent());
assertEquals( slAction, msg.getContent() );
}
COM: <s> test conversion of jademx config to sl using ontology </s>
|
funcom_train/15922640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Context pushAt(X10CodeDef ci) {
if (reporter.should_report(TOPICS, 4))
reporter.report(4, "push at " + ci.position());
Context v = push();
v.kind = AT;
v.code = ci;
v.inCode = true;
v.staticContext = ci.staticContext();
return v;
}
COM: <s> enter the scope of an at </s>
|
funcom_train/43097827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTarget(Object theTarget) {
Object t = (theTarget instanceof Fig)
? ((Fig) theTarget).getOwner() : theTarget;
if (!(Model.getFacade().isAModelElement(t))) {
target = null;
return;
}
target = t;
selectedListModel.setTarget(t);
validate();
}
COM: <s> todo this does not seem to get called </s>
|
funcom_train/7980996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected List getRegexp(Object o) {
try {
return (StringList) getAttribute(o, ATTR_REGEXP_LIST);
} catch (AttributeNotFoundException e) {
logger.severe(e.getMessage());
// Basically the filter is inactive if this occurs
// (The caller should be returning false when regexp is null).
return null;
}
}
COM: <s> get the regular expressions list to match the uri against </s>
|
funcom_train/35718011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleProjectionEnabled() {
// http://home.ott.oti.com/teams/wswb/anon/out/vms/index.html
// projectionEnabled messages are not always paired with projectionDisabled
// i.e. multiple enabled messages may be sent out.
// we have to make sure that we disable first when getting an enable
// message.
handleProjectionDisabled();
if (isInstalled()) {
initialize();
fElementListener = new ElementChangedListener();
JavaCore.addElementChangedListener(fElementListener);
}
}
COM: <s> called whenever projection is enabled for example when the viewer issues a </s>
|
funcom_train/12768073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void afterMove(TreeItemMoveEvent event) {
if (event.data instanceof Waypoint) {
Route route = (Route) event.parent.getData();
Waypoint waypoint = (Waypoint) event.data;
route.addWaypoint(event.index, waypoint);
// if (tooltip != null) {
// tooltip.setToolTip(event.item, item.getTag().getToolTip());
// }
}
}
COM: <s> moves a waypoint </s>
|
funcom_train/958764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() {
slotTypes = InternalSlotTypes.getInstance();
if (slotTypes.getSlotTypeSize() == 0) {
SqlPersistence persistence = new SqlPersistence(newRequestContext());
try {
slotTypes.loadSlots(persistence);
} catch (Exception ex) {
logger.log(Level.SEVERE, "Could not load slot types", ex);
}
}
}
COM: <s> initialize the backend client </s>
|
funcom_train/48748448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFilterMethod(String newMethod) throws DBException {
//Check for validity of new method
if (! (newMethod.equals("standardFilter") ||
newMethod.equals("rawFilter") ||
newMethod.equals("stripFilter") ) ) {
throw new DBException("Unknown Filter Method Name: "
+ newMethod);
}
filterMethod = newMethod;
}/* setFilterMethod(String) */
COM: <s> sets the name of the filter method to be used </s>
|
funcom_train/3600531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getInt(int columnIndex) throws SQLException {
Object obj = this.getField(columnIndex, currentRecord);
if (obj == null) {
return 0;
} else {
try {
return ((java.math.BigDecimal) obj).intValue();
} catch (Throwable exe) {
return Integer.parseInt(((String) obj).trim());
}
}
}
COM: <s> get an integer value specified by the column name </s>
|
funcom_train/2711232 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPropertyDefinition(PropertyDefinition propertyDefinition) {
if (propertyDefinition != null) {
if (getPropertyDefinitions() == null) {
propertyDefinitions = new HashMap();
propertyDefinitionsByAlias = new HashMap();
}
propertyDefinitions.put(propertyDefinition.getName(), propertyDefinition);
propertyDefinitionsByAlias.put(propertyDefinition.getAlias(), propertyDefinition);
}
}
COM: <s> adds a property definition </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.