__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/31651914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: //; public File getDeploymentRootForName( String pluginName ) {
//; File nameroot = new File( deploymentDir, pluginName );
//; if ( ! nameroot.isDirectory() && ! nameroot.mkdir() ) {
//; SM.warning( "Could not create deployment directory " +
//; nameroot.getAbsolutePath() );
//; }
//; return nameroot;
//; }
COM: <s> get the directory under which bundle resources are located </s>
|
funcom_train/18104166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRefPixelPosition(int x, int y) {
// update this.x and this.y
this.x = x - getTransformedPtX(dRefX, dRefY,
this.t_currentTransformation);
this.y = y - getTransformedPtY(dRefX, dRefY,
this.t_currentTransformation);
}
COM: <s> sets this sprites position such that its reference pixel is located </s>
|
funcom_train/14012323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFocusTraversalParticipant(boolean newValue) {
boolean oldValue = isFocusTraversalParticipant();
if (oldValue != newValue) {
flags ^= FLAG_FOCUS_TRAVERSAL_PARTICIPANT; // Toggle FLAG_FOCUS_TRAVERSAL_PARTICIPANT bit.
firePropertyChange(FOCUS_TRAVERSAL_PARTICIPANT_CHANGED_PROPERTY, new Boolean(oldValue), new Boolean(newValue));
}
}
COM: <s> sets whether the component participates in the focus traversal order </s>
|
funcom_train/16744145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean setGenotype(Chrom chrom, int position, int sampleIndex, boolean isTumor, Nuc[] genotype) {
if (chrom != mChrom) return null;
int positionIndex = getIndexOfPosition(position);
if (positionIndex < 0) return Boolean.FALSE;
return setGenotypeByIndex(chrom, positionIndex, sampleIndex, isTumor, genotype);
}
COM: <s> returns null if chrom num is incorrect boolean </s>
|
funcom_train/24121977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDemoList(final DemoList demoList) {
DemoList oldList = this.demoList;
this.demoList = demoList;
if (oldList != null) {
// Transfer the registered demos to the new list.
Demo[] demos = oldList.getDemos();
this.demoList.add(demos);
}
}
COM: <s> sets the demo list </s>
|
funcom_train/12602824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEvaluateString() {
System.out.println("evaluateString");
String expr = "";
MatlabEngine instance = new MatlabEngine();
instance.evaluateString(expr);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of evaluate string method of class matlab engine </s>
|
funcom_train/4853067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getItemCommand() {
if (itemCommand == null) {//GEN-END:|90-getter|0|90-preInit
// write pre-init user code here
itemCommand = new Command("Item", Command.ITEM, 0);//GEN-LINE:|90-getter|1|90-postInit
// write post-init user code here
}//GEN-BEGIN:|90-getter|2|
return itemCommand;
}
COM: <s> returns an initiliazed instance of item command component </s>
|
funcom_train/19746305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLinkedResource(ContentResource resource) {
if ( !resource.getLinkedMenuItems().contains(this) ) {
resource.getLinkedMenuItems().add(this);
}
if ( !getLinkedPages().contains(resource) ) {
getLinkedPages().add(resource);
}
}
COM: <s> adds a connection between this menu item and a given content resource </s>
|
funcom_train/30194957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone(){
JxplList out = new JxplList();
Vector outElem = out.getElements();
for(int i=0; i<elements.size(); i++){
JxplElement elem = (JxplElement)elements.get(i);
outElem.addElement(elem.clone());
}
return out;
}
COM: <s> makes a copy of the jxpl list and returns it </s>
|
funcom_train/10658907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printUsage() {
// If there is a problem invoking the method, simply dump the trace for
// now
try {
printUsageMth.invoke(mainInst);
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
}
COM: <s> prints the compiler usage message out on the console </s>
|
funcom_train/17269389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEditorSaveAs() {
/*
* GUI Code
System.out.println("editorSaveAs");
Editor editor = null;
DocumentManager instance = null;
instance.editorSaveAs(editor);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
*/
}
COM: <s> test of editor save as method of class com </s>
|
funcom_train/27809045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String getParam( String parm, CGIArgument[] args ) {
int i;
for( i = 0; i < args.length; i++ ) {
if ( args[i].getParam().equals( parm ) ) {
return args[i].getValue();
}
}
return "";
}
COM: <s> searches an array of cgiargument objects and returns </s>
|
funcom_train/1026278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LString getlocalname(int number, int pc) {
int i;
for (i = 0; i<locvars.length && locvars[i].startpc <= pc; i++) {
if (pc < locvars[i].endpc) { /* is variable active? */
number--;
if (number == 0)
return locvars[i].varname;
}
}
return null; /* not found */
}
COM: <s> get the name of a local variable </s>
|
funcom_train/19309406 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseMetricsFileBasics() throws IOException {
if (isAFM()) {
this.metricsFormat = MetricsFileReader.METRICSFORMAT_AFM;
return;
}
if (isPFM()) {
this.metricsFormat = MetricsFileReader.METRICSFORMAT_PFM;
return;
}
throw new IOException("Unsupported Metrics File Format.");
}
COM: <s> parses the metrics file enough to find the file format </s>
|
funcom_train/4874486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createNamedWindow(String name) {
JFrame jf = new JFrame();
jf.setName(name);
jf.setTitle(name);
//jf.addKeyListener(this);
jf.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
//jf.addMouseListener(this);
windows.put(name, jf);
}
COM: <s> create a new window </s>
|
funcom_train/10944553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getContentId(String contentTypeId) {
GenericValue workEffortContent = getFirstWorkEffortContentByType(null, workEffort, contentTypeId, workEffort.getDelegator());
if (workEffortContent != null) {
return workEffortContent.getString("contentId");
} else {
return null;
}
}
COM: <s> get the id from the most current content data by the defined type </s>
|
funcom_train/16893920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void refreshFromWorkspace() {
if (fTreeViewer != null) {
fTreeViewer.setInput(null);
}
if (fWorkspaceObjects == null ) {
fWorkspaceObjects = resourceContentProvider.getElements( ResourcesPlugin.getWorkspace().getRoot() );
}
if (fFilteredList != null) {
fFilteredList.setEnabled(true);
fFilteredList.setAllowDuplicates(showDuplicates);
fFilteredList.setElements(contentProvider.getElements( fWorkspaceObjects ));
}
}
COM: <s> show the types which are available in the current workspace </s>
|
funcom_train/41524890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File findContent(File collection, String imageId) {
File result = null;
File[] auxLst = collection.listFiles(icff);
if (auxLst != null) {
for (File file : auxLst) {
String id = StringUtils.substringBeforeLast(file.getName(), FilenameUtils.EXTENSION_SEPARATOR_STR);
if (id.equals(imageId)) {
result = file;
break;
}
}
}
return result;
}
COM: <s> finds any content into a collection </s>
|
funcom_train/1959573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void animate(int time, int substep, int myPhase, int totalPhase) {
super.animate(time,substep, myPhase,totalPhase);
int currentsubsteps = (time-startTime)*SimulatorThread.SUBSTEP_UNITY+substep;
int newX = startX + (int)(currentsubsteps*dx);
int newY = startY + (int)(currentsubsteps*dy);
setLocation(newX,newY);
}
COM: <s> perform the actual animation </s>
|
funcom_train/16882859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unmarkEdges() {
for (Iterator<EdgePresentation> it = markedEdges.iterator(); it.hasNext();) {
EdgePresentation ep = it.next();
ep.unmark();
it.remove();
}
//if ((verticesData.size() == 0) && (markedVertices.size() == 0)) {
// fireVisualChandesCancelled();
//} else {
fireVisualStateChange();
//}
}
COM: <s> unmarks previously marked edges </s>
|
funcom_train/27781753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getStatus(StringBuffer sb) {
sb.append("Manager R-cache miss-rate ").append(cache.missRate()).append("\n");
sb.append("Manager P-cache miss-rate ").append(processedCache.missRate()).append("\n");
linkdb.getStatus(sb);
}
COM: <s> gets the status attribute of the manager central object </s>
|
funcom_train/43093836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPath(String path) {
StringTokenizer st = new StringTokenizer(path, ";");
st.countTokens();
while (st.hasMoreTokens()) {
String token = st.nextToken();
try {
this.addFile(new File(token));
} catch (Exception e) {
LOG.warn("could not set path ", e);
}
}
}
COM: <s> add the file for which a path is given </s>
|
funcom_train/18727973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected File getOutputFile(String base, String fileName) {
File outputDirectory = new File(testOutputDir + base);
if (!outputDirectory.exists()) {
outputDirectory.mkdirs();
}
File outputFile = new File(outputDirectory, fileName);
if (outputFile.exists()) {
outputFile.delete();
}
assertFalse("Output file exists!", outputFile.exists());
return outputFile;
}
COM: <s> return a file for writing test results </s>
|
funcom_train/1805333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void commit() {
if (isBeingEdited()) {
boolean success = false;
try {
if (originalEntry != null) {
doUpdateExisting();
} else {
doAddNew();
}
success = true;
} catch (ServiceException e) {
SpreadsheetApiDemo.showErrorBox(e);
} catch (IOException e) {
SpreadsheetApiDemo.showErrorBox(e);
}
}
}
COM: <s> commits all changes </s>
|
funcom_train/4393357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean checkSubtreeStreams(ActivityNode q) {
Set<ActivityNode> subtreeNodesQ = querygraph.getSubtreeNodes(q);
for (ActivityNode subtreeNodeQ : subtreeNodesQ) {
if (queryNodeStreamMap.get(subtreeNodeQ.getActivityID()).isEmpty()) {
return true;
}
}
return false;
}
COM: <s> determines whether there is at least one qs subtree node whose stream </s>
|
funcom_train/32057349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUserProperties(){
UserProperties y = UserProperties.getInstance("testA");
assertTrue(y.nameSpace.endsWith("testA"));
y.setProperty("testkey","testval");
y.save();
y = UserProperties.getInstance("testA");
assertTrue(y.nameSpace.endsWith("testA"));
}
COM: <s> test of user properties string constructor </s>
|
funcom_train/13936259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JarFile getPackage(LeviathanModule lp) {
//TODO: Implement remote package downloading
if (!isLocallyAvailable(lp)) {
JarFile jf;
try {
jf = new JarFile(getServerLocal(lp));
return jf;
} catch (IOException e) {
return null;
}
} else {
try {
return new JarFile(local.get(lp));
} catch (IOException e) {
new Message("Local module file is not a Jar File!").showError();
}
}
return null;
}
COM: <s> get the jar file for a given package </s>
|
funcom_train/22370732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUIFont (FontUIResource f){
Enumeration<Object> keys = UIManager.getDefaults().keys();
while (keys.hasMoreElements()) {
Object key = keys.nextElement();
Object value = UIManager.get (key);
if (value instanceof FontUIResource) {
UIManager.put (key, f);
}
}
}
COM: <s> changes all components font to a given one </s>
|
funcom_train/4285505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIsUsedPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Component_isUsed_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Component_isUsed_feature", "_UI_Component_type"),
ComponentsPackage.Literals.COMPONENT__IS_USED,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the is used feature </s>
|
funcom_train/44135821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasTimeStamps(boolean recursive) {
if (getTimeStamps() != null && getTimeStamps().size() > 0) {
return true;
} else {
for (Object project1 : projects) {
Project project = (Project)project1;
return project.hasTimeStamps(recursive);
}
}
return false;
}
COM: <s> check if a project and its children have timestamps attached </s>
|
funcom_train/16892859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void populateComboBoxItems() {
int num = 0;
if (comboBox != null && items != null) {
num = comboBox.getItemCount();
comboBox.remove(0, num - 1);
for (int i = 0; i < items.length; i++)
comboBox.add(items[i], i);
setValueValid(true);
selection = 0;
}
}
COM: <s> updates the list of choices for the combo box for the current control </s>
|
funcom_train/3331065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isWhitespace(String string) {
for (int i = 0; i < string.length(); i++) {
char ch = string.charAt(i);
switch (ch) {
case ' ':
case '\n':
case '\t':
case '\r':
break;
default:
return false;
}
}
return true;
} //-- isWhitespace
COM: <s> checks the given string to determine if it only </s>
|
funcom_train/48046253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Instant minus(long amount, TimeUnit unit) {
if (unit == TimeUnit.SECONDS) {
return minusSeconds(amount);
} else if (unit == TimeUnit.MILLISECONDS) {
return minusMillis(amount);
} else if (unit == TimeUnit.NANOSECONDS) {
return minusNanos(amount);
}
return minus(Duration.of(amount, unit));
}
COM: <s> returns a copy of this duration with the specified duration subtracted </s>
|
funcom_train/3024366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void move(int x, int y) {
if (inShapeChange) {
super.move(x, y);
} else {
inShapeChange = true;
absoluteX = x;
absoluteY = y;
super.move(scaleInteger(x), scaleInteger(y));
inShapeChange = false;
}
}
COM: <s> invokes old version of set location </s>
|
funcom_train/45250153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateInProgressManager() {
Iterator infoIterator = infos.iterator();
while (infoIterator.hasNext()) {
JobInfo next = (JobInfo) infoIterator.next();
if (!(next.getJob().getState() == Job.NONE)) {
ProgressManager.getInstance().refreshGroup(this);
return;
}
}
if (FinishedJobs.getInstance().isKept(this))
ProgressManager.getInstance().refreshGroup(this);
else
ProgressManager.getInstance().removeGroup(this);
}
COM: <s> update the receiver in the progress manager </s>
|
funcom_train/44626274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHarness3() {
helpFailure("Column for message 0 expected:<-1> but was:<14>",
" class A { QQ }","/TEST.java:1: <identifier> expected",-1,"",0,"",0);
}
COM: <s> test that harness reports a wrong column </s>
|
funcom_train/5228331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private XmlSchema getSchema(Object includeOrImport) {
XmlSchema schema;
if (includeOrImport instanceof XmlSchemaImport) {
schema = ((XmlSchemaImport) includeOrImport).getSchema();
} else if (includeOrImport instanceof XmlSchemaInclude) {
schema = ((XmlSchemaInclude) includeOrImport).getSchema();
} else {
// skip ?
schema = null;
}
return schema;
}
COM: <s> get a schema from an import </s>
|
funcom_train/21225090 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasClassMeaning() {
switch (getGroup()) {
case GROUP_GENERAL_DATA_CODING:
case GROUP_AUTOMATIC_DELETION:
return (value & 0x10) != 0; // B4
case GROUP_MESSAGE_CODING_CLASS:
return true; // assumed always class meaning with group 1111
default: // all other groups
return false;
}
}
COM: <s> this indicates that bits 1 and 0 have a class meaning </s>
|
funcom_train/4412512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addToken(String token, String translation) {
int len = token.length();
if (len>currentMax) {
for (int i=currentMax; i<len; i++) {
// initialize
tokens.add(new HashMap<String, String>());
}
currentMax = len;
}
if (tokens.get(len-1).put(token, translation)!=null) {
// previous value exists
throw new IllegalArgumentException("Token already in list: " + token);
}
tokenCount++;
}
COM: <s> adds a token to the list of translations </s>
|
funcom_train/25826767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JPanel initChartOptionPanel() {
chartOptionPanel = new JPanel(new BorderLayout());
chartOptionPanel.setBorder(BorderFactory.createEtchedBorder());
westP = new JPanel();
chartOptionPanel.add(BorderLayout.WEST, westP);
centerP = new JPanel();
chartOptionPanel.add(BorderLayout.CENTER, centerP);
return chartOptionPanel;
}
COM: <s> usage initialize the chart option panel </s>
|
funcom_train/4628737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean performFinish() {
WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException {
finishPage(monitor);
}
};
try {
getContainer().run(false, true, op);
} catch (InvocationTargetException e) {
return false;
} catch (InterruptedException e) {
return false; // canceled
}
return true;
}
COM: <s> this method is called when finish button is pressed in </s>
|
funcom_train/22371459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Point computeDisplayPoint(int x, int y, Dimension dim) {
int computedX = x;
int computedY = y;
if (computedX - dim.width > 0) {
computedX -= dim.width;
}
if (computedY - dim.height > 0) {
computedY -= dim.height;
}
return new Point(computedX, computedY);
}
COM: <s> compute the proper position for a popup </s>
|
funcom_train/2486952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return "<font class='file" + (firstFile ? "1" : "2") + "-code'>" +
(firstFile ? "<" : ">") + HtmlEncoder.encode(getLine()) + "</font><br>";
}
COM: <s> by default this renders a html result </s>
|
funcom_train/9567280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setExternalDigest(byte digest[], byte RSAdata[], String digestEncryptionAlgorithm) {
externalDigest = digest;
externalRsaData = RSAdata;
if (digestEncryptionAlgorithm != null) {
if (digestEncryptionAlgorithm.equals("RSA")) {
this.digestEncryptionAlgorithm = ID_RSA;
} else if (digestEncryptionAlgorithm.equals("DSA")) {
this.digestEncryptionAlgorithm = ID_DSA;
} else
throw new ExceptionConverter(new NoSuchAlgorithmException("Unknown Key Algorithm "
+ digestEncryptionAlgorithm));
}
}
COM: <s> sets the digest signature to an external calculated value </s>
|
funcom_train/6445976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getDeployerHandle(String handleFile) throws Exception {
File myHandleFile = new File(handleFile);
//get the object
ObjectInputStream objectIn = new ObjectInputStream(new FileInputStream(myHandleFile));
//get the handle
Handle deployerHandle = (Handle) objectIn.readObject();
this.deployer = (DeployerObject) deployerHandle.getEJBObject();
}
COM: <s> this function gets the deployer handle </s>
|
funcom_train/32777562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleDetachEvent(DetachEvent event) {
String name = event.getTargetName();
//check whether the object to be move exists
if(!_dynamicObjectMap.containsKey(name)){
throw new RuntimeException("The visible object which should attach " +
"can't be found.");
}
DynamicObject detachObject = _dynamicObjectMap.get(name);
if(detachObject.isAttached()){
detachObject.detach(_defaultGroup);
}
}
COM: <s> handles the detach event </s>
|
funcom_train/43245844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetBNStreetAddr1() {
System.out.println("setBNStreetAddr1");
String bNStreetAddr1 = "";
EmergencyContactDG5Object instance = new EmergencyContactDG5Object();
instance.setBNStreetAddr1(bNStreetAddr1);
// 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 bnstreet addr1 method of class org </s>
|
funcom_train/20496213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean agentMove(){
int best = -1;
if ((cross | circle) == DONE) {
return false;
}
int[] board = {circle,cross};
agent.activateDecisionProcess(board);
mutex.down();
best = agentChoice;
doAgentMove(best);
return true;
}
COM: <s> computer move this will invoke code code if </s>
|
funcom_train/3597161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getProgramArguments(Element xmlele, NLayer layer) {
NodeIterator nodeit=null;
try {
nodeit = XPathAPI.selectNodeIterator(xmlele, NiteMetaConstants.argumentxpath);
} catch (TransformerException ex) {
ex.printStackTrace();
}
Element e;
while ((e=(Element)nodeit.nextNode())!= null) {
layer.addProgramArgument(e.getAttribute(NiteMetaConstants.value),
e.getAttribute(NiteMetaConstants.objectDefault));
}
}
COM: <s> extract the arguments to be passed to the external program </s>
|
funcom_train/22920243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(InputStream in, OutputStream out) throws IOException {
BufferedInputStream bin = new BufferedInputStream(in);
BufferedOutputStream bout = new BufferedOutputStream(out);
din = new DataInputStream(bin);
// dout = new DataOutputStream(bout);
dout = new DataOutputStream(new CountingOutputStream(bout));
}
COM: <s> init transport using these streams </s>
|
funcom_train/4533824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ChatRoom getAssociatedChatRoom(PhonePanel phonePanel) {
for (ChatRoom chatRoom : SparkManager.getChatManager().getChatContainer().getChatRooms()) {
Component comp = chatRoom.getSplitPane().getRightComponent();
if (phonePanel.equals(comp)) {
return chatRoom;
}
}
return null;
}
COM: <s> returns the associated chat room if one exists </s>
|
funcom_train/25575620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() {
final Box contentBox = new Box(BoxLayout.PAGE_AXIS);
// color options
contentBox.add(initElementColorPanel());
contentBox.add(initFontColorPanel());
// SynAnalysis.IndentationWidth
// contentBox.add(initIndentationPanel());
// Font
contentBox.add(initFontPanel());
add(contentBox, HORIZONTAL_SPAN);
GridBagConstraints spacing = new GridBagConstraints();
spacing.fill = GridBagConstraints.VERTICAL;
spacing.weighty = 1;
spacing.gridy = 1;
add(new JPanel(), spacing);
setMinimumSize(getPreferredSize());
}
COM: <s> initializes all components and their default values </s>
|
funcom_train/26597337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(_ServerSession serverSession) throws DException {
String bve = "role_name = ?";
_ServerSession globalSession = serverSession.getGlobalSession();
booleanvalueexpression condition = ConditionParser.parseCondition(bve, globalSession, SqlSchemaConstants.roles_TableName);
super.delete(serverSession, SqlSchemaConstants.roles_TableName, condition,
new Object[] {role_name});
}
COM: <s> remove the all information of a particular role from roles system table </s>
|
funcom_train/45792900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String convert(String txt) {
if (txt == null) {
txt = "";
}
BotlistMarkStringUtil text = new BotlistMarkStringUtil(txt);
try {
text.replaceAll("\\r\\n", "\n");
text.replaceAll("\\r", "\n");
text.replaceAll("^[ \\t]+$", "");
text.append("\n\n");
text.detabify();
text.deleteAll("^[ ]+$");
stripLinkDefinitions(text);
text = runBlockGamut(text);
text.append("\n");
} catch(Exception ex) {
return text.toString();
}
return text.toString();
}
COM: <s> perform the conversion from markdown to html </s>
|
funcom_train/22277982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void completeEditing() {
boolean textDidChange = _textChanged;
if (!isBeingEdited()) {
return;
}
if (_owner != null &&
!_owner.textEditingWillEnd(this, TextFieldOwner.RESIGNED_FOCUS,
textDidChange)) {
return;
}
_completeEditing();
if (_owner != null) {
_owner.textEditingDidEnd(this, TextFieldOwner.RESIGNED_FOCUS,
textDidChange);
}
}
COM: <s> causes the text field to complete any editing by retaining all </s>
|
funcom_train/852681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reinit() {
Cube ancienCube = cube;
CubeMatrix.getInstance().addObserver(this);
cube = CubeMatrix.getInstance().getCube(ancienCube.getX(), ancienCube.getY(), ancienCube.getZ());
if (label != null) {
label.getParent().remove(label);
label = null;
}
this.setBackground(null);
this.setVisible(true);
alreadyChanged = false;
}
COM: <s> reinitialization of this button for a new game </s>
|
funcom_train/7772523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JDateChooser getDataTrasporto() {
if (dataTrasporto == null) {
dataTrasporto = new JDateChooser("dd/MM/yyyy", "##/##/##", '_');
dataTrasporto.setBounds(new Rectangle(235, 137, 100, 24));
dataTrasporto.setDate(new Date());
}
return dataTrasporto;
}
COM: <s> this method initializes data trasporto </s>
|
funcom_train/38535698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeDuration(int start, int end)throws PropagationFailureException {
for (int i=0; i< possibleResourceIndexList.size(); i++) {
((ActResourceDomain)resources.get(possibleResourceIndexList.get(i))).removeDurationRange(start,end, true);
}
removeEmptyResources();
}
COM: <s> removes a range of values from the duration of this operation </s>
|
funcom_train/34340564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOtherSMS() {
if (OtherSMS == null) {//GEN-END:|46-getter|0|46-preInit
// write pre-init user code here
OtherSMS = new Command("OtherSMS", Command.OK, 0);//GEN-LINE:|46-getter|1|46-postInit
// write post-init user code here
}//GEN-BEGIN:|46-getter|2|
return OtherSMS;
}
COM: <s> returns an initiliazed instance of other sms component </s>
|
funcom_train/47462737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected PrivExprElement pvm(PrivExprElement... expr) {
if (expr == null)
return null;
if (expr.length == 0)
return null;
if (expr.length == 1) {
return pe.mergePrivilege(null, expr[0]);
}
PrivExprElement exp = pe.mergePrivilege(expr[0], expr[1]);
for (int i = 2; i < expr.length; i++) {
exp = pe.mergePrivilege(exp, expr[i]);
}
return exp;
}
COM: <s> merge the elements of privilege expression </s>
|
funcom_train/8039309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDeserializationWithException() throws Exception {
Object obj =
SerializationTestHelper.deserializeStream(
"witness/serialization/exception.bin");
assertTrue(obj instanceof LoggingEvent);
LoggingEvent event = (LoggingEvent) obj;
assertEquals("Hello, world.", event.getMessage());
assertEquals(Level.INFO, event.getLevel());
}
COM: <s> deserialize a logging event with an exception </s>
|
funcom_train/40358361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Node resolveNode(AbstractElement<?> parent, Node node, String nodeName) {
if (node == null) {
Node n = ((Graph) parent).getNode(nodeName);
if (n == null) {
throw new InvalidNodeNameException(nodeName);
}
return n;
}
return node;
}
COM: <s> if node reference is null will resolve node name to node reference </s>
|
funcom_train/13314421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visit(RelationUpdate n, A argu) {
n.nodeToken.accept(this, argu);
n.target.accept(this, argu);
n.nodeOptional.accept(this, argu);
n.nodeToken1.accept(this, argu);
n.componentAssignCommalist.accept(this, argu);
n.nodeToken2.accept(this, argu);
}
COM: <s> node token update </s>
|
funcom_train/39213412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void WidgetSelected(TreeItem tItem) {
JobItem item = (JobItem)(tItem.getData());
if(item.state == JobItem.STATE_ERROR)
startTransfer(new TreeItem[]{item.item});
else {
if(item.state == JobItem.STATE_FINISH)
return;
stopTransfer(item);
}
}
COM: <s> double click event of the job table view </s>
|
funcom_train/2578597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (!(obj instanceof DefaultPolarItemRenderer)) {
return false;
}
DefaultPolarItemRenderer that = (DefaultPolarItemRenderer) obj;
if (!this.seriesFilled.equals(that.seriesFilled)) {
return false;
}
return super.equals(obj);
}
COM: <s> tests this renderer for equality with an arbitrary object </s>
|
funcom_train/4644670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIdPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BaseObject_id_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BaseObject_id_feature", "_UI_BaseObject_type"),
TassooPackage.Literals.BASE_OBJECT__ID,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the id feature </s>
|
funcom_train/39369931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkStorageBufferOverflow(long storageIndex, long stride, long count) throws IllegalArgumentException {
long lengthRequested = storageIndex + stride * (count - 1);
if (lengthRequested >= _length) {
throw new IllegalArgumentException("Requested operation will overflow the buffer: buffer length is " + _length
+ ", requested length is " + lengthRequested);
}
}
COM: <s> check that requested operation will not overflow the storage buffer </s>
|
funcom_train/28350617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Component makeTableRow() {
final JTabbedPane tabPane = new JTabbedPane();
tabPane.add( "Objectives", makeObjectivesView() );
tabPane.add( "Correctors", makeCorrectorView() );
tabPane.add( "BPMs", makeBPMView() );
final Box row = new Box( BoxLayout.X_AXIS );
row.add( tabPane );
return row;
}
COM: <s> make a view that displays tables of correctors bpms and objectives </s>
|
funcom_train/35079099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getHeight() {
ensureIndexAvailable();
Row row = (Row)document.getPage(pageIndex).getRow(rowIndex);
Paragraph paragraph = row.getParagraph();
int insertIndex = row.getStartIndex() + columnIndex;
Glyph g = paragraph.child(insertIndex);
if(g instanceof Char)
return paragraph.getStringFormat(insertIndex).getFont().height();
return g.height();
}
COM: <s> get the height of the caret </s>
|
funcom_train/21606442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setServiceLocatorExceptionClass(Class serviceLocatorExceptionClass) {
if (serviceLocatorExceptionClass != null && !Exception.class.isAssignableFrom(serviceLocatorExceptionClass)) {
throw new IllegalArgumentException(
"serviceLocatorException [" + serviceLocatorExceptionClass.getName() + "] is not a subclass of Exception");
}
this.serviceLocatorExceptionConstructor =
determineServiceLocatorExceptionConstructor(serviceLocatorExceptionClass);
}
COM: <s> set the exception class that the service locator should throw if service </s>
|
funcom_train/24571182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int addScene(String doc) {
boolean oldvalue = addSceneResult;
// sanity check
if (doc == null) {
return RV_INVALID_SCENE;
}
Logger.debug(this, 2, "Start parsing scene");
boolean newValue = parseScene(doc);
propertySupport.firePropertyChange(StateVariableSceneXML.SCENE_XML,
oldvalue, newValue);
return RV_FAIL;
}
COM: <s> add a new scene </s>
|
funcom_train/36618690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String result = "Type:" + type + "\n";
result += "Scope:" + scope + "\n";
result += "Depth:" + depth + "\n";
result += "Owner:" + owner + "\n";
result += "Expiration:" +
WebDAVServlet.getHttpDate(new Date(expiresAt)) + "\n";
Iterator tokensList = tokens.iterator();
while (tokensList.hasNext()) {
result += "Token:" + tokensList.next() + "\n";
}
return result;
}
COM: <s> get a string representation of this lock token </s>
|
funcom_train/38861761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBackCommand() {
if (backCommand == null) {//GEN-END:|145-getter|0|145-preInit
// write pre-init user code here
backCommand = new Command("Back", Command.BACK, 0);//GEN-LINE:|145-getter|1|145-postInit
// write post-init user code here
}//GEN-BEGIN:|145-getter|2|
return backCommand;
}
COM: <s> returns an initialized instance of back command component </s>
|
funcom_train/44574106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visitJmlMethodDeclaration( JmlMethodDeclaration self ) {
newLine();
//// if (self.hasSpecification()) {
//// mayStartAnnotation();
//// self.methodSpecification().accept(this);
//// mayEndAnnotation();
//// }
boolean isRacMethod = self.isRacMethod();
boolean isModel = self.isModel();
mayStartAnnotation(isModel);
if(isRacMethod){
visitRacJmlMethodDeclaration(self);
}else{
// self.acceptDelegee(this);
}
mayEndAnnotation(isModel);
}
COM: <s> prints a jml method declaration </s>
|
funcom_train/10502658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void prepareTask() {
getProject().setProperty("ivy.version", Ivy.getIvyVersion());
// push current project and Ivy on the stack in context
IvyContext.pushNewCopyContext();
IvyContext.getContext().setIvy(getIvyInstance());
IvyContext.getContext().push(ANT_PROJECT_CONTEXT_KEY, getProject());
}
COM: <s> called when task starts its execution </s>
|
funcom_train/16410722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String formatTime(double timeSinceStart) {
String s = String.format("%02d", (int) timeSinceStart % 60);
String m = String.format("%02d", (int) (timeSinceStart / 60) % 60);
String h = String.format("%02d", (int) ((timeSinceStart / 60) / 60) % 60);
return h + ":" + m + ":" + s;
}
COM: <s> formats the time in hh mm ss </s>
|
funcom_train/2882161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public VMWareImageModule createImageModule(String inPath) throws FileNotFoundException {
// try to create the new image module
VMWareImageModule newImg = VMWareImageModule.createImageModule(inPath, this);
if (newImg != null) {
// if the creation has been successful add the module to the list
listImageModule.add(newImg);
}
return newImg;
}
COM: <s> creates a vmware image module from an existing virtual machine image </s>
|
funcom_train/46377180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public interface PlacemarkListener {
/**
* A Placemark has been added.
*
* @param placemark The Placemark added
* @param type Either USER or SYSTEM
*/
public void placemarkAdded(Placemark placemark, PlacemarkType type);
/**
* A Placemark has been removed.
*
* @param placemark The Placemark removed
* @param type Either USER or SYSTEM
*/
public void placemarkRemoved(Placemark placemark, PlacemarkType type);
}
COM: <s> a listener indicating that a change has happened to the set of registered </s>
|
funcom_train/45354875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getRemove() {
if (Remove == null) {
Remove = new JButton();
Remove.setBounds(147, 141, 86, 18);
Remove.setText("Remove");
Remove.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
String Temp = (String) jList1.getSelectedValue();
getDefaultListModel1().removeElement(Temp);
}
});
}
return Remove;
}
COM: <s> this method initializes up </s>
|
funcom_train/50336206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean init() {
// Generate the AudioSource
al.alGenSources(1, _source, 0);
if (JoalAudioFactory.checkALError()) {
log.warn("Error creating JoalSource (" + this.getSystemName() + ")");
_source = null;
return false;
}
return true;
}
COM: <s> initialise this audio source </s>
|
funcom_train/4817531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setImagePath(String path) {
if (this.image != null) {
this.image.dispose();
}
if (path != null) {
this.image = new Image(getParent().getDisplay(), path);
setSize(getImageSize());
} else {
this.image = null;
}
redraw();
fireImageChanged();
}
COM: <s> sets the image based on a file path </s>
|
funcom_train/50892115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addGraphicsCentered(String[] graphics, String[] mask) {
int line = (NUMBER_OF_LINES - graphics.length) / 2;
int column = (NUMBER_OF_COLUMNS - graphics[0].length()) / 2;
addGraphics(line, column, graphics, mask);
}
COM: <s> paints a multi colored text graphics object centered into the text view </s>
|
funcom_train/1536577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOutputSegmentsAndPolygonsEuclidianVisible(boolean visible){
for (int i=0; i<outputSegments.size(); i++)
outputSegments.getElement(i).setEuclidianVisible(visible);
for (int i=0; i<outputPolygons.size(); i++)
outputPolygons.getElement(i).setEuclidianVisible(visible, false);
}
COM: <s> set visibility of output segments and polygons </s>
|
funcom_train/42341697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public int fac(int j) throws ArithmeticException {
int i = j;
int d = 1;
if (j < 0) {
i = Math.abs(j);
}
while (i > 1) {
d *= i--;
}
if (j < 0) {
return -d;
} else {
return d;
}
}
COM: <s> compute the factorial of the argument </s>
|
funcom_train/2903842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XMLTag getXML(){
XMLTag parent = new XMLTag(null);
parent.tag = "MenuItem";
parent.level = 0;
Vector v = new Vector();
parent.value = (Object)v;
if((separator!=null) && (separator.length()>0)){
parent.attribute = new Hashtable(1);
parent.attribute.put("separator", separator);
}
boolean any = false;
if(draw != null){
XMLTag c = draw.getXML();
if(c != null){
c.reparent(parent);
v.add(c);
any = true;
}
}
if(exec != null){
XMLTag c = exec.getXML();
if(c != null){
c.reparent(parent);
v.add(c);
any = true;
}
}
if(any){
return parent;
}
else{
return null;
}
}
COM: <s> get xml tag of this menu item </s>
|
funcom_train/7260324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerMessageType( Message message ) throws MessageException {
try{
this_mon.enter();
byte[] id_bytes = message.getIDBytes();
if( message_map.containsKey( id_bytes ) ) {
throw new MessageException( "message type [" +message.getID()+ "] already registered!" );
}
message_map.put( id_bytes, message );
messages.add( message );
}finally{
this_mon.exit();
}
}
COM: <s> register the given message type with the manager for processing </s>
|
funcom_train/12895793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pageBeginRender(PageEvent event) {
List<GenericValue> reportList = getReportDAO().getFilteredReports();
_log.info("Opening rss view with " + reportList.size() + " report item(s)");
setSiteURL(
event.getRequestCycle().getAbsoluteURL(""));
setFeedList(reportList);
}
COM: <s> get the build reports from the past 24 hours </s>
|
funcom_train/45108123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int mapScenario(int scenarioIdx, boolean rootOnly) throws Exception {
Vector<Object> v = new Vector<Object>();
v.addElement(scenarioIdx);
v.addElement(true);// isScenario == true
v.addElement(rootOnly);
return (Integer) handleCommand("mapTest: test index-" + scenarioIdx, "mapTest", v);
}
COM: <s> will map a scenario at index scenario idx </s>
|
funcom_train/9567432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOutputIntents(String outputConditionIdentifier, String outputCondition, String registryName, String info, byte destOutputProfile[]) throws IOException {
ICC_Profile colorProfile = (destOutputProfile == null) ? null : ICC_Profile.getInstance(destOutputProfile);
setOutputIntents(outputConditionIdentifier, outputCondition, registryName, info, colorProfile);
}
COM: <s> sets the values of the output intent dictionary </s>
|
funcom_train/21616696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateRatio() {
String curr1 = currPairs.getSelectedItem().toString().substring(0,3);
String curr2 = currPairs.getSelectedItem().toString().substring(3,6);
if (buySell.getSelectedItem().toString().equals("Buy"))
ratio.setText(PriceController.getInstance().getPrice(curr1, curr2).getBuy()+"");
else
ratio.setText(PriceController.getInstance().getPrice(curr1, curr2).getSell()+"");
}
COM: <s> if the client selected sell it swaps curr1 and curr2 s data </s>
|
funcom_train/31363422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getNames() {
Vector rVector = new Vector ();
rVector.add ("PermID");
rVector.add ("ClassID");
rVector.add ("Units");
rVector.add ("EntryDate");
rVector.add ("ExitDate");
rVector.add ("DiscoveryDate");
return rVector;
}
COM: <s> returns a vector of field names for all the roster columns </s>
|
funcom_train/18808500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIndexOf() {
final XYSeries s1 = new XYSeries("Series 1");
s1.add(1.0, 1.0);
s1.add(2.0, 2.0);
s1.add(3.0, 3.0);
assertEquals(0, s1.indexOf(new Double(1.0)));
}
COM: <s> simple test for the index of method </s>
|
funcom_train/6514936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public View resolveViewName(String name, Locale locale) throws ResourceException {
if (suffix != null) name += suffix;
Template template = wm.getTemplate(name);
WebMacroView view = new WebMacroView(wm, template);
if (requestContextAttribute != null) {
view.setRequestContextAttribute(requestContextAttribute);
}
return view;
}
COM: <s> resolve a view by using it as a path to a template </s>
|
funcom_train/12170373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void expandSegmentArray() {
if (segments == null) {
segments = new StringSegment[INITIAL_SEGMENT_CELLS];
} else {
int newSize = segments.length + EXTRA_SEGMENT_CELLS;
StringSegment[] newSegments = new StringSegment[newSize];
System.arraycopy(segments, 0, newSegments, 0,
segments.length);
segments = newSegments;
}
}
COM: <s> expand the segment array </s>
|
funcom_train/33522938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeEndDocument() {
try {
if (indent)
handler.ignorableWhitespace("\n".toCharArray(), 0, 1);
handler
.endElement(Constants.MARCXML_NS_URI, COLLECTION,
COLLECTION);
handler.endPrefixMapping("");
handler.endDocument();
} catch (SAXException e) {
throw new MarcException(
"SAX error occured while writing end document", e);
}
}
COM: <s> writes the root end tag to the result </s>
|
funcom_train/34011745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PropertyValueResult findAllPropertiesValuesFor(String propertyValueKey) {
String resourceBundleContextKey = super.getResourceBundleContext().generateResourceBundleContextKey();
List<PropertyValue> propertyValues = (List<PropertyValue>) super.getPropertyValueDAO().findAllByResourceBundleContextKey(resourceBundleContextKey);
return new PropertyValueResultImpl(propertyValues, resourceBundleContextKey, super.getResourceBundleContext().getKeySeparator());
}
COM: <s> find all properties values for a property value key </s>
|
funcom_train/24078860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean overMaximal(Map<Criterion, Double> alternative) {
if (!alternative.keySet().equals(m_criteria)) {
throw new IllegalArgumentException("Invalid criteria set.");
}
final AlternativeEvaluations target = new AlternativeEvaluations(alternative);
for (AlternativeEvaluations eval : m_maximalAlternatives.values()) {
try {
if (target.dominates(eval)) {
return true;
}
} catch (InvalidInputException exc) {
throw new IllegalStateException("Should not happen.");
}
}
return false;
}
COM: <s> the given alternative must be evaluated on the criteria bound to this object </s>
|
funcom_train/17008656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSoTimeout(int timeout) throws SocketException {
try {
if (comm_socket_ != null) {
comm_socket_.setSoTimeout(timeout);
}
if (data_sockets_ != null) {
for (int i = 0; i < number_of_streams_; i++) {
data_sockets_[i].setSoTimeout(timeout);
}
}
}
catch (SocketException e) {
throw e;
}
}
COM: <s> enable disable so timeout with the specified timeout in milliseconds </s>
|
funcom_train/3389631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean classExists(Identifier nm) {
if (nm.isInner()) {
nm = nm.getTopName(); // just in case
}
Type t = Type.tClass(nm);
try {
ClassDeclaration c = (ClassDeclaration)classes.get(t);
return (c != null) ? c.getName().equals(nm) :
getPackage(nm.getQualifier()).classExists(nm.getName());
} catch (IOException e) {
return true;
}
}
COM: <s> check if a class exists </s>
|
funcom_train/15405870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DbEncryptFunction getDbEncryptFunction(int jdbcType) {
switch (jdbcType) {
case Types.VARCHAR:
return varcharEncryptFunction;
case Types.CLOB:
return varcharEncryptFunction;
case Types.CHAR:
return varcharEncryptFunction;
case Types.LONGVARCHAR:
return varcharEncryptFunction;
case Types.DATE:
return dateEncryptFunction;
case Types.TIMESTAMP:
return timestampEncryptFunction;
default:
return null;
}
}
COM: <s> return the db encryption function for the given jdbc type </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.