__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/22003199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean add(Object o) {
if (o instanceof YKDocument)
return super.add(o);
else
throw new IllegalArgumentException(Messages.getString("DocumentListImpl.argumentException") + //$NON-NLS-1$
"a non YKDocument"); //$NON-NLS-1$
}
COM: <s> overrides add to catch non ykdocument insertions </s>
|
funcom_train/43014413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UIObject clone(UIObject parent, String locator) {
UIObject clone = new UIObject(parent, locator);
/* Recursively clone all of the children, assigning them to
* newly-cloned parents.
*/
for(String childName : getChildren().keySet()) {
UIObject originalChild = getChild(childName);
UIObject newChild = originalChild.clone(clone, originalChild.getLocator());
clone.putChild(childName, newChild);
}
return clone;
}
COM: <s> perform a deep clone of this object and all of its children </s>
|
funcom_train/38389979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void service(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
final String glid = glAuth.requireAuth(request, response);
if (glid != null) {
super.service(new GLAuthHttpServletRequest(request, glid), response);
}
}
COM: <s> check the users authentication </s>
|
funcom_train/15673855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateSampleLabel() {
String pattern = additionalCommentText.getText();
try {
String commentText = MessageFormat.format(pattern, new Object[] {
System.getProperty("user.name", ""), new Date() });
sampleLabel.setText(commentText);
setMessage("Welcome to the Security Coach Plugin");
setValid(true);
} catch (IllegalArgumentException e) {
setMessage("wrong");
setValid(false);
}
}
COM: <s> update the sample label when the additional comment text is modified </s>
|
funcom_train/20874443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double percentWaitlisted() {
if (!isCourseRequest())
return 0.0;
CourseRequest courseRequest = (CourseRequest) getRequest();
int nrWaitlisted = 0;
for (Section section : getSections()) {
if (courseRequest.isWaitlisted(section))
nrWaitlisted++;
}
return ((double) nrWaitlisted) / getAssignments().size();
}
COM: <s> percent of sections that are wait listed </s>
|
funcom_train/12565066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPrototype(final ElementNode prototypeElement) {
// Get the namespace map
String namespaceURI = prototypeElement.getNamespaceURI();
Hashtable lmap = (Hashtable) namespaceMap.get(namespaceURI);
if (lmap == null) {
lmap = new Hashtable();
namespaceMap.put(namespaceURI, lmap);
}
lmap.put(prototypeElement.getLocalName(), prototypeElement);
}
COM: <s> to support the creation of elements in the code create element ns code </s>
|
funcom_train/50480823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void exposeDefaultVariables() throws IOException {
super.exposeDefaultVariables();
page.expose("defaultURL", getURL("default"));
page.expose("processURL", getURL("process"));
page.expose("addURL", getURL("add"));
}
COM: <s> add some extra default variables to be exposed </s>
|
funcom_train/17492249 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object visit(SynchronizedStatement node) {
// Check the lock
if (((Class)node.getLock().acceptVisitor(this)).isPrimitive()) {
throw new ExecutionError("lock.type", node);
}
node.getBody().acceptVisitor(this);
return null;
}
COM: <s> visits a synchronized statement </s>
|
funcom_train/529177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void computeChildren() {
Enumeration<SEntity> entities = ((SGroup)value).getGroupItems();
ArrayList<TreeNode> array = new ArrayList<TreeNode>();
while(entities.hasMoreElements()) {
SEntity entity = entities.nextElement();
if(entity instanceof SGroup)
array.add(new TreeGroup((SGroup) entity));
else
array.add(new TreeNode(entity));
}
this.setChildren(array.toArray(new TreeNode[array.size()]));
}
COM: <s> computes the children of this group </s>
|
funcom_train/2582809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateXPoints() {
this.propagateEvents = false;
for (int s = 0; s < this.data.size(); s++) {
updateXPoints((XYSeries) this.data.get(s));
}
if (this.autoPrune) {
prune();
}
this.propagateEvents = true;
}
COM: <s> updates the x values for all the series in the dataset </s>
|
funcom_train/33519398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void tearDown() {
try {
userLeagueManager.removeAllRelationships();
usersManager.removeAllUsers();
leagueManager.removeAllLeagues();
blms.removeAllLeagues();
blms.removeAllMatches();
blms.removeAllUsers();
} catch (DBException e) {
fail();
}
}
COM: <s> destroy the information created in tests </s>
|
funcom_train/29904100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getCurrentTime() {
GregorianCalendar calendar = new GregorianCalendar();
return this.getFilledInt(calendar.get(GregorianCalendar.DAY_OF_MONTH),
2)
+ "."
+ this.getFilledInt(
(calendar.get(GregorianCalendar.MONTH) + 1), 2)
+ "."
+ calendar.get(GregorianCalendar.YEAR)
+ " - "
+ this.getFilledInt(
calendar.get(GregorianCalendar.HOUR_OF_DAY), 2)
+ ":"
+ this.getFilledInt(calendar.get(GregorianCalendar.MINUTE), 2);
}
COM: <s> returns the current time as string </s>
|
funcom_train/19844689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getObjectHeight(int groupID, int objectID) {
if (groupID >= 0 && groupID < objectGroups.size()) {
ObjectGroup grp = (ObjectGroup) objectGroups.get(groupID);
if (objectID >= 0 && objectID < grp.objects.size()) {
GroupObject object = (GroupObject) grp.objects.get(objectID);
return object.height;
}
}
return -1;
}
COM: <s> returns the height of a specific object from a specific group </s>
|
funcom_train/40677736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public static interface WARNING {
/**
* Called when a {@link Pipeline} element posts an warning message.
*
* @param source the element which posted the message.
* @param code a numeric code representing the warning.
* @param message a string representation of the warning.
*/
public void warningMessage(GstObject source, int code, String message);
}
COM: <s> signal emitted when a warning message is delivered </s>
|
funcom_train/18812536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void allocateImage(int attribs, Component a) {
source[attribs] = new MemoryImageSource(8 * magnify, 8 * magnify,
new DirectColorModel(32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000),
imageData, 0, 8 * magnify);
source[attribs].setAnimated(true);
image[attribs] = a.createImage(source[attribs]);
}
COM: <s> allocate memory for the tile image with the specified attributes </s>
|
funcom_train/35323986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDictionary(byte[] b, int off, int len) {
if (b == null) {
throw new NullPointerException();
}
if (off < 0 || len < 0 || off > b.length - len) {
throw new ArrayIndexOutOfBoundsException();
}
synchronized (zsRef) {
ensureOpen();
setDictionary(zsRef.address(), b, off, len);
needDict = false;
}
}
COM: <s> sets the preset dictionary to the given array of bytes </s>
|
funcom_train/51226306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cylinder createCylinder (float width, float length, Color3f ambient, Color3f diffuse){
mat = new Material();
mat.setAmbientColor(ambient);
mat.setDiffuseColor(diffuse);
mat.setShininess(60.0f);
ColoringAttributes colatt = new ColoringAttributes();
colatt.setShadeModel(ColoringAttributes.NICEST);
mat.setLightingEnable(true);
a.setCapability(Appearance.ALLOW_MATERIAL_READ);
a.setCapability(Appearance.ALLOW_MATERIAL_WRITE);
a.setCapability(Appearance.ALLOW_COLORING_ATTRIBUTES_WRITE);
a.setMaterial(mat);
a.setColoringAttributes(colatt);
cylinder = new Cylinder(width, length, Cylinder.GENERATE_NORMALS, a);
return cylinder;
}
COM: <s> creates the actual cylinder represents an edge connection between two nodes </s>
|
funcom_train/37821642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setC0Program(C0Program program) throws IllegalArgumentException {
if (program != null) {
functions.clear();
symbolTable = new SymbolTable();
functions.add(new Trans((Program) program.get(0), null));
setState(TransformationState.TS_WAITING_FIRST);
getView().updateModel(functions);
getView().updateSymbolTable();
newHistory();
} else
throw new IllegalArgumentException("C0Program must not be null."); //$NON-NLS-1$
}
COM: <s> creates a new </s>
|
funcom_train/1576398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getExpectedRightTypesAsString() {
final short[] types = getExpectedRightTypes();
StringBuilder result = new StringBuilder();
for ( int i = 0, n = types.length; i < n; i++ ) {
result.append(" ").append(simulation.getTypeManager().typeToString(types[i])).append(
" ");
}
return result.toString();
}
COM: <s> gets the expected right types as string </s>
|
funcom_train/25653505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object evaluate(String script) throws EvaluatorException, EcmaError{
context=ContextFactory.getGlobal().enterContext();
for (Entry<String, Object> p: params.entrySet())
ScriptableObject.putProperty(scope, p.getKey(), Context.javaToJS(p.getValue(), scope));
Object result=context.evaluateString(scope, script, script, 0, null);
if (result instanceof Undefined) return null;
return Context.jsToJava(result, Object.class);
}
COM: <s> invoke given script returning the object that results if any </s>
|
funcom_train/42268780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void unLockPage(final Long idOfPage, final PageState newState) {
// pageId == null if its a new page
if(pageId != null){
rpcPage.unlockThisPage(pageId, new AsyncCallback<Void>() {
public void onFailure(Throwable caught) {}
public void onSuccess(Void result) {
// avertit tout les presenter qu'il faut cancel
eventBus.cancelPage(newState);
}
});
}else {
eventBus.cancelPage(newState);
}
}
COM: <s> unlock specific page in datastore </s>
|
funcom_train/460478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPart() throws java.io.IOException {
if (multiMap==null)
return null;
Object o = multiMap.get(partName);
if (o instanceof InputStream) {
return Io.getStringFromInputStream((InputStream)o);
} else {
return (String) o;
}
}
COM: <s> getter for property part </s>
|
funcom_train/1533709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /*AGfinal public GeoPoint ProjectedPoint(GeoPoint P, GeoLine g) {
boolean oldMacroMode = cons.isSuppressLabelsActive();
cons.setSuppressLabelCreation(true);
GeoLine perp = OrthogonalLine(null, P, g);
GeoPoint S = IntersectLines(null, perp, g);
cons.setSuppressLabelCreation(oldMacroMode);
return S;
}*/
COM: <s> returns the projected point of p on line g </s>
|
funcom_train/27906400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeCookies(CookieMatcher cm) {
if (cm == null) {
throw new IllegalArgumentException("Null CookieMatcher");
}
Cookie c;
for (int i = 0; i < iNumCookies; i++) {
c = (Cookie) theJar.get(i);
if (cm.doMatch(c)) {
theJar.removeElementAt(i);
iNumCookies--;
}
}
}
COM: <s> removes all cookies that match the given cookie matcher </s>
|
funcom_train/592992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ActionBean getActionBean(ActionBeanContext context) throws StripesServletException {
HttpServletRequest request = context.getRequest();
String path = HttpUtil.getRequestedPath(request);
ActionBean bean = getActionBean(context, path);
request.setAttribute(RESOLVED_ACTION, getUrlBindingFromPath(path));
return bean;
}
COM: <s> gets the logical name of the action bean that should handle the request </s>
|
funcom_train/2389255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnReport() {
if (btnReport == null) {
btnReport = new JButton();
btnReport.setIcon(new ImageIcon(getClass().getResource("/images/icons/color_wheel.png")));
btnReport.setToolTipText("grafischen Report anzeigen");
btnReport.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
runGraphicReport();
}
});
}
return btnReport;
}
COM: <s> this method initializes btn report </s>
|
funcom_train/36717852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public void ClearCurrentGraph(){
Collection<DefaultEdge> c = new ArrayList<DefaultEdge>();
for(DefaultEdge e : datamodelgraph.edgeSet()){
c.add(e);
}
datamodelgraph.removeAllEdges(c);
datamodelgraph.removeAllVertices(hmItems.values());
hmItems.clear();
stepg = Graph.newEmptyGraph();
//LayoutGraph();
}
COM: <s> removes all contents and starts over with a graph </s>
|
funcom_train/45495091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
// add button clicked
if(e.getSource().equals(add)) {
/*
* Add all chosen conference members to the council
*/
Object[] selectedValues = conferenceMembersList.getSelectedValues();
for(Object c: selectedValues) {
council.addConferenceMember((String) c);
}
dispose();
}
// cancel button clicked
else if(e.getSource().equals(cancel)) {
dispose();
}
}
COM: <s> gets called when an action from a button is received </s>
|
funcom_train/10792171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public QueryResultMapping getCachedQueryResultMapping(Class cls, String name) {
if (_locking) {
synchronized (this) {
return (QueryResultMapping) _results.get(getQueryResultKey(cls, name));
}
} else {
return (QueryResultMapping) _results.get(getQueryResultKey(cls, name));
}
}
COM: <s> return the cached query result mapping with the given name or null if </s>
|
funcom_train/17640147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String join(String[] tab, String separator) {
StringBuffer buff = new StringBuffer();
if (tab != null) {
for (String elem : tab) {
if (buff.length() > 0) {
buff.append(separator);
}
buff.append(elem);
}
}
return buff.toString();
}
COM: <s> join array of strings using custom separator </s>
|
funcom_train/50084266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean compare(Object object) {
if (!(object instanceof IAtomType)) {
return false;
}
if (!super.compare(object)) {
return false;
}
AtomType type = (AtomType) object;
return (getAtomTypeName() == type.getAtomTypeName()) &&
(maxBondOrder == type.maxBondOrder) &&
(bondOrderSum == type.bondOrderSum);
}
COM: <s> compares a atom type with this atom type </s>
|
funcom_train/36177170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private float computeDeboost(int paragraphNumber, int sentenceNumber) {
if (paragraphNumber > 0) {
if (sentenceNumber > 0) {
float deboost = 1.0F - (sentenceNumber * sentenceDeboost);
deboost = (deboost < sentenceDeboostBase) ? sentenceDeboostBase : deboost;
return deboost;
}
}
return 1.0F;
}
COM: <s> applies a linear deboost function to simulate the manual heuristic of </s>
|
funcom_train/21703930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare( Object o1, Object o2 ) {
if ( property == null ) {
// compare the actual objects
return comparator.compare( o1, o2 );
}
try {
Object value1 = PropertyUtils.getProperty( o1, property );
Object value2 = PropertyUtils.getProperty( o2, property );
return comparator.compare( value1, value2 );
}
catch ( Exception e ) {
throw new ClassCastException( e.toString() );
}
}
COM: <s> compare two java beans by their shared property </s>
|
funcom_train/44283138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void storePatch(Patch p, int bankNum, int patchNum) {
//replace old values in Patch p
p.sysex[6]=(byte)bankNum;
//recalculate the new checksum with the new bankNum in the patch.
calculateChecksum(p,5,16,17);
//sendPatch(p);
}
COM: <s> sends a settings to a set patch p </s>
|
funcom_train/14626348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void postInit() {
String urlHistory=Properties.getHistory(Properties.KEY_HISTORY_URL);
if(urlHistory!=null && !urlHistory.equals("")) {
String[] items=urlHistory.split(";");
m_mainWindow.getCComboWSDLURL().setItems(items);
}
}
COM: <s> post initializes the main window controller </s>
|
funcom_train/2287027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addHeaders(Map headers) {
if (m_completed) {
return;
}
m_headers = headers;
Iterator allHeaders = m_headers.keySet().iterator();
while (allHeaders.hasNext()) {
m_byteSize += CmsMemoryMonitor.getMemorySize(allHeaders.next());
}
}
COM: <s> add a map of headers to this cache entry </s>
|
funcom_train/32812300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String process( String key, String source ) {
String result = source;
if (source.indexOf(key) >= 0) {
try {
RegexPair exp = (RegexPair) map.get(key);
if (exp != null) {
cat.debug("MATCH: " + result);
result = Util.substitute( new Perl5Matcher(),
exp.pattern,
exp.replacement,
result );
cat.debug("FIXUP: " + result);
}
} catch (Exception m) {
cat.error("FIXUP FAILED: " + m.getMessage());
}
}
return result;
}
COM: <s> code process code if there is a pattern replacement indexed </s>
|
funcom_train/41279316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getFileNumber(int nb, int size) {
//compute the number of '0' to add
int cpt = 0;
int nb2 = nb;
if (nb2 == 0) {
cpt = 1;
} else {
while (nb2 > 0) {
nb2 = nb2/10;
cpt++;
}
}
//number of '0' to add = size - cpt;
int zero2add = size - cpt;
StringBuffer buffer = new StringBuffer();
for (int i = 0 ; i < zero2add ; i++) {
buffer.append("0");
}
buffer.append(Integer.toString(nb));
return buffer.toString();
}
COM: <s> get a beautiful file number eg </s>
|
funcom_train/12521209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startLoggingProblems(int errors, int warnings) {
this.parameters.put(Logger.NUMBER_OF_PROBLEMS, new Integer(errors + warnings));
this.parameters.put(Logger.NUMBER_OF_ERRORS, new Integer(errors));
this.parameters.put(Logger.NUMBER_OF_WARNINGS, new Integer(warnings));
this.printTag(Logger.PROBLEMS, this.parameters, true, false);
}
COM: <s> used to start logging problems </s>
|
funcom_train/12649465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream getResourceAsStream(String name) {
ClassLoader cl;
name = resolveName(name);
if (CVM.callerCLIsMIDCLs()) {
cl = ClassLoader.getCallerClassLoader();
} else {
cl = getClassLoader0();
}
if (cl==null) {
// A system class.
return ClassLoader.getSystemResourceAsStream(name);
}
return cl.getResourceAsStream(name);
}
COM: <s> finds a resource with a given name </s>
|
funcom_train/49092339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int moveLeft(int count, boolean lineWrap) {
int ret = 0;
while (count > 0) {
if (isPos1()) {
return ret;
}
if (col >= 1) {
if (count > col) {
ret += col;
count -= col;
col=0;
retainLeft = retainCol = -1;
continue;
}
col -= count;
ret += count;
retainLeft = retainCol = -1;
return ret;
}
assert col == 0;
if (!lineWrap) {
return ret;
}
line--;
ret++;
count--;
retainLeft = retainCol = -1;
col = axed.getLineLength(line);
}
return ret;
}
COM: <s> moves the pointer count characters to the left </s>
|
funcom_train/44627592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testJMLprecedence4() {
helpExpr("a + b ==> c || d",
JmlBinary.class, 9,
JCBinary.class, 2,
JCIdent.class ,0,
JCIdent.class ,7,
JCBinary.class, 16,
JCIdent.class ,14,
JCIdent.class ,21);
}
COM: <s> test precedence between implies and java operators </s>
|
funcom_train/11103899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void contextDestroyed(ServletContextEvent event) {
if (log.isInfoEnabled()) {
log.info("Finalizing Dialog SCXML Implementation");
}
// Clean up our cache of dialog configuration information
event.getServletContext().removeAttribute(Globals.DIALOGS);
// Clean up dependency libraries we have used
PropertyUtils.clearDescriptors();
LogFactory.release(Thread.currentThread().getContextClassLoader());
log = null;
}
COM: <s> p process the application shutdown event cleanup resources </s>
|
funcom_train/48931695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processItems() {
if (itemReaderExists) {
final Iterator<?> iterator = itemReader.iterator();
while (iterator.hasNext()) {
try {
runWorkflowFor(iterator.next());
} catch (SkipItemException e) {
// OK, as skip item and process next item
}
}
} else {
try {
runWorkflowFor(null);
} catch (SkipItemException e) {
// OK, as skip item and process next item
}
}
}
COM: <s> processes all items reads each item and sends them through the process </s>
|
funcom_train/38556871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NSArray contentArrayFromPathArray(NSArray pathArray) {
Enumeration pathEnumerator;
String path;
NSMutableArray contentArray;
pathEnumerator = pathArray.objectEnumerator();
contentArray = new NSMutableArray();
while (pathEnumerator.hasMoreElements()) {
path = (String) pathEnumerator.nextElement();
C_Content content;
content = contentAtContentPath(path);
if (content != null) {
contentArray.addObject(content);
}
}
return contentArray;
}
COM: <s> constructs an array of content objects from an array of </s>
|
funcom_train/31682829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection createSubCollection(String collectionName) throws WebDAVException {
Collection subCollection = null;
try {
subCollection = new Collection(getURL().toString() + collectionName);
} catch (WebDAVException exc) {
throw exc;
}
subCollection.getRequestContext().precondition(getRequestContext().precondition());
subCollection.getRequestContext().authorization(getRequestContext().authorization());
subCollection.createCollection();
return subCollection;
}
COM: <s> create a sub collection of this collection </s>
|
funcom_train/3702651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getReportPeriodAsString() {
switch (getReportPeriod()) {
case PERIOD_DAILY:
return (KEY_DAILY);
case PERIOD_WEEKLY:
return (KEY_WEEKLY);
case PERIOD_MONTHLY:
return (KEY_MONTHLY);
case PERIOD_UNKNOWN:
return (KEY_UNKNOWN);
default:
return (KEY_UNKNOWN);
}
} // of method
COM: <s> get the period ex </s>
|
funcom_train/51632132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private URI getTargetURI(final URI uri) throws CoreException {
final IFileStore parent= EFS.getStore(uri).getParent();
if (parent != null) {
final URI location= fImportData.getRefactoringFileLocation();
if (location != null)
return parent.getChild(EFS.getStore(location).getName()).toURI();
}
return uri;
}
COM: <s> returns the target uri taking any renaming of the jar file into account </s>
|
funcom_train/43371667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getMilliseconds() {
int minutes = ((Integer) minComboBox.getSelectedItem())
.intValue();
int seconds = ((Integer) secComboBox.getSelectedItem())
.intValue();
long msec = 1000 * ((minutes * 60) + seconds);
return msec;
}
COM: <s> converts the minutes and seconds specified by the user to milliseconds </s>
|
funcom_train/34314631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void normalizePredictions() {
for (int i = 0; i < baseLevelPredictions.length; i++) {
for (int j = 0; j < numLabels; j++) {
baseLevelPredictions[i][j] = baseLevelPredictions[i][j] - minProb[j] / maxProb[j] - minProb[j];
}
}
}
COM: <s> normalizes the predictions of the base level classifiers </s>
|
funcom_train/20205786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ActionLink getControlLink() {
if (controlLink == null) {
String name = getName();
if (name == null) {
throw new RuntimeException("Paginator name is not defined. " +
"Please set the Paginator name through #setName(String).");
}
controlLink = new ActionLink(name);
}
return controlLink;
}
COM: <s> return the page link </s>
|
funcom_train/6282660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ElvisMessage newMessage(java.lang.String keyword, java.lang.String data) {
if ( (keyword == null) || (keyword.length() == 0) ) throw new IllegalArgumentException ( "Invalid keyword provided" );
if ( data == null ) data = "";
ElvisMessage msg = new ElvisMessage ( program, key, keyword, data );
return msg;
}
COM: <s> create a new message with the specified keyword and data </s>
|
funcom_train/15461416 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getAssociationLink(String i_association_param) {
String property = (String) associationsAliases.get(i_association_param);
if (property == null)
return (String) associationsCallbackLinks.get(i_association_param);
else {
String link = (String) associationsCallbackLinks.get(property);
if (link == null || link.matches(" *"))
throw new NullPointerException(
"Cannot retrieve the association link for: '"
+ i_association_param + "'");
return link;
}
}
COM: <s> given the value of the </s>
|
funcom_train/32802229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetValues() {
isHighlightBrackets = preferenceStore.getBoolean(tudresden.ocl20.pivot.language.ocl.resource.ocl.ui.OclPreferenceConstants.EDITOR_MATCHING_BRACKETS_CHECKBOX);
bracketColor = colorManager.getColor(org.eclipse.jface.preference.PreferenceConverter.getColor(preferenceStore, tudresden.ocl20.pivot.language.ocl.resource.ocl.ui.OclPreferenceConstants.EDITOR_MATCHING_BRACKETS_COLOR));
bracketSet.resetBrackets();
}
COM: <s> resets the changed values after setting the preference pages </s>
|
funcom_train/26645942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ResultsBean performImageLevelQuery(String studyUID, String modality, String ae) {
Map<String, Object> newParams = new HashMap<String, Object>();
newParams.put("studyUID", studyUID);
newParams.put("Modality", modality);
if( ae!=null ) newParams.put("ae", ae);
return (ResultsBean) imageSearch.filter(null, newParams);
}
COM: <s> perform image level query for the given study uid and the modality </s>
|
funcom_train/130649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rewindPlayback () {
try {
sendHeader (PLAYER_MSGTYPE_REQ, PLAYER_LOG_REQ_SET_READ_REWIND, 0);
os.flush ();
} catch (IOException e) {
throw new PlayerException
("[Log] : Couldn't request PLAYER_LOG_REQ_SET_READ_REWIND: "
+ e.toString(), e);
}
}
COM: <s> request reply rewind playback </s>
|
funcom_train/1152280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getItemCommand26() {
if (itemCommand26 == null) {//GEN-END:|435-getter|0|435-preInit
// write pre-init user code here
itemCommand26 = new Command("Acerca de...", Command.ITEM, 0);//GEN-LINE:|435-getter|1|435-postInit
// write post-init user code here
}//GEN-BEGIN:|435-getter|2|
return itemCommand26;
}
COM: <s> returns an initiliazed instance of item command26 component </s>
|
funcom_train/3391841 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void printStaticAndType(boolean isStatic, Type type) {
writer.printTypeSummaryHeader();
if (isStatic) {
print("static");
}
writer.space();
if (type != null) {
writer.printLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_MEMBER,
type));
}
writer.printTypeSummaryFooter();
}
COM: <s> print static if static and type link </s>
|
funcom_train/47907540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getPath(){
String filePath = System.getProperty("user.dir");
//clean up and add a trailing slash:
filePath = filePath.replaceAll("%20", " ");
filePath = filePath + "/";
//logger.log(Level.CONFIG, "ttr.Gui.getPath() - settings file path is {0}", filePath);
return filePath;
}
COM: <s> get the path of the currently executing process </s>
|
funcom_train/46458392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean start(OutputStream os) {
if (os == null)
return false;
boolean ok = true;
closeStream = false;
out = os;
try {
writeString("GIF89a"); // header //$NON-NLS-1$
}
catch (IOException e) {
ok = false;
}
return started = ok;
}
COM: <s> initiates gif file creation on the given stream </s>
|
funcom_train/22284671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getPreferredSize() {
FontMetrics fm = getFontMetrics(getFont());
int width2 = fm.stringWidth("88") + 3;
int width4 = fm.stringWidth("8888") + 3;
int sepwidth = fm.stringWidth(" "+separator+" ") - 2;
int width = width2 + sepwidth + width2 + sepwidth + width4;
int height = fm.getHeight();
return new Dimension(width+10, height+10);
}
COM: <s> get the preferred size of date widgets </s>
|
funcom_train/38737359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TodoUI (Todo parent, CoreInitData cid) {
this.parent = parent;
this.cid = cid;
/* Get the list of categories */
CategoryIO cio = new CategoryIO(cid);
categories = cio.load();
Map<String, Image> images = Todo.getImages();
noteIcon = images.get("noteIcon");
calendarIcon = images.get("calendarIcon");
}
COM: <s> default constructor creates the actual note </s>
|
funcom_train/20079167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveSelectionUp() {
if (selectedEl != null) {
int index = DOM.getChildIndex(containerEl, selectedEl);
if (index > 0) {
Element el = DOM.getChild(containerEl, index - 1);
Object elem = findModel(el);
selectItem(elem, el);
}
}
}
COM: <s> moves the current selection up </s>
|
funcom_train/49469567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addExpertiseObj(Expertise xp) throws Exception, RaciException {
Db main = dbRW();
try{
main.begin();
_logger.info("Directory : addExpertise "+xp);
checkUserCanAdmin(main);
ExpertiseFactory.addExpertise(main, main, xp, getCurrentUser());
main.commit();
return true;
} catch (Exception e) { store(e); throw e; } finally { main.safeClose(); }
}
COM: <s> add an expertise </s>
|
funcom_train/42423959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void switcheThreadContextClassLoader() {
clEnabled = true;
if(cl==null && cachedPath!=null) {
DynamicJavaBridgeClassLoader loader = DynamicJavaBridgeClassLoader.newInstance(scl);
setClassLoader(loader);
}
try {
Thread.currentThread().setContextClassLoader(getClassLoader());
} catch (SecurityException e) {Util.printStackTrace(e);}
}
COM: <s> enable the dynamic java bridge class loader if needed </s>
|
funcom_train/46460409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private XMLProperty getXMLProperty(String name) {
if(name==null) {
return null;
}
Iterator it = getPropertyContent().iterator();
while(it.hasNext()) {
XMLProperty prop = (XMLProperty) it.next();
if(name.equals(prop.getPropertyName())) {
return prop;
}
}
return null;
}
COM: <s> gets a named property </s>
|
funcom_train/12737199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int parseAuthority(String uri, int start) throws MalformedURIException {
int len = uri.length();
if (start >= len)
return start;
StringBuffer buffer = new StringBuffer(len-start);
int result = processURIPart(uri, start, "/?#", buffer);
authority = buffer.toString();
return result;
}
COM: <s> initialize the authority for this uri from a uri string spec </s>
|
funcom_train/15676851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector3D transform(AffineTransform3D trans) {
double[] tab = trans.coefficients();
return new Vector3D(
x * tab[0] + y * tab[1] + z * tab[2],
x * tab[4] + y * tab[5] + z * tab[6],
x * tab[8] + y * tab[9] + z * tab[10]);
}
COM: <s> transform the vector by using only the first 4 parameters of the </s>
|
funcom_train/12157242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testResolvableComponentURI() throws Exception {
inputValues.setComputedValue(MCS_INPUT_FORMAT,
STYLE_VALUE_FACTORY.getComponentURI(null, "fred"));
assetResolverMock.expects.evaluateExpression(fred)
.returns(policyReferenceMock);
assetResolverMock.expects
.resolveText(policyReferenceMock, expectedEncodings)
.returns("text");
resolver.normalize(inputValues);
checkNormalized(supportedProperties, "mcs-input-format:\"text\"");
}
COM: <s> ensure that a component uri value that can be resolved results in the </s>
|
funcom_train/38758352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addParam(Param param){
if (localParam == null){
localParam = new Param[]{};
}
//update the setting tracker
localParamTracker = true;
java.util.List list =
org.apache.axis2.databinding.utils.ConverterUtil.toList(localParam);
list.add(param);
this.localParam =
(Param[])list.toArray(
new Param[list.size()]);
}
COM: <s> auto generated add method for the array for convenience </s>
|
funcom_train/15488424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addPostfixUnaryOperator(String importName, String op) {
if(ZUtils.DEBUG) {
ZUtils.assert_(importName != null);
ZUtils.assert_(op != null);
ZUtils.assert_(op.equals("++") || op.equals("--"));
ZUtils.assert_(importName.toLowerCase().indexOf("postfix") >= 0);
}
name2postfix.put(importName, op);
}
COM: <s> adds a postfix unary operator </s>
|
funcom_train/49199973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addFnPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DigilibImage_fn_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DigilibImage_fn_feature", "_UI_DigilibImage_type"),
ExhibitionPackage.Literals.DIGILIB_IMAGE__FN,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the fn feature </s>
|
funcom_train/28963508 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean add(String key, Expression expression, boolean mayHide, boolean mayReplace) {
if (!mayReplace && innerSymbols.containsKey(key)) {
return false;
}
if (!mayHide && outerSymbols != null && outerSymbols.resolveSymbol(key) != null) {
return false;
}
innerSymbols.put(key, expression);
return true;
}
COM: <s> add a symbol unless it violates a hiding or replacement restriction </s>
|
funcom_train/10505868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void mergeConfigurations(ModuleRevisionId sourceMrid, Configuration[] configurations) {
DefaultModuleDescriptor md = getMd();
for (int i = 0; i < configurations.length; i++) {
Configuration configuration = configurations[i];
Message.debug("Merging configuration with: " + configuration.getName());
//copy configuration from parent descriptor
md.addConfiguration(new Configuration(configuration, sourceMrid));
}
}
COM: <s> describes how to merge configurations elements </s>
|
funcom_train/19059556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireExceptionOccured(Exception e) {
// Guaranteed to return a non-null array
Object[] listeners = listenerList.getListenerList();
// Process the listeners last to first, notifying
// those that are interested in this event
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == IExceptionListener.class) {
((IExceptionListener) listeners[i + 1]).exceptionOccured(e);
}
}
}
COM: <s> notify all listeners of the exception </s>
|
funcom_train/20629282 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAbove(Node above, Node below) {
//handle trivial case
if (above.id() == below.id()) {
return true;
}
ArrayList parents = below.parents();
Iterator it = parents.iterator();
while (it.hasNext()) {
Node c = (Node) it.next();
if (isAbove(above, c)) {
return true;
}
}
return false;
}
COM: <s> does there exist a path from one node to the other </s>
|
funcom_train/8060825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireTreeStructureChanged(VisionBlock oldRoot) {
int len = treeModelListeners.size();
TreeModelEvent e = new TreeModelEvent(this,
new Object[] {oldRoot});
for (int i = 0; i < len; i++) {
((TreeModelListener)treeModelListeners.elementAt(i)).
treeStructureChanged(e);
}
}
COM: <s> the only event raised by this model is tree structure changed with the </s>
|
funcom_train/26020283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MediaSample readSample() throws MediaException {
try {
if (fifo != null) {
return (MediaSample)fifo.getObject();
} else {
throw new MediaException("Media input not opened");
}
} catch (Exception e) {
throw new MediaException("Can't read media sample");
}
}
COM: <s> read a media sample blocking method </s>
|
funcom_train/24275629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb = new StringBuffer();
sb.append(this.signature_);
sb.append(',');
sb.append(this.offset_);
sb.append(',');
sb.append(this.tagsize_);
return sb.toString();
}
COM: <s> return a string of the element values separated by commas </s>
|
funcom_train/35140042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRetractInserts() {
SemanticSession session = sessionFactory.getInstance();
session.insert(new Integer(1));
session.insert(new Integer(2));
session.fireAllRules();
Collection results = session.getContext().getResults();
super.assertNotNull(results);
super.assertEquals(2, results.size());
FactHandle handle = (FactHandle) session.insert(new Integer(4));
session.insert(new Integer(3));
session.modifyRetract(handle);
session.fireAllRules();
results = session.getContext().getResults();
super.assertNotNull(results);
super.assertEquals(3, results.size());
session.dispose();
session = null;
}
COM: <s> test retract inserts </s>
|
funcom_train/17731733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void view(File file) throws DocumentViewerException {
try {
String text = FileUtil.getFileContents(file.getCanonicalPath());
textArea_.setText(text);
textArea_.setCaretPosition(0);
}
catch (FileNotFoundException e) {
throw new DocumentViewerException(e);
}
catch (IOException e) {
throw new DocumentViewerException(e);
}
}
COM: <s> reads in the file via a reader and displays it in the textarea </s>
|
funcom_train/7674944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(OffsettedItem item) {
throwIfPrepared();
try {
if (item.getAlignment() > getAlignment()) {
throw new IllegalArgumentException(
"incompatible item alignment");
}
} catch (NullPointerException ex) {
// Elucidate the exception.
throw new NullPointerException("item == null");
}
items.add(item);
}
COM: <s> adds an item to this instance </s>
|
funcom_train/15819724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Link getLink(String errorMsg, String path, int line) {
Link newLink = new Link(errorMsg, path, line);
Link cachedLink = (Link)links.get(newLink);
if (cachedLink != null) {
return cachedLink;
}
links.put(newLink, newLink);
return newLink;
}
COM: <s> return a link which implements code output listener code interface </s>
|
funcom_train/36983056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printDataset() {
double[] tempPoint;
for (int i = 0; i < dataset.size(); i++) {
System.out.println("\n[" + i + "]");
tempPoint = (double[]) getPoint(i);
for (int j = 0; j < tempPoint.length; j++) {
System.out.print(" " + tempPoint[j]);
}
}
System.out.println(" "); // add a carriage return
}
COM: <s> print out all points in the dataset </s>
|
funcom_train/35643137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Calendar calcSpawnTime(Calendar now) {
// Date acquisition criteria
Calendar base = getBaseCycleOnTarget(now);
// Calculations emergence period
base.add(Calendar.MINUTE, _startTime);
// Appearance time decision until the start ~ end of the second set at random
int diff = (_endTime - _startTime) * 60;
int random = diff > 0 ? _rnd.nextInt(diff) : 0;
base.add(Calendar.SECOND, random);
return base;
}
COM: <s> a specified time period including the emergence of a calculated timing </s>
|
funcom_train/27710900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void highlightArea(BoundingBox bb) {
PBounds pb = null;
if (bb != null) {
pb = new PBounds(wtst.getScreenX(bb.getX1()), wtst.getScreenY(bb.getY2()), bb.getX2() - bb.getX1(), bb.getY2() - bb.getY1());
}
highlightArea(pb);
}
COM: <s> highlights the delivered bounding box </s>
|
funcom_train/10980969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSimpleFloat() {
Object value = dynaForm.get("floatProperty");
assertNotNull("Got a value", value);
assertTrue("Got correct type", (value instanceof Float));
assertEquals("Got correct value", ((Float) value).floatValue(),
(float) 123.0, (float) 0.005);
}
COM: <s> test get simple property on a float property </s>
|
funcom_train/8685004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean dependsOn(String other) {
Project p = getProject();
Hashtable t = (p == null) ? null : p.getTargets();
return (p != null
&& p.topoSort(getName(), t, false).contains(t.get(other)));
}
COM: <s> does this target depend on the named target </s>
|
funcom_train/48934241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String create(Concept_Structure_I con) {
SyntaxCreator_Class_I cls = new SyntaxCreator_Class_Prolog_SOL();
String result = "concept(" +
Serializer_Prolog_SOL.createSystemSaveSyntax(con.getClassName()) + ", " +
Serializer_Prolog_SOL.createSystemSaveSyntax(con.getNamespace()) + ", " +
Serializer_Prolog_SOL.createSystemSaveSyntax(con.getInstanceID()) + ")";
cls = null;
return result;
}
COM: <s> returns a concept class class name namespace individual id predicate </s>
|
funcom_train/4780847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void statisticsReport() {
if (document.isEmpty()) {
displayWarning(ResourceUtil.getString("mainframe.warning.documentisempty"));
}
else {
new Thread() {
@Override
public void run() {
try {
final GenericReport report = new StatisticsReport(document);
final JFrame frame = new ViewerFrame(ResourceUtil.getString("statisticsreport.title"), report
.generate(), Constants.MIME_HTML);
frame.setVisible(true);
}
catch (final AppException e) {
displayError(e.getMessage());
}
}
}.start();
}
}
COM: <s> statistics report action handler </s>
|
funcom_train/18116206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /*public void mouseClicked(MouseEvent e) {
JEditorPane editor = (JEditorPane) e.getSource();
if (! editor.isEditable()) {
Point pt = new Point(e.getX(), e.getY());
int pos = editor.viewToModel(pt);
if (pos >= 0) {
activateLink(pos, editor, e.getX(), e.getY());
}
}
}*/
COM: <s> called for a mouse click event </s>
|
funcom_train/49535741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addParam(int x) {
Logger.debug(this, "db.addParam " + paramList.size() + " (int): " + x);
HashMap<String, Object> param = new HashMap<String, Object>();
param.put(inputValueKey, x + "");
paramList.add(paramList.size(), param);
}
COM: <s> this method adds an code int code parameter to the prepared sql </s>
|
funcom_train/573831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isThisMysqlServer() {
try {
String item = p.getProperty( "DATA0.SERVERMXJ" ).toString();
if( item.compareToIgnoreCase( "localhost" ) == 0 ){
return true;
} else {
InetAddress localaddr;
localaddr = InetAddress.getLocalHost();
if( item.compareToIgnoreCase( localaddr.getHostAddress() ) == 0 ){
return true;
}
return false;
}
} catch (Exception e) {
return false;
}
}
COM: <s> check if mysql server is configured to run on localhost or </s>
|
funcom_train/20229093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getRowCountEstimate(String tableName) throws SQLException {
int count = 0 ;
Statement stmt = createStatement() ;
ResultSet rs = stmt.executeQuery("SHOW TABLE STATUS " +
"WHERE name='" + tableName + "';") ;
if (rs.first())
count = rs.getInt("Rows") ;
rs.close() ;
stmt.close() ;
return count ;
}
COM: <s> returns an estimated row count for a given table </s>
|
funcom_train/7703202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DrawingBuffer createLayer(String key, String humanName, int z, boolean visible) {
DrawingBuffer db = new DrawingBuffer();
db.setHumanReadableName(humanName);
db.setComplainWhenDrawingToInvisibleBuffer(false);
layersByName.put(key, db);
db.setLayer(z);
layers.add(db);
db.setVisible(visible);
return db;
}
COM: <s> make a new layer with a specific key e </s>
|
funcom_train/26201418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void polygon(int[] xp,int[] yp,int np) {
// newPath() not needed here as moveto does it ;-)
moveto(xp[0],yp[0]);
for(int i=1;i<np;i++)
lineto(xp[i],yp[i]);
}
COM: <s> this is used to add a polygon to the current path </s>
|
funcom_train/50863523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void assignTask(Person person, Task task) {
boolean canPerformTask = true;
// If task is effort-driven and person too ill, do not assign task.
if (task.isEffortDriven() && (person.getPerformanceRating() < .5D))
canPerformTask = false;
if (canPerformTask) person.getMind().getTaskManager().addTask(task);
}
COM: <s> adds a new task for a person in the mission </s>
|
funcom_train/13346986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cycleStates() {
int updates = 0;
CycleState currentState = getCurrentState();
if (!currentState.isActive()) {
enforceCurrentState();
return;
}
do {
currentIndex = (currentIndex + 1) % states.size();
updates++;
currentState = getCurrentState();
if (tryEveryState || currentState.alwaysActivate()
|| !currentState.isActive()) {
enforceCurrentState();
return;
}
} while (updates < states.size());
}
COM: <s> first check the current state </s>
|
funcom_train/18519240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addOutgoingMessage(Message message) {
if (message.emptyAddrTo()) {
throw new IllegalArgumentException("Messages to be sent must have to address");
}
synchronized (messagesToSend) {
messagesToSend.addLast(message);
}
if (!outboxListenerNotifyThread.isBusy()) {
new Thread(outboxListenerNotifyThread, "OutboxListenerNotifier").start();
}
}
COM: <s> adds a new message to the list of messages to be send </s>
|
funcom_train/49200039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLinkedMapContainerPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MapContainer_linkedMapContainer_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_MapContainer_linkedMapContainer_feature", "_UI_MapContainer_type"),
ExhibitionPackage.Literals.MAP_CONTAINER__LINKED_MAP_CONTAINER,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the linked map container feature </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.