__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/13530456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TransferKinInfoVector fIntersection(TransferKinInfoVector intersect) {
for(intersect.reset(); intersect.isNext();) {
TransferKinInfo u = intersect.getNext();
TransferKinInfo k = lookupTerm(u.term);
if (k != null) k.fIntersection(u);
}
for(reset(); isNext();) {
TransferKinInfo k = getNext();
if (intersect.indexOf(k) == -1) delete();
}
return this;
}
COM: <s> finds the intersection of this kin term map with another </s>
|
funcom_train/13576553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void finish() {
double expBetaScoreDiffSum = 0d;
for (Double Vj : notStayHomeScores) {
expBetaScoreDiffSum += Math.exp(betaBrain * (Vj - Vmax));
}
double ASC = Math.log((1 - f) / f * expBetaScoreDiffSum) / betaBrain
+ Vmax - stayHomeScore;
stayHome.getCustomAttributes().put(STAY_HOME_ASC, ASC);
}
COM: <s> saves asc in custom attribute of this unique stay home </s>
|
funcom_train/17898413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ToolBarConstraints getConstraint(Component comp) {
ToolBarConstraints constraint = null;
Enumeration consEnum = componentsMap.keys();
while (consEnum.hasMoreElements()) {
Object element = consEnum.nextElement();
if (componentsMap.get(element) == comp) {
constraint = (ToolBarConstraints)element;
break;
}
}
return constraint;
}
COM: <s> p retrieves the specified components constraints </s>
|
funcom_train/9877129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private FloatMatrix getMeans(FloatMatrix data, int [][] clusters){
FloatMatrix means = new FloatMatrix(clusters.length, data.getColumnDimension());
for(int i = 0; i < clusters.length; i++){
means.A[i] = getMeans(data, clusters[i]);
}
return means;
}
COM: <s> calculates means for the clusters </s>
|
funcom_train/32308093 | /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("ArrayRef: <");
sb.append(HClassUtil.baseClass(type));
sb.append('['); sb.append(elements.length); sb.append(']');
for (int i=1; i<HClassUtil.dims(type); i++)
sb.append("[]");
sb.append('>');
return sb.toString();
} */
COM: <s> returns a human readable representation of this code array ref code </s>
|
funcom_train/9810409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void NotifyBouquetListeners(SIChangeEvent event) {
if (event == null) return;
SIElement element = event.getSIElement();
if (element == null || !(element instanceof Bouquet)) return;
TransportImpl transport = (TransportImpl) transports[transports.length - 1];
if (transport == null) return;
SIChangeType ct = event.getChangeType();
BouquetChangeEvent sdce = new BouquetChangeEvent(transport, ct,
(Bouquet) element);
transport.notifyBouquetListeners(sdce);
}
COM: <s> notify the bouquet listeners </s>
|
funcom_train/43581179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getUiButton() {
if (uiButton == null) {
uiButton = new JButton();
uiButton.setIcon(new ImageIcon(Constants.UI));
uiButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
displayPanel4.removeAll();
displayPanel4.invalidate();
displayPanel4.repaint();
UserColourChangeWindow changeTheme = new UserColourChangeWindow(
fr);
displayPanel4.add(changeTheme);
displayPanel4.updateUI();
graphPanel4.removeAll();
graphPanel4.invalidate();
graphPanel4.repaint();
}
});
}
return uiButton;
}
COM: <s> this method initializes ui button </s>
|
funcom_train/2731610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SetCt visit(SetCt setCt) {
logger.debug("<SetCt>");
SetCt newSetCt = ruleFactory.createSetCt();
visitCt(setCt, newSetCt);
logger.debug("<Before>" + printer.visit(setCt) + "</Before>");
logger.debug("<After>" + printer.visit(newSetCt) + "</After>");
logger.debug("</SetCt>");
return newSetCt;
}
COM: <s> makes substitutions on a set comprehension term </s>
|
funcom_train/1591090 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DateTime toDateTimeAtMidnight(DateTimeZone zone) {
zone = DateTimeUtils.getZone(zone);
Chronology chrono = getChronology().withZone(zone);
return new DateTime(getYear(), getMonthOfYear(), getDayOfMonth(), 0, 0, 0, 0, chrono);
}
COM: <s> converts this local date to a full datetime at midnight using the </s>
|
funcom_train/50911668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int indexOfLargestElement() throws ArrayIndexOutOfBoundsException {
if (nelem == 0) {
throw new ArrayIndexOutOfBoundsException();
}
int index = -1;
int value = Integer.MIN_VALUE;
for (int i = 0; i < nelem; i++) {
if (array[i] > value) {
value = array[i];
index = i;
}
}
return index;
}
COM: <s> index of largest element </s>
|
funcom_train/3471006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() {
viewPanelHelper = new ViewPanelHelper();
this.popupMenu = new TrackViewPopupMenu(env, this);
this.addMouseListener(new BlockMouseListener());
this.addMouseMotionListener(new BlockMouseMotionListener());
this.setBackground(Color.WHITE);
this.setBorder(BorderFactory.createLineBorder(Color.BLACK));
}
COM: <s> p initializes the panel with listeners helper etc </s>
|
funcom_train/31742247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void cleanWorkingDirBeforeBuild()
{ // FIXME: remove comment: T O D O why does this happen here and in the class NightlyBuild?!
Logger.debug("Cleaning up working dir (before build)..."); // FIXME: remove comment: This deletes a bit too much - commented out. Marco.
Utils.deleteDirectoryRecursively(projectWorkingDir);
}
COM: <s> delete the working dir for the current version </s>
|
funcom_train/34068262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Contestant isCollidingCar(ImmutableVector3D v) {
for (Contestant i : session.getContestants()) {
if (i == this) {
continue;
}
if (car.isCollidingCar(v.getX(), v.getY(), v.getZ(), i.getCar())) {
return i;
}
}
return null;
}
COM: <s> returns if the specified vector collides with another contestant </s>
|
funcom_train/31226265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setConnected(boolean b) {
if (b) {
conIcon.setIcon(conYes);
conIcon.setToolTipText("Connected");
secIcon.setIcon(secYes);
secIcon.setToolTipText("Secure Connection");
butChannel.setEnabled(true);
} else {
conIcon.setIcon(conNo);
conIcon.setToolTipText("Not Connected");
secIcon.setIcon(secNo);
secIcon.setToolTipText("Connection not Secured");
butChannel.setEnabled(false);
butCreate.setEnabled(false);
}
}
COM: <s> used to manage the connection icons to signify connection and </s>
|
funcom_train/8971365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSamples(float sample[]) {
if (sample.length != nElements) {
try {
throw new Exception("Warning! The sample arrays length must match the constructor");
} catch (Exception e) {
e.printStackTrace();
return;
}
}
if (passthrough) {
for (int iElem = 0; iElem < nElements; iElem++) {
lastResult[0][iElem] = sample[iElem];
}
return;
}
_add(sample);
}
COM: <s> add a sample to the filter </s>
|
funcom_train/12786223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void modifySecurityManager() {
System.setSecurityManager(new SecurityManager() {
private final SecurityManager parent = System.getSecurityManager();
@Override
public void checkPermission(Permission perm) {
if (parent != null) {
parent.checkPermission(perm);
}
}
/**
* Ignore when test runner exits with <code>System.exit()</code>
* @see java.lang.SecurityManager#checkExit(int)
*/
@Override
public void checkExit(int status) {
throw new SecurityException("preventing exit by application");
}
});
}
COM: <s> prevents code system </s>
|
funcom_train/37229212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVisitNumber( CXElement cxVisitNumber ) {
cxVisitNumber.setName( "PV1.19" );
try {
setField( cxVisitNumber, 19 );
}
catch( ArrayIndexOutOfBoundsException ae ) {
ae.printStackTrace();
}
catch( MalformedSegmentException mfe ) {
mfe.printStackTrace();
}
}
COM: <s> set full visit number as cx element defined as completely as you like </s>
|
funcom_train/39972950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJNewSourceButton() {
if (jNewSourceButton == null) {
jNewSourceButton = new JButton();
jNewSourceButton.setPreferredSize(new Dimension(100, 40));
jNewSourceButton.setText("New Source");
jNewSourceButton.setSize(new Dimension(100, 40));
jNewSourceButton.setHorizontalAlignment(SwingConstants.CENTER);
jNewSourceButton.addActionListener(this);
}
return jNewSourceButton;
}
COM: <s> this method initializes j new source button </s>
|
funcom_train/20112964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void generateFunctions(Writer out) throws IOException {
Collection<Function> functions = dbConfig.getFunctions();
if (!functions.isEmpty()) {
out.write("\n\t/*\n\t\t Functions definition \n\t*/");
for (Function f : functions) {
if ("groovy".equalsIgnoreCase( f.getAdapter() ) ) {
out.write("\n");
out.write(f.getBody());
out.write("\n");
}
}
}
}
COM: <s> generate function methods </s>
|
funcom_train/13390044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getService(Locality locality, Class serviceClass) {
switch (locality) {
case LOCAL:
return this.getService(locality, serviceClass.getName() + Local);
case REMOTE:
return this.getService(locality, serviceClass.getName() + Remote);
default:
return this.getService(locality, serviceClass.getName() + Local);
}
}
COM: <s> get the service for a class </s>
|
funcom_train/2293906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getParentFolder() {
String relativeTo;
if (isDirectPublish()) {
relativeTo = CmsResource.getParentFolder((String)getResourceList().get(0));
} else {
relativeTo = getCms().getRequestContext().getSiteRoot() + "/";
}
return relativeTo;
}
COM: <s> returns the parent folder for the publish process </s>
|
funcom_train/15723858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SearchTerm getSearchTermForCriterias() {
SearchTerm[] sta = new SearchTerm[criteriasVector.size()];
for (int i = 0; i < criteriasVector.size(); i++) {
sta[i] = ((FilterCriteria) criteriasVector.get(i)).getSearchTerm();
}
return (new OrTerm(sta));
}
COM: <s> get the search terms for this filter rule </s>
|
funcom_train/48404458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addDropOverHandler(com.smartgwt.client.widgets.events.DropOverHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.events.DropOverEvent.getType()) == 0) setupDropOverEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.events.DropOverEvent.getType());
}
COM: <s> add a drop over handler </s>
|
funcom_train/17631657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Database createDatabase(String name) {
String dbname = name.toLowerCase().replaceAll("[^a-z0-9_$()+\\-/]", "_");
if (!dbname.endsWith("/")) {
dbname+="/";
}
CouchResponse resp = put(dbname);
if (resp.isOk()) {
return getDatabase(dbname);
} else {
log.warn("Error creating database: "+name);
return null;
}
}
COM: <s> creates a new database if the name doesnt already exist </s>
|
funcom_train/4929899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkAncestor( Page ancestorPage, ContentEntityObject content ) {
if ( ancestorPage != null ) {
if ( content instanceof Page ) {
Page page = ( ( Page ) content ).getParent();
while ( page != null ) {
if ( ancestorPage.equals( page ) )
return true;
page = page.getParent();
}
}
return false;
}
return true;
}
COM: <s> checks if the specified code ancestor page code is an ancestor of the </s>
|
funcom_train/32280242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isNodeChild(TreeNode node) {
// Variables
TreeNode current;
// Sanity Check
if (node == null) {
return false;
} // if
// Process Path
current = node;
while (current != null) {
if (current == this) {
return true;
} // if
current = current.getParent();
} // while
// Node not located in path, not child
return false;
} // isNodeChild()
COM: <s> is node child </s>
|
funcom_train/20978375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setColor(int r, int g, int b) {
m_Red = r;
m_Green = g;
m_Blue = b;
if (false && m_Red == 100 && m_Green == 100 && m_Blue == 100) {
m_Red = 90;
m_Green = 90;
m_Blue = 90;
}
}
COM: <s> sets the color attribute of the color fill filter object </s>
|
funcom_train/45539238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IParseUnit getWorkingCopy(IEditorInput input, boolean primaryOnly) {
IParseUnit unit= fMap == null ? null : (IParseUnit) fMap.get(input);
if (unit == null)
unit= fDocumentProvider.getWorkingCopy(input);
if (unit != null && (!primaryOnly || JSCModelUtil.isPrimary(unit)))
return unit;
return null;
}
COM: <s> returns the working copy remembered for the compilation unit encoded in the </s>
|
funcom_train/2625347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doCreate(FileEntry entry) {
for (FileAlterationListener listener : listeners) {
if (entry.isDirectory()) {
listener.onDirectoryCreate(entry.getFile());
} else {
listener.onFileCreate(entry.getFile());
}
}
FileEntry[] children = entry.getChildren();
for (FileEntry aChildren : children) {
doCreate(aChildren);
}
}
COM: <s> fire directory file created events to the registered listeners </s>
|
funcom_train/35282494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeControl(Class<? extends Control> controlType) {
for (int i = 0; i < controls.size(); i++) {
if (controlType.isAssignableFrom(controls.get(i).getClass())) {
Control control = controls.remove(i);
control.setSpatial(null);
}
}
}
COM: <s> removes the first control that is an instance of the given class </s>
|
funcom_train/43900323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setContactInformation(String contactInformation) {
if (contactInformation == null) {
throw new NullPointerException();
}
String oldContactInformation = this.contactInformation;
this.contactInformation = contactInformation;
propertyChangeSupport.firePropertyChange("contactInformation", oldContactInformation,
contactInformation);
}
COM: <s> setter for property contact information </s>
|
funcom_train/9394953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(String name, double value) throws IllegalArgumentException {
ObjectSlot slot = findSlot(name, Double.TYPE);
if (slot == null) {
throw new IllegalArgumentException();
}
slot.fieldValue = Double.valueOf(value);
slot.defaulted = false; // No longer default value
}
COM: <s> find and set the double value of a given field named </s>
|
funcom_train/17603561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadDriver() {
logger.info("Loading database driver [" + dbDriver + "]");
try {
Class.forName(dbDriver);
} catch (ClassNotFoundException e) {
logger.log(Level.SEVERE, "Unable to load driver [com.mysql.jdbc.Driver]. Please make sure it is in your classpath", e);
throw new RuntimeException(e);
}
}
COM: <s> loads the db driver </s>
|
funcom_train/10790028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void derefColumns() {
Column[] cols = getColumns();
for (int i = 0; i < cols.length; i++)
cols[i].deref();
cols = getConstantColumns();
for (int i = 0; i < cols.length; i++)
cols[i].deref();
}
COM: <s> deref all columns in this key </s>
|
funcom_train/38385306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDeleteFirstChar() {
REDText text = getTestText();
String result = TEXT_CONTENT.substring(1); // cut first char
text.replace(0, 1, null);
assertEquals("Deletion of first character failed.", result,
text.asString());
assertEquals("Wrong length after deletion of first character.",
TEXT_CONTENT.length() - 1, text.length());
checkEvents("beforeDelete(0, 1)\n" +
"afterDelete(0, 1)");
}
COM: <s> tests the deletion of the first character of a redtext object </s>
|
funcom_train/25201722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void putText(PrintStream out, CharSequence text, Dimen x) {
out.write('(');
out.append(text);
out.write(')');
PsUnit.toPoint(x, out, false);
out.write(' ');
addLib(out, "x");
}
COM: <s> put some text at a certain position given by x coordinate only </s>
|
funcom_train/18132666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeConnection() {
Log.info("Attempting to close the database connection.");
if (this.connection != null) {
try {
this.connection.close();
Log.info("Database connection is closed.");
this.connection = null;
} catch (SQLException e) {
Log.exception(this.getClass().getName(), "closeConnection()", e);
Log.severe(e.getLocalizedMessage());
}
return;
}
Log.info("Connection may not need closing (did you already do this?).");
}
COM: <s> close the connection to the database </s>
|
funcom_train/20694720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element authorInfoLink() {
Element result = null;
User author = lastAuthor();
if (author != null) {
String name = author.fullName();
if (name.equals("MailSystem")) {
name = this.getSenderMailAddress();
result = new Element("i").setText(name);
} else
result = XHTMLFactory.a(author.urlString(), name, null);
} else
result = new Element("i").setText("---");
return result;
}
COM: <s> create an xml element that links to the mini homepage of the sending </s>
|
funcom_train/3883254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_LocationType_type_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_LocationType_type_feature", "_UI_LocationType_type"),
ImsMdRootv1p1Package.Literals.LOCATION_TYPE__TYPE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the type feature </s>
|
funcom_train/3294038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startElement(String uri, String loc, String raw, Attributes a) throws SAXException {
String name = null;
if (raw.length()>0) {
name = raw;
} else if (loc.length()==0) {
throw new SAXException("No local name found");
} else {
name = loc;
}
startElementName = name;
//check if element is a root element
if (rootElementName.equals("")){
rootElementName = startElementName;
}
}
COM: <s> receive notification of the beginning of an element </s>
|
funcom_train/40291434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void update() {
if (state.equals(State.NORMAL)) {
text.setTextColor(ColorRGBA.white);
text.print(textString);
} else {
text.setTextColor(ColorRGBA.red);
text.print("> " + textString + " <");
}
text.getLocalTranslation().setX(
DisplaySystem.getDisplaySystem().getWidth() / 2
- text.getWidth() / 2);
}
COM: <s> updates the text according to state </s>
|
funcom_train/18803336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unwind(final String tagName) throws SAXException, XmlReaderException {
this.currentHandlers.pop();
if (this.currentHandlers.isEmpty() && !this.outerScopes.isEmpty()) {
this.currentHandlers = (Stack) this.outerScopes.pop();
}
if (!this.currentHandlers.isEmpty()) {
getCurrentHandler().endElement(tagName);
}
}
COM: <s> hand control back to the previous handler </s>
|
funcom_train/51111241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Person hireEmployee(String name, double baseSalary) {
Person person = (Person) getDataContext().createAndRegisterNewObject("Person");
person.setFullName(name);
person.setDateHired(new Date());
person.setBaseSalary(new Double(baseSalary));
this.addToEmployees(person);
return person;
}
COM: <s> creates and returns a new department with the specified name </s>
|
funcom_train/32778165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open(String pathname, String name) {
super.open(createFileName(pathname, name, "error"));
// write tags to open the table used to write the TraceNotes to
// with the proper heading
formatter.openTable(name + " - errors & warnings");
formatter.openRow();
formatter.writeHeadingCell("model");
formatter.writeHeadingCell("time");
formatter.writeHeadingCell("error");
formatter.writeHeadingCell("content");
formatter.closeRow();
}
COM: <s> opens a new file with the given file and pathname for writing </s>
|
funcom_train/40931603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getVehiculoReparadoStringItem() {
if (vehiculoReparadoStringItem == null) {//GEN-END:|365-getter|0|365-preInit
// write pre-init user code here
vehiculoReparadoStringItem = new StringItem("", null);//GEN-LINE:|365-getter|1|365-postInit
// write post-init user code here
}//GEN-BEGIN:|365-getter|2|
return vehiculoReparadoStringItem;
}
COM: <s> returns an initiliazed instance of vehiculo reparado string item component </s>
|
funcom_train/35865534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getExclusionSetsForParticipantAndMeetings(UserEntity user, MeetingEntity meeting) {
Query q = em.createQuery("SELECT p FROM ExclusionRangeEntity p WHERE p.userEnt.email = '" + user.getEmail() + "' AND p.meetingEnt.id = '" + meeting.getId() + "'");
return (Collection) q.getResultList();
}
COM: <s> get all of the exclusion preference sets for a given user and meeting </s>
|
funcom_train/25545992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ColTable getCurrentColTable(int idx) {
return this.coltables[idx];
// ColTable col = null;
// int i;
// int curre = 0;
// for (i = 0; i < this.coltables.length; i++) {
// col = getColTable(i);
// if (col.getCurrentState()) {
// if (idx == curre) {
// return col;
// }
// curre++;
// }
// }
// return col;
}
COM: <s> fetch current column </s>
|
funcom_train/16384095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(){
//loadBeanProperties() ;
logger.info("AlarmMonitorDao - properties:");
logger.info(" jndi_fact_class_name ="+jndi_fact_class_name);
logger.info(" jndi_url ="+jndi_url);
logger.info(" bean_naming_package ="+bean_naming_package);
logger.info(" topic_connection_factory_name ="+topic_connector_factory_name);
logger.info(" jvt_event_topic_name ="+jvt_event_topic_name);
logger.info(" xvt_event_topic_name ="+xvt_event_topic_name);
}
COM: <s> initialises the dao </s>
|
funcom_train/24000680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testToConcrete() {
NullLiteralAst instance = new NullLiteralAst(-1, TokenFactory.createToken(-1), null);
assertEquals("null",instance.toConcrete());
instance = new NullLiteralAst(-1, TokenFactory.createToken(-1), "Boolean");
assertEquals("null : Boolean",instance.toConcrete());
}
COM: <s> test of to concrete method of class null literal ast </s>
|
funcom_train/3100038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void gatherVariables() {
variables = new ArrayList();
Enumeration e = formula.cycListVisitor();
while (true) {
if (! e.hasMoreElements())
break;
Object element = e.nextElement();
if ((element instanceof CycVariable) &&
(! (variables.contains(element))))
variables.add(element);
}
}
COM: <s> gathers the unique variables from the literals formula </s>
|
funcom_train/7347071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addText(String key, String value) {
value = Replace.replace(value,"\\n", "\n");
value = Replace.replace(value,"\\\\", "\\");
if (textResources.get(key) != null) {
System.out.println("WARNING: Writing over existing text repository key: " + key);
}
textResources.put(key, value);
}
COM: <s> puts a text asset into this text resource repository </s>
|
funcom_train/24421934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStatus (Object object) {
this.resourceButton.refresh ();
if (object == null) return;
final String text = object.toString();
this.statusbar.setText(text);
if (object instanceof Throwable) {
final Throwable throwable = (Throwable) object;
final StringWriter writer = new StringWriter ();
throwable.printStackTrace(new PrintWriter (writer));
this.statusbar.setToolTipText(writer.toString());
} else {
this.statusbar.setToolTipText(text); // FIXME long description
}
}
COM: <s> adds an item to the status bar </s>
|
funcom_train/2369502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getMoveRating(final Player player, final Card toTest) {
final TurnRating rating = GameControl.extendRating(getCurrentRating(),
this.game, player, toTest);
return rating.getRatings().get(rating.getRatings().size() - 1)
.intValue();
}
COM: <s> returns a rating of the for the specified move </s>
|
funcom_train/46620853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFileTimeStamp() {
if (m_timestamp == null) {
return "";
} else if (m_timestamp.getValue().equals(TIME_MODIFIED)) {
return FLAG_FILETIME_MODIFIED;
} else if (m_timestamp.getValue().equals(TIME_UPDATED)) {
return FLAG_FILETIME_UPDATED;
} else {
return FLAG_FILETIME_DEF;
}
}
COM: <s> gets the value set for the file time stamp </s>
|
funcom_train/50323941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initCacheFile() {
Label cacheFileLabel = new Label(getComposite(), SWT.NULL);
cacheFileLabel.setText("Cache file:");
FileChooserField cacheFileField = new FileChooserField(getComposite());
cacheFileField.getTextField().setText(
getConfigEntry().getProperty(BlocklistConstants.BLOCKLIST_CACHE_FILE));
setCacheFileChooserField(cacheFileField);
}
COM: <s> initializes the label and file chooser field for the configuration cache file </s>
|
funcom_train/25582462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadBasicConfig(){
Set<String> types = getType();
for(JCheckBox rb: checkButtonMap.keySet()){
rb.setSelected(false);
String value = checkButtonMap.get(rb);
if(types.contains(value)){
rb.setSelected(true);
}
else {
rb.setSelected(false);
}
}
for(JCheckBox rb: checkButtonMap.keySet()){
if(rb.isSelected()){
String value = checkButtonMap.get(rb);
ReasonerProperty prop = new ReasonerProperty("name", value);
selectedFunctionCondition.addCondition(prop);
}
}
}
COM: <s> when thd mode is changed to basic mode load the relate properties </s>
|
funcom_train/29063994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ungrayChildren(File parent, ViewerFilter filter) {
sourceFilesViewer.setGrayed(parent, false);
if (parent.isDirectory()) {
Object[] children = filter.filter(sourceFilesViewer, parent, parent.listFiles());
for (int i = 0; i < children.length; i++) {
ungrayChildren((CachedFile) children[i], filter);
}
}
}
COM: <s> ungrays all children of a parent file in the tree viewer </s>
|
funcom_train/25332193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetAndSetVersion() {
DACoordinateSystem instance = new DACoordinateSystem();
String expResult = "bob";
String result = instance.getVersion();
assertNull(result);
instance.setVersion(expResult);
result = instance.getVersion();
assertEquals(expResult, result);
}
COM: <s> test of get version method of class dacoordinate system </s>
|
funcom_train/50301905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accessWrite(String resource) throws CmsException {
try {
return m_rb.accessWrite(m_context.currentUser(), m_context.currentProject(), getSiteRoot(resource));
} catch (Exception exc) {
throw new CmsException(CmsException.C_UNKNOWN_EXCEPTION, exc);
}
}
COM: <s> checks if the user may write this resource </s>
|
funcom_train/28662258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean saveDataToModel() {
encryption.setEncryptionAlgorithm(cEncryptionAlgorithm.getText());
encryption.setKeyWrapAlgorithm(cKeyWrapAlgorithm.getText());
encryption.setContent(bContentOnly.getSelection());
encryption.setEncryptionId(tID.getText());
encryption.setLaunchSignatureWizard(bSigWiz.getSelection());
storeSettings();
return true;
}
COM: <s> saves the selections on this wizard page to the model </s>
|
funcom_train/48067826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Token other = (Token) obj;
if (elementCode != other.elementCode)
return false;
if (type != other.type)
return false;
if (value == null) {
if (other.value != null)
return false;
} else if (!value.equals(other.value))
return false;
return true;
}
COM: <s> equals method generated by eclipse </s>
|
funcom_train/30207554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String listAclEntries(Long id, String idType) {
Part[] parts = {
new StringPart("command", "listaclentries"),
new StringPart(idType, id.toString()),
new StringPart("ticket", sessionTicket),
};
return executeMethod(parts);
}
COM: <s> retrieve a list of all acl entries for a group or acl </s>
|
funcom_train/19577061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getNextArchive() {
if(currArchiveNumber != (archives.length-1)) {
currArchiveNumber = currArchiveNumber + 1;
theApp.loader.openArchive(1,getArchiveDir() + System.getProperty("file.separator") + archives[currArchiveNumber]);
} // end if not at last archive
} // end getNextArchive()
COM: <s> loads the next archive in the directory </s>
|
funcom_train/39474998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int rollOrDouble(BoardSetup boardSetup) throws CannotDecideException {
Mode category = getCategory(boardSetup, boardSetup.getPlayerAtMove());
try {
return mapAI.get(category).rollOrDouble(boardSetup);
} catch (CannotDecideException ex) {
// Fall back solution: ask normal mode!
return fallbackAI.rollOrDouble(boardSetup);
}
}
COM: <s> given a board make decide whether to roll or to double </s>
|
funcom_train/13185768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInteriorGap(double percent) {
// check arguments...
if ((percent < 0.0) || (percent > MAX_INTERIOR_GAP)) {
throw new IllegalArgumentException(
"Invalid 'percent' (" + percent + ") argument.");
}
// make the change...
if (this.interiorGap != percent) {
this.interiorGap = percent;
notifyListeners(new PlotChangeEvent(this));
}
}
COM: <s> sets the interior gap and sends a </s>
|
funcom_train/1482035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean next() throws IOException {
pointer++;
if (pointer >= pointerMax) {
pointerMax = termDocs.read(docs, freqs); // refill buffer
if (pointerMax != 0) {
pointer = 0;
} else {
termDocs.close(); // close stream
doc = Integer.MAX_VALUE; // set to sentinel value
return false;
}
}
doc = docs[pointer];
return true;
}
COM: <s> advances to the next document matching the query </s>
|
funcom_train/22400423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
float radius = getRadius();
createTubeShape(Cylinder.GENERATE_NORMALS_INWARD, radius);
createTubeShape(Cylinder.GENERATE_NORMALS, radius);
if(p == null){
org.wilmascope.graph.Cluster c = ((org.wilmascope.graph.Node) getNode()).getOwner();
p = c.getNodes().getBestFitPlane();
}
}
COM: <s> the plane this circular node lies on is set when init is called </s>
|
funcom_train/24009426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Date confirm(String id, Double price, String customer) throws Exception {
if (price == null)
throw new Exception("Price can not be null!");
if ((customer == null) || ("".equals(customer)))
throw new Exception("Customer can not be null!");
Session session = getSession();
Booking booking = (Booking)session.get(Booking.class, id);
booking.setPrice(price);
booking.setCustomername(customer);
booking.setConfirmed(new Date());
session.saveOrUpdate(booking);
session.flush();
return booking.getConfirmed();
}
COM: <s> confirms a reservation done before </s>
|
funcom_train/16924597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer html = new StringBuffer("<");
html.append(elementName);
appendAttributes(html, this, "cols", "rows");
html.append(">");
html.append(Util.escapeXml(value != null ? String.valueOf(value) : ""));
html.append("</");
html.append(elementName);
html.append(">");
return html.toString();
}
COM: <s> implementations should return the html for the element </s>
|
funcom_train/2357695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Grammar getGrammarForSentence(Phrase sentence) {
int[] words = new int[sentence.size()];
for (int i = 0; i < words.length; i++) {
words[i] = sentence.getWordID(i);
}
PrefixTree prefixTree = new PrefixTree(
// sourceSuffixArray, targetCorpus, alignments,
// sourceSuffixArray.getVocabulary(), lexProbs, ruleExtractor,
this);
prefixTree.add(words);
return prefixTree;
// return prefixTree.getRoot();
}
COM: <s> extracts a grammar which contains only those rules </s>
|
funcom_train/29784834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object executeXPath(String xpath, QName resultType, Element context) {
Object toReturn;
try {
XPathExpression selector = xPathProcessor.compile(xpath);
//will only evaluate expression on whole documents, not seperate nodes
toReturn =
(NodeList) selector.evaluate(
context.getOwnerDocument().getDocumentElement(),
XPathConstants.NODESET);
} catch (XPathExpressionException e) {
throw new HtmlObjectException("Error evaluating xpath expression: " + xpath , e);
}
return toReturn;
}
COM: <s> provides document absolute xpath execution services </s>
|
funcom_train/32353625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected GPXTrackSeg parseTrackSeg(final XMLNode node) {
if (node != null) {
final String nodeName = node.getName();
if (nodeName.equals(TAG_TRKSEG)) {
final Collection<GPXWaypoint> trkpt = parseWaypoints(node
.getSubNodes(TAG_TRKPT));
final GPXTrackSeg trackSeg = new GPXTrackSeg(trkpt, null);
return trackSeg;
}
}
return null;
}
COM: <s> parse a trkseg tag </s>
|
funcom_train/47854595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void flushAdd() {
logger.debug("flush required for agents queued for add");
boolean addAgents = writeAllAgents();
/*if (addAgents && transationOpen && !db.canInsertMultiple()) {
try {
db.getStatement().execute("COMMIT;");
} catch (SQLException e) {
throw new RuntimeException("Error while commiting adds of agents", e);
}
}*/
}
COM: <s> writes all pending agents into the database </s>
|
funcom_train/7281600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ResumeDownloader newResumeDownloader() throws Exception {
// this ResumeDownloader is started from the library, not from restart,
// that is why the last param to init is false
ResumeDownloader downloader = injector.getInstance(CoreDownloaderFactory.class).createResumeDownloader(
incompleteFile, name, size);
downloader.initialize();
downloader.startDownload();
return downloader;
}
COM: <s> returns a new resume downloader with stubbed out download manager etc </s>
|
funcom_train/43897877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected double getPerimeter(LineString lineString) {
double perimeter = 0.0d;
int numberOfPoints = lineString.getNumPoints();
Coordinate[] coordinates = lineString.getCoordinates();
for (int i = 0; i < (numberOfPoints - 1); i++) {
perimeter += coordinates[i].distance(coordinates[i + 1]);
}
return perimeter;
}
COM: <s> returns the perimeter of a line string </s>
|
funcom_train/10281902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getToggleToCaretText() {
Document doc = target.getDocument();
String s = null;
try {
int pos = target.getCaretPosition();
s = doc.getText(togglePosition, pos - togglePosition);
} catch (BadLocationException ble) {
// programatic error
}
return s;
}
COM: <s> get the text from toggle position to the current caret offset </s>
|
funcom_train/5433435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeOldLocation(boolean changingPlanets) {
if(theLoc instanceof Grid) { //On the ground
Grid g=(Grid)theLoc;
if(g.occupier==this)
g.occupier=null;
if(changingPlanets)
g.thePlanet.groundObjects.remove(this);
theLoc=null;
}
else if(theLoc instanceof Sector) { //In space
Sector theSector=(Sector)theLoc;
((Vector)theSector.theServer.map.spaceObjects.get(theSector)).remove(this);
theLoc=null;
}
}
COM: <s> remove the references to my old location </s>
|
funcom_train/21995865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refresh(Vector keys) throws BusException {
if (log.isDebugEnabled())
log.debug("refreshExternal: queueing " + keys);
// when user requests a store of a playlist
// with external resources, refresh that playlist
PlaylistParserDaemon daemon = PlaylistParserDaemon.getInstance();
// request a parsing the items in the splaylist
daemon.queue(keys);
}
COM: <s> refresh the tunes in the specified playlists </s>
|
funcom_train/42273227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return "EveMessage:\n" +
"-----------\n" +
"From: " + m_from + "\n" +
"To: " + m_to + "\n" +
"Type: " + m_type + "\n" +
"Data: " + m_data + "\n\n";
}
COM: <s> simple string representation of a message </s>
|
funcom_train/2292857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setShowExplorer(boolean showExplorer) {
Map dialogMap = (Map)getSettings().getDialogObject();
if (dialogMap == null) {
dialogMap = new HashMap();
getSettings().setDialogObject(dialogMap);
}
dialogMap.put(getClass().getName(), Boolean.valueOf(showExplorer));
}
COM: <s> sets the show explorer flag </s>
|
funcom_train/7712378 | /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("width=");
sb.append(bWidth);
sb.append(",height=");
sb.append(bHeight);
sb.append(",bitCount=");
sb.append(sBitCount);
sb.append(",colorCount="+bColorCount);
return sb.toString();
}
COM: <s> a string representation of this tt icon entry tt structure </s>
|
funcom_train/29738012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setColumnCount(int columnCount) {
int oldColumnCount = columns != null? columns.length : 0;
columns = new Column[columnCount];
for (int i = 0; i < columnCount; i++) {
columns[i] = new Column("column"+i, java.lang.String.class, true);
}
pcs.firePropertyChange("columnCount", oldColumnCount, columnCount);
}
COM: <s> initializes the number of columns in this meta data object </s>
|
funcom_train/33296598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL getResource(String path) throws MalformedURLException {
if (path == null || path.length() == 0 || path.charAt(0) != '/')
throw new MalformedURLException("Path " + path
+ " is not in acceptable form.");
return new URL("file", "localhost", getRealPath(path));
}
COM: <s> returns a url to the resource that is mapped to a specified path </s>
|
funcom_train/36188256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getColumnName(int col) {
switch (col) {
case 0:
return "(first) Date";
case 1:
return "Time";
case 2:
return "Class";
case 3:
return "Cycle";
case 4:
return "times";
case 5:
return "Summary";
default:
return "";
}
}
COM: <s> gets the column name attribute of the event table model object </s>
|
funcom_train/20149687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PostmarkResponse sendMessage(String from, String to, String replyTo, String cc, String subject, String body, boolean isHTML, String tag) throws PostmarkException {
return sendMessage(from, to, replyTo, cc, subject, body, isHTML, tag, null);
}
COM: <s> sends a message through the postmark api </s>
|
funcom_train/32634945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsMatchingLoad(CombineableOperator comb) {
if (comb.getLValue().matches(this)) {
if (subsEquals((Operator) comb.getLValue()))
return true;
}
for (int i=0; i < subExpressions.length; i++) {
if (subExpressions[i].containsMatchingLoad(comb))
return true;
}
return false;
}
COM: <s> checks if this expression contains a matching load that matches the </s>
|
funcom_train/23677598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startNewGame() {
if (timer != null && timer.isRunning()) {
fireGameStopped();
}
if (this.currentGame != null) {
this.currentGame.start();
nextStep();
if (this.currentGame.getConfiguration().getDelay() > 0) {
timer = new Timer(this.currentGame.getConfiguration().getDelay(), this);
} else {
timer = new Timer(Integer.MAX_VALUE, this);
}
fireGameStarted();
this.timer.start();
}
}
COM: <s> create a new and fire corresponding events </s>
|
funcom_train/20870892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String deleteUserAdmin() throws Exception {
try {
dataServiceLocator.getUserService().deleteUser(getReqParam(USER_ID));
} catch (Exception ex) {
logger.error("DAO exception occured, cause: ", ex);
MessageUtils.addErrorMessage("error.dataSource");
}
return "userAdminDetail";
}
COM: <s> deletes a user entry </s>
|
funcom_train/44657426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GridBagLayoutBuilder appendSeparator(String labelKey) {
if (this.currentRowList.size() > 0) {
nextLine();
}
final JComponent separator = getComponentFactory().createLabeledSeparator(labelKey);
return append(separator, 1, 1, true, false).nextLine();
}
COM: <s> appends a seperator usually a horizonal line using the provided string </s>
|
funcom_train/33436026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String form(double x) {
String r;
if (precision < 0) {
precision = 6;
}
int s = 1;
if (x < 0) {
x = -x;
s = -1;
}
if (fmt == 'f') {
r = fixedFormatUtil(x);
} else if (fmt == 'e' || fmt == 'E' || fmt == 'g' || fmt == 'G') {
r = expFormatUtil(x);
} else {
throw new java.lang.IllegalArgumentException();
}
return pad(sign(s, r));
}
COM: <s> format utils a double into a string like sprintf in c </s>
|
funcom_train/31018084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getLabelSize(EdgeView view) {
Object label = view.getGraph().convertValueToString(view);
if (label != null && label.toString().length() > 0) {
fontGraphics.setFont(
GraphConstants.getFont(view.getAllAttributes()));
metrics = ((Graphics2D) fontGraphics).getFontMetrics();
int sw = metrics.stringWidth(label.toString());
int sh = metrics.getHeight();
return new Dimension(sw, sh);
}
return null;
}
COM: <s> returns the label size of the specified view in the given graph </s>
|
funcom_train/47311677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startFrame(Screen screen) {
Graphics g = screen.getGraphics();
if (clearViewEveryFrame) {
g.setColor(0x00000000); // Color.black
g.fillRect(viewWindow.getLeftOffset(), viewWindow.getTopOffset(), viewWindow.getWidth(), viewWindow
.getHeight());
}
}
COM: <s> indicates the start of rendering of a frame </s>
|
funcom_train/39276797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CategoryDataset createCategoryDataset(SingleValueAnalysis analysis) {
DefaultCategoryDataset dataset = new DefaultCategoryDataset();
for (int i = 0; i < analysis.size(); i++) {
dataset.addValue(analysis.getDouble(i), analysis.getName(),
analysis.getStringKey(i));
}
return dataset;
}
COM: <s> creates a categories based data set </s>
|
funcom_train/5347853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumOldConnectionQueries() {
int numQueries = 0;
Iterator iter = CONNECTIONS.iterator();
while(iter.hasNext()) {
TestConnection tc = (TestConnection)iter.next();
if(tc instanceof OldConnection) {
numQueries += tc.getNumQueries();
}
}
return numQueries;
}
COM: <s> returns the total number of queries received over all old connections </s>
|
funcom_train/3918975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void selectPlay(Play play, boolean checked) {
if(checked) {
_method.getCompleteUOLType().addPlayRef(play.getIdentifier());
}
else {
_method.getCompleteUOLType().removePlayRef(play.getIdentifier());
}
_ldEditor.getLearningDesignDataModel().setDirty(true);
}
COM: <s> select or clear a play </s>
|
funcom_train/39955026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNormalStream() throws IOException {
String text = "some test content";
Reader reader = extractor.extractText(
new ByteArrayInputStream(text.getBytes()), "text/plain", null);
assertEquals("", ExtractorHelper.read(reader));
}
COM: <s> tests that the extractor correctly handles a normal stream </s>
|
funcom_train/19637859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection makeFullCollection() {
CompositeCollection compositeCollection = new CompositeCollection();
Object[] elements = getFullElements();
for (int i = 0; i < elements.length; i++) {
Collection summand = new HashSet();
summand.add(elements[i]);
compositeCollection.addComposited(summand);
}
return compositeCollection;
}
COM: <s> full collection consists of 4 collections each with one element </s>
|
funcom_train/50158628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireFileDirectoryEvent(List filesToAdd, List filesToRemove) {
//
FileDirectoryEvent fileEvent = new FileDirectoryEvent(this);
fileEvent.setFileLists(filesToAdd, filesToRemove);
if ( listeners != null && listeners.size() > 0 ) {
for (int i=0; i<listeners.size(); i++) {
((FileDirectoryListener)listeners.get(i)).fileDirectoryChanged(fileEvent);
}
}
}
COM: <s> construct the file directory event object and fire off the event to listeners </s>
|
funcom_train/34339647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand3() {
if (okCommand3 == null) {//GEN-END:|32-getter|0|32-preInit
// write pre-init user code here
okCommand3 = new Command("Agregar", Command.OK, 0);//GEN-LINE:|32-getter|1|32-postInit
// write post-init user code here
}//GEN-BEGIN:|32-getter|2|
return okCommand3;
}
COM: <s> returns an initiliazed instance of ok command3 component </s>
|
funcom_train/36780157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStart(final String s) {
SimpleDateFormat stf = new SimpleDateFormat("HH:mm:ss");
stf.setTimeZone(TimeZone.getTimeZone("UTC"));
try {
start = stf.parse(s).getTime();
} catch(ParseException ex) {
LogLog.warn("Error parsing start value " + s, ex);
}
}
COM: <s> set start inclusive of time span </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.