__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/41621944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Joint clone(ModelNode modelNode) {
Joint clone = new Joint();
clone.modelNode = modelNode;
clone.name = new String(this.name.toCharArray());
clone.parent = this.parent;
clone.translation = this.translation.clone();
clone.orientation = new Quaternion(this.orientation.x, this.orientation.y, this.orientation.z, this.orientation.w);
clone.transform = new TransformMatrix();
clone.transform.set(this.transform);
return clone;
}
COM: <s> clone this join with given newly cloned code model node code parent </s>
|
funcom_train/23267796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetNroGiro() {
System.out.println("getNroGiro");
Giros instance = new Giros();
int expResult = 0;
int result = instance.getNroGiro();
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 nro giro method of class capa negocios </s>
|
funcom_train/16329969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleStartElement(Attributes atts) throws SAXException {
int row = Integer.parseInt(getRequiredAttrValue(atts, ATTR_ROW));
int col = Integer.parseInt(getRequiredAttrValue(atts, ATTR_COLUMN));
mapLoadingData.setRowAndColumn(row, col);
}
COM: <s> method called when an open tag instance is encountered </s>
|
funcom_train/3703342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ContextTuple getLastKnownTuple() {
if (size() <= 0) {
return (createUnknownTuple());
}
ContextTuple ctuple = createUnknownTuple();
int size = size();
for (int i = 0; i < size; i++) {
ctuple = get(i);
if (ctuple.hasValueUnknown() == false) {
break;
}
}
return (ctuple);
} // of method
COM: <s> get the most recent tuple that doesnt have a value of unknown </s>
|
funcom_train/31824654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void internal_dispose_GC (int hDC, GCData data) {
checkWidget ();
int hwnd = handle;
if (data != null && data.hwnd != 0) {
hwnd = data.hwnd;
}
if (data == null || data.ps == null) {
OS.ReleaseDC (hwnd, hDC);
} else {
OS.EndPaint (hwnd, data.ps);
}
}
COM: <s> invokes platform specific functionality to dispose a gc handle </s>
|
funcom_train/37074744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SeqFeatureI getFeatureAt (int i) {
if (!canHaveChildren())
return null;
else {
logger.error (getName() + " a " + this.getClass().getName() +
" says it can have features, but it is not a FeatureSetI");
return null;
}
}
COM: <s> returns a seqfeature at the specified position </s>
|
funcom_train/49677046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setCellMapElements(ArrayList<Sprite> elements, int x, int y) {
MapForegroundElement element = this.map
.getMapForegroundElementAtLocation(new Location(y, x));
if (element != null) {
elements.add(element.getSprite());
}
}
COM: <s> initialize a location with the different foregrounds sprites </s>
|
funcom_train/4675182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createAcceptK2FirstPurchaseInvoice() {
//Save PENDING Purchase invoice
rinGroup1 = new RIN[]{rin3, rin1, rin2};//K2 purchased first
new RINsRPCImpl().saveInvoice(createPurchaseInvoice("p2", rinGroup1, 5765, "Rail"));
//Accountant accept invoice
allInvoices = getAllInvoices();
allRINs = getAllRINs();
assertEquals(allInvoices.size(), 1);
acceptInvoice(allInvoices.get(0));
new RINsRPCImpl().saveInvoice(allInvoices.get(0));
}
COM: <s> creates an purchase invoice with k2 rin saved before k1 saves the </s>
|
funcom_train/23235485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillRPAction(RPAction action) {
if (parent != null) {
// the item is inside a container
action.put("baseobject", parent.getID().getObjectID());
action.put("baseslot", slot);
} else {
// the item is on the ground
action.put("x", objectx);
action.put("y", objecty);
}
action.put("baseitem", content);
}
COM: <s> fills the action with the appropiate move from parameters </s>
|
funcom_train/20915547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Period precedingPeriod(Period p) {
if (this.getStart().compareTo(p.getStart()) >=0) {
return null;
}
if (this.getEnd().compareTo(p.getStart()) <=0 ) {
// we assume Period is immutable
return this;
}
return new Period(this.getStart(), p.getStart());
}
COM: <s> returns the part of this period that precedes p </s>
|
funcom_train/16678680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean accessAllowed() {
StackTraceElement[] elems = Thread.currentThread( ).getStackTrace( );
String methodName = elems[methodIndex].getMethodName( );
String callerClassName = elems[methodIndex + 1].getClassName( );
callerClassName = ClassUtils.getShortClassName(callerClassName);
if (!accessControl.get(methodName).contains(callerClassName)) {
accessNotAllowed(methodName, callerClassName);
return false;
}
return true;
}
COM: <s> checks if the access to the last called method was allowed by </s>
|
funcom_train/40658203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run () {
// No Exceptions here, since loading Modules is non-critical.
loadModules (ConfigManager.get ("Main", "modules").split (","));
// disable() will be called by the BotManager when it's time to clean
// up and shut down.
while (isEnabled ()) {
loop ();
checkDistributeMessages ();
// Don't stress the CPU too much.
try {
Thread.sleep (50);
} catch (InterruptedException pException) {}
}
}
COM: <s> the thread which handles the modules </s>
|
funcom_train/24450509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element getRootElement(String xmlText) throws ApsSystemException {
SAXBuilder builder = new SAXBuilder();
builder.setValidation(false);
StringReader reader = new StringReader(xmlText);
Element root = null;
try {
Document doc = builder.build(reader);
root = doc.getRootElement();
} catch (Throwable t) {
ApsSystemUtils.getLogger().severe("Error parsing xml: " + t.getMessage());
throw new ApsSystemException("Error parsing xml", t);
}
return root;
}
COM: <s> returns the xml element from a given text </s>
|
funcom_train/37037067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setReloadable(boolean reloadable) {
// Process this property change
boolean oldReloadable = this.reloadable;
this.reloadable = reloadable;
support.firePropertyChange("reloadable",
new Boolean(oldReloadable),
new Boolean(this.reloadable));
// Start or stop our background thread if required
if (!started)
return;
if (!oldReloadable && this.reloadable)
threadStart();
else if (oldReloadable && !this.reloadable)
threadStop();
}
COM: <s> set the reloadable flag for this loader </s>
|
funcom_train/264940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getValueAt(int row, int col) {
if (displayNumbering) {
if (col == 0)
return new Integer(row + 1);
return model.getValueAt(indexList[row], col - 1);
}
return model.getValueAt(indexList[row], col);
}
COM: <s> implements table model by forwarding the message get value at substitutes </s>
|
funcom_train/28466853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsDriver(ISQLDriver driver) {
boolean result = false;
for (Iterator iter = _cache.getAllForClass(SQL_DRIVER_IMPL); iter.hasNext();) {
ISQLDriver cachedDriver = (ISQLDriver) iter.next();
if (cachedDriver.equals(driver)) {
result = true;
break;
}
}
return result;
}
COM: <s> returns a boolean value indicating whether or not the specified driver </s>
|
funcom_train/2807510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getState(String workEffortId) throws WfException {
WfExecutionObject obj = getExecutionObject(workEffortId);
if (obj == null) throw new WfException("Invalid Execution Object (null value)");
if (Debug.verboseOn()) Debug.logVerbose("Current State (" + workEffortId + ") => " + obj.state(), module);
return obj.state();
}
COM: <s> gets the state of the execution object defined by the work effort key </s>
|
funcom_train/3116906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setText(final String string) {
text = string;
setFullSizeBounds(
TEXT,
DamaskAppUtils.getRenderedTextBounds(text, DEFAULT_FONT_SIZE));
fireTextChanged();
if (isVisibleToDeviceType(DeviceType.VOICE)) {
if (syncPromptTextWithText) {
super.setVoicePromptText(string);
}
}
}
COM: <s> sets the text version of this piece of content to the specified string </s>
|
funcom_train/50166167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TreePath getFirstStep() {
IStep parent = (IStep)treeModel.getRoot();
TreePath res = new TreePath(parent);
while (!parent.isRealStep() && parent.getChildCount() > 0) {
res = res.pathByAddingChild(parent.getChildAt(0));
parent = (IStep)parent.getChildAt(0);
}
return res;
}
COM: <s> returns a treepath to the first non sequence step </s>
|
funcom_train/18467697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Square getSquare(char c) throws XMLException {
if (squares[c]==null) {
//Logger.err.println(Messages.get(Messages.NO_DEF)+"'"+c+"'");
throw new XMLException(Messages.get(Messages.NO_DEF)+"'"+c+"'"+" in <floorplan>");
}
return squares[c];
}
COM: <s> get the square that corresponds to the given character in a floorplan </s>
|
funcom_train/3807884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void replace(Object pOldChild, Object pNewChild) {
for (ListIterator iter = childs.listIterator(); iter.hasNext(); ) {
Object o = iter.next();
if (o.equals(pOldChild)) {
iter.set(pNewChild);
return;
}
}
throw new NoSuchElementException();
}
COM: <s> p replaces the existing child code p old child code with </s>
|
funcom_train/10357370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int findHeader(String name, int start) {
for (int i = start; i < headers.size(); i++) {
InternetHeader header = (InternetHeader)headers.get(i);
// found a matching header
if (name.equalsIgnoreCase(header.getName())) {
return i;
}
}
return -1;
}
COM: <s> find a header in the current list beginning with the specified </s>
|
funcom_train/3466221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMethodIndex(String name, String descriptor) throws InvalidByteCodeException {
for (int i = 0; i < methods.length; i++) {
MethodInfo method = methods[i];
if (method.getName().equals(name) && method.getDescriptor().equals(descriptor)) {
return i;
}
}
return -1;
}
COM: <s> get the index of a method for given method name and signature </s>
|
funcom_train/21913275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addRequiredRolesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ModelSecurityConstraint_requiredRoles_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ModelSecurityConstraint_requiredRoles_feature", "_UI_ModelSecurityConstraint_type"),
UIMPackage.Literals.MODEL_SECURITY_CONSTRAINT__REQUIRED_ROLES,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the required roles feature </s>
|
funcom_train/19251510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int computeUpperIndex(int _lowerIndex, int _upperIndex, int _characterNumber) {
//-- in case the retrieved (from preferences) upperIndex is > characterNumber or upperIndex < lowerIndex,
//--we force it to characterNumber.
if ( !upperIndexOk( _lowerIndex, _upperIndex, _characterNumber)) {
return _characterNumber;
}
return( _upperIndex);
}
COM: <s> retrieves the preferred upper index and checks that is value is correct </s>
|
funcom_train/45750154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIsEssentialPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Meronymic_isEssential_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Meronymic_isEssential_feature", "_UI_Meronymic_type"),
OntoUMLPackage.Literals.MERONYMIC__IS_ESSENTIAL,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the is essential feature </s>
|
funcom_train/34262089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void nodeChanged(Node node) {
if(listenerList != null && node != null) {
Node parent = node.getParentNode();
if(parent != null) {
int anIndex = parent.getIndex(node);
if(anIndex != -1) {
int[] cIndexs = new int[1];
cIndexs[0] = anIndex;
nodesChanged(parent, cIndexs);
}
}
else if (node == getRoot()) {
nodesChanged(node, null);
}
}
}
COM: <s> invoke this method after youve changed how node is to be </s>
|
funcom_train/18275152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop() {
if (chromeAdapter==null) return;
mozAsyncExec(new Runnable() { public void run() {
nsIWebNavigation nav = qi(chromeAdapter.getWebBrowser(), nsIWebNavigation.class);
nav.stop(nsIWebNavigation.STOP_ALL);
}});
}
COM: <s> stops loading of the page if running </s>
|
funcom_train/1436017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void maximizeIntensity() {
int rows = getHeight();
int cols = getWidth();
double dbL = (L - 1);
for (int row = 0; row < rows; row++) {
for (int col = 0; col < cols; col++) {
intensity[row][col] = (short) Math.min(L - 1, Math
.round((L - 1)
* maxIntensity(hue[row][col] / dbL,
saturation[row][col] / dbL)));
}
}
}
COM: <s> set the intensity to its maximum possible value while maintaining hue and </s>
|
funcom_train/11418168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setTheConfiguration(String config) {
//System.setProperty("javax.net.debug", "all");
try {
System.setProperty(
Configurer.USER_CFG_FILE_PROPERTY_URL,
HTTPSClientTest.class.getResource(config).toString()
);
} catch (final Exception e) {
e.printStackTrace();
}
}
COM: <s> the package path used to locate resources specific to this test </s>
|
funcom_train/18114330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addComponent(Component c, Object o, int i) {
super.addImpl(c, o, i);
//constraints = o;
//imple = i;
/*int x = getDividerLocation();
components.add(c);
if (c.getName() != null && buttonPanel != null) {
addButton(c.getName(), "" + c.hashCode());
}
currentComponent = c;
setDividerLocation(x);*/
}
COM: <s> should be removed </s>
|
funcom_train/22467945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Prediction calculatePrediction(UserId user, IRatableItem item) {
if (!canPredict(user, item)) {
return new Prediction(item, 0, 0, new Explanation(getName()), false);
}
Explanation expl = new Explanation(getName());
double prediction = ratingModel.getAverageRating(user);
double certainty = calculateCertainty(user, item);
return new Prediction(item, prediction, certainty, expl);
}
COM: <s> calculates a prediction for a given content item based on the average of </s>
|
funcom_train/15555007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void determineNumberOfClusters() {
if (!m_numberOfClustersDetermined && (m_cobwebTree != null)) {
int[] numClusts = new int[1];
numClusts[0] = 0;
m_cobwebTree.assignClusterNums(numClusts);
m_numberOfClusters = numClusts[0];
m_numberOfClustersDetermined = true;
}
}
COM: <s> determines the number of clusters if necessary </s>
|
funcom_train/37520586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStyle(String token, Color foreground, int fontStyle) {
Style s = context.getStyle(token);
if (s == null) {
s = context.addStyle(token, context.new NamedStyle());
}
StyleConstants.setItalic(s, (fontStyle & Font.ITALIC) > 0);
StyleConstants.setBold(s, (fontStyle & Font.BOLD) > 0);
StyleConstants.setForeground(s, foreground);
}
COM: <s> set the style identified by the name </s>
|
funcom_train/50099907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void makeHead(){
html = new String();
html = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>\n" +
"<html>\n<head>\n<title>" + data.getName() + "</title>\n" +
"<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>\n" +
"</head>\n";
}
COM: <s> generate the head section of the document </s>
|
funcom_train/49045298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButtonMenuItem getJRadioButtonH_AEC() {
if (buttH_AEC == null) {
buttH_AEC = new JRadioButtonMenuItem();
buttH_AEC.setText("H AEC");
buttH_AEC.setToolTipText("H AEC");
buttH_AEC.addActionListener(this);
buttH_AEC.setActionCommand("parameter");
buttH_AEC.setEnabled(true);
}
return buttH_AEC;
}
COM: <s> this method initializes the option h aec </s>
|
funcom_train/14078638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ExportPDFAction2 getPDFExportAction() {
byte[] actionBytes = prefs.getByteArray(PDF_EXPORT_ACTION, null);
if (actionBytes == null) return null;
ByteArrayInputStream bis = new ByteArrayInputStream(actionBytes);
try {
ObjectInputStream ois = new ObjectInputStream(bis);
ExportPDFAction2 action = (ExportPDFAction2) ois.readObject();
return action;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
COM: <s> get the saved export pdfaction2 from the preferences store </s>
|
funcom_train/2901952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getMenus() {
try {
Session hSession = HibernateSession.openSession();
List menus = hSession.find("from Menu as menu ");
HibernateSession.closeSession(hSession);
return menus;
} catch (HibernateException e) {
log.error("Unable to get system menu!", e);
}
return Collections.EMPTY_LIST;
}
COM: <s> returns a list of a menu objects defined within database </s>
|
funcom_train/19810460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connectToDatabase() {
try {
String url = "jdbc:mysql://" + ip + "/mythconverg";
Class.forName( "com.mysql.jdbc.Driver" ).newInstance();
conn = DriverManager.getConnection( url, username, password );
System.out.println( "Database connection established" );
} catch ( Exception e ) {
System.err.println( "Cannot connect to database server" );
System.exit( -1 );
}
}
COM: <s> connects via jdbc to the myth tv database </s>
|
funcom_train/44819850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMenuText() {
if (definitionId == null) {
return menuText;
}
ExternalActionManager.ICallback callback = ExternalActionManager
.getInstance().getCallback();
if (callback != null) {
String shortCut = callback.getAcceleratorText(definitionId);
if (shortCut == null) {
return menuText;
}
return menuText + "\t" + shortCut; //$NON-NLS-1$
}
return menuText;
}
COM: <s> returns the text shown in the menu potentially with a shortcut </s>
|
funcom_train/8541721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printAllResult() {
// print out the result
Iterator<Frame> it = cc.getPlayer().iterator();
while (it.hasNext()) {
Point[] result = it.next().getPointArray();
for (int i = 0; i < result.length; i++)
System.out.print("X: " + result[i].getX() + "Y: "
+ result[i].getY() + " ");
System.out.println("");
}
}
COM: <s> prints out all the coordinates </s>
|
funcom_train/28424227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void openFile( java.io.File f ) {
if ( f == null )
return ;
if ( f.isDirectory() )
return ;
if ( getView().getBuffer().getPath().equals( f.getAbsolutePath() ) )
return ;
jEdit.openFile( getView(), f.getAbsolutePath() );
}
COM: <s> opens the given file in j edit </s>
|
funcom_train/7296021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseTrailerHeaders() throws IOException {
try {
this.footers = AbstractMessageParser.parseHeaders
(in, -1, -1, null);
} catch (HttpException e) {
IOException ioe = new MalformedChunkCodingException("Invalid footer: "
+ e.getMessage());
ExceptionUtils.initCause(ioe, e);
throw ioe;
}
}
COM: <s> reads and stores the trailer headers </s>
|
funcom_train/41517419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printValue(MibValue value) {
if (value instanceof ObjectIdentifierValue) {
os.print("{ ");
os.print(((ObjectIdentifierValue) value).toAsn1String());
os.print(" }");
} else if (value instanceof StringValue) {
os.print(getQuote(value.toString()));
} else {
os.print(value.toString());
}
}
COM: <s> prints a mib value </s>
|
funcom_train/13271509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setYStart(float yStart) {
if (yStart != this.yStart) {
float oldYStart = this.yStart;
this.yStart = yStart;
clearPointsCache();
this.propertyChangeSupport.firePropertyChange(Property.Y_START.name(), oldYStart, yStart);
}
}
COM: <s> sets the start point ordinate of this wall </s>
|
funcom_train/23838729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSemClass() {
if (TokenAnnotation_Type.featOkTst && ((TokenAnnotation_Type)jcasType).casFeat_SemClass == null)
jcasType.jcas.throwFeatMissing("SemClass", "uima.tt.TokenAnnotation");
return jcasType.ll_cas.ll_getStringValue(addr, ((TokenAnnotation_Type)jcasType).casFeatCode_SemClass);}
COM: <s> getter for sem class gets semantic class of token </s>
|
funcom_train/28368668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVal(final String n, final Object o) {
if (carryingAgent != null) {
((Place.withValues) carryingAgent).setVal(n, o);
}
if (gisPlace != null) {
gisPlace.setVal(n, o);
}
if (gridPlace != null) {
gridPlace.setVal(n, o);
}
}
COM: <s> set val created 9 sept </s>
|
funcom_train/3028776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getValue() {
Iterator iter = list.iterator();
while (iter.hasNext()) {
Object[] pair = (Object[]) iter.next();
if (((JRadioButton) pair[1]).isSelected()) {
return (String) pair[0];
}
}
return "";
}
COM: <s> gets the value attribute of the toggle panel object </s>
|
funcom_train/20920682 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkLineLength() {
if (PropertyStore.getBoolean(file, P_LINE_LENGTH)) {
int max = PropertyStore.getInt(file, P_LINE_LENGTH_VALUE);
for (int i = 0; i < fileLines.length; i++) {
String string = fileLines[i];
if (string.length() > max) {
checker.notifyListeners(Messages.LineChecker_9, i + 1);
}
}
}
}
COM: <s> checks lines for length </s>
|
funcom_train/22758065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
//open the connection dialog:
PaloBrowser browser = getPaloBrowser();
ConnectionDialog conDlg = new ConnectionDialog(browser);
Rectangle r = browser.getBounds();
//center dialog:
int w = 400;
int h = 250;
conDlg.setBounds(r.x + (r.width - w) / 2, r.y + (r.height - h) / 2, w, h);
conDlg.setVisible(true);
}
COM: <s> displays the connection dialog centered on screen </s>
|
funcom_train/45249488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isValidCoolItemId(String id, WorkbenchWindow window) {
ActionSetRegistry registry = WorkbenchPlugin.getDefault()
.getActionSetRegistry();
if (registry.findActionSet(id) != null) {
return true;
}
if (window != null) {
return window.isWorkbenchCoolItemId(id);
}
return false;
}
COM: <s> checks to see if the cool item id is in the given window </s>
|
funcom_train/41074462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void _undoOne() {
if (!canUndo()) {
log.warn("No more operations to undo");
return;
}
int newLastOpIx = lastOpIx - 1;
resetToStartContext();
while (lastOpIx != newLastOpIx) {
_redoOne();
}
}
COM: <s> restores the context before the last operation was performed </s>
|
funcom_train/36423920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MoneyAmountStyle withGroupingCharacter(Character groupingCharacter) {
int groupingVal = (groupingCharacter == null ? -1 : groupingCharacter);
if (groupingVal == iGroupingCharacter) {
return this;
}
return new MoneyAmountStyle(
iZeroCharacter,
iPositiveCharacter, iNegativeCharacter,
iDecimalPointCharacter, groupingVal,
iGroupingSize, iGrouping, iForceDecimalPoint);
}
COM: <s> returns a copy of this style with the specified grouping character </s>
|
funcom_train/33005874 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Packet getFirstChild(String subelement) {
Iterator childIterator = children.iterator();
while (childIterator.hasNext()) {
Object child = childIterator.next();
if (child instanceof Packet) {
Packet childPacket = (Packet) child;
if (childPacket.getElement().equals(subelement)) {
return childPacket;
}
}
}
return null;
}
COM: <s> returns the first child with the given subelement </s>
|
funcom_train/31435541 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void runEvent() {
int rownum = ttTippedTable.getSelectedRow();
try
{
rownum = tsSorter.getMappingToRow(rownum);
}
catch (Exception e)
{
}
if (rownum > -1)
{
AliceX10AddressListener x10Listener = new AliceX10AddressListener(mtmMonitorModel);
x10Listener.runAction((IX10MonitorEvent)mtmMonitorModel.getItemAt(rownum));
}
}
COM: <s> this is used to test the running of an event so that the </s>
|
funcom_train/36596715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateGeometry(Vector3f center, int zSamples, int radialSamples, float radius) {
this.center = center != null ? center : new Vector3f();
this.zSamples = zSamples;
this.radialSamples = radialSamples;
this.radius = radius;
setGeometryData();
setIndexData();
}
COM: <s> changes the information of the sphere into the given values </s>
|
funcom_train/2586474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(final File dir) {
if (dir.isDirectory() && acceptsDirectories()) {
return true;
}
for (int i = 0; i < fileext.length; i++) {
if (dir.getName().endsWith(this.fileext[i])) {
return true;
}
}
return false;
}
COM: <s> returns code true code if the specified file matches the requirements of this </s>
|
funcom_train/29831217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMenu(JMenu menu) {
if (compactView) {
int menuNum = mainMenu.getMenuComponentCount();
mainMenu.add(menu, menuNum-3);
} else {
int menuNum = mainMenuBar.getMenuCount();
mainMenuBar.add(menu, menuNum-1);
}
}
COM: <s> adds code menu code of a plugin into menu </s>
|
funcom_train/4934273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ComponentChooser getNonEuleGUIFrameChooser() {
return new ComponentChooser() {
@Override
public String getDescription() {
return null;
}
@Override
public boolean checkComponent(Component comp) {
JFrame jFrame = (JFrame) comp;
return ! jFrame.getName().matches("EulerGUI project(.)*") &&
! jFrame.getTitle().startsWith( "EulerGUI Message" );
}
};
}
COM: <s> jemmy chooser for non euler gui application and non euler gui message frame </s>
|
funcom_train/18525006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String showDialog(JFrame parent, String name, Vector data) {
setLocationRelativeTo(parent);
this.parent = parent;
String retStr = null;
isSave = false;
if (name != null) {
getMethodTextField().setText(name);
setParamVec(data);
getMetCreateBtn().setEnabled(true);
repaintList();
}
this.setVisible(true);
if (isSave) {
retStr = getMethodTextField().getText();
}
return retStr;
}
COM: <s> show this dialog and initialize some properties </s>
|
funcom_train/49017697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void populateTreeByAlbum() {
// delete previous tree
top.removeAllChildren();
ArrayList<Track> tracks = TrackManager.getInstance().getTracksAsList();
Collections.sort(tracks, TrackManager.getInstance().getComparator());
for (Track track : tracks) {
if (!track.shouldBeHidden()) {
addTrackAndAlbum(top, track);
}
}
}
COM: <s> fill the tree </s>
|
funcom_train/44702900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getAttributeFromDoc(String path, String attribute) {
String retVal = null;
try {
XPath xpQuery = XPath.newInstance(path);
Element query = (Element) xpQuery.selectSingleNode(doc);
retVal = query.getAttributeValue(attribute);
} catch (Exception e) {
LOG.error("Error in PPFPlugin.getAttributeFromDoc: problem using path: "+ path
+" and attribute: "+ attribute, e);
retVal = null;
}
return retVal;
}
COM: <s> get an attribute from an element in the document </s>
|
funcom_train/9238072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getUserModeStr() {
final StringBuilder sModes = new StringBuilder("+");
long nTemp = 0;
final long nChanModes = this.getUserMode();
for (char cTemp : myParser.hUserModes.keySet()) {
nTemp = myParser.hUserModes.get(cTemp);
if ((nChanModes & nTemp) == nTemp) { sModes.append(cTemp); }
}
return sModes.toString();
}
COM: <s> get the user modes as a string representation </s>
|
funcom_train/3890834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadExportPath() {
// Get the LD Entry from the Project Index
LearningDesignEntry ldEntry = _ldEditor.getLearningDesignDataModel()
.getLearningDesignEntry();
if(ldEntry.getExportPath() != null) {
_fileTextField.setText(ldEntry.getExportPath());
}
}
COM: <s> load the export path </s>
|
funcom_train/48630788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetVilles() {
System.out.println("getVilles");
Itineraire instance = new Itineraire();
ArrayList<Ville> expResult = null;
ArrayList<Ville> result = instance.getVilles();
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 villes method of class itineraire </s>
|
funcom_train/17185436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getIndexOfPathway(String description, String source) {
description = clean(description);
if (pathwayDescriptions.contains(description)) {
return pathwayDescriptions.indexOf(description) + 1; // Indexing from 1
} else {
// New pathway
int sourceIndex = getIndexOfSource(source);
pathwaySourceAssociation.put(description, sourceIndex);
pathwayDescriptions.add(description);
return pathwayDescriptions.size();
}
}
COM: <s> returns the index of the pathway </s>
|
funcom_train/24049681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void computeIntersects(Edge e0, Edge e1, SegmentIntersector si) {
Coordinate[] pts0 = e0.getCoordinates();
Coordinate[] pts1 = e1.getCoordinates();
for (int i0 = 0; i0 < pts0.length - 1; i0++) {
for (int i1 = 0; i1 < pts1.length - 1; i1++) {
si.addIntersections(e0, i0, e1, i1);
}
}
}
COM: <s> performs a brute force comparison of every segment in each edge </s>
|
funcom_train/34569119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void overrideProperty(Properties p,BrainyConfiguration configuration) throws BaseException{
Configuration conf = BrainyConfiguration.getInstance().subset(VELOCITY_PREFIX_PROP_NAME);
Iterator<?> keys = conf.getKeys();
while (keys.hasNext()) {
String key = (String)keys.next();
// setting the property
String value = conf.getString(key);
logger.debug("Found override property: "+key+"="+value);
p.setProperty(key, value);
}
}
COM: <s> override the default velocity property </s>
|
funcom_train/39465372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @ActionMethod public void deleteRow() {
try {
tableModel.deleteRow(table.getSelectedRow());
} catch (final SQLException e) {
System.err.println(e);
showMessageDialog(frame, "Error Message", "Error", ERROR_MESSAGE);
}
}
COM: <s> action method for deleting a row </s>
|
funcom_train/47193875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getMapSRC() {
if (mapSRC == null) {
mapSRC = new JTextField();
mapSRC.setText("default.msrc");
mapSRC.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent e) {
if (e.getKeyChar() == '\n') {
setMap(Config.mapName, mapSRC.getText());
}
}
});
}
return mapSRC;
}
COM: <s> this method initializes map src </s>
|
funcom_train/8049121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String saveFile (Frame f, String title, String defDir, String fileType) {
FileDialog fd = new FileDialog(f, title, FileDialog.SAVE);
fd.setFile(fileType);
fd.setDirectory(defDir);
fd.setLocation(50, 50);
fd.setVisible(true);
return (fd.getDirectory() + fd.getFile());
}
COM: <s> creates new save file dialog </s>
|
funcom_train/20885018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBooleanCSV() {
BooleanDTO dto = new BooleanDTO();
dto.booleanField = new Boolean(false);
assertTrue(JSefaTestUtil.serialize(CSV, dto).indexOf("0") >= 0);
JSefaTestUtil.assertRepeatedRoundTripSucceeds(CSV, dto);
}
COM: <s> tests boolean csv </s>
|
funcom_train/10957459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConvertToString() throws Exception {
InternalStrutsTypeConverter strutsTypeConverter = new InternalStrutsTypeConverter();
strutsTypeConverter.convertValue(new HashMap(), "", String.class);
assertTrue(strutsTypeConverter.isConvertToString);
assertEquals(strutsTypeConverter.objToBeConverted, "");
}
COM: <s> typically form struts html </s>
|
funcom_train/35178257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection findAllVersion() {
ArrayList values = new ArrayList();
try {
Collection col = EntityHomeCache.getInstance().getVersionHome().findAll();
Iterator it = col.iterator();
while (it.hasNext()) {
values.add(((VersionLocal) it.next()).getVersionLite());
}
} catch (FinderException e) {
e.printStackTrace();
}
return values;
}
COM: <s> finds and returns all the versions of the database </s>
|
funcom_train/12640325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String scanLine() throws IOException {
int ch = scanChar();
if(ch == -1) {
return null;
}
StringBuffer sb = new StringBuffer();
do {
if(ch != '\r') {
if(ch == '\n') {
break;
}
sb.append((char)ch);
}
} while((ch = scanChar()) != -1);
return sb.toString();
}
COM: <s> scan a line of text in from the stream </s>
|
funcom_train/10980639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void saveMessages(HttpSession session, ActionMessages messages) {
// Remove any messages attribute if none are required
if ((messages == null) || messages.isEmpty()) {
session.removeAttribute(Globals.MESSAGE_KEY);
return;
}
// Save the messages we need
session.setAttribute(Globals.MESSAGE_KEY, messages);
}
COM: <s> p save the specified messages keys into the appropriate session </s>
|
funcom_train/47314601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String parseHeaders(String header){
String httpHeader = new String(content.get(0));
if(!httpHeader.contains(header))return null;
Scanner sc = new Scanner(httpHeader);
while (sc.hasNextLine()) {
String line = sc.nextLine();
if (line.contains(header)) {
sc = new Scanner(line);
String split[] = line.split(" ");
if(split[1].endsWith(";"))split[1] = split[1].split(";")[0];
headers.put(split[0], split[1]);
return split[1];
}
}
return null;
}
COM: <s> parses header in first content byte and return header value </s>
|
funcom_train/35297743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getTileWidth() {
if (!canWriteTiles()) {
throw new UnsupportedOperationException("Tiling not supported!");
}
if (getTilingMode() != MODE_EXPLICIT) {
throw new IllegalStateException("Tiling mode not MODE_EXPLICIT!");
}
if (!tilingSet) {
throw new IllegalStateException("Tiling parameters not set!");
}
return tileWidth;
}
COM: <s> returns the width of each tile in an image as it will be </s>
|
funcom_train/49463413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkExists(String filename, String url) throws Exception {
Db db = getDb();
try {
db.enter();
_logger.info("Looking up " + filename + ", " + url);
ps_find.setString(1, filename);
ps_find.setString(2, url);
ResultSet rs_find = db.executeQuery(ps_find);
return rs_find.next(); //NOPMD, true if exist
}
finally {
db.exit();
}
}
COM: <s> check if a rfs object exists </s>
|
funcom_train/1046408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateFoodClick(AutoCompleteTextView food_txt, AutoCompleteTextView cal_txt, AutoCompleteTextView fat_txt, AutoCompleteTextView fiber_txt, Main main, Button addFood_btn){
food_txt.setEnabled(true);
String food = food_txt.getText().toString().trim();
fdb.deleteFood(food);
addFoodClick(food_txt, cal_txt, fat_txt, fiber_txt, main, addFood_btn);
addFood_btn.setText("Add Food");
}
COM: <s> the events that occur when the update food button is clicked </s>
|
funcom_train/25823197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int read() {
if (index == source.length())
return -1;
else {
char c = source.charAt(index++);
if (c == '#') commentMode = true;
else if ((c == '\n') || (c == '\r')) commentMode = false;
if (commentMode) return ' ';
else return c;
}
}
COM: <s> reads the next character </s>
|
funcom_train/8013765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assignPropertyExpression(String component, String propName, String expression, DataStoreBuffer dataStore) {
PropertyExpression propeExp = new PropertyExpression();
propeExp.comp = component;
propeExp.prop = propName;
propeExp.exp = expression;
propeExp.ds = dataStore;
if (_propertyExpression == null)
_propertyExpression = new Vector();
_propertyExpression.addElement(propeExp);
}
COM: <s> this method is called by the framework tag libraries to for the property </s>
|
funcom_train/12645075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkAwtEventQueueAccess() {
AppContext appContext = AppContext.getAppContext();
XletClassLoader xletClassLoader = currentXletClassLoader();
if ((appContext == mainAppContext) && (xletClassLoader != null)) {
// If we're about to allow access to the main EventQueue,
// and anything untrusted is on the class context stack,
// disallow access.
super.checkAwtEventQueueAccess();
}
} // checkAwtEventQueueAccess()
COM: <s> tests if a client can get access to the awt event queue </s>
|
funcom_train/47507079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String cleanSoapMessage(String str) {
System.out.println("Inicio do XmlParser -> cleanSoapMessage ");
str = str.replaceAll("&", "&");
str = str.replaceAll(">", ">");
str = str.replaceAll("<", "<");
System.out.println("Inicio do XmlParser -> cleanSoapMessage ");
return str;
}
COM: <s> clean soap message </s>
|
funcom_train/3595978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCorpusDescription(String description) {
try {
Node n = XPathAPI.selectSingleNode(doc, NiteMetaConstants.descriptionxpath);
if (n!=null) { n.setNodeValue(description); }
else { System.err.println("Failed to find node " + NiteMetaConstants.descriptionxpath); }
} catch (TransformerException e) {
e.printStackTrace();
}
this.description=description;
}
COM: <s> sets the description of the corpus </s>
|
funcom_train/36282739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetParts() {
ID id1 = new ID("qualifier.local");
ID id2 = new ID("onlylocal");
assertEquals("local", id1.getLocalPart());
assertEquals("qualifier", id1.getNamespace());
assertEquals("onlylocal", id2.getLocalPart());
assertEquals("", id2.getNamespace());
}
COM: <s> tests getting the local and namespace parts </s>
|
funcom_train/40346080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GQuery prevAll() {
JsNodeArray result = JsNodeArray.create();
for (Element e : elements) {
allPreviousSiblingElements(getPreviousSiblingElement(e), result, null);
}
return pushStack(unique(result), "prevAll", getSelector());
}
COM: <s> find all sibling elements in front of the current element </s>
|
funcom_train/41843295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void train(int method, int length) {
this.trainingLength = length;
this.method = method;
if (method == SOM.TRAIN_SEQ)
this.trainSequential();
else if (method == SOM.TRAIN_BATCH)
this.trainBatch();
if (colorByPCA)
gridcolors = PCAProjectionToColor.getColorsForFeatures(codebook.toDoubleArray());
else
gridcolors = new Color[this.getNumberOfColumns()*this.getNumberOfRows()];
}
COM: <s> trains the som using the method given in the parameter code method code </s>
|
funcom_train/50913803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInteger(int i) throws RuntimeException {
CMLScalar scalar = (CMLScalar) this.getChildCMLElement(CMLScalar.TAG, 0);
if (scalar == null) {
scalar = new CMLScalar(i);
this.appendChild(scalar);
} else {
scalar.setValue(i);
}
}
COM: <s> sets integer value </s>
|
funcom_train/18939583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyBrokerFailure(DeploymentID lwpcID) {
// Mocking monitorable (EventProcessor)
LocalWorkerProviderClient monitorable = EasyMock.createMock(LocalWorkerProviderClient.class);
createStub(monitorable, LocalWorkerProviderClient.class, lwpcID);
EasyMock.replay(monitorable);
// Notifying LocalWorkerProviderClient failure
getClientMonitor().doNotifyFailure(monitorable, lwpcID);
}
COM: <s> notifies my grid failure without verifying any behavior </s>
|
funcom_train/34260380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getLocationsPanel() {
JPanel lPanel = GuiHelper.createGridBagPanel();
// lPanel.setBorder(new TitledBorder("Proxy Locations"));
this.buildProxyLocationsComboBox(lPanel,0);
this.buildLocationsButtons(lPanel,0);
this.buildUseProxyCheckBox(lPanel,1);
return lPanel;
}
COM: <s> create the proxy fields </s>
|
funcom_train/12120225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connEtoM6(java.awt.event.ActionEvent arg1) {
try {
// user code begin {1}
// user code end
getVediDominus().show();
// user code begin {2}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {3}
// user code end
handleException(ivjExc);
}
}
COM: <s> conn eto m6 dominus jbutton </s>
|
funcom_train/25916115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mailNote(final Cursor cursor) {
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("message/rfc822");
intent.putExtra(Intent.EXTRA_SUBJECT, cursor.getString(cursor
.getColumnIndexOrThrow("title")));
String body = String.format(mContext.getResources()
.getString(R.string.email_leader), cursor.getString(cursor
.getColumnIndexOrThrow("body")));
intent.putExtra(Intent.EXTRA_TEXT, body);
mContext.startActivity(Intent.createChooser(intent, "Title:"));
}
COM: <s> launches the email system client to send a mail with the current </s>
|
funcom_train/7641920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean getBooleanReply(String reply) throws IOException {
for (String valid : BOOLEAN_YES_REPLIES) {
if (valid.equalsIgnoreCase(reply)) {
return true;
}
}
for (String valid : BOOLEAN_NO_REPLIES) {
if (valid.equalsIgnoreCase(reply)) {
return false;
}
}
throw new IOException(String.format("%s is not a valid reply", reply));
}
COM: <s> returns the boolean value represented by the string </s>
|
funcom_train/175878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Hashtable getGlobalParamTypes() throws JTestCaseException {
try {
return _root.getAttrValuesHashedByNamedAttr("/class/params/param", "type", "name");
} catch (XMLUtilException e) {
throw new JTestCaseException(e.getMessage());
}
}
COM: <s> retrieves types of all global class wided params into hashtable </s>
|
funcom_train/12194310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testResolveString() throws Exception {
assertEquals("a/b/c", Path.parse("a///").resolve("b/c").asString());
assertEquals("/a/b/c",
Path.parse("///a/b//").resolve("c///").asString());
}
COM: <s> test the reolve string method </s>
|
funcom_train/8077119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double norm(double x, int i) {
if (Double.isNaN(m_Ranges[i][R_MIN]) ||
Utils.eq(m_Ranges[i][R_MAX], m_Ranges[i][R_MIN])) {
return 0;
} else {
return (x - m_Ranges[i][R_MIN]) / (m_Ranges[i][R_WIDTH]);
}
}
COM: <s> normalises a given value of a numeric attribute </s>
|
funcom_train/13630019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setClipRect(SDLRect rect) throws SDLException {
SDL_Rect swigRect = new SDL_Rect();
swigRect.setX((short)rect.getX());
swigRect.setY((short)rect.getY());
swigRect.setW((int)rect.getWidth());
swigRect.setH((int)rect.getHeight());
SWIG_SDLVideo.SWIG_SDL_SetClipRect(swigSurface, swigRect);
}
COM: <s> sets the clipping rectangle for the destination surface in a blit </s>
|
funcom_train/5677969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void search (String filename)
{ Searcher s=new Searcher(SearchString,IgnoreCase);
try
{ BufferedReader in=new BufferedReader(
new InputStreamReader(
new FileInputStream(filename)));
String line;
int linecount=0;
while (true)
{ line=in.readLine();
linecount++;
if (line==null) break;
int n=s.find(0,line.toCharArray(),line.length());
if (n>=0)
{ EP.appendLine("--> "+filename+":"+linecount+":"+(n+1),true);
EP.appendLine(line,true);
}
}
in.close();
}
catch (Exception e) {}
}
COM: <s> search for the file with normal search </s>
|
funcom_train/18337422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop() {
try {
if (alive) {
alive = false;
// force the close with a socket call
new Socket(host, port);
}
} catch (IOException e) {
logger.warn(e.getMessage());
}
try {
if (serverSocket != null) {
serverSocket.close();
}
} catch (IOException e) {
logger.warn(e.getMessage());
}
}
COM: <s> stops the http daemon </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.