__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/32778184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeTable() {
if (!tableOpen)
return; // do nothing if table not open
if (rowOpen) {
closeRow(); // correct an open row if necessary
rowOpen = false;
}
out.writeln("</TABLE><P>"); // The table end tag
out.writeln("<FONT SIZE=-1><A HREF=#top>top</A></FONT><P>");
tableOpen = false;
}
COM: <s> inserts the tags needed to close a html 3 </s>
|
funcom_train/34595225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAbility(IntrinsicAbility abl, boolean ignoreTransferability) {
removeStatus(m_ability);
if (abl != null) {
m_abilityName = abl.getName();
if (ignoreTransferability || abl.isEffectTransferrable()) {
m_ability = (IntrinsicAbility) addStatus(this, abl);
} else {
m_ability = null;
}
} else {
m_abilityName = null;
}
}
COM: <s> set this pokemons ability </s>
|
funcom_train/8641036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTextFromPage(int page) throws IOException {
PdfDictionary pageDic = reader.getPageN(page);
PdfDictionary resourcesDic = pageDic.getAsDict(PdfName.RESOURCES);
extractionProcessor.processContent(getContentBytesForPage(page), resourcesDic);
return extractionProcessor.getResultantText();
}
COM: <s> gets the text from a page </s>
|
funcom_train/3429766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int lengthUnknownElement() {
int result = 0;
Node n=this._constructionElement.getFirstChild();
while (n!=null){
if ((n.getNodeType() == Node.ELEMENT_NODE)
&&!n.getNamespaceURI().equals(Constants.SignatureSpecNS)) {
result += 1;
}
n=n.getNextSibling();
}
return result;
}
COM: <s> method length unknown element </s>
|
funcom_train/15641294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onLeave(StateMachine viewer) {
Iterator it = this.contents.iterator();
while(it.hasNext())
{
PageContent el = (PageContent)it.next();
el.onLeave(viewer);
}
if(scriptedHandler!=null)
scriptedHandler.onLeave();
scriptedHandler = null;
// stop the audio if any
if(mediawrapper!=null)
this.mediawrapper.stop();
}
COM: <s> when this page becomes not the current </s>
|
funcom_train/16524189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void select(int tx, int ty) {
setTileAt(tx, ty, selTile);
Area a = new Area(new Rectangle2D.Double(tx, ty, 1, 1));
if (selection == null) {
selection = a;
} else {
if (!selection.contains(tx, ty)) {
selection.add(a);
}
}
}
COM: <s> selects only the given tile location adds it to the selection </s>
|
funcom_train/50391457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getFallbackGroovyExpression(){
try{
String res="/TestRunner.groovy";
InputStream is=getClass().getResourceAsStream(res);
if(is==null)throw new IllegalStateException("Expected resource '"+res+"' not found!");
expression=IOUtils.toString(is);
if(expression==null)throw new IllegalStateException("Expected resource '"+res+"' not found!");
}catch(Exception e){
throw new RuntimeException(e);
}
}
COM: <s> load default test runner </s>
|
funcom_train/14092919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTestComponentValidComponent() throws Exception {
JWindowFinder finder = new JWindowFinder();
JWindow win = new JWindow();
win.setSize(200, 200);
win.pack();
win.setVisible(true);
assertTrue("Finder is not working", finder.testComponent(win));
}
COM: <s> tests the test component method for valid component </s>
|
funcom_train/36680340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBaseRecolorImage(String imgRef, String imgPath) {
String baseImgRef = loadAwtImg(imgRef, imgPath);
Image slickImg = slickImageFactory.createImageFromAwtSource(baseImgRef);
slickImageLib.addSlickImg(baseImgRef, slickImg);
}
COM: <s> set the base image for recoloring </s>
|
funcom_train/39110153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final protected String emptyTag(String atts) {
String tagContent;
if (atts.length() > 0) {
tagContent = name.trim()+' '+atts.trim()+'/';
}
else {
tagContent = name.trim()+'/';
}
return makeIntoTag(tagContent);
}
COM: <s> outputs tag with no content so will include trailing slash </s>
|
funcom_train/39105032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int agentExists(String name, String port) {
for (int i = 0; i < model.getRowCount(); i++) {
if (((String)model.getValueAt(i,1)).equals(name)) {
if (((String)model.getValueAt(i,2)).equals(port)) {
return i;
}
}
}
return -1;
}
COM: <s> returns the index of this item in our table or negative if </s>
|
funcom_train/7308736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return "StreamInfo:"
+ " BlockSize=" + minBlockSize + "-" + maxBlockSize
+ " FrameSize" + minFrameSize + "-" + maxFrameSize
+ " SampelRate=" + sampleRate
+ " Channels=" + channels
+ " BPS=" + bitsPerSample
+ " TotalSamples=" + totalSamples;
}
COM: <s> convert to string </s>
|
funcom_train/38386664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeControllerDecorator(REDViewControllerDecorator decorator) {
REDViewController c = getController();
REDViewControllerDecorator prev = null;
while (c instanceof REDViewControllerDecorator) {
REDViewControllerDecorator d = (REDViewControllerDecorator) c;
if (d == decorator) {
if (d == getController()) {
setController(d.getDecorated());
break;
}
else {
prev.setDecorated(d.getDecorated());
break;
}
}
prev = d;
c = d.getDecorated();
}
}
COM: <s> remove a specific controller decoration from the controller stack of this editor </s>
|
funcom_train/3610502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTile(int x, int y, String tile) {
if ((x > getArrayWidth()) || (y > getArrayHeight()) || (x < 0) || (y < 0)) {
throw new IllegalArgumentException();
}
image[x][y] = tile;
}
COM: <s> updates an 8 8 tile in the xpm image </s>
|
funcom_train/28901001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLongChainOfRules() throws Exception {
StringBuilder buffer = new StringBuilder();
final String p = "p";
final int count = 1000;
for (int predicate = 1; predicate < count; ++predicate) {
buffer.append(p + (predicate + 1)).append("(?X,?Y ) :- ").append(
p + predicate).append("(?X,?Y ).");
}
buffer.append("?- " + p + count + "(?x,?y).");
program = buffer.toString();
}
COM: <s> check that a long chain of rules can be correctly evaluated i </s>
|
funcom_train/44473124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isMatchArgs(List args) {
List reqs = getArgumentTypes();
if (reqs != null) {
Iterator argItr = args.iterator(), reqItr = reqs.iterator();
while (argItr.hasNext() && reqItr.hasNext())
if (!((Class)reqItr.next()).isInstance(argItr.next()))
return false;
if (argItr.hasNext() || reqItr.hasNext())
return false;
}
return true;
}
COM: <s> returns true if the list of args matches the current command </s>
|
funcom_train/46732802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStateRef(DisplayModel stateRef) {
if (Converter.isDifferent(this.stateRef, stateRef)) {
DisplayModel oldstateRef= new DisplayModel(this, 79394);
oldstateRef.copyAllFrom(this.stateRef);
this.stateRef.copyAllFrom(stateRef);
setModified("stateRef");
firePropertyChange(String.valueOf(INTERFACEMESSAGES_STATEREFID), oldstateRef, stateRef);
}
}
COM: <s> state of this transaction foreign key to referece interface transaction state </s>
|
funcom_train/3099523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addJobSet (String commandName, List jobSet) {
List jobSets = (List) jobDictionary.get(commandName);
if (jobSets == null)
jobSets = new ArrayList();
jobSets.add(jobSet);
jobDictionary.put(commandName, jobSets);
}
COM: <s> adds a job set that accomplishes the given command name </s>
|
funcom_train/9758592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showMatchingCharacters() {
if (fMatchingCharacterPainter == null) {
if (fSourceViewer instanceof ITextViewerExtension2) {
fMatchingCharacterPainter= new MatchingCharacterPainter(fSourceViewer, fCharacterPairMatcher);
fMatchingCharacterPainter.setColor(getColor(fMatchingCharacterPainterColorKey));
ITextViewerExtension2 extension= (ITextViewerExtension2) fSourceViewer;
extension.addPainter(fMatchingCharacterPainter);
}
}
}
COM: <s> enables showing of matching characters </s>
|
funcom_train/44138101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onObjectSelected(OSMSlideEditorEvent e) {
OSMElement elt = e.getElement();
if(elt != null) {
if((elt != m_Document.getTitleElement()) && (elt != m_Document.getSummaryTitleElement()))
centerOnComponent(elt.getComponent());
selectNewComponent(elt.getComponent(), e.getSource());
}
}
COM: <s> action to do when a component is selected in the slide frame </s>
|
funcom_train/36194652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void orderBy(final String target, final boolean desc) {
if (this.targets == null || !this.targets.contains(target)) {
throw new IllegalArgumentException("Cannot group by variable '"
+ target + "' since it is not in the target list "
+ targets);
}
this.ordering = target;
if (desc) {
this.orderingDirection = "DESC";
} else {
this.orderingDirection = "ASC";
}
}
COM: <s> force an order on the results </s>
|
funcom_train/23403937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doGenerate(Monitor monitor) throws IOException {
if (!targetFolder.exists()) {
targetFolder.mkdirs();
}
for (int i = 0; i < TEMPLATE_NAMES.length; i++) {
AcceleoService.doGenerate(module, TEMPLATE_NAMES[i], model, arguments, targetFolder, false, monitor);
}
}
COM: <s> launches the generation </s>
|
funcom_train/9489428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public GeoPoint3D Point3D(String label, double x, double y, double z) {
GeoPoint3D p = new GeoPoint3D(cons);
p.setCoords(x, y, z, 1.0);
p.setLabel(label); // invokes add()
// p.setObjColor(ConstructionDefaults.colPoint);
return p;
}
COM: <s> point3 d label with cartesian coordinates x y z </s>
|
funcom_train/25457530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getCBSelectReserves() {
if (CBSelectReserves == null) {
CBSelectReserves = new JCheckBox();
CBSelectReserves.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent e)
{
blnSelectReserves = CBSelectReserves.isSelected();
parentPane.addOrRemovePanel(blnSelectReserves, "rs");
}
});
}
return CBSelectReserves;
}
COM: <s> this method initializes cbselect reserves </s>
|
funcom_train/28544629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void trimSpaceTokens(List<Annotation> annList) {
if (!annList.isEmpty()) {
while (annList.get(0).getType().equals(
RabbitAnnotation.GATE_SPACETOKEN.getName())) {
annList.remove(0);
}
while (annList.get(annList.size() - 1).getType().equals(
RabbitAnnotation.GATE_SPACETOKEN.getName())) {
annList.remove(annList.size() - 1);
}
}
}
COM: <s> trims all leading and ending space tokens </s>
|
funcom_train/31359786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void readDescription(){
String desc = getResourceString("desc");
if (desc == null) desc = "[(OBJECTID)$(OBJECTID)][(MODULEID)$(MODULEID)] '$(NAME)' $(STATUS)[(PORT) on port $(PORT)].";
desc = parseDescription(desc, table);
if (desc != null) description = desc; else description = "";
fireModelChanged(DESCRIPTION);
}
COM: <s> parses the description of the object </s>
|
funcom_train/7505325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Class findDaoInterface(Class persistentClass, List<Class> daoInterfaces) {
Class result = null;
for (Class dao : daoInterfaces) {
Dao daoAnnotation = (Dao)dao.getAnnotation(Dao.class);
if (daoAnnotation != null) {
if (daoAnnotation.entity().getName().equals(persistentClass.getName())) {
result = dao;
break;
}
}
}
return result;
}
COM: <s> find the defined dao interface for the persistent class </s>
|
funcom_train/46793913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Iterator objects() {
return new Iterator() {
int i = 1;
public boolean hasNext() {
return i < getXRefSection().getSize();
}
public Object next() {
if (!hasNext()) {
throw new NoSuchElementException(""); //$NON-NLS-1$
}
COSObjectKey key = new COSObjectKey(i++, 0);
return getObjectReference(key);
}
public void remove() {
throw new UnsupportedOperationException("remove not supported"); //$NON-NLS-1$
}
};
}
COM: <s> an iterator on the indirect objects of the storage layer document </s>
|
funcom_train/21084984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInOut() {
Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
outputWidth = (int) d.getWidth();
outputHeight = (int) d.getHeight();
inputWidth = signal.getSignalSource().getMaxWidth();
inputHeight = signal.getSignalSource().getMaxHeight();
inOutX = inputWidth / (double) outputWidth;
inOutY = inputHeight / (double) outputHeight;
}
COM: <s> sets some variables regarding input and output dimensions and in out ratio </s>
|
funcom_train/43245340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetECTwoStreetAddr2() {
System.out.println("getECTwoStreetAddr2");
EmergencyContactDG4Object instance = new EmergencyContactDG4Object();
String expResult = "";
String result = instance.getECTwoStreetAddr2();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get ectwo street addr2 method of class org </s>
|
funcom_train/33727717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyModified() {
if (updateCounter > 0) {
// we're inside a beginUpdate...endUpdate block
return;
}
if (modified) {
// The client sent at least one update -> increase version of SO
updateVersion();
lastModified = System.currentTimeMillis();
}
if (modified && storage != null) {
if (!storage.save(this)) {
log.error("Could not store shared object.");
}
}
sendUpdates();
updateHashes();
}
COM: <s> send notification about modification of so </s>
|
funcom_train/14171773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMemoryLeak() throws Exception {
long differenceMemoryCache = thrashCache();
// sun.management.ManagementFactory.getDiagnosticMXBean().dumpHeap(getName()+".hprof", false);
assertTrue("Memory difference greater than 512K was " + differenceMemoryCache, differenceMemoryCache < 512 * 1024);
}
COM: <s> multi thread read put and remove all test </s>
|
funcom_train/11744673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long position(final String searchstr, long start) throws SQLException {
if (searchstr == null || start > Integer.MAX_VALUE) {
return -1;
}
final String ldata = data;
final int pos = ldata.indexOf(searchstr, (int) --start);
return (pos < 0) ? -1 : pos + 1;
}
COM: <s> retrieves the character position at which the specified substring </s>
|
funcom_train/2273260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasVariable(String name, String teamId) {
String prefix;
if (teamId == null || teamId.length() == 0) {
prefix = "";
} else {
prefix = teamId + "_";
}
if (idList.contains(prefix + name)) {
return true;
}
return idList.contains(name);
}
COM: <s> has variable with specified name and team id </s>
|
funcom_train/29656834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object newBean(DocumentPath path, BeanPath beanPath) {
if ( path.getElementCount() == 1 ) {
return copyBean(rootBean);
}
else {
Element element = path.peekElement();
return newBean(element.getJavaName(), beanPath.peek(), new Object[0], new Class[0]);
}
}
COM: <s> instantates a bean by matching the element name against the bean patterns </s>
|
funcom_train/29022213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadDefaultData() {
String dir = System.getProperty("speciesData");
if(dir==null)return;
if (!loadData(FileHelper.readDataLines(dir+"/watershedSegments.txt"))) {
System.out.println("Unable to load watershed segments file ");
}
}
COM: <s> load in default chemical species weights </s>
|
funcom_train/18288155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setPreferencesFromControls() {
IPreferenceStore store = getPreferenceStore();
for (int i = 0; i < preverificationRadios.length; i++) {
if (preverificationRadios[i].getSelection()) {
store.setValue(
IEclipseMECoreConstants.PREF_PREVERIFY_CONFIG_LOCATION,
CONFIG_FILE_LOCATIONS[i]);
break;
}
}
int index = configCombo.getSelectionIndex();
store.setValue(
IEclipseMECoreConstants.PREF_PREVERIFY_CONFIG_VALUE,
configSpecs[index].getIdentifier());
}
COM: <s> set the state of the preferences based on the controls </s>
|
funcom_train/29272061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void populatePanel(AbstractQuery selectedQuery) {
for (Method method : selectedQuery.getClass().getMethods()) {
if (method.isAnnotationPresent(GetProperty.class)) {
GetProperty getter = method.getAnnotation(GetProperty.class);
this.createLabel(getter.value());
String value = this.getValue(selectedQuery, method);
Text field = this.createTextField(value);
field.addModifyListener(this);
fieldMap.put(getter.value(), field);
}
}
}
COM: <s> populates this composite via reflection using the get property annotation </s>
|
funcom_train/17965123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLabelFont(Font font) {
// check arguments...
if (font == null) {
throw new IllegalArgumentException("Null 'font' not allowed.");
}
// make the change...
if (!this.labelFont.equals(font)) {
this.labelFont = font;
notifyListeners(new PlotChangeEvent(this));
}
}
COM: <s> sets the label font </s>
|
funcom_train/3787328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer result = new StringBuffer();
result.append("FileSelectionMode[");
result.append("id=").append(getId());
result.append(", ");
result.append("name=").append(getName());
result.append("]");
return result.toString();
}
COM: <s> returns a string description of this code file selection mode code </s>
|
funcom_train/51533450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public class DefaultListItemBinder implements ListItemBinder {
/**
* @param itemValue - the item value to transfer to the SVG element.
* @param itemElement - the item element where the item value is
* displayed.
*/
public void bindItem(Object itemValue, SVGElement itemElement) {
itemElement.setTrait("#text", itemValue.toString());
}
}
COM: <s> default list item binder </s>
|
funcom_train/33281906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize(final Window window) {
window_ = window;
if (window_ != null && window_.getWebWindow().getEnclosedPage() != null) {
jsxSet_hash(window_.getWebWindow().getEnclosedPage().getWebResponse().getWebRequest().getUrl().getRef());
}
}
COM: <s> initializes the object </s>
|
funcom_train/18104264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setupViewport() {
// setup the default viewport, the size of the Display
if (viewport == null) {
viewport = new int[4];
}
viewport[X] =
viewport[Y] = 0;
viewport[WIDTH] = Display.WIDTH;
viewport[HEIGHT] = (fullScreenMode)
? Display.HEIGHT
: Display.ADORNEDHEIGHT;
}
COM: <s> by default the viewport array is configured to be </s>
|
funcom_train/44715143 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeDependency(Task task) {
remove(DEPENDENCY_LIST, task);
if ( s_log.isDebugEnabled() ) {
s_log.debug("Removed dependency " + task.getID() + " for " + getID());
}
notifyRemoveDependency(task);
this.updateState();
}
COM: <s> removes a dependency from this task </s>
|
funcom_train/27900151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasSelectOption(String selectName, int index, String optionLabel) {
String[] opts = getSelectOptionValues(selectName, index);
for (int i = 0; i < opts.length; i++) {
String label = getSelectOptionLabelForValue(selectName, index, opts[i]);
if (label.equals(optionLabel)) {
return true;
}
}
return false;
}
COM: <s> return true if the nth select box contains the indicated option </s>
|
funcom_train/787800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean filterCheck(VisualItem item) {
if ( filter == null )
return true;
try {
return filter.getBoolean(item);
} catch ( Exception e ) {
Logger.getLogger(getClass().getName()).warning(
e.getMessage() + "\n" + StringLib.getStackTrace(e));
return false;
}
}
COM: <s> perform a filtering check on the input item </s>
|
funcom_train/12804540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startElement(String name, Map attributes) {
Property newNode = new Property(name);
if (valueFromAttribute) {
newNode.setValue((String)attributes.get(VALUE_ATTRIBUTE));
}
if (rootNode == null) {
rootNode = newNode;
}
else {
currentNode.addChild(newNode);
parents.push(currentNode);
}
currentNode = newNode;
}
COM: <s> this method is called when the parser encounters a starting element tag </s>
|
funcom_train/25915983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void viewSavedImage(Uri uri) {
Log.i(TAG, "viewSavedImage(" + uri + ")...");
if (uri == null) {
Log.w(TAG, "viewSavedImage: null uri!");
return;
}
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
Log.i(TAG, "- running startActivity... Intent = " + intent);
startActivity(intent);
}
COM: <s> goes to the pictures app for the specified uri </s>
|
funcom_train/25148468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MsxAppointment convertToAppointment(Appointment a) throws Exception{
MsxAppointment msx = new MsxAppointment();
//item stuff
ConvertorUtils.copyServerItemProperties(msx, a);
//task specific stuff
msx.setAllDayEvent(a.getIsAllDayEvent());
msx.setEnd(a.getEnd());
msx.setStart(a.getStart());
msx.setLocation(a.getLocation());
StringList categories = a.getCategories();
for (String string : categories) {
msx.getCategories().add(string);
}
return msx;
}
COM: <s> convert the appointment object from exchange service to msx appointment </s>
|
funcom_train/6484411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Socket initialiseNetworkInterface(int portNumber) {
System.out.println("waiting for a network connectioin");
Socket sock = null;
try {
ServerSocket s = new ServerSocket(portNumber);
sock = s.accept();
} catch (Exception e) {
e.printStackTrace();
}
System.out.println("got a network connection");
return sock;
}
COM: <s> initialise a network command interface on a given port number </s>
|
funcom_train/49637295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write (File outputFile) throws IOException {
if (outputFile == null) {
throw new NullPointerException("outputFile argument is null");
}
if (outputFile.isDirectory()) {
outputFile = new File (outputFile, getFilename());
}
log.trace ("Writing spec to file: " + outputFile);
write (new FileOutputStream(outputFile));
}
COM: <s> write the bundle spec to a file any existing file will be overwritten </s>
|
funcom_train/2884666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean put(Object key, Object entry) {
if( map.containsKey(key) ) {
Set s = (Set)map.get(key);
s.add(entry);
return true;
} else {
Set s = new HashSet();
s.add(entry);
map.put(key, s);
return false;
}
}
COM: <s> add an association between a key and an entry to the map </s>
|
funcom_train/8275259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long fileAttachmentLength(com.velocityme.interfaces.FileAttachmentLocal p_fileAttachmentLocal) throws FileNotFoundException, IOException {
if (p_fileAttachmentLocal.getLength().longValue() != -1)
return p_fileAttachmentLocal.getLength().longValue();
// this is provided for backward compatability!
File file = p_fileAttachmentLocal.getFile();
return file.length();
}
COM: <s> get the length of the attachment to write </s>
|
funcom_train/44852128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String createPassword() {
Random randomGenerator = new Random();
int numSaltChars = saltChars.length;
StringBuffer outPassword = new StringBuffer();
for (int i = 0; i < 6; i++)
outPassword.append(saltChars[Math.abs(randomGenerator.nextInt()) % numSaltChars]);
return new String(outPassword);
}
COM: <s> creates a new password </s>
|
funcom_train/22493204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addSubcommand(HistoricalCommand subcommand) {
long txnID = getTransactionId();
Assertions.assertNotNull("historical-command-subcommand", subcommand);
Assertions.assertEqual("history-subcommand-transaction-id", txnID, subcommand.getTransactionId());
return subCommands.add(subcommand);
}
COM: <s> add sub command to this command context </s>
|
funcom_train/5374547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getLevel (int offset) {
checkLayout();
/*
computeRuns(null);
int length = text.length();
if (!(0 <= offset && offset <= length)) SWT.error(SWT.ERROR_INVALID_RANGE);
offset = translateOffset(offset);
for (int i=1; i<allRuns.length; i++) {
if (allRuns[i].start > offset) {
return allRuns[i - 1].analysis.s.uBidiLevel;
}
}
*/
return (orientation & SWT.RIGHT_TO_LEFT) != 0 ? 1 : 0;
}
COM: <s> returns the embedding level for the specified character offset </s>
|
funcom_train/928128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeListenerFrom(BookmarkDirectory bmd) {
//bmd.removeListener(this);
for (Iterator iterator = bmd.getBookmarkDirectorys().iterator(); iterator.hasNext();) {
BookmarkDirectory aBmd = (BookmarkDirectory) iterator.next();
removeListenerFrom(aBmd);
}
}
COM: <s> because the domain model does not have a richer </s>
|
funcom_train/6518307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Point getArrowCenter(int direction) {
Point c = getLocation();
switch (direction) {
case NORTH:
case SOUTH:
c.translate(getSize().width / 2, getSize().height / 2);
case EAST:
c.translate(getSize().width, getSize().height / 2);
case WEST:
c.translate(0, getSize().height / 2);
}
return c;
}
COM: <s> where the center of the arrow is </s>
|
funcom_train/4149108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String remove(String expression) {
if (expression == null || expression.length() == 0) {
return null;
}
String property = next(expression);
if (expression.length() == property.length()) {
return null;
}
int start = property.length();
if (expression.charAt(start) == NESTED) {
start++;
}
return expression.substring(start);
}
COM: <s> remove the last property expresson from the </s>
|
funcom_train/51573217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getMatchIndex(final MatchResult mr) {
final int groupCount = mr.groupCount();
for (int i = 1; i <= groupCount; ++i) {
if (mr.group(i) != null) {
return i;
}
}
throw new AssertionError("no match index");
}
COM: <s> produces the index 1 indexed of the first matching capturing </s>
|
funcom_train/51189370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJCloseButton() {
if (jResetButton == null) {
jResetButton = new JButton();
jResetButton.setText("New game");
jResetButton.setSize(new Dimension(110, 25));
jResetButton.setLocation(new Point(3, 3));
jResetButton.addActionListener(new ResetBtnHandler());
}
return jResetButton;
}
COM: <s> this method initializes j reset button </s>
|
funcom_train/31085420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LocalVariableTypeTable getLocalVariableTypeTable(boolean add) {
LocalVariableTypeTable attr = (LocalVariableTypeTable) getAttribute
(Constants.ATTR_LOCAL_TYPES);
if (!add || (attr != null))
return attr;
return (LocalVariableTypeTable)addAttribute(Constants.ATTR_LOCAL_TYPES);
}
COM: <s> return local variable generics information for the code </s>
|
funcom_train/33282347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String jsxGet_htmlText() {
final org.w3c.dom.Node node = range_.getCommonAncestorContainer();
final HTMLElement element = (HTMLElement) getScriptableFor(node);
return element.jsxGet_outerHTML(); // TODO: not quite right, but good enough for now
}
COM: <s> retrieves the html fragment contained within the range </s>
|
funcom_train/1777761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void compose(Beat beat) {
GuitarSound guitar = beat.getGuitar();
int count = beat.getCount();
if (count == 0)
count = 1;
if (guitar == GuitarSound.NULL) {
// use the sound specified in the tuning
Tab tab = Util.getContainerOfType(beat, Tab.class);
guitar = tab.getGuitar();
}
while (count > 0) {
for (Tone tone : beat.getNotes()) {
compose(tone, guitar);
}
count--;
}
}
COM: <s> plays a beat </s>
|
funcom_train/5447016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object other) {
if (other == null) return false;
if (this == other) return true;
if (!(other instanceof Pair)) return false;
Pair p = (Pair)other;
return (((a != null) ? a.equals(p.getA()) : p.getA() == null)
&& ((b != null) ? b.equals(p.getB()) : p.getB() == null));
}
COM: <s> compares this pair with another pair for equality </s>
|
funcom_train/26016388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SIPServerTransaction findPendingTransaction(SIPRequest requestReceived) {
if (this.stackLogger.isLoggingEnabled()) {
this.stackLogger.logDebug("looking for pending tx for :"
+ requestReceived.getTransactionId());
}
return (SIPServerTransaction) pendingTransactions.get(requestReceived.getTransactionId());
}
COM: <s> finds a pending server transaction </s>
|
funcom_train/48390073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDisabled(boolean disabled) {
if(tabSet == null || !tabSet.isDrawn()) {
setAttribute("disabled", disabled);
} else {
if(disabled) {
tabSet.disableTab(getID());
} else {
tabSet.enableTab(getID());
}
}
}
COM: <s> if specified this tab will initially be rendered in a disabled state </s>
|
funcom_train/43410812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RespostaString removeDestinatariosPorLista(String lg, String listaID, List<String> siglasDestinatarios) {
EntidadesService entidades = new EntidadesService(lg);
entidades.getConnectionDB();
RespostaString result = null;
result = entidades.removeDestinatariosPorLista(listaID, siglasDestinatarios);
entidades.closeConnectionDB();
return result;
}
COM: <s> deletes selected entities from a personalized list </s>
|
funcom_train/1749078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUrlHome(String p_URL) {
try {
urlHome = new URL(p_URL);
} catch (MalformedURLException mu) { // new URL() failed
error = "MalformedURLException in creating url was " + mu.getMessage();
urlHome = null;
} catch(Exception e) {
error = "Exception in creating url was " + e.getMessage();
urlHome = null;
}
}
COM: <s> set the url url home </s>
|
funcom_train/32764971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private LtiDigitalFilter initLowPassFilter() {
LtiDigitalFilter fltLow = new LtiDigitalFilter( this.getDataSize() );
fltLow.setInputCoefficients(ProfileDataProcessor.ARR_DBL_LOWPASS_INP_COEFFS);
fltLow.setOutputCoefficients(ProfileDataProcessor.ARR_DBL_LOWPASS_OUT_COEFFS);
return fltLow;
}
COM: <s> initializes the low pass filter and returns it </s>
|
funcom_train/29624333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Point3f getLocationByIndex(int xIndex, int yIndex) {
float x = -(gridBase / 2.0f - 0.5f) * gridLen + yIndex * gridLen;
float y = (gridBase / 2.0f - 0.5f) * gridLen - xIndex * gridLen;
return new Point3f(x, y, 0.0f);
}
COM: <s> get the current location of the ball </s>
|
funcom_train/3296103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int readShort(DataInputStream in) throws IOException {
int result = in.readShort();
if (byteOrder == BYTE_ORDER_INTEL) {
int r1 = (result >> 8) & 0xff;
int r2= result & 0xff;
return r1 | (r2 << 8);
} else {
return result;
}
}
COM: <s> reads a 16 bit signed integer value regarding the current byte order </s>
|
funcom_train/31912006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension2D getViewportSize() {
if (EventQueue.isDispatchThread()) {
return userAgent.getViewportSize();
} else {
class Query implements Runnable {
Dimension2D result;
public void run() {
result = userAgent.getViewportSize();
}
}
Query q = new Query();
invokeAndWait(q);
return q.result;
}
}
COM: <s> returns the default size of the viewport </s>
|
funcom_train/24311214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initAll() {
name = null;
id = null;
referenceId = null;
accountId = null;
shortDescription = null;
longDescription = null;
flvUrl = null;
creationDate = null;
publishedDate = null;
lastModifiedDate = null;
startDate = null;
endDate = null;
linkUrl = null;
linkText = null;
videoStillUrl = null;
thumbnailUrl = null;
length = null;
geoFiltered = null;
geoFilteredExclude = null;
playsTotal = null;
playsTrailingWeek = null;
releaseDate = null;
renditions = null;
videoFullLength = null;
itemState = null;
tags = null;
economics = null;
geoFilteredCountries = null;
cuePoints = null;
customFields = null;
}
COM: <s> p fully initializes the video object by setting all fields to null p </s>
|
funcom_train/51060973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CacheablePinned reserve(int sizeOfBlock) {
// see if sizeOfblock fits in cache
synchronized(BYTES_FREE) {
if (sizeOfBlock <= BYTES_FREE.intValue()) {
BYTES_FREE.dec(sizeOfBlock);
}
else return null;
}
return placePin(null, sizeOfBlock);
}
COM: <s> reserve x bytes in the cache if there is room in the cache </s>
|
funcom_train/17415823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public Log makeNewLogInstance(String name) {
Log log = null;
try {
Object[] args = new Object[1];
args[0] = name;
log = (Log) (logImplctor.newInstance(args));
} catch (Throwable t) {
log = null;
}
if (null == log) {
}
return log;
}
COM: <s> create a new </s>
|
funcom_train/50878662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initPanel(){
setTitle("Select Color");
JPanel tempPanel = (JPanel) getContentPane();
tempPanel.setLayout(new BorderLayout());
tempPanel.add(myColorChooser, BorderLayout.CENTER);
setSize(500,400);
resetSize();
}
COM: <s> create the gui widgets for this panel </s>
|
funcom_train/14400422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private StackTraceElement getCaller() {
StackTraceElement[] stack = (new Throwable()).getStackTrace();
for (int i = 0; i < stack.length; ++i) {
StackTraceElement frame = stack[i];
String cname = frame.getClassName();
if (!this.iTHIS_CLASS.equals(cname) && !this.iTHROWABLE.equals(cname)) { return frame; }
}
return null;
}
COM: <s> analyzes the stack trace and determines from where the </s>
|
funcom_train/50395337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initialiseSourceAndTarget(String rawsource, String rawtarget){
if(rawsource!=null){
SourceTargetType stt=SourceTargetType.Factory.newInstance();
stt.setURI(makeQualifiedURI(rawsource));
properties.put(RPSource, new SourceResourceProperty(stt));
source=rawsource;
}
else{
properties.put(RPSource, new SourceResourceProperty(null));
}
if(rawtarget!=null){
SourceTargetType stt=SourceTargetType.Factory.newInstance();
stt.setURI(makeQualifiedURI(rawtarget));
properties.put(RPTarget, new TargetResourceProperty(stt));
target=rawtarget;
}
else{
properties.put(RPTarget, new TargetResourceProperty(null));
}
}
COM: <s> setup the source and target of this transfer br </s>
|
funcom_train/48154029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset(){
super.reset();
//Random variables
x.reset();
success.reset();
//Initialize sample array
sample = new double[sampleSize];
//Graphs
estimateGraph.repaint();
successGraph.reset();
criticalGraph.setValueDrawn(false);
//Tables
sampleTable.reset();
if (sigmaKnown) recordTable.setVariableNames(new String[]{"Run", "L", "R", "Z", "I"});
else recordTable.setVariableNames(new String[]{"Run", "L", "R", "T", "I"});
successTable.reset();
}
COM: <s> this method resets the experiment including the sampling variable standard score variable </s>
|
funcom_train/3926100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isCompatible( int type ) {
return( false );
// if ( type == chiselType ) {
// return( false );
// } else if (( chiselType == ChiselDescriptor.ALLNODE_CHISEL ) && ( type > ChiselDescriptor.ALLNODE_CHISEL )) {
// return( false );
// } else {
// return( true );
// }
}
COM: <s> this no longer used but should probably be re introduced </s>
|
funcom_train/3583624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUserDatum(Object key, Object value, CopyAction shared) {
// removeUserDatum(key);
// addUserDatum(key, value, shared);
// getKeyMap(key).put(getObjectKey(), new Pair(value, shared));
getKeyMap(key).put(this, new Pair(value, shared));
// getStorage().put(key, new Pair(value, shared));
}
COM: <s> changes the user level information to the object </s>
|
funcom_train/9523124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getClasses(String[] paths) {
Vector<String> v_cls = new Vector<String>();
for (String p : paths) {
//System.out.println(p);
v_cls.addAll(SourceLocator.v().getClassesUnder(p));
}
SootClass cl;
for (String c : v_cls) {
//System.out.println(c);
cl = Scene.v().loadClass(c, SootClass.BODIES);
cl.setApplicationClass();
classes.add(cl);
}
Scene.v().loadDynamicClasses();
this.buildCallGraph();
}
COM: <s> gets classes under the given path </s>
|
funcom_train/29936319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public void layoutNodes() {
GraphLayout layout = layoutAlg.layoutNodes(this);
if(layout == null)
return;
Dimension size = layout.getSize();
setPreferredSize(size);
setMinimumSize(size);
setSize(size);
edgePanel.setPreferredSize(size);
edgePanel.setMinimumSize(size);
edgePanel.setSize(size);
repaint();
}
COM: <s> lays out the nodes in the graph </s>
|
funcom_train/9286048 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int appendBytes(byte b[], int offset, int pos, int length) {
if (SanityManager.DEBUG){
SanityManager.ASSERT(freeSize() >= length,
"byte[] is to big to fit"+
" into this buffer");
SanityManager.ASSERT(b != null, "Cannot append null to buffer");
}
System.arraycopy(b, offset, bufferdata, pos, length);
return pos + length;
}
COM: <s> append a byte to this log buffer element </s>
|
funcom_train/37593236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testXMLConfigException() throws Exception{
XMLConfig.XMLConfigException e1 = new XMLConfig.XMLConfigException();
XMLConfig.XMLConfigException e2 = new XMLConfig.XMLConfigException("dummy message", null);
XMLConfig.XMLConfigException e3 = new XMLConfig.XMLConfigException((Throwable)null);
}
COM: <s> test that construction of xmlconfig exceptions will succeed </s>
|
funcom_train/12541144 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private RGB getColorPreference(IPreferenceStore store, AnnotationPreference pref) {
RGB rgb= null;
if (store.contains(pref.getColorPreferenceKey())) {
if (store.isDefault(pref.getColorPreferenceKey()))
rgb= pref.getColorPreferenceValue();
else
rgb= PreferenceConverter.getColor(store, pref.getColorPreferenceKey());
}
if (rgb == null)
rgb= pref.getColorPreferenceValue();
return rgb;
}
COM: <s> extracts the color preference for the given preference from the given store </s>
|
funcom_train/50504853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ViewType getViewType() {
EJBMethodSettings methodInfo = (EJBMethodSettings) this.getProperty().getGetterMethod().getSettings(EJBMethodSettings.class);
if(methodInfo != null) {
return methodInfo.getViewType();
}
else {
return ViewType.UNKNOWN;
}
}
COM: <s> gets the view type attribute of the ejbproperty descriptor object </s>
|
funcom_train/3836544 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonSelect() {
if (jButtonSelect == null) {
jButtonSelect = new JButton();
jButtonSelect.setText("Select");
jButtonSelect
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
handleMode = UserEvent.WhanTo_SELECT;
}
});
}
return jButtonSelect;
}
COM: <s> this method initializes j button select </s>
|
funcom_train/23267842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetEmail() {
System.out.println("setEmail");
String email = "";
Cliente instance = new Cliente();
instance.setEmail(email);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set email method of class capa negocios </s>
|
funcom_train/25203554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getLigature(int[] glyphIds) {
for (int i = 0; i < ligatureCount; i++) {
Ligature lig = ligatures[i];
if (lig != null) {
boolean found =
checkComponents(lig.getGlyphCount(), lig
.getComponents(), glyphIds);
if (found) {
return lig.getLigGlyph();
}
}
}
return -1;
}
COM: <s> returns the ligature glyph id or 1 if not found </s>
|
funcom_train/17178517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getModificationsFile() {
File result = new File(MODIFICATION_FILE);
if (!result.exists()) {
JOptionPane.showMessageDialog(null, MODIFICATION_FILE + " not found.", "Modification File Error", JOptionPane.ERROR_MESSAGE);
}
return result;
}
COM: <s> returns the modifications file </s>
|
funcom_train/128272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void exportProperties(Entity entity, BaseBook book, XMLOutputStream xos) throws HibernateException, IOException {
ClassMetadata meta = factory.getClassMetadata(entity.getClass());
String[] propNames = meta.getPropertyNames();
Object[] propValues = meta.getPropertyValues(entity);
Type[] propTypes = meta.getPropertyTypes();
exportProperties(entity, book, xos, propNames, propValues, propTypes);
}
COM: <s> export the properties of an entity into the current tag </s>
|
funcom_train/17094749 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVisible(boolean visible) {
if ((isEnabled() == false) && (visible == true)) {
throw new RuntimeException("Disabled modules may not be made visible");
}
try {
getView().setVisible(visible);
} catch (HeadlessException ex) {
/* do nothing */
}
viewVisible = visible;
}
COM: <s> sets the visibility state </s>
|
funcom_train/22563164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String doSelectNextAction() {
if (plan != null) {
try {
ICursor nextActionCursor;
nextActionCursor = plan.getNextLearningAction();
if (nextActionCursor != null) {
// make sure user is subscribed to all parents of the next learning action
nextActionCursor.subScribe();
// make this the current cursor for this plan
plan.setCursor(nextActionCursor);
this.cursor = nextActionCursor;
}
} catch (Exception e) {
PortletUtils.handleError(LOG, e);
}
}
return null;
}
COM: <s> selects the next available learning action a user has to perform </s>
|
funcom_train/9114290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String didYouMean(String token) throws MailException {
try {
String repositoryName = context.getCallerPrincipal().getName();
return manager.didYouMean(repositoryName, token);
} catch (Exception e) {
if (e instanceof MailException) {
throw (MailException) e;
}
throw new MailException(e);
} finally {
}
}
COM: <s> did you mean </s>
|
funcom_train/39380908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsDisabled() {
// Fieldset is not disabled.
assertFalse(this.fieldSet.isDisabled());
// Textfield inside is not disabled.
assertFalse(this.trackField.isDisabled());
// Change fieldset state.
this.fieldSet.setDisabled(true);
// Textfield is now disabled too.
assertTrue(this.trackField.isDisabled());
}
COM: <s> test the is disabled for a child component </s>
|
funcom_train/26266989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void signalError(final Exception e) {
// only react to the first error, the others presumably are inherited errors
if (error == null) {
// set the error field to let go() throw the exception
error = e;
// terminate the network's components
for (Component comp : getComponents().values()) {
comp.terminate(StatusValues.ERROR);
}
}
}
COM: <s> handles errors in the network </s>
|
funcom_train/38325985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer buf = new StringBuffer();
for (int idx = 0; idx < this.binds.length; idx++) {
if (idx > 0) {
buf.append(" && ");
}
buf.append(this.binds[idx].toBindString());
}
return buf.toString();
}
COM: <s> basic implementation will return string format of the beta node </s>
|
funcom_train/49996084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCommitData() {
StringBuffer buff = new StringBuffer();
for (Map.Entry<String, String> entry : user2commit.entrySet()) {
buff.append(String.format("%s(%s) ", entry.getKey(), entry.getValue()));
}
return buff.toString();
}
COM: <s> returns a string listing each project member with their commit and churn totals </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.