__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/32074973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element writeModel() throws Exception {
Element root = new Element("memm");
for(String prev : gmByPrev.keySet()) {
Element maxent = new Element("maxent");
maxent.addAttribute(new Attribute("prev", prev));
StringGISModelWriter sgmw = new StringGISModelWriter(gmByPrev.get(prev));
sgmw.persist();
maxent.appendChild(sgmw.toString());
root.appendChild(maxent);
}
if(rescorer != null) {
root.appendChild(rescorer.writeElement());
}
return root;
}
COM: <s> produces an xml element containing the current memm model </s>
|
funcom_train/49050426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setShowNotes(boolean showNotesValue) {
ObjectFactory oFactory = new ObjectFactory();
ShowNotesElementType showNotes = (ShowNotesElementType)
JAXBPath.createJaxbObject(oFactory, SHOW_NOTES_PATH + "+", acclip);
showNotes.setValue(showNotesValue);
}
COM: <s> set the users quot show notes quot preference value </s>
|
funcom_train/31079845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMethodDeclarerName() {
if (_index == 0)
return null;
ComplexEntry entry = (ComplexEntry) getPool().getEntry(_index);
String name = getProject().getNameCache().getExternalForm
(entry.getClassEntry().getNameEntry().getValue(), false);
if (name.length() == 0)
return null;
return name;
}
COM: <s> return the declaring type of the method this instruction operates on </s>
|
funcom_train/36110941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Instance createInstance(Minable minable, Attribute contentAtt, Attribute classAtt) {
Instance instance = new Instance(classAtt == null ? 1 : 2);
instance.setValue(contentAtt, getMinableContent(minable));
if (classAtt != null) {
String classId = minable.getClassId();
if (classId != null) {
instance.setValue(classAtt, classId);
}
}
return instance;
}
COM: <s> creates a single content or content class </s>
|
funcom_train/43605751 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection peers() {
Collection c = new ArrayList();
for (Iterator i = peerMap.values().iterator(); i.hasNext(); ) {
Map m = (Map) i.next();
for (Iterator j = m.values().iterator(); j.hasNext(); ) {
c.add(j.next());
}
}
return c;
}
COM: <s> return a collection of all code peer code s in this flow graph </s>
|
funcom_train/43997396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDate(long transaction_id, Date date) throws DAOException{
//lookup the tranaction
try {
org.mybeans.factory.Transaction.begin();
Transaction t = this.lookup(transaction_id);
if(t == null)
throw new DAOException("No such transaction.");
if(t.getExecute_date() == "")
throw new DAOException("This transaction has already been executed.");
t.setExecute_date(date.toString());
org.mybeans.factory.Transaction.commit();
} catch (RollbackException e) {
throw new DAOException(e);
}
}
COM: <s> this method is to set the execute date of the given transaction </s>
|
funcom_train/22654807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File getFile(){
String rootDir = System.getProperty("java.io.tmpdir") + InsightConstants.ROOT_CACHE_DIR;
createDir(rootDir);
String pageSetDir = rootDir + getPageSetNamespace();
createDir(pageSetDir);
String fileName = getPageNamespace() + InsightConstants.FILE_EXT;
String fullyQualFileName = pageSetDir + InsightConstants.FILE_SEPARATOR + fileName;
File file = new File(fullyQualFileName);
return file;
}
COM: <s> returns the file </s>
|
funcom_train/20898115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parseRefNum(){
MatchResult res = null;
String tempo;
if(matcher.contains(input, patterns.getRefNumPattern())){
res = matcher.getMatch();
tempo = res.group(1);
try {
refNum = Integer.parseInt(tempo);
} catch (NumberFormatException nfe){
refNum = 0;
}
}
input.setCurrentOffset(input.getBeginOffset());
}
COM: <s> the code parse ref num code method here </s>
|
funcom_train/51556710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testModuleImport() throws Exception {
echo("Testing testModuleImport");
String moduleName = getThisProjectsModuleName();
assertTrue("Module '" + moduleName + "' was not imported!", hasModule(moduleName));
assertEquals("A simple Example for the INFONOVA OpenCms XML Template", getThisProjectsModuleDescription());
}
COM: <s> p simple test if the module at </s>
|
funcom_train/10366286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeKeystorePassword(char[] storePassword, char[] newPassword) throws KeystoreException {
ensureLoaded(storePassword);
saveKeystore(newPassword);
log.info("Password changed for keystore "+keystoreName);
openPassword = newPassword;
if(!isKeystoreLocked()) {
unlockKeystore(newPassword);
}
}
COM: <s> changes the keystore password </s>
|
funcom_train/42994580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateCurrentEvents() {
events = calendar.getEvents(Period.parse(getCurrentYear() + "." + getCurrentMonth() + ".1:00.00-" + getCurrentYear() +
"." + getCurrentMonth() + "." + curMonths[getCurrentMonth()-1] + ":24.00"));
}
COM: <s> updates the current events </s>
|
funcom_train/9453656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void tearDown() {
TestEnvironment.reset();
if (notExist.exists()) {
notExist.delete();
}
if (fileWithContent.exists()) {
fileWithContent.delete();
}
if (readOnly.exists()) {
readOnly.delete();
}
if (secret.exists()) {
secret.delete();
}
TimeZone.setDefault(defaultTimeZone);
}
COM: <s> delete the resource files if they exist </s>
|
funcom_train/28146376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRelink(MethodHandle relink) {
if(relink == null) {
throw new IllegalArgumentException("relink == null");
}
if(this.relink != null) {
throw new IllegalStateException("this.relink already set");
}
this.relink = relink;
// Set it as the initial target
setTarget(relink);
}
COM: <s> sets the relink method </s>
|
funcom_train/13955404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object contents(NSArray<?> array, String keypath) {
if(array != null && array.count() > 0 && keypath != null && keypath.length() > 0) {
return NSKeyValueCodingAdditions.Utility.valueForKeyPath(array, keypath);
}
return array;
}
COM: <s> rather than iterating through the array argument calling </s>
|
funcom_train/42975560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Controller getInputController(){
Controller controller = null;
Controller[] controllers = ControllerEnvironment.getDefaultEnvironment().getControllers();
for(int i = 0; i < controllers.length; i++){
/*
* This may need to be changed if another controller is used
*/
if(controllers[i].getType() == Controller.Type.STICK){
controller = controllers[i];
}
}
return controller;
}
COM: <s> gets an instance of a hid game controller </s>
|
funcom_train/5374620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rectangle union (Rectangle rect) {
if (rect == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
int left = x < rect.x ? x : rect.x;
int top = y < rect.y ? y : rect.y;
int lhs = x + width;
int rhs = rect.x + rect.width;
int right = lhs > rhs ? lhs : rhs;
lhs = y + height;
rhs = rect.y + rect.height;
int bottom = lhs > rhs ? lhs : rhs;
return new Rectangle (left, top, right - left, bottom - top);
}
COM: <s> returns a new rectangle which represents the union of </s>
|
funcom_train/33745534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void zoom(float factor) {
float newWidth = Math.max(0, mView.width * factor);
float newHeight = Math.max(0, mView.height * factor);
float dw = newWidth - mView.width;
float dh = newHeight - mView.height;
mView.x -= dw / 2;
mView.y += dh / 2;
mView.width = newWidth;
mView.height = newHeight;
repaint();
}
COM: <s> zoom in by increasing the width height by given factor </s>
|
funcom_train/8218071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getHelp() {
if (this.helpMessage == null) {
StringBuffer buffer = new StringBuffer(HELP_QUIT_MESSAGE);
for (WattDepotCliCommand command : commandTable.values()) {
buffer.append(command.getHelp());
}
this.helpMessage = buffer.toString();
}
return this.helpMessage;
}
COM: <s> generates helpful information </s>
|
funcom_train/20806119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPropertyValue(Object id, Object value) {
if (id.equals(LINESTYLE_PROP))
setLineStyle((Integer) value);
else if (id.equals(FreeNoteConstants.DESC_PROPERTY))
setDesc(String.valueOf(value));
else if (id.equals(FreeNoteConstants.BACKCOLOR))
setBackColor((RGB) value);
else if (id.equals(FreeNoteConstants.FORECOLOR))
setForeColor((RGB) value);
else if(id.equals(SOURCE_DECORATION_PROP))
setSourceDecoration((Integer) value);
else if(id.equals(TARGET_DECORATION_PROP))
setTargetDecoration((Integer) value);
else
super.setPropertyValue(id, value);
}
COM: <s> sets the line style based on the string provided by the property sheet </s>
|
funcom_train/42982061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeEdgeMiddleNode() {
Edge selEdge = (Edge) frame.cbEdge.getSelectedItem();
Node node = (Node) frame.cbEdgeMnRemove.getSelectedItem();
engine.removeMiddleNode(selEdge.getId(), node.getId());
fillEdgeData();
fullMap();
}
COM: <s> removes a node from the edges middle nodes list </s>
|
funcom_train/32979747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseMoved(MouseEvent e)
{ /* mouseMoved */
//if(!mae.MouseOver)
//return;
// /* Update MouseOver */
//cgC.setCurrentGene(e.getX(), e.getY(), e.getModifiers(), false);
} /* mouseMoved */
COM: <s> mouse moved process mouse event </s>
|
funcom_train/32656185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(DataOutput out) throws IOException {
out.writeShort(size);
int i = 1;
while(i < size) {
PoolEntry entry = (PoolEntry)entries.get(i);
entry.write(out);
// long and double constants occupy 2 entries of const pool
if((entry instanceof LongConst) || (entry instanceof DoubleConst)) {
i++;
}
i++;
}
}
COM: <s> writes constant pool to output stream </s>
|
funcom_train/10420210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cleanup() {
if (in != null)
try {
in.close();
} catch (Exception ignore) {
}
if (out != null)
try {
out.close();
} catch (Exception ignore) {
}
in = null;
out = null;
size = 0;
closed = true;
data = null;
nrOfMessagesProcessed = 0;
totalNrOfMessages = 0;
}
COM: <s> closes the factory its streams and sets all its references to null </s>
|
funcom_train/48703853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateSearchButtonText() {
search.setText(!increment.isSelected()
&& SearchExpressionParser.checkSyntax(
searchField.getText(),
caseSensitive.isSelected(),
regExpSearch.isSelected()) != null
? Globals.lang("Search Specified Field(s)")
: Globals.lang("Search All Fields"));
}
COM: <s> updates the text on the search button to reflect </s>
|
funcom_train/39378679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getHtmlImports() {
Context context = getContext();
String[] args = {
context.getRequest().getContextPath(),
ClickUtils.getResourceVersionIndicator(context),
getId(),
getPage().getPath(),
getAutoCompleteOptions()
};
return MessageFormat.format(HTML_IMPORTS, args);
}
COM: <s> return the html css and java script includes </s>
|
funcom_train/35562658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JsonWriter beginObject() throws IOException {
return open(JsonScope.EMPTY_OBJECT, "{");
}
/**
* Ends encoding the current object.
*
* @return this writer.
*/
public JsonWriter endObject() throws IOException {
return close(JsonScope.EMPTY_OBJECT, JsonScope.NONEMPTY_OBJECT, "}");
}
COM: <s> begins encoding a new object </s>
|
funcom_train/50464385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean dirExists(String pPath) {
//Setup File Name
String _path = pPath.replace(PATH_SEPERATOR, File.separatorChar);
File _file = new File(docDir, _path);
return (_file.exists() && _file.isDirectory());
}
COM: <s> return true if the directory exists </s>
|
funcom_train/17592442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(TrialInfo that) {
if (this == that) return 0;
int result = FindBestDomainOrder.signum(this.cost - that.cost);
if (result == 0) {
result = this.order.compareTo(that.order);
}
if(result == 0){
result = FindBestDomainOrder.signum(this.timestamp - that.timestamp);
}
return result;
}
COM: <s> comparison operator for trial info objects </s>
|
funcom_train/50894908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void add2DArrayHeader(byte typeByte, int xLength, int yLength) {
add(end, ARRAY_TYPE);
end++;
add(end, typeByte);
end++;
packer.pack((int) 2, data, end);
end += 4;
packer.pack(xLength, data, end);
end += 4;
packer.pack(yLength, data, end);
end += 4;
}
COM: <s> adds the requisite prefix information for a 2 d array i </s>
|
funcom_train/34840428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Group findGroup(String groupName) {
try {
Role role = (Role) JPAUtil.getEntityManager()
.createQuery("select aRole from Role aRole where aRole.roleName =:groupName")
.setParameter("groupName", groupName)
.getSingleResult();
return role;
} catch (NoResultException ne) {
return null;
}
}
COM: <s> find a role with a given name </s>
|
funcom_train/45486474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton10Del() {
if (jButton10Del == null) {
jButton10Del = new JButton();
jButton10Del.setBounds(new Rectangle(951, 250, 64, 26));
Font font = new Font("Serif", Font.BOLD, 16);
jButton10Del.setFont(font);
jButton10Del.setForeground(Color.red);
jButton10Del.setText("10");
}
return jButton10Del;
}
COM: <s> this method initializes j button10 del </s>
|
funcom_train/32733777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doEnterRegistrationProcess(Patient patient) {
System.out.println(this.getClass() + ": Event " + this.getEventList().getCurrentSimEvent());
// Nothing needs to be done here, except to be heard by the
// RegistrationProcess object, so the doEnterRegistrationProcess()
// event will be executed.
}
COM: <s> event method for the enter registration process event </s>
|
funcom_train/9576641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getActionBeanUrl(URL url, ServletContext context) throws UnsupportedEncodingException {
String urlString = URLDecoder.decode(url.toString(), "UTF-8");
String query = urlString.substring(0, urlString.indexOf("?"));
return query.substring(query.indexOf(context.getContextPath()) + context.getContextPath().length());
}
COM: <s> returns action bean url part of url </s>
|
funcom_train/26177090 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String escapeMessageFormat (String text) {
if (text.indexOf('{') == -1 && text.indexOf('}') == -1) {
return text;
}
return text.replaceAll("\\{", "'{'").replaceAll("\\}", "'}'");
}
COM: <s> escapes the specified text so that it can be used as input value </s>
|
funcom_train/10983166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addActionOutput(String paramName, Object value) {
if (paramName == null || paramName.length() == 0) {
throw new IllegalArgumentException("An action output name may not be null or empty.");
}
if (_actionOutputs == null) {
_actionOutputs = new HashMap();
}
_actionOutputs.put(paramName, value);
}
COM: <s> adds an action output that will be made available in the request through </s>
|
funcom_train/16668573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int computeSimilaritySpectrum(Trie tree2) {
if ((this.getNumberOfFeatures() == 0) && ((tree2.getNumberOfFeatures()) == 0)) {
return 0;
}
final TrieResultContainer r = new TrieResultContainer();
this.computeSimilaritySpectrum(0, this.root, tree2.getRoot(), r);
return r.getSimilarity();
}
COM: <s> returns the spectrum similarity of two trees </s>
|
funcom_train/44482449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addIgnored(String path) {
if (path.indexOf("*") != -1) {
String pattern = makeRegex(path);
ignoredPatterns.add(pattern);
if (defaultType != IGNORED_TYPE) {
specifiedPatterns.add(pattern);
}
}
else {
ignoredFilenames.add(new File(path));
if (defaultType != IGNORED_TYPE) {
specifiedFiles.add(path);
}
}
}
COM: <s> adds one or more files to be ignored by file generator </s>
|
funcom_train/21955566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTextAndTextInlines(String attachmentSeparator, boolean withHeaders, boolean showFullHeaders) throws MessagingException, OperationCancelledException {
return getTextAndTextInlines(attachmentSeparator, withHeaders, showFullHeaders, getMaxMessageDisplayLength(), getTruncationMessage());
}
COM: <s> gets the content and inline text content for the message </s>
|
funcom_train/25856737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getNextNamespacePrefix() {
StringBuffer buffer=new StringBuffer();
int index=m_nextAutomaticPrefix++;
do {
buffer.append((char)('a'+(index % 26)));
index=index/26;
} while (index!=0);
return buffer.toString();
}
COM: <s> returns the next new namespace prefix </s>
|
funcom_train/40338342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void containerBrowse() {
Shell shell = new Shell(Display.getDefault());
SaveAsDialog saveas = new SaveAsDialog(shell);
if (saveas.open() == SaveAsDialog.OK) {
IPath result = saveas.getResult();
file.setText(result.toOSString());
}
}
COM: <s> open a browser to select a container for a new file </s>
|
funcom_train/46056471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assessmentStopped(UserRequest ureq) {
if (assessmentCounter == 0) return;
assessmentCounter--;
if (isCollaborationEnabled()) {
// if we've reached the assessmentCounter floor, enable collab
fireEvent(ureq, COLLAB_ENABLE_EVENT);
if (InstantMessagingModule.isEnabled())
InstantMessagingModule.getAdapter().enableChat(ureq.getIdentity().getName());
}
}
COM: <s> call this if an assessment is stopped </s>
|
funcom_train/4811999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void calculateZoomConstants() {
ZOOMSTEPS = (int) ((waveformPanel.getAudioInfo().getLength() * 1000) / WaveformPanel.MIN_MILLISECONDS_PER_WIDTH);
zoomSlider.setMaximum(ZOOMSTEPS);
zoomSlider.setValue(ZOOMSTEPS/2);
waveformPanel.zoom(ZOOMSTEPS/2);
}
COM: <s> calculates the zoomconstants </s>
|
funcom_train/34340772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getCodigoCuenta() {
if (codigoCuenta == null) {//GEN-END:|23-getter|0|23-preInit
// write pre-init user code here
codigoCuenta = new TextField("Codigo de la Cuenta", null, 10, TextField.NUMERIC);//GEN-LINE:|23-getter|1|23-postInit
// write post-init user code here
}//GEN-BEGIN:|23-getter|2|
return codigoCuenta;
}
COM: <s> returns an initiliazed instance of codigo cuenta component </s>
|
funcom_train/8064482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canConnectTo(GraphModel gm, Object anotherPort) {
return (super.canConnectTo(gm, anotherPort)) &&
(anotherPort.getClass() == this.getClass());
// needs-more-work: should work with subclasses too. This is
// really a java.lang.Class method that is missing: isSubclass()
}
COM: <s> add the constraint that sample port2s can only be connected to </s>
|
funcom_train/45075732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element readXMLRoot(String fileName) {
if (fileName != null) {
try {
Builder docBuilder = new Builder();
Document doc = docBuilder.build(fileName);
// domErrors.sysOutErrors();
return (Element) doc.getRootElement();
} catch (Exception e) {
cat.error("readXMLRoot failed to read: " + fileName + " " + e);
}
}
return null;
}
COM: <s> reads an xml file and returns the root document </s>
|
funcom_train/26558189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getStringProperty(String name) throws IntrospectionException, NoSuchPropertyException {
Object obj = getProperty(name);
if (! (obj instanceof String))
throw new NoSuchPropertyException("There is no String property '"+name+"' (but a property with type '"+obj.getClass().getName()+"' does exist)");
return (String)obj;
}
COM: <s> return the value of the property as a string </s>
|
funcom_train/41736252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuilder stringBuilder = new StringBuilder("[");
for (File file : files) {
if (stringBuilder.length() > 1) {
stringBuilder.append(", ");
}
stringBuilder.append(file.getName());
}
return stringBuilder.append("]").toString();
}
COM: <s> returns the list of files contained in this object </s>
|
funcom_train/27821552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRemoveIcon(Icon icon) {
Icon oldRemoveIcon=m_removeIcon;
m_removeIcon=icon;
for (int i=0;i<getItemCount();i++) {
TitlePanel titlePanel=getTitlePanel(i);
titlePanel.m_removeButton.setIcon(m_removeIcon);
}
firePropertyChange("removeIcon",oldRemoveIcon,m_removeIcon);
}
COM: <s> sets the icon for the remove button </s>
|
funcom_train/10516997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGrantedAndRevoked() {
perms.setSecurityManager();
try {
String s = System.getProperty("user.home");
System.setProperty("user.home", s);
fail("Could perform an action that should have been forbidden.");
} catch (SecurityException e){
// Was expected, test passes
} finally {
perms.restoreSecurityManager();
}
}
COM: <s> tests a permission that has been granted and revoked later </s>
|
funcom_train/26628285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDistributeCopyPermission( String value ) {
if ( value.equals( "yes" ) ){
setCopyPermission( value );
this.distributeCopy = value;
} else if ( value.equals( "no" ) ){
this.distributeCopy = value;
} else {
throw new IllegalArgumentException(
"distributeCopyPermission = \"" + value + "\"" );
}
}
COM: <s> can the user distribute copies of the work </s>
|
funcom_train/12541517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void commitFileBuffer(IProgressMonitor monitor, FileInfo info, boolean overwrite) throws CoreException {
Assert.isNotNull(info);
info.fTextFileBuffer.commit(monitor, overwrite);
if (info.fModel instanceof AbstractMarkerAnnotationModel) {
AbstractMarkerAnnotationModel model= (AbstractMarkerAnnotationModel) info.fModel;
model.updateMarkers(info.fTextFileBuffer.getDocument());
}
}
COM: <s> commits the given file infos file buffer by changing the contents </s>
|
funcom_train/19314587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeSetup() throws IOException {
if (this.setupWritten) {
return;
}
this.setupWritten = true;
write("%%BeginSetup");
writeProcs();
writeFontDict();
writeEPSprocs();
write(this.basicProcSet + " begin");
write(this.fontProcSet + " begin");
write("%%EndSetup");
}
COM: <s> write the setup portion of the document </s>
|
funcom_train/39276099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String normalizeToString(final Date date) {
String dateString = getDateFormat().format(date);
int minutes = Integer.parseInt(dateString.substring(14));
dateString = dateString.substring(0, dateString.length() - 2) + "0";
if (minutes < 30) {
dateString += "00";
} else {
dateString += "30";
}
return dateString;
}
COM: <s> sets the minutes to tt 00 tt or tt 30 tt </s>
|
funcom_train/51812077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstructorArgs2_After() {
createContext();
SimpleTestServiceNoDefConstructor service = new SimpleTestServiceNoDefConstructor("dummy");
service.configure("foo");
//assertEquals("Name not carried over", "foobar", service.getName());
}
COM: <s> test using constructor arguments that define a type to define the </s>
|
funcom_train/27823017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected EngineeringServerLocal createEngineeringServer() throws KAONException {
try {
return EngineeringServerUtil.getLocalHome().create();
}
catch (NamingException e) {
throw new KAONException("Cannot locate local objects",e);
}
catch (CreateException e) {
throw new KAONException("Error creating engineering server",e);
}
}
COM: <s> creates the object of the engineering server bean object </s>
|
funcom_train/4780153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JTable getGroupAccessRulesTable() {
if (groupAccessRulesTable == null) {
groupAccessRulesTable = new JTable();
groupAccessRulesTable.setDefaultRenderer(Object.class, new MyTableCellRenderer());
groupAccessRulesTable.setRowHeight(ApplicationDefaultsContants.DEFAULT_ACCESS_RULE_TABLE_ROW_HEIGHT);
groupAccessRulesTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
groupAccessRulesTable.setAutoCreateRowSorter(true);
}
return groupAccessRulesTable;
}
COM: <s> this method initializes group access rules table </s>
|
funcom_train/14217656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getPaymentMethodIds() {
List pmi = new LinkedList();
Iterator i = paymentInfo.iterator();
while (i.hasNext()) {
CartPaymentInfo inf = (CartPaymentInfo) i.next();
if (inf.paymentMethodId != null) {
pmi.add(inf.paymentMethodId);
}
}
return pmi;
}
COM: <s> returns the payment method ids </s>
|
funcom_train/45254971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private RGB getColorValue(ColorDefinition definition) {
String id = definition.getId();
RGB updatedRGB = (RGB) colorPreferencesToSet.get(id);
if (updatedRGB == null) {
updatedRGB = (RGB) colorValuesToSet.get(id);
if (updatedRGB == null) {
updatedRGB = currentTheme.getColorRegistry().getRGB(id);
}
}
return updatedRGB;
}
COM: <s> get the rgb value for the specified definition </s>
|
funcom_train/7347677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getFile(Vector fileNames) throws IllegalArgumentException {
//if the file names is not null then only call the method
// on protocol
if (fileNames != null) {
rProtocol.start((new CommandEvent(this)).DOWNLOAD, fileNames);
} else {
throw new IllegalArgumentException("Vector which contains file names is null in get file");
}
return;
}
COM: <s> download the specified file s from the ftp server </s>
|
funcom_train/37008374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isQueryRegistered(URI qUri) throws SQLException{
Statement st = con.createStatement();
ResultSet rs = null;
rs = st.executeQuery("SELECT uri FROM " + QUERY_TABLE + " WHERE uri='"+ qUri.toString() +"'");
if (rs==null) return false;
return rs.next();
}
COM: <s> zjisti zda je query registrovano ve storage </s>
|
funcom_train/43403606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SimpleForm autogenSimpleForm(Module module) {
SimpleForm simpleForm = autogenSimpleForms.get(module);
if (simpleForm == null) {
String name = "_Simple("+module.toString()+")";
simpleForm = FormFactory.makeModuleForm(name, module);
autogenSimpleForms.put(module, simpleForm);
register(simpleForm);
}
return simpleForm;
}
COM: <s> returns a simple form with the given module </s>
|
funcom_train/31846656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createTableViewer() {
tableViewer = new TableViewer(table);
tableViewer.setUseHashlookup(true);
tableViewer.setColumnProperties(columnNames);
// Create the cell editors
CellEditor[] editors = new CellEditor[columnNames.length];
createEditors(editors);
// Assign the cell editors to the viewer
tableViewer.setCellEditors(editors);
// Set the cell modifier for the viewer
tableViewer.setCellModifier(new TableCellModifier(this));
// Set the default sorter for the viewer
}
COM: <s> create the table viewer </s>
|
funcom_train/49677093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void untagUnattackable() {
this.sprites.clear();
for (Fightable opponentFightable : this.opponentContainer().getTroop()) {
Location l = CoreEngine.map().getLocationForMapForegroundElement(
opponentFightable);
this.sprites.add(new Pair<Location, Sprite>(l, Sprite.UNATTACKABLE));
}
CoreEngine.fireSpritesRemoved(this.sprites);
}
COM: <s> erase a sprite to all units which are not attackable </s>
|
funcom_train/40469366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void computeMetrics() {
//fullZoomStringWidth = zoomPrefix.pixelWidth;
int i = 0;
for (ZoomInterval zoom : zooms) {
//fullZoomStringWidth += space.pixelWidth;
int w = StringSizer.getWidth(layer, zoom.getName(), gssProperties);
zoomLinkWidths[i++] = w;
//fullZoomStringWidth += w;
}
}
COM: <s> todo this method only needs to be fired when a dataset has been </s>
|
funcom_train/11729840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNullMultiValue() throws RepositoryException {
property2.setValue(new Value[]{null, sv2});
superuser.save();
assertEquals("Null value not removed", Arrays.asList(property2.getValues()), Arrays.asList(new Value[]{sv2}));
}
COM: <s> test the deletion of a value in a multi value property </s>
|
funcom_train/15407525 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DeployTableJoin getTableJoin(String tableName) {
String key = tableName.toLowerCase();
DeployTableJoin tableJoin = (DeployTableJoin) tableJoinMap.get(key);
if (tableJoin == null) {
tableJoin = new DeployTableJoin();
tableJoin.setTable(tableName);
tableJoin.setType(TableJoin.JOIN);
descriptor.addTableJoin(tableJoin);
tableJoinMap.put(key, tableJoin);
}
return tableJoin;
}
COM: <s> appropriate table join for a property mapped to a secondary table </s>
|
funcom_train/36184091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJTextFieldActionVal() {
if (jTextFieldActionVal == null) {
jTextFieldActionVal = new JTextField();
jTextFieldActionVal.setBounds(new Rectangle(157, 52, 143, 20));
}
return jTextFieldActionVal;
}
COM: <s> this method initializes j text field action val </s>
|
funcom_train/4509822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void translateAddressField(Element addressElement, String vCardFieldName, String fieldName, StringBuilder sb) {
String field = addressElement.elementTextTrim(vCardFieldName);
if (field != null && !"".equals(field)) {
sb.append(fieldName).append(":").append(field).append(",");
}
}
COM: <s> translates the address field from the v card format to the clearspace format </s>
|
funcom_train/40673746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeCategory(CategoryBean categoryBean) {
PersistenceManager pm = getPersistenceManagerFactory().getPersistenceManager();
pm.currentTransaction().begin();
try {
Category category = pm.getObjectById(Category.class, categoryBean.getValue());
if (category != null) {
pm.deletePersistent(category);
pm.currentTransaction().commit();
}
} catch (NucleusObjectNotFoundException e) {
// object does not exist, should not happen
pm.currentTransaction().rollback();
System.err.println("Error on removing a category");
e.printStackTrace(System.err);
} finally {
pm.close();
}
}
COM: <s> remove the given category from the database </s>
|
funcom_train/3182981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testShowBugsState() {
logger.debug("beginning showBugs test");
try {
ControllerResponse response = super.controllerProcess();
logger.debug("response == null" + (response == null));
} catch (Exception e) {
logger.error("Test Failed", e);
fail(e.getMessage());
}
}
COM: <s> starts the test against test show bugs state </s>
|
funcom_train/3369699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRootVisible(boolean rootVisible) {
boolean oldValue = this.rootVisible;
this.rootVisible = rootVisible;
firePropertyChange(ROOT_VISIBLE_PROPERTY, oldValue, this.rootVisible);
if (accessibleContext != null) {
((AccessibleJTree)accessibleContext).fireVisibleDataPropertyChange();
}
}
COM: <s> determines whether or not the root node from </s>
|
funcom_train/36930409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadMaterialFile() throws CCOBJParsingException {
String s = null;
// Filenames are case sensitive
lowerCaseMode(false);
// Get name of material file (skip path)
do {
getToken();
if (ttype == CCOBJParser.TT_WORD)
s = sval;
} while (ttype != CCOBJParser.TT_EOL);
try {
new CCMTLParser(_mySourceFolder+s,_myModel.materialMap()).readFile();
} catch (RuntimeException e) {
// TODO Auto-generated catch block
// e.printStackTrace();
}
lowerCaseMode(true);
skipToNextLine();
}
COM: <s> load material file </s>
|
funcom_train/14262594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Attributes getTargetAttributes(Locale locale) {
TuTarget target = null; // Holds the target
Attributes targetAtts = null; // Holds its attribute list
target = tuTargets.get(locale); // Get the target object
if (target != null) {
targetAtts = target.getAttributes(); // Get its attributes
}
return targetAtts;
}
COM: <s> passed a targets locale return the attribute list associated </s>
|
funcom_train/14122668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void renderFields(List fields) {
int currentRow = this.main.getRowCount();
FlexCellFormatter cf = this.main.getFlexCellFormatter();
for (int i = 0; i < fields.size(); i++) {
PIBRow row = (PIBRow) fields.get(i);
row.setRow(currentRow);
currentRow = renderRow(row, cf);
}
}
COM: <s> renders fields in editing view lable value and visibility buttons </s>
|
funcom_train/42392227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void cleanStaticReference(Field field) {
field.setAccessible(true);
try {
// In order to set a 'private static field', we need to fix the modifier, i.e. use magic! ;-)
Field modifiersField = Field.class.getDeclaredField("modifiers");
modifiersField.setAccessible(true);
final int modifiers = modifiersField.getInt(field);
modifiersField.setInt(field, modifiers & ~Modifier.FINAL); // Remove the FINAL modifier
field.set(null, null);
} catch (Throwable ignore) {}
}
COM: <s> cleans a static field reference class even when it is private static final </s>
|
funcom_train/2882626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
log = owner.getLog();
log.info("Playing " + file);
play(file, loops);
//forget about ourselves
finished = true;
thread = null;
ComponentHelper componentHelper = new ComponentHelper(owner);
componentHelper.sfSelfDetachAndOrTerminate(null,
"Playback",
null,
playbackException);
}
COM: <s> when an object implementing interface code runnable code is used </s>
|
funcom_train/23778179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setToAirport(AirportBO airportTo) {
this.toAirport = airportTo;
this.jLFaaTo.setText(StringUtils.trimToEmpty(toAirport.getFaa()) + " (" + StringUtils.trimToEmpty(toAirport.getName()) + ")");
}
COM: <s> takes the airport object and sets it to a label </s>
|
funcom_train/23403295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addActionFilePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Mapping_actionFile_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Mapping_actionFile_feature", "_UI_Mapping_type"),
OLCLMapPackage.Literals.MAPPING__ACTION_FILE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the action file feature </s>
|
funcom_train/7679548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteFile(File file) {
File[] files = file.listFiles();
if ((files != null) && files.length > 0) {
for (int i=0; i< files.length; i++) {
deleteFile(files[i]);
}
}
if (!file.delete()) {
Log.e(TAG, file.getPath() + " could not get deleted");
}
}
COM: <s> utility method to delete a file or a directory </s>
|
funcom_train/10840543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getStatusCode() {
Integer status = getProperty(PN_STATUS_CODE, Integer.class);
if (status == null) {
if (getError() != null) {
// if there was an error
status = HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
} else {
status = HttpServletResponse.SC_OK;
}
}
return status;
}
COM: <s> returns the status code of this instance </s>
|
funcom_train/7482853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeOffsetByte(byte b) {
assert offsets != null;
if (offsets[offsetUpto] != 0) {
offsetUpto = vectorsPool.allocSlice(offsets, offsetUpto);
offsets = vectorsPool.buffer;
vector.offsetUpto = vectorsPool.byteOffset;
}
offsets[offsetUpto++] = b;
}
COM: <s> write byte into offsets stream of current </s>
|
funcom_train/32916271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
if (wasStopped) {
throw new IllegalStateException("Can not start previously stopped queue");
}
if (!stopped) return;
setDaemon(true);
int priority = Thread.NORM_PRIORITY - 1;
if (priority < Thread.MIN_PRIORITY)
priority = Thread.MIN_PRIORITY;
setPriority(priority);
stopped = false;
super.start();
}
COM: <s> starts the thread for queue </s>
|
funcom_train/9355788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File chooseForRead() {
File result;
if (mReal.exists()) {
result = mReal;
if (mTemp.exists()) {
mTemp.delete();
}
} else if (mTemp.exists()) {
result = mTemp;
mTemp.renameTo(mReal);
} else {
return mReal;
}
return result;
}
COM: <s> returns the file for you to read </s>
|
funcom_train/12837924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAttributeDisplayLabel(String key, String value) throws SnapInException {
if (StringUtils.isBlank(key)) {
throw new SnapInException("Null or blank key argument.");
}
if (StringUtils.isBlank(value)) {
throw new SnapInException("Null or blank value argument.");
}
getAttributeDisplayLabelMap().put(key, value);
}
COM: <s> sets a key value property </s>
|
funcom_train/3689120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getRowsPerPage(FacesContext context) {
String forValue = (String) getAttributes().get("for");
UIData uiData = (UIData) getForm(context).findComponent(forValue);
if (uiData == null) {
return 0;
}
return uiData.getRows();
}
COM: <s> returns the number of rows to display by looking up the </s>
|
funcom_train/43245840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetBNAddrSameAsPatient() {
System.out.println("setBNAddrSameAsPatient");
boolean bNAddrSameAsPatient = true;
EmergencyContactDG5Object instance = new EmergencyContactDG5Object();
instance.setBNAddrSameAsPatient(bNAddrSameAsPatient);
// 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 bnaddr same as patient method of class org </s>
|
funcom_train/13690449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getStatistikButton() {
if (statistikButton == null) {
statistikButton = new JButton();
statistikButton.setText(Helper.getMessage("general.btnStatistics"));
statistikButton.setPreferredSize(new java.awt.Dimension(116,26));
statistikButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
question = questions.get(questionNr);
StatisticsDialog sd = new StatisticsDialog(question);
sd.setVisible(true);
}
});
}
return statistikButton;
}
COM: <s> this method initializes statistik button </s>
|
funcom_train/37019728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(File f) {
String fname = f.getName();
if (f.isDirectory()) {
return true;
} else if (fname.indexOf(".") == -1) {
return acceptNoDots;
} else {
return (fname.toLowerCase().endsWith(endMask));
}
}
COM: <s> overrides accept in </s>
|
funcom_train/17401367 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printScores(){
List<CategoryScore> categoryScores = new ArrayList<CategoryScore>(scores.values());
Comparator<CategoryScore> categoryScoreComparator = new CategoryScoreComparator();
Collections.sort(categoryScores, categoryScoreComparator);
System.out.println(documentName);
System.out.println("--------------------------------");
if(!categoryScores.isEmpty()){
for(CategoryScore categoryScore : categoryScores){
System.out.println(categoryScore.getCategory().getName() + " : " + categoryScore.getScore());
}
}
}
COM: <s> method for printing the scores of the document </s>
|
funcom_train/31356778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
// Log Connection Closing
// log(this.server.LOG_NOTIFICATION, "Closing connection");
log("Closing connection");
try {
// Close Communications
if (this.receive != null) {
this.receive.close();
}
if (this.send != null) {
this.send.close();
}
if (this.sckt != null) {
this.sckt.close();
}
// Reset Variables
this.active = false;
} catch (Exception e) {
System.out.println("Exception closing connection" + e);
}
} // close()
COM: <s> method closes connection and frees all resources reserved </s>
|
funcom_train/23891464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ConnectToServer() {
//if there are still old opened workspaces, must close them
if(wsPane.getTabCount() > 0) {
this.showMessageInPopUp (trans.getString("MainWindow.CannotconnectDeleteWorkspaces"));
}
//else can normally connect
else {
//start the progress Monitor to show the user the progress
startProgressMonitor();
client = new NetDaggleClient(this);
client.start();
disconnectItem.setEnabled(true);
connectToItem.setEnabled(false);
controlPanel.activeControlPanel();
}
}
COM: <s> connects to a server with the intern saved variables </s>
|
funcom_train/7255165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addReadEntity( RateControlledEntity entity, int partition_id ) {
if ( read_controllers.size() == 1 || partition_id < 0 ){
read_controllers.get(0).addReadEntity(entity);
}else{
ReadController controller = read_controllers.get((partition_id%(read_controllers.size()-1))+1 );
controller.addReadEntity( entity );
}
}
COM: <s> add a download entity for read processing </s>
|
funcom_train/12200498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copyContainerProperties(Item sourceItem) {
if (sourceItem == null)
throw new NullPointerException("Item can't be null.");
propertyIds.clear();
types.clear();
Object ID;
Property property;
for (Iterator e = sourceItem.getItemPropertyIds().iterator();
e.hasNext();
) {
ID = e.next();
property = sourceItem.getItemProperty(ID);
addContainerProperty(ID, property.getType(), null);
}
}
COM: <s> p set the container properties to match the properties of </s>
|
funcom_train/25877701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void readTags( MetadataTags tags, String header, boolean listable) {
if (header == null) {
return;
}
String[] attrs = header.split(",");
for (int i = 0; i < attrs.length; i++) {
String attr = attrs[i].trim();
tags.addTag(new MetadataTag(attr, listable));
}
}
COM: <s> parses the given header and appends to the list of metadata tags </s>
|
funcom_train/44834288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JGRendererDescriptor getRendererDescriptor(String contentType) {
Iterator iter = rendererDescriptors.iterator();
while (iter.hasNext()) {
JGRendererDescriptor rendererDescriptor = (JGRendererDescriptor) iter
.next();
if (rendererDescriptor.getContentType().equals(contentType)) {
return rendererDescriptor;
}// if
}// while
return null;
}
COM: <s> getter for renderer </s>
|
funcom_train/33430068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleFire() {
if (map.getSelectedMarker() != null) {//Show the details of the selected item
if (markerForm == null) {
markerForm = new MarkerForm(this);
}
markerForm.loadMarker(map.getSelectedMarker());
display.setCurrent(markerForm);
} else {
markThisPlace();
}
}
COM: <s> handles the fire button </s>
|
funcom_train/31363104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUp() {
ze = new HTCoordE();
zi = new HTCoordE(0.42, -0.25);
zs = new HTCoordS(42, -25);
zz = new HTCoordS();
sOrigin = new HTCoordS(100, 125);
sMax = new HTCoordS(90, 115);
}
COM: <s> setup the fixture </s>
|
funcom_train/46789610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAll(CDSNameTreeNode node) {
for (Iterator i = node.iterator(); i.hasNext();) {
CDSNameTreeEntry entry = (CDSNameTreeEntry) i.next();
COSString name = (COSString) entry.getName().copyOptional();
COSObject value = entry.getValue().copyOptional();
put(name, value);
}
}
COM: <s> add all children from code node code </s>
|
funcom_train/24484253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(String fileName) {
String ext = null;
int dotIdx = fileName.lastIndexOf('.');
if (++dotIdx > 0) {
ext = fileName.toLowerCase().substring(dotIdx);
}
if(extList.contains(ext))
{
System.err.println("Filtered " + fileName);
}
return !extList.contains(ext);
}
COM: <s> checks if the path of the file passed as argument should be filtered </s>
|
funcom_train/5260858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBasisForPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BusinessPolicy_basisFor_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BusinessPolicy_basisFor_feature", "_UI_BusinessPolicy_type"),
BmmPackage.Literals.BUSINESS_POLICY__BASIS_FOR,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the basis for feature </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.