__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/19913323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String uppercaseRomanLetters(String text) {
// first replace underscores with spaces to use word separator
Matcher ma = ROMAN_LETTER_PATTERN.matcher(text.replaceAll("_", " "));
StringBuffer out = new StringBuffer();
while (ma.find()) {
ma.appendReplacement(out, ma.group().toUpperCase());
}
ma.appendTail(out);
return out.toString();
}
COM: <s> this method finds roman letters and uppercases them </s>
|
funcom_train/5902768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTabLook() {
final String mold = getMold();
String prefix = "default".equals(mold) ? "tab-":
"accordion".equals(mold) ? "tabaccd-": "tab" + mold + '-';
if ("vertical".equals(_orient))
prefix += 'v';
final String scls = getSclass();
return scls != null && scls.length() > 0 ? prefix + scls: prefix + "3d";
}
COM: <s> returns the look of the </s>
|
funcom_train/10299090 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void putValue(String key, Object newValue) {
if (table == null) {
table = new Hashtable();
}
Object oldValue;
if (newValue == null) {
oldValue = table.remove(key);
} else {
oldValue = table.put(key, newValue);
}
firePropertyChange(key, oldValue, newValue);
}
COM: <s> sets the code value code associated with the specified key </s>
|
funcom_train/26188587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Category addSubcategory(final String local_name) {
if (local_name == null || local_name.length() == 0) return null;
Category category = this.getSubcategory(local_name);
if (category == null) {
category = new CategoryImpl(local_name,"",null,event_dispatcher);
this.addSubcategory(category);
}
return category;
}
COM: <s> returns the corresponding existing category </s>
|
funcom_train/10020458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAllGroupWithMinOccursZero() throws Exception {
EXISchemaFactoryTestUtil.getEXISchema("/allGroupWithMinOccursZero.xsd",
getClass(), m_compilerErrorHandler);
Assert.assertEquals(0, m_compilerErrorHandler.getTotalCount());
}
COM: <s> currently all group with min occurs value 0 results in </s>
|
funcom_train/9726852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addOtherArgument(RSLInstance instance, RSLParam param, ParamValueHolder defaultValue) {
TopLevelArgRec t = new ShaderRec.TopLevelArgRec();
t.paramName = param.name;
t.defaultValue = defaultValue;
t.type = param.getType();
otherArgs.put(instance.name + '.' + param.name, t);
}
COM: <s> add a non top level parameter </s>
|
funcom_train/18865551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getDailyPeriodicInterestRate() {
if (I != null && n > 0 && m > 0 && daysPerYear != null) {
double rate = getEffectiveInterestRate();
rate = rate * n;
rate = rate / daysPerYear.doubleValue();
return rate;
}
return 0.0;
}
COM: <s> calculates the daily interest rate </s>
|
funcom_train/43014726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLink() {
if (Link_Type.featOkTst && ((Link_Type) jcasType).casFeat_link == null) {
jcasType.jcas.throwFeatMissing("link", "org.apache.uima.mediawiki.types.Link");
}
return jcasType.ll_cas.ll_getStringValue(addr, ((Link_Type) jcasType).casFeatCode_link);
}
COM: <s> getter for link gets the address the link is pointing to </s>
|
funcom_train/4975017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TimeSeries createTimeSeries(Map<String,Object> properties) {
final TimeSeries ts = new DefaultTimeSeries(properties);
if(properties != null) {
for(String key : properties.keySet()) {
ts.setTSProperty(key, properties.get(key));
}
}
ts.setTSProperty(TSAPIConstants.TS_ID, TS_ID);
ts.setTSProperty(TSAPIConstants.TS_DATASTORE, this);
return ts;
}
COM: <s> creates a new time series </s>
|
funcom_train/3288007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getData() throws IOException {
Reader is = this.getReader();
StringWriter bos = new StringWriter();
//now process the Reader...
char chars[] = new char[200];
int readCount = 0;
while( ( readCount = is.read( chars )) > 0 ) {
bos.write(chars, 0, readCount);
}
is.close();
return bos.toString();
}
COM: <s> open this url and read its data then return it as a string </s>
|
funcom_train/22689037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb = new StringBuffer();
sb.append("[Configuration:");
sb.append(getCode());
sb.append(" (");
sb.append(getLocalName());
sb.append(")");
return sb.toString();
}
COM: <s> return a string representation for debugging purposes </s>
|
funcom_train/1225737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getNowPlayingAfter(int delay_ms) {
Handler h = new Handler();
Runnable r = new Runnable() {
public void run() {
new CurrentlyPlayingThread(BoxeeRemote.this, mRemote).start();
}
};
h.postDelayed(r, delay_ms);
}
COM: <s> schedule an attempt to get the currently playing item </s>
|
funcom_train/31291813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private URI getBaseUri(final URI uri) {
final String str = uri.toString();
final int queryPos = str.indexOf('?');
if (queryPos < 0) {
return uri;
}
try {
return new URI(str.substring(0, queryPos));
} catch (URISyntaxException use) {
LOGGER.error("Unable to extract base uri", use);
}
return uri;
}
COM: <s> determine the base uri for the given uri </s>
|
funcom_train/36851692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void defineExceptionHandler(String startLabelName, String endLabelName, Type exceptionType, String handlerLabelName) {
exceptionHandlerList.add(new ExceptionHandlerDefinition(getLabel(startLabelName), getLabel(endLabelName), exceptionType, getLabel(handlerLabelName)));
}
COM: <s> defines a tt try catch tt block </s>
|
funcom_train/32383211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object setBeanProperty(final String identifier, final String name, final Object value) throws BeanPotException {
final Object bean = getBean(identifier);
if (bean != null) {
BeanUtilities.setBeanProperty(bean, value, name, identifier, getClassLoader());
return bean;
}
return BeanUtilities.squawk("Bean not found: " + identifier); //$NON-NLS-1$
}
COM: <s> method to allow applications to dynamically update the value of a beans </s>
|
funcom_train/18099654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsChangesTo( boolean[] flags ) {
if (this.itemsList.size() != flags.length ) {
return true;
}
for (int i = 0; i < flags.length; i++) {
boolean flag = flags[i];
if (flag != ((ChoiceItem)this.itemsList.get(i)).isSelected ) {
return true;
}
}
return false;
}
COM: <s> determines whether there are any changes compared to the specified boolean array </s>
|
funcom_train/22639787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void computeMethodItableIndex(ColoredGraphNode node) {
int index = 0;
List<XmlvmMethod> methods = node.getResource().getMethodsSorted();
for (XmlvmMethod method : methods) {
if (method.isStatic()) {
continue;
}
int color = node.getColors().get(index);
method.setInterfaceTableIndex(Integer.valueOf(color));
index++;
}
}
COM: <s> determine the interface table index if any for the nodes resources methods </s>
|
funcom_train/5427582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void compileOpText(HashSet<DefView> visited, OpDefinitionView d) {
if (d.isComposite()) {
contextBuilder.compileSyntax(visited, b, d
.operatorStatements(contextBuilder.contextView()));
} else {
b.tokenText(Terms.STRUCTURAL, SyntaxRole.OPERATOR,
((OperatorDefinition) d.definition()).text);
}
}
COM: <s> compile operator text </s>
|
funcom_train/9007217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException {
if(!ExternalizableHelperDeprecated.isEOF(in)){
setId(in.readByte());
setName(in.readUTF());
setVariableName(in.readUTF());
setForms(ExternalizableHelperDeprecated.readBig(in,new FormDef().getClass()));
}
}
COM: <s> reads the study definition object from the stream </s>
|
funcom_train/3404161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addTypeName(NonElement<T, C> r) {
QName t = r.getTypeName();
if(t==null) return;
TypeInfo old = typeNames.put(t,r);
if(old!=null) {
// collision
reportError(new IllegalAnnotationException(
Messages.CONFLICTING_XML_TYPE_MAPPING.format(r.getTypeName()),
old, r ));
}
}
COM: <s> checks the uniqueness of the type name </s>
|
funcom_train/12024004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String formatParam(final Object param) {
final StringBuffer paramString = new StringBuffer();
if (!(param instanceof Number)) {
paramString.append('\'');
}
paramString.append(param.toString());
if (!(param instanceof Number)) {
paramString.append('\'');
}
return paramString.toString();
}
COM: <s> formats string and other parameters with quotes </s>
|
funcom_train/26151946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createOptionsGroup(Composite parent) {
// options groups
Composite optionsGroup= new Composite(parent, SWT.NONE);
GridLayout layout= new GridLayout();
layout.marginHeight= 0;
optionsGroup.setLayout(layout);
// create manifest file
createManifestCheckbox = new Button(optionsGroup, SWT.CHECK | SWT.LEFT);
createManifestCheckbox.setText(WebAppPlugin.getResourceString("NewWebAppProjectWizardPage.createManifestCheckbox.text")); //$NON-NLS-1$
createManifestCheckbox.addListener(SWT.Selection, this);
}
COM: <s> creates the manifest checkbox in the given parent </s>
|
funcom_train/9663110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireCellDoubleClicked(SourcesTableDoubleClickEvents sender, int row, int cell) {
for (TableDoubleClickListener listener : this) {
try {
listener.onCellDoubleClick(sender, row, cell);
} catch (Throwable t) {
//continue event dispatching whatever happened
}
}
}
COM: <s> this method fires the double click event and invokes all the listeners </s>
|
funcom_train/3168593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IntegerValue edge() {
if (myIndex >= myCount) {
IntegerEdgeStepper.outOfBounds();
}
return myEdges.integerVarAt(myIndex);
/*
udanax-top.st:54401:IntegerEdgeStepper methodsFor: 'edge accessing'!
{IntegerVar INLINE} edge
"the current transition"
(myIndex >= myCount) ifTrue: [ IntegerEdgeStepper outOfBounds ].
^myEdges integerVarAt: myIndex!
*/
}
COM: <s> the current transition </s>
|
funcom_train/42639025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setSolution(Vector X, Number eps, int count){
if(emptySolution!=null){//solution=emptySolution!
if(shouldCreateInexactSolution() && (emptySolution instanceof InexactAESolution))
((InexactAESolution)emptySolution).setInexactitude(new Inexactitude(eps, count));
emptySolution.setSolution(X);
}else{
if(shouldCreateInexactSolution())solution = new InexactDefaultAESolution(X, eps, count);
else solution = new DefaultAESolution(X);
}
}
COM: <s> call at the end of solve </s>
|
funcom_train/43568054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void replaceByChildren(String xpath, Element context) throws Exception {
Nodes toReplace = context.query(xpath, Constants.namespaces);
if(toReplace.size() == 0) return;
for (int i = 0; i < toReplace.size(); i++) {
replaceByChildren((Element) toReplace.get(i));
}
replaceByChildren(xpath, context);
}
COM: <s> replace all elements matching the given xpath expression by their children </s>
|
funcom_train/32058013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemoveGPInternalFrame() {
System.out.println("testRemoveGPInternalFrame");
GPInternalFrame frame = new GPInternalFrame(new GPDocument(pad,
"file25.txt", new TPGraphModelProvider(), new GPGraph(),
new DefaultGraphModel(), new GraphUndoManager()));
try {
pad.addGPInternalFrame(frame);
pad.removeGPInternalFrame(frame);
} catch (Exception e) {
fail();
}
try {
pad.removeGPInternalFrame(null);
} catch (Exception e) {
fail();
}
}
COM: <s> test of remove gpinternal frame method of class gpgraphpad </s>
|
funcom_train/19745505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object o) {
if ( !(o instanceof ApplicationResourceID) ) {
throw new ClassCastException("Cannot compare instance of '" + getClass().getName() + "' to the instance of '" + o.getClass().getName() + "'");
}
ApplicationResourceID id = (ApplicationResourceID) o;
if ( key.equalsIgnoreCase(id.key) ) {
return locale.compareTo(id.locale);
} else {
return key.compareTo(id.key);
}
}
COM: <s> compares this application resource to another one </s>
|
funcom_train/45113538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String winGetTitle(String title, String text) throws Exception {
Map<?, ?> result = null;
if (StringUtils.isEmpty(text)) {
result = runRemoteScript(commandCreate("WinGetTitle", title));
} else {
result = runRemoteScript(commandCreate("WinGetTitle", title, text));
}
processResult("The title of window " + title + " is :", result);
return result.get(STDOUT).toString();
}
COM: <s> retrieves the full title from a window </s>
|
funcom_train/180911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeAttributes(AttributeList attributes) throws java.io.IOException {
if (attributes != null) {
java.util.Iterator iterator = attributes.iteratorAttributes();
while(iterator.hasNext()) {
java.util.List attribute = (java.util.List)iterator.next();
nativeContent(" " + (String)attribute.get(0) + EQUAL + APOSTROPH + (String)attribute.get(1) + APOSTROPH);
}
}
}
COM: <s> write an element with a single attribute to xml stream </s>
|
funcom_train/5345279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean multicastFetch(long now) {
if(nextAllowedMulticastTime < now &&
!ConnectionSettings.DO_NOT_MULTICAST_BOOTSTRAP.getValue()) {
LOG.trace("Fetching via multicast");
PingRequest pr = PingRequest.createMulticastPing();
MulticastService.instance().send(pr);
nextAllowedMulticastTime = now + POST_MULTICAST_DELAY;
return true;
}
return false;
}
COM: <s> attempts to fetch via multicast returning true </s>
|
funcom_train/41090280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getFirstTextOccurence(Node node){
if(node != null)
{
if(node.getNodeValue() != null)
return node.getNodeValue();
NodeList nodeList = node.getChildNodes();
for (int i=0; i< nodeList.getLength(); i++)
{
String firstOccurence = getFirstTextOccurence(nodeList.item(i));
if(firstOccurence != null)
return firstOccurence;
}
}
return null;
}
COM: <s> the method returns the first text occurence in a given node element </s>
|
funcom_train/4289556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addEpsilonPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ComparisonExpression_epsilon_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ComparisonExpression_epsilon_feature", "_UI_ComparisonExpression_type"),
RequirementsPackage.Literals.COMPARISON_EXPRESSION__EPSILON,
true,
false,
false,
ItemPropertyDescriptor.REAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the epsilon feature </s>
|
funcom_train/31487349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWeightXValues(Component components[], int value) {
int len = components.length;
for(int i = 0; i < len; i++) {
Component c = components[i];
if(c==null)
continue;
JGridBagConstraints constraint = gridbag.getConstraints(c);
constraint.weightx = value;
gridbag.setConstraints(c, constraint);
}
}
COM: <s> set the underlying grid bag layout weight y value </s>
|
funcom_train/20920717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkBraceAfterFunction() {
if (PropertyStore.getString(file, P_BRACE_AFTER_FUNCTION).equals(
StructureChecker.M_BRACE_AFTER_FUNCTION_NEWLINE)) {
// TODO check mode
for (int i = 0; i < fileLines.length; i++) {
String string = fileLines[i];
if (string.matches(".*function(.+)\\{")) { //$NON-NLS-1$
checker.notifyListeners(Messages.StructureChecker_7, i + 1);
}
}
}
}
}
COM: <s> checks the file for newlines before the opening brace of function </s>
|
funcom_train/23361180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadListOfSpeciesTypes(Iterator<OMElement> iterator){
String name = null;
String id = null;
while(iterator.hasNext()){
OMElement oneSpeciesType = iterator.next();
id = oneSpeciesType.getAttributeValue(new QName(XMLConstraints.ID.getXMLTag()));
name = oneSpeciesType.getAttributeValue(new QName(XMLConstraints.NAME.getXMLTag()));
this.availableSpeciesTypes.put(id, name);
}
}
COM: <s> loads all species types in a given sbml file </s>
|
funcom_train/39109121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public String getDescriptor() {
return String.valueOf(ASK_DISPLAY_CHAR)+TOKEN_SEPARATOR+
fieldItemInstance.field.getName()+TOKEN_SEPARATOR+
record.getNumber()+TOKEN_SEPARATOR+
context.getDescriptor()+TOKEN_SEPARATOR+
fieldItemInstance.getRecordNumbersDescriptor(); // subRec
}
COM: <s> returns a string that will identify the instance of the field used </s>
|
funcom_train/28984179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkResultSymmtricEncryptionForm () {
if (okResultSymmtricEncryptionForm == null) {//GEN-END:|158-getter|0|158-preInit
// write pre-init user code here
okResultSymmtricEncryptionForm = new Command ("Ok", Command.OK, 0);//GEN-LINE:|158-getter|1|158-postInit
// write post-init user code here
}//GEN-BEGIN:|158-getter|2|
return okResultSymmtricEncryptionForm;
}
COM: <s> returns an initiliazed instance of ok result symmtric encryption form component </s>
|
funcom_train/7803667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Component createNetworkPanel() {
// Create the network panel and set its layout manager.
JPanel networkPanel = new JPanel();
networkPanel.setLayout(new BoxLayout(networkPanel, BoxLayout.Y_AXIS));
// Add the t spinner panel, the fail panel and the change weight / repair panel to the network panel.
networkPanel.add(createTSpinnerPanel());
networkPanel.add(createFailPanel());
networkPanel.add(createChangeWeightRepairPanel());
return networkPanel;
}
COM: <s> create the network panel gui component </s>
|
funcom_train/39164230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected SetHandler getSetHandler(String name){
for (SetHandler setHandler : setHandlers) {
if (name == null) { // default annotation set
if (setHandler.set.getName() == null) return setHandler;
} else {
if (name.equals(setHandler.set.getName())) return setHandler;
}
}
// set handler not found
return null;
}
COM: <s> get an annotation set handler in this annotation set view </s>
|
funcom_train/37200865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SRN (int ninp, int nhid) {
int nout = ninp;
i = new BPLayer(ninp);
h = new BPLayer(nhid);
o = new BPLayer(nout);
c = new BPLayer(nhid);
try {
c.delay(h);
}
catch (Exception e) {
System.err.println(e);
System.exit(1);
}
h.connect(c);
h.connect(i);
o.connect(h);
}
COM: <s> constructs an srn </s>
|
funcom_train/5063736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int connect() {
if (!connected) {
skjConnId = SKJava.Native_CreateConnection(primaryHost,
primaryPort, secondaryHost, secondaryPort, appID,
new ConnMonitor());
if (skjConnId != -1) {
logger.fine("New connection created with ID:" + skjConnId);
connectionsById.put(new Integer(skjConnId), this);
connected = true;
} else {
// Error creating a connection!
logger.severe("New connection could not be created");
connected = false;
}
}
return skjConnId;
}
COM: <s> performs the connection to the llc </s>
|
funcom_train/1880110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveFrogForward(KFrogDataType distance)throws RuntimeException {
double fwDistance = 0;
if ((distance instanceof KFrogDecimal))
fwDistance = ((KFrogDecimal)distance).getVariable();
else if((distance instanceof KFrogReal))
fwDistance = ((KFrogReal)distance).getVariable();
else
throw new RuntimeException("Illegal type: expression in " +
"forward statement must evaluate to decimal or real");
Frog lastFrog = getFrogIfActive();
lastFrog.forward(fwDistance);
}
COM: <s> moves the frog forward for the specified distance </s>
|
funcom_train/50462749 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(int index, DCMenuModel subMenuModel) {
synchronized(items) {
items.add(subMenuModel);
DCMenuModelEvent event = new DCMenuModelEvent(DCMenuModelEvent.ADD_EVENT, index, subMenuModel, this);
fireMenuChanged(event);
}
}
COM: <s> add a sub menu to the end of this menu model </s>
|
funcom_train/10482022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isMarked(int article) {
for (int i = 0; i < ranges.size(); i++) {
Range range = (Range) ranges.get(i);
if (range.contains(article)) {
return true;
}
// we've passed the point where a match is possible.
if (range.greaterThan(article)) {
return false;
}
}
return false;
}
COM: <s> test if a given article point falls within one of the contained ranges </s>
|
funcom_train/9553477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setLeechForUser(boolean leech, String username, String groupname, boolean checkAvailability) throws NoSuchUserException, NoSuchGroupException {
try {
return rmi.setLeechForUser(leech, username, groupname, checkAvailability);
} catch (RemoteException e) {
System.err.println(e.getMessage()); reinitialize();
return setLeechForUser(leech, username, groupname, checkAvailability);
}
}
COM: <s> sets the ratio for the specified user in the specified group </s>
|
funcom_train/18751308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyLTSListenersOfClose(State closed) {
Iterator<GraphShapeListener> listenerIter = getGraphListeners();
while (listenerIter.hasNext()) {
GraphShapeListener listener = listenerIter.next();
if (listener instanceof LTSListener) {
((LTSListener) listener).closeUpdate(this, closed);
}
}
}
COM: <s> iterates over the graph listeners and notifies those which </s>
|
funcom_train/38573866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test
public void testWriteAndRead() {
Options o = getOptions(false);
o.write();
Options testO = Options.read();
assertEquals(o, testO);
assertTrue(o.equals(testO));
o = getOptions(true);
o.write();
testO = Options.read();
assertEquals(o, testO);
assertTrue(o.equals(testO));
}
COM: <s> test of write method of class options </s>
|
funcom_train/28356962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadNodesFromOpticsAdaptor( final DataAdaptor opticsAdaptor, final Map<String, NodeRecord> records ) {
final DataAdaptor acceleratorAdaptor = opticsAdaptor.childAdaptor( "xdxf" );
final List<DataAdaptor> sequenceAdaptors = (List<DataAdaptor>)acceleratorAdaptor.childAdaptors( "sequence" );
for ( final DataAdaptor sequenceAdaptor : sequenceAdaptors ) {
loadNodesFromSequenceAdaptor( sequenceAdaptor, records );
}
}
COM: <s> load the nodes design nodes from the optics adaptor </s>
|
funcom_train/8491687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getNewMap() {
if (newMap == null) {
newMap = new JButton();
newMap.setBounds(new Rectangle(11, 14, 45, 39));
newMap.setText("ADD");
newMap.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
Analyzer.removeFromLPanel();
Analyzer.searchConstructors(TileManager.class);
}
});
}
return newMap;
}
COM: <s> this method initializes new map </s>
|
funcom_train/7482871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writePosByte(byte b) {
assert pos != null;
if (pos[posUpto] != 0) {
posUpto = vectorsPool.allocSlice(pos, posUpto);
pos = vectorsPool.buffer;
vector.posUpto = vectorsPool.byteOffset;
}
pos[posUpto++] = b;
}
COM: <s> write byte into pos stream of current </s>
|
funcom_train/47414985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void testBasicApplication() {
int word = 0xA5A5A5A5;
word = Effect.NC.applyToWord(word);
assertEquals(0xA4A5A5A5, word);
word = Effect.WZ.applyToWord(word);
assertEquals(0xA6A5A5A5, word);
word = Effect.NR.applyToWord(word);
assertEquals(0xA625A5A5, word);
}
COM: <s> a very loose check of </s>
|
funcom_train/46640152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initLogging() {
// initialize log4j
// use the current threads class loader to load in the given
// resource
URL log4jUrl = Thread.currentThread().getContextClassLoader().getResource("basel/log4j.xml");
// if we have our log4j config then initialize using it
if (log4jUrl != null) {
DOMConfigurator.configure(log4jUrl);
}
else {
// otherwise just use the default
BasicConfigurator.configure();
}
}
COM: <s> initializes our logging </s>
|
funcom_train/45611816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getBelief() {
double belief = 1.0;
if (getDisbelief() == 1.0) {
return 0.0;
} else {
if (support.isEmpty()) {
return 0.0;
} else {
belief = calculateBelief(support.valueIterator());
}
}
return belief - getDisbelief();
}
COM: <s> gets the belief in the matter as a number between 0 and 1 </s>
|
funcom_train/14336422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void PlaySound(String directory, String filename, String ext) {
try {
if (!filename.equals(null)){
InputStream in = new FileInputStream(directory + "/" + filename + ext);
AudioStream as = new AudioStream(in);
AudioPlayer.player.start(as);
// AudioPlayer.player.stop(as);
}
} catch (FileNotFoundException f) {
System.out.println("Error ps1000:" + f);
} catch (IOException f) {
System.out.println("Error ps1001:" + f);
}
}
COM: <s> play the the sound file </s>
|
funcom_train/16519294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void accept(IAbstractPrinter printer, Object currentLocation) {
currentLocation = printer.visit(this, CodeZoneId.body, currentLocation); // Visit
// self
super.accept(printer, currentLocation); // Accept the buffer allocation
Iterator<ThreadDeclaration> iterator = threads.iterator();
while (iterator.hasNext()) {
ThreadDeclaration thread = iterator.next();
thread.accept(printer, currentLocation); // Accept the threads
}
}
COM: <s> accepts a printer visitor </s>
|
funcom_train/29286740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void undo() {
parent.getChildren().remove(visualModel);
if (addedToCore) {
if (type.equals(ProvidedInterfaceEditPart.PROVIDED_INTERFACE))
((PortModel)parent.getSemanticModel()).getProvideds().remove(visualModel.getSemanticModel());
else
((PortModel)parent.getSemanticModel()).getRequireds().remove(visualModel.getSemanticModel());
}
}
COM: <s> removes the semantic interface from the port model </s>
|
funcom_train/43605915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected NodeVisitor enterCall(Node n) throws SemanticException {
if (n instanceof ClassBody) {
// we are starting to process a class declaration, but have yet
// to do any of the dataflow analysis.
// set up the new ClassBodyInfo, and make sure that it forms
// a stack.
setupClassBody((ClassBody)n);
}
return super.enterCall(n);
}
COM: <s> overridden superclass method </s>
|
funcom_train/34596532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void renderChildren(GUIContext container, Graphics g) {
ensureZOrder();
for (int i = 0; i < getChildCount(); i++) {
Component child = getChild(i);
Rectangle oldclip = g.getWorldClip();
Rectangle clip = new Rectangle(getAbsoluteX(), getAbsoluteY(),
getWidth(), getHeight());
g.setWorldClip(clip);
// TODO: fix clipping
child.render(container, g);
g.setWorldClip(oldclip);
}
}
COM: <s> called to recursively render all children of this container </s>
|
funcom_train/3820953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void load() throws IOException {
File config = new File( System.getProperty("user.home") + File.separator
+ ".tuxcourser" + File.separator + "config" );
if( ! config.exists() ) { return; } // bail if file doesn't exist.
FileInputStream in = new FileInputStream( config );
prop.load( in );
in.close();
}
COM: <s> load the properties from the config file if it exists </s>
|
funcom_train/8569141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean complete(V v, Throwable t, int finalState) {
if (compareAndSetState(RUNNING, COMPLETING)) {
this.value = v;
this.exception = t == null ? null : new ExecutionException(t);
releaseShared(finalState);
return true;
}
// The state was not RUNNING, so there are no valid transitions.
return false;
}
COM: <s> implementation of completing a task </s>
|
funcom_train/9642485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JTable getAlternativesTable() {
if (alternativesTable == null) {
alternativesTable = new JTable();
int width = Sizes.dialogUnitXAsPixel(250, alternativesTable);
int height = Sizes.dialogUnitYAsPixel(100, alternativesTable);
alternativesTable.setPreferredScrollableViewportSize(new Dimension(
width, height));
alternativesTable.setDefaultRenderer(FormulaBooleanElement.class,
new DefaultTableCellRenderer());
}
return alternativesTable;
}
COM: <s> gets the alternatives table </s>
|
funcom_train/44222022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isPageCompleteLoading() {
ImageIcon ic = (ImageIcon) this.getIcon();
if (this.page_background != null &&
ic != null &&
(ic.getImageLoadStatus() & MediaTracker.COMPLETE) != 0 &&
(ic.getImageLoadStatus() & MediaTracker.ERRORED) == 0) {
return true;
} else {
return false;
}
}
COM: <s> check if the current page has been loaded completely </s>
|
funcom_train/16511873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String calcHash(byte[] data){
String hash=null;
if(digest==null){
log.error("Hash cannot be calculated. The MessageDigest has not been initialised probably.");
hash="0";
}else{
digest.update(data);
hash=new BigInteger(digest.digest()).toString(16);
}
return hash;
}
COM: <s> calculates a hash value using the algorithm configured in </s>
|
funcom_train/10838889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dump(final PrintWriter writer) {
logTimer(REQUEST_PROCESSING_TIMER,
"Dumping SlingRequestProgressTracker Entries");
final StringBuilder sb = new StringBuilder();
final Iterator<String> messages = getMessages();
while (messages.hasNext()) {
sb.append(messages.next());
}
writer.print(sb.toString());
}
COM: <s> dumps the process timer entries to the given writer one entry per line </s>
|
funcom_train/14587051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Play getPlayData(String category, String name) {
int i = 0;
for (i = 0; !(plays[i].getName().equalsIgnoreCase(name)
&& plays[i].getSide().equalsIgnoreCase(getSide())
&& plays[i].getCategory().equalsIgnoreCase(category));
i++);
assignPlayPlayers(plays[i]);
return (Play)plays[i].clone();
}
COM: <s> gets the data for a given play </s>
|
funcom_train/3898079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteLinkedFiles() {
/*
* Delete resource files
* Should really mark the files to be deleted and delete on exit if no Entries reference them
* Then if user does Undo, can unmark and not delete
*/
try {
getResourceFile().delete();
getNotesFile().delete();
}
catch(FileNotFoundException ex) {
ex.printStackTrace();
}
}
COM: <s> delete any linked resource files </s>
|
funcom_train/5260873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addHasAchievementSupportedByPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DesiredResult_hasAchievementSupportedBy_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DesiredResult_hasAchievementSupportedBy_feature", "_UI_DesiredResult_type"),
BmmPackage.Literals.DESIRED_RESULT__HAS_ACHIEVEMENT_SUPPORTED_BY,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the has achievement supported by feature </s>
|
funcom_train/2430358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isXmlTransformation() {
DataStructureType source = getSourceType();
if (source != null && source.isXmlBased()) {
return true;
}
DataStructureType target = getTargetType();
if (target != null && target.isXmlBased()) {
return true;
}
// TODO: (1.4) Check if this transformation uses a JMS message with XML payload
return false;
}
COM: <s> checks if this transformation is using an xml based input or output structure </s>
|
funcom_train/40945052 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() throws CloneNotSupportedException {
final PropertysetItem npsi = new PropertysetItem();
npsi.list = list != null ? (LinkedList) list.clone() : null;
npsi.propertySetChangeListeners = propertySetChangeListeners != null ? (LinkedList) propertySetChangeListeners
.clone()
: null;
npsi.map = (HashMap) map.clone();
return npsi;
}
COM: <s> creates and returns a copy of this object </s>
|
funcom_train/9887492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Algorithm getAlgorithm(String name) throws AlgorithmException {
if (name == null) {
throw new AlgorithmException("Algorithm name expected.");
}
if (isRemote(name)) {
if (this.isRemoteEnabled) {
return new RemoteAlgorithm(name);
}
throw new AlgorithmException("Remote execution not available.");
}
if (this.localFactory == null) {
throw new AlgorithmException("Local execution not available.");
}
return this.localFactory.getAlgorithm(name);
}
COM: <s> returns an instance of algorithm by its name </s>
|
funcom_train/46161334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initUserList() {
for (PresenceInfo info : presenceManager.getAllUsers()) {
WonderlandIdentity id = info.userID;
if (id.equals(localUserIdentity) == false) {
String displayName = getDisplayName(id);
userMap.put(displayName, id);
listModel.addElement(displayName);
}
}
}
COM: <s> initializes the user list to all users except the local one </s>
|
funcom_train/33623636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object parseToNumber() {
StringBuilder sb = new StringBuilder();
sb.append(json.current());
boolean isLong = true;
while (json.hasNext()) {
switch (json.next()) {
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
sb.append(json.current());
break;
case '.':
case 'e':
case 'E':
sb.append(json.current());
isLong = false;
break;
default:
json.back();
if (isLong) {
return Long.parseLong(sb.toString());
} else {
return Double.parseDouble(sb.toString());
}
}
}
return null;
}
COM: <s> parse string to a number </s>
|
funcom_train/50221690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toggleSelection(GraphObject element) {
boolean selectElement = !selection.contains(element);
modifySelection(new MosesArrayList(element), selectElement);
// report that the undoable edit is finished
fireUndoableEditUpdate(new UndoableEditEvent(this, new UndoableSelectionEdit(new MosesArrayList(element), selectElement)));
}
COM: <s> add or remove the graph element from the selection </s>
|
funcom_train/39294002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDisplaytextPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_LegalTextPartType1_displaytext_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_LegalTextPartType1_displaytext_feature", "_UI_LegalTextPartType1_type"),
CntPackage.Literals.LEGAL_TEXT_PART_TYPE1__DISPLAYTEXT,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the displaytext feature </s>
|
funcom_train/32363205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Class getWindowConstructorClass(String windowClassId) {
String clsName = getProperty(windowClassId + ".constructor", null);
if (clsName != null) {
try {
return Class.forName(clsName);
} catch (ClassNotFoundException x) {
ApplicationContext.getApplicationLog().error("Unable to find window constructor class: " + clsName);
}
}
return null;
}
COM: <s> gets window constructor class </s>
|
funcom_train/50168086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RecordModel createRecordModel(String recordClassTag) {
RecordModel record = (RecordModel) recordFactoryObjects.get(recordClassTag);
if (record == null) {
return null;
} else {
RecordModel clone = (RecordModel) record.clone();
clone.setNewRecord(true);
return clone;
}
}
COM: <s> instantiate a copy of a record model with the given name </s>
|
funcom_train/48618694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String delete() {
log.debug("delete group workspace group id = " + id );
workspaceGroup = groupWorkspaceGroupService.get(id, false);
groupWorkspace = workspaceGroup.getGroupWorkspace();
IrUser user = userService.getUser(userId, false);
if( groupWorkspace.getIsOwner(user))
{
groupWorkspace.remove(workspaceGroup);
groupWorkspaceService.save(groupWorkspace);
return "deleted";
}
else
{
return "accessDenied";
}
}
COM: <s> delete the specified group space </s>
|
funcom_train/49046025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButtonMenuItem getJRadioButtonMagnitudeSquared() {
if (buttMagnitudeSquared == null) {
buttMagnitudeSquared = new JRadioButtonMenuItem();
buttMagnitudeSquared.setText("Magnitude^2");
buttMagnitudeSquared.setPreferredSize(new Dimension(105,10));
buttMagnitudeSquared.setToolTipText("calculates the squared magnitude");
buttMagnitudeSquared.addActionListener(this);
buttMagnitudeSquared.setActionCommand("parameter");
}
return buttMagnitudeSquared;
}
COM: <s> this method initializes the option magnitude squared </s>
|
funcom_train/3409818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTimeToLive(int ttl) throws IOException {
if (ttl < 0 || ttl > 255) {
throw new IllegalArgumentException("ttl out of range");
}
if (isClosed())
throw new SocketException("Socket is closed");
getImpl().setTimeToLive(ttl);
}
COM: <s> set the default time to live for multicast packets sent out </s>
|
funcom_train/15467577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHoldability(int holdability) throws SQLException {
logger.debug(" setHoldability(int holdability) throws SQLException ");
String methodName = "setHoldability";
ArrayList<Serializable> methodSignature = new ArrayList<Serializable>();
methodSignature.add(int.class);
ArrayList<Serializable> methodParameters = new ArrayList<Serializable>();
methodParameters.add(new Integer(holdability));
remoteCall(CaTIES_Null.class, this.remoteObjectUuid, methodName,
methodSignature, methodParameters);
}
COM: <s> sets the holdability </s>
|
funcom_train/12694582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addWidget(Widget widget, int x, int y, int width, int height, int verticalConstraint, int horizontalConstraint) {
_father.addWidget(widget, new GridLayoutConstraint(x, y, width, height, horizontalConstraint, verticalConstraint));
}
COM: <s> adds a widget to the boundeb container </s>
|
funcom_train/9701990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAlphaNumeric(){
Class<? extends Object> c = getFieldType();
if (c.isPrimitive()){
return false;
}
if (c.equals(Boolean.class) || c.equals(Integer.class) ||
c.equals(Double.class) || c.equals(Float.class) ||
c.equals(Byte.class) || c.equals(Short.class) ||
c.equals(Long.class) || c.equals(Character.class)){
return false;
}
return true;
}
COM: <s> check if the field type is a primitve type or its wrapper class </s>
|
funcom_train/33277439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addInstructionCount() {
int count = cfw.getCurrentCodeOffset() - savedCodeOffset;
// TODO we used to return for count == 0 but that broke the following:
// while(true) continue; (see bug 531600)
// To be safe, we now always count at least 1 instruction when invoked.
addInstructionCount(Math.max(count, 1));
}
COM: <s> generate calls to script runtime </s>
|
funcom_train/45231964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextPane getTxpFileLogo() {
if (txpFileLogo == null) {
txpFileLogo = new JTextPane();
txpFileLogo.setBounds(new Rectangle(255, 33, 332, 62));
txpFileLogo.setFont(new java.awt.Font("Dialog", //$NON-NLS-1$
java.awt.Font.PLAIN, 12));
txpFileLogo.setEditable(false);
txpFileLogo.setText(EnvProperties.getInstance().getProperty(
EnvProperties.FILELOGO));
}
return txpFileLogo;
}
COM: <s> this method initializes txp file logo </s>
|
funcom_train/23071331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean grantContextAuthorization(User user, Object context) {
List list = getRequiredPreInvocationAuthorizers();
if (list.size() == 0)
return true; //no required authorizers
for (Iterator iter = list.iterator(); iter.hasNext();) {
ContextSensitivePreInvocationAuthorizer preInvocationAuthorizer = (ContextSensitivePreInvocationAuthorizer) iter.next();
if (preInvocationAuthorizer.isValid(user, context)) {
return true;
}
}
return false;
}
COM: <s> if any authorizer is true return true </s>
|
funcom_train/32112262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UserData getMapUserData(int mapId) {
// check if the map id is valid
if((mapId < 0) || (mapId >= vectorMap.size())) {
//TODO afegir exepció
//CalError::setLastError(CalError::INVALID_HANDLE, __FILE__, __LINE__);
return null;
}
return vectorMap.get(mapId).userData;
}
COM: <s> provides access to a specified map user data </s>
|
funcom_train/17458385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isRandom() throws MPDConnectionException, MPDPlayerException {
String random = null;
try {
random = mpd.getStatus(MPD.StatusList.RANDOM);
} catch (MPDResponseException re) {
throw new MPDPlayerException(re.getMessage(), re.getCommand());
}
if (random.equals("1")) {
return (true);
}
return (false);
}
COM: <s> returns if the player is in random play mode </s>
|
funcom_train/48201060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createOCLAnnotations() {
String source = "http://www.eclipse.org/ocl/examples/OCL";
addAnnotation
(stackEClass.getEOperations().get(0),
source,
new String[] {
"invariant", "Sequence{\'a\',\'b\',\'c\'}->size()>0"
});
}
COM: <s> initializes the annotations for b http www </s>
|
funcom_train/27779577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void append(BarrelReader a) {
if (cache != null && a.length() < max_size) {
if (cache.length() + a.length() > max_size) {
flushCache();
}
cache.append(a);
} else {
super.append(a);
}
}
COM: <s> add the contents of the given barrel to the cache </s>
|
funcom_train/21878279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int countRecursionGenerics() {
int count = 0;
for (Iterator i = pluginRecursion.keySet().iterator(); i.hasNext();) {
String key = (String) i.next();
Integer in = (Integer) pluginRecursion.get(key);
if (null != in) {
count += in.intValue();
}
}
return count;
}
COM: <s> return the recursion count for all generics </s>
|
funcom_train/3412435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTitle(String title) {
String oldTitle = this.title;
synchronized(this) {
this.title = title;
DialogPeer peer = (DialogPeer)this.peer;
if (peer != null) {
peer.setTitle(title);
}
}
firePropertyChange("title", oldTitle, title);
}
COM: <s> sets the title of the dialog </s>
|
funcom_train/1563964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean needAccessToken() {
if (realRequest.getOAuthArguments().mustUseToken()
&& accessorInfo.getAccessor().requestToken != null
&& accessorInfo.getAccessor().accessToken == null) {
return true;
}
return realRequest.getOAuthArguments().mayUseToken() && accessTokenExpired();
}
COM: <s> do we need to exchange a request token for an access token </s>
|
funcom_train/4926642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addStartTimePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Event_startTime_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Event_startTime_feature", "_UI_Event_type"),
DomainPackage.Literals.EVENT__START_TIME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the start time feature </s>
|
funcom_train/9663171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected DateTimeFormat getFormat() {
if (this.format != null)
return DateTimeFormat.getFormat(this.format);
DateTimeFormat format;
if (isTimeVisible())
format = DateTimeFormat.getFormat(Calendar.constants.dateTimeFormat());
else
format = DateTimeFormat.getFormat(Calendar.constants.dateFormat());
return format;
}
COM: <s> getter for property format </s>
|
funcom_train/7842787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testXmlToObj() throws Exception {
System.out.println("xmlToObj");
String xml = "";
Object expResult = null;
Object result = Utilities.xmlToObj(xml);
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 xml to obj method of class org </s>
|
funcom_train/29080265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setImage(BufferedImage Image) {
this.ImageFileLocation = null;
this.IsImageFileSet = false;
this.ImageIP.setImage(Image.getScaledInstance(this.ImageIP.getWidth(), this.ImageIP.getHeight(), Image.SCALE_FAST));
}
COM: <s> set the value of image </s>
|
funcom_train/10375209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTLD11Obsolete() throws Exception {
URL srcXML = classLoader.getResource("1_1_dtd/taglib-obsolete-src.tld");
URL expectedXML = classLoader.getResource("1_1_dtd/taglib-obsolete-expected.tld");
parseAndCompare(srcXML, expectedXML);
}
COM: <s> tests for removal of obsolete tld tags </s>
|
funcom_train/44934707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isHeadKnown(String sequence) {
boolean result = false;
Iterator<String> keys = symbols.keySet().iterator();
while (keys.hasNext()) {
String key = keys.next();
if (key.startsWith(sequence)) {
result = true;
break;
}
}
return result;
}
COM: <s> is there any symbol which starts with this sequence </s>
|
funcom_train/27784909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void replace(Graph oldGraph, Graph newGraph) {
// Find the first matching graph
boolean found = false;
Graph traverse;
ListIterator iterator = levels.listIterator();
Vector innerVector;
ListIterator innerIterator;
while(iterator.hasNext()) {
innerVector = (Vector)iterator.next();
innerIterator = innerVector.listIterator();
while(innerIterator.hasNext()) {
traverse = (Graph)innerIterator.next();
// Found one to replace?
if(traverse == oldGraph) {
innerIterator.set(newGraph);
return;
}
}
}
// If we got here we couldnt find it
}
COM: <s> replace the graph from the chart with another graph </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.