__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/1883182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextPane getDescriptionTextArea() {
if (this.descriptionTextArea == null) {
this.descriptionTextArea = new JTextPane();
this.descriptionTextArea.setPreferredSize(new Dimension(200, 45));
this.descriptionTextArea.setSize(new Dimension(200, 45));
// descriptionTextArea.setLineWrap(true);
// descriptionTextArea.setWrapStyleWord(true);
this.descriptionTextArea.setEditable(false);
}
return this.descriptionTextArea;
}
COM: <s> this method initializes description text area </s>
|
funcom_train/43391427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() throws IOException {
fw.write("echo '- Wrapper script finished succesfully '>> gridnfo.log \n nfo \n");
if (compressoutputs){
fw.write("compressouts \n");
}
if (callback) {
fw.write("uploadouts '6' \n");
}
fw.write("exit 0 \n");
fw.flush();
fw.close();
}
COM: <s> finishes the wrapper script print succes to gridnfo is success </s>
|
funcom_train/26480811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String trimPrefix(String name) {
char[] ch = name.toCharArray();
int pos = -1;
for (int i=0; i<ch.length; i++)
{
boolean found = Character.isUpperCase(ch[i]);
if (found) pos = i;
}
if (pos<1) return null;
return name.substring(0,pos);
}
COM: <s> return null or the service name </s>
|
funcom_train/32877766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("USSI".equals(portName)) {
setUSSIEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/3108624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void runTask() {
// execution should not forward exceptions
try {
runTaskTemplate();
} catch (HubTaskException he) {
exceptions.add(he);
logger.error("Catched HubTaskException in "
+ this.getClass().getName(), he);
} catch (Exception e) {
exceptions.add(e);
logger.error("Catched unexpected " + e.getClass().getName()
+ " in " + this.getClass().getName(), e);
}
}
COM: <s> wrapper method to catch exceptions and make the execution of tasks safe </s>
|
funcom_train/9556974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getBlackListSize(long accountId) throws ListLoadingException {
try {
AccountEntity account = anAccountEntityHome.findByPrimaryKey(new Long(accountId));
return account.getBlackList().size();
} catch (Exception e) {
System.out.println(e.getMessage());
throw new ListLoadingException();
}
}
COM: <s> returns size of the black list </s>
|
funcom_train/5451295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void PrintOptions() {
StrLLastProjects LastOPrFiles = (StrLLastProjects)(getOptions(cRecentProjectsOName));
super.PrintOptions();
if (LastOPrFiles != null) {
System.out.println("");
System.out.println("Last Opened Projects");
LastOPrFiles.PrintItems();
}
}
COM: <s> for test only </s>
|
funcom_train/27839637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInvalidClass() throws Exception {
String xmlString = "<bogus name=\"string is not an actor\"/>";
ActorFactory factory = ActorFactory.getInstance();
try {
factory.addType("bogus", "java.lang.String");
Actor actor = factory.create(getTestActorDefinition(xmlString), "aTagName");
fail("expected an ActorFactoryException");
} catch (ActorFactoryException e) {
// o-tay!
} finally {
factory.removeType("bogus");
}
}
COM: <s> test that we throw the right exception when creating an actor when </s>
|
funcom_train/13849317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeInt(DataOutput out, int val) throws IOException {
intBuf[0] = (byte) (val >> 24);
intBuf[1] = (byte) (val >> 16);
intBuf[2] = (byte) (val >> 8);
intBuf[3] = (byte) val;
out.write(intBuf);
}
COM: <s> write an int value in single write operation </s>
|
funcom_train/26040649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(String uri, Class< ? > procClass)
{
if ( ! Procedure.class.isAssignableFrom(procClass) )
{
ALog.warn(this, "Class "+procClass.getName()+" is not a Procedure" );
return ;
}
registry.put(uri, new ProcedureFactoryAuto(procClass)) ;
}
COM: <s> insert a class that is the procedure implementation </s>
|
funcom_train/17498022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getResourceFile(String resource) {
File file = new File(resource);
if (file.exists())
return file;
file = new File(getTestResourcesDir() + "/" + resource);
if (file.exists())
return file;
throw new IllegalArgumentException("Cannot obtain '"
+ getTestResourcesDir() + "/" + resource + "'");
}
COM: <s> try to discover the file for the test resource </s>
|
funcom_train/4495954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton() {
if (jButton == null) {
jButton = new JButton();
jButton.setFont(new Font("\u30e1\u30a4\u30ea\u30aa", Font.PLAIN, 12));
jButton.setBounds(new Rectangle(115, 55, 66, 31));
jButton.setText("Cancel");
jButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
exitDialog();
}
});
}
return jButton;
}
COM: <s> this method initializes j button </s>
|
funcom_train/36186783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getJCheckBoxIsParent() {
if (jCheckBoxIsParent == null) {
jCheckBoxIsParent = new JCheckBox();
jCheckBoxIsParent.setBounds(new Rectangle(459, 168, 21, 21));
}
return jCheckBoxIsParent;
}
COM: <s> this method initializes j check box is parent </s>
|
funcom_train/37513828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ClassDoc overriddenClass() {
MjClassDoc c = (MjClassDoc)containingClass();
MjClassDoc sp = MjdocWrapper.lookup(c.cclass().getSuperClass());
if (sp == null) return null;
MjMethodDoc m = sp.findMethodRecursive(this);
if (m == null) return null;
if (m.topConcreteMethod() != topConcreteMethod()) return null;
return m.containingClass();
}
COM: <s> returns the super class that contains the method that this method overrides </s>
|
funcom_train/23044655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addRetryDelayPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SyncActivity_retryDelay_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SyncActivity_retryDelay_feature", "_UI_SyncActivity_type"),
ConceptPackage.Literals.SYNC_ACTIVITY__RETRY_DELAY,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the retry delay feature </s>
|
funcom_train/40504967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireResourceAdded(String parentPath, String resourceName) {
ResourceManagerEvent evt = new ResourceManagerEvent(this, parentPath, resourceName);
for (int i = listeners.size() - 1; i >= 0; i--) {
listeners.get(i).resourceAdded(evt);
}
}
COM: <s> delivers a resource added event to all currently registered listeners </s>
|
funcom_train/16884503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean hasLateBindingInformation(DataSource dataSource) {
boolean hasLateBindingInformation = false;
hasLateBindingInformation = dataSource != null
&& dataSource.getLateBinding().getPolicy() != null
&& dataSource.getLateBinding().getStrategy() != null
&& dataSource.getLateBinding().getUddiAddress() != null;
return hasLateBindingInformation;
}
COM: <s> checks if a given data source has late binding information </s>
|
funcom_train/44282410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void storeSingleGroup (Patch p, int groupNum,int bankNum)
{
byte[] gsysex = ((Patch)p).sysex;
byte[] ggsysex = new byte[127];
for (int i=0;i<64;i++){
gsysex[127 * i + 5]=(byte)0x0F;
gsysex[127 * i + 6]=(byte)(groupNum * 64 + bankNum * 8 + i);
gsysex[127 * i + 7]=(byte)0x00;
System.arraycopy(gsysex,127 * i,ggsysex,0,127);
sendPatchWorker(new Patch(ggsysex,this));
try {Thread.sleep(sleepTime); } catch (Exception e){}}
}
COM: <s> worker for store patch </s>
|
funcom_train/19567268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectGroup(int start, int end) {
if ((start <= getRowCount()) && (start >= 0) && (end <= getRowCount())
&& (end >= 0)) {
for (int i = start; i <= end; i++) {
changeSelection(i, 0, false, false);
}
}
((DataTool) tool).highlight();
}
COM: <s> selects group in all cases including start and end </s>
|
funcom_train/45775439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void remove(String imageName) {
try {
Object conf = Configuration.getConfigurationRoot(xMSF,WebWizardConst.CONFIG_PATH + "/BackgroundImages",true);
Configuration.removeNode(conf,imageName);
}
catch (Exception ex) {
ex.printStackTrace();
}
}
COM: <s> when instanciating the model it checks if each image </s>
|
funcom_train/27960926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toUpperCase() {
char[] newStr = new char[count];
for (int i = 0; i < count; i++)
newStr[i] = Character.toUpperCase(value[i]);
for (int i = 0; i < count; i++)
if (value[i] != newStr[i])
return new String(newStr);
return this;
}
COM: <s> uppercases this string </s>
|
funcom_train/12619017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stay(int step, Automaton a){
Expr ex = ef.Or();
for(Event ev: a.getAlphabet())
ex.add(vl.transitionEqLabel(step, ev));
ex.add(vl.keepState(a, step));
yeild(ex);
}
COM: <s> returns clause that either event belong to automaton a or a keeps state </s>
|
funcom_train/10617198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCRLException04() {
Throwable cause = null;
CRLException tE = new CRLException(cause);
assertNull("getMessage() must return null.", tE.getMessage());
assertNull("getCause() must return null", tE.getCause());
}
COM: <s> test for code crlexception throwable code constructor assertion </s>
|
funcom_train/548851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(){
try{
IViewPart trendView = window.getActivePage().showView(viewId, Integer.toString(instanceNum), IWorkbenchPage.VIEW_ACTIVATE);
NumericTrendView viewX = (NumericTrendView)trendView;
deviceName = parentView.getMonitoredDeviceName();
viewX.connectToDevice(deviceName);
if(fromStore){
instanceNum++;
store.setValue(this.storeCounterId, this.instanceNum);
}
else{
instanceNum++;
}
}catch(PartInitException e){
}
}
COM: <s> public method for creating instances of the given view and </s>
|
funcom_train/2967106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BufferedImage getImageTile(String tilePath) throws Exception {
BufferedImage imageTile = null;
imageTile = m_imageCache.getImage(tilePath);
if (imageTile == null) {
// the tile is not in our cache, let's load it now.
InputStream is = m_currentSpecimen.getInputStream(tilePath);
imageTile = ImageIO.read(is);
is.close();
m_imageCache.add(tilePath, imageTile);
imageTile = m_imageCache.getImage(tilePath);
}
return imageTile;
}
COM: <s> this method either retrieves the requested tile from the image cache or </s>
|
funcom_train/8206212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int parsePage(){
_parse_error = 0;
_tempsearch = 0;
_related.clear();
String s = getTextBetween("translated_short_prefix_", "\" class=");
int findRelated = 0;
while ( !s.equals("") )
{
findRelated++;
String cat = getTextBetween("href=\"/results?search_category=","\"");
if (cat.equals(_policy))
_related.add(s);
s = getTextBetween("translated_short_prefix_", "\" class=");
}
if (findRelated < 1)
_parse_error = _GENERAL_ERROR; // if no related links were found at all
else
_parse_error = 0;
return _parse_error;
}
COM: <s> parse the page </s>
|
funcom_train/40437288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /* protected */ public void removeRow(int row) {
int columnCount = getCellCount(row);
for (int column = 0; column < columnCount; ++column) {
cleanCell(row, column, false);
}
DOM.removeChild(bodyElem, rowFormatter.getRow(bodyElem, row));
}
COM: <s> removes the specified row from the table </s>
|
funcom_train/13292989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PaletteContainer createLinks6Group() {
PaletteDrawer paletteContainer = new PaletteDrawer(
Messages.Links6Group_title);
paletteContainer.setDescription(Messages.Links6Group_desc);
paletteContainer.add(createTransition1CreationTool());
paletteContainer.add(createInformation2CreationTool());
paletteContainer.add(createAdmissionRequest3CreationTool());
paletteContainer.add(createOffer4CreationTool());
paletteContainer.add(createAdmissionResponse5CreationTool());
paletteContainer.add(createOfferResponse6CreationTool());
paletteContainer.add(createRequestForProposal7CreationTool());
return paletteContainer;
}
COM: <s> creates links palette tool group </s>
|
funcom_train/29629803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long runCheckPick() {
if (ci.inventoryCount(ITEM_PICK) > 0)
return 0;
else {
if (droppedPick != null) // droppedPick assigned when client notices pick falling on floor
{
ci.log("Picking lost pick up....");
ci.atGroundObject(droppedPick, 3); // 3 == pickup
return 1000 + ci.random(1000, 2000);
} else {
ci.log("Aah, we don't have any picks, quitting!");
return -1;
}
}
}
COM: <s> check if we have dropped our pick and pick it up if so </s>
|
funcom_train/1662775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedNode(Node selectedNode) {
SimpleXML selectedNodeNode = new SimpleXML("selected-node");
selectedNodeNode.append("name", selectedNode.getName());
selectedNodeNode.append("hostname", selectedNode.getHostname());
selectedNodeNode.append("port", String.valueOf(selectedNode.getPort()));
rootNode.replace(selectedNodeNode);
}
COM: <s> sets the selected node </s>
|
funcom_train/9157532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getClasses() {
ClassPathScanningCandidateComponentProvider scanner =
new ClassPathScanningCandidateComponentProvider(true);
scanner.addIncludeFilter(new AnnotationTypeFilter(Entity.class));
scanner.addIncludeFilter(new AnnotationTypeFilter(Embeddable.class));
for (BeanDefinition bd : scanner.findCandidateComponents(basePackage)) {
if (excludes==null || !excludes.contains(bd.getBeanClassName())) {
this.add(bd.getBeanClassName());
}
}
}
COM: <s> scans all classes accessible from the context class loader which belong </s>
|
funcom_train/36124107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean actionRequest(String jsonString) {
try {
Logger.getLogger(Core.class.getName()).log(Level.INFO,
"required Action:" + jsonString);
return actionRequest(new Onion(jsonString.replace('\'', '"')));
} catch (org.json.JSONException ex) {
Logger.getLogger(Core.class.getName()).log(
Level.SEVERE,
"could not convert JSONstring \"" + jsonString
+ "\" into Onion", ex);
return false;
}
}
COM: <s> main entry point for all actions required by the different components </s>
|
funcom_train/20579553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Result evaluate(final Patient patient, final String token, final Map<String, Object> parameters) {
Result result = new Result();
try {
EvaluatorService evaluatorService = Context.getService(EvaluatorService.class);
result = evaluatorService.evaluate(patient, token, parameters);
} catch (Exception e) {
log.error("Evaluating token " + token + " on patient " + patient.getPatientId() + " failed ...", e);
}
return result;
}
COM: <s> this evaluation method are meant to be used inside velocity template </s>
|
funcom_train/19604222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addNodeletHandler(Object handler) {
Class type = handler.getClass();
Method[] methods = type.getMethods();
for (Method m : methods) {
NodeEvent n = m.getAnnotation(NodeEvent.class);
if (n != null) {
checkMethodApplicable(n, type, m);
nodeletMap.put(n.value(), new NodeEventWrapper(handler, m));
}
}
}
COM: <s> registers a nodelet for the specified xpath </s>
|
funcom_train/23778493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void lexStateNotify(int argCurrentState, int argNextState) {
System.out.println("TokenManager: current = " + SasBaseParserTokenManager.lexStateNames[argCurrentState] + ", next = " + SasBaseParserTokenManager.lexStateNames[argNextState]);
}
COM: <s> debug method for printing lexical states </s>
|
funcom_train/29792907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete() throws DataAccessException {
String sql = "DELETE from AttendanceLog WHERE slotID = " + this.getSlotID()
+ " AND userID = '" + this.getStudentID() + "'"
+ " AND weekNo = " + this.getWeekNo() +
" AND courseID = '" + this.getCourseID() + "'";
TeachingDBMS.executeSQL(sql);
}
COM: <s> method to delete an attendance </s>
|
funcom_train/5214391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PaletteContainer createValueSpecification3Group() {
PaletteStack paletteContainer = new PaletteStack(Messages.ValueSpecification3Group_title, null, null);
paletteContainer.setId("createValueSpecification3Group"); //$NON-NLS-1$
paletteContainer.setDescription(Messages.ValueSpecification3Group_desc);
paletteContainer.add(createLiteralString1CreationTool());
paletteContainer.add(createLiteralInteger2CreationTool());
paletteContainer.add(createExpression3CreationTool());
return paletteContainer;
}
COM: <s> creates value specification palette tool group </s>
|
funcom_train/3391923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printClassFrameTag() {
frame("src=\"" + configuration.topFile + "\""
+ " name=\"classFrame\""
+ " title=\""
+ configuration.getText("doclet.Package_class_and_interface_descriptions")
+ "\" scrolling=\"yes\"");
}
COM: <s> print the frame tag for the frame that describes the class in detail </s>
|
funcom_train/45740708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getStringItemData () {
if (stringItemData == null) {//GEN-END:|48-getter|0|48-preInit
// write pre-init user code here
stringItemData = new StringItem ("Data:", null);//GEN-LINE:|48-getter|1|48-postInit
// write post-init user code here
}//GEN-BEGIN:|48-getter|2|
return stringItemData;
}
COM: <s> returns an initiliazed instance of string item data component </s>
|
funcom_train/51345157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startSection(int classType, String id) {
generator.startSectionCB(classType);
println();
String s = "<" + T_ONTO_PREFIX + Generator.CLASS_TOKEN[classType] + T_SPACE +
T_RDF_ABOUT + "=\"" + id + "\">";
println(s);
}
COM: <s> implementation of writer start section </s>
|
funcom_train/125911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Connection borrow()throws DBException{
synchronized (this){
if(connections.size()>0){
Key key = (Key)connections.get(connections.size()-1);
connections.remove(key);
busy.add(key.connection);
return key.connection;
}else{
Connection con = createConnection();
busy.add(con);
return con;
}
}
}
COM: <s> returns a connection from the pool </s>
|
funcom_train/22232848 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDepthComponent(DepthComponent depthComponent) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_DEPTH_COMPONENT_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("Raster5"));
((RasterRetained)this.retained).setDepthComponent(depthComponent);
}
COM: <s> sets the depth image used to copy pixels to from a canvas3 d </s>
|
funcom_train/25437842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createDestinationFolder() throws Exception {
String src = config.getFileName();
String dst = config.getDestFileName();
File srcFile = new File(src);
File dstFile = new File(dst);
if (srcFile.isDirectory() && dstFile.isFile()){
throw new Exception("Can't overwrite file to folder");
}
// Create directory if the end of the file name is '/'
if (dst.charAt(dst.length()-1) == '/') {
dstFile.mkdirs();
}
}
COM: <s> create a directory specified in the </s>
|
funcom_train/8410536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean startsWith(String str) {
if (str == null) {
return false;
}
int len = str.length();
if (len == 0) {
return true;
}
if (len > size) {
return false;
}
for (int i = 0; i < len; i++) {
if (buffer[i] != str.charAt(i)) {
return false;
}
}
return true;
}
COM: <s> checks whether this builder starts with the specified string </s>
|
funcom_train/43245517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetSpEmpStreetAddr2() {
System.out.println("setSpEmpStreetAddr2");
String spEmpStreetAddr2 = "";
EmploymentDataDG2Object instance = new EmploymentDataDG2Object();
instance.setSpEmpStreetAddr2(spEmpStreetAddr2);
// 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 sp emp street addr2 method of class org </s>
|
funcom_train/9386642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(IWorkbench workbench, IStructuredSelection selection) {
setHelpAvailable(false); // TODO have help
setWindowTitle("New Android Project");
setImageDescriptor();
if (mAvailablePages == AvailablePages.ANDROID_AND_TEST_PROJECT) {
mMainPage = createMainPage();
}
mTestPage = createTestPage();
}
COM: <s> initializes this creation wizard using the passed workbench and object </s>
|
funcom_train/5551504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int nextInt(int lower, int upper) {
if (lower >= upper) {
throw new IllegalArgumentException
("upper bound must be > lower bound");
}
RandomGenerator rand = getRan();
return lower + (int) (rand.nextDouble() * (upper - lower + 1));
}
COM: <s> generate a random int value uniformly distributed between </s>
|
funcom_train/25296380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void measureStart() {
audioProcessed = audioSequence = 0;
readError = AudioReader.Listener.ERR_OK;
audioReader.startReader(sampleRate, inputBlockSize * sampleDecimate, new AudioReader.Listener() {
@Override
public final void onReadComplete(short[] buffer) {
receiveAudio(buffer);
}
@Override
public void onReadError(int error) {
handleError(error);
}
});
}
COM: <s> we are starting the main run start measurements </s>
|
funcom_train/4361508 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isWriteable() {
File file = new File(pathname);
if (!file.isAbsolute()) {
file = new File(System.getProperty("catalina.base"),
pathname);
}
File dir = file.getParentFile();
return dir.exists() && dir.isDirectory() && dir.canWrite();
}
COM: <s> check for permissions to save this user database </s>
|
funcom_train/25484825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String check() {
if (fSubEntities.isEmpty() && fSuperEntity == null) {
return "ISA Relationship has no super entity and no sub entities";
} else if (fSubEntities.isEmpty()) {
return "ISA Relationship has no subentities";
} else if (fSuperEntity == null) {
return "ISA Relationship has no super entity";
}
return null;
}
COM: <s> checks if this isa relationship is valid </s>
|
funcom_train/34131231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAllViews() {
if (DEBUG) System.out.println( "InputView.removeAll()");
outputPane.reset();
messagePane.reset();
for ( int i = 0; i < tabs.getTabCount(); i++) {
Component comp = tabs.getComponentAt( i);
if ( comp != messagePane && comp != outputPane) {
tabs.removeTabAt( i);
if ( comp instanceof OutputPane) {
((OutputPane)comp).cleanup();
}
views.removeElement( comp);
i--;
}
}
}
COM: <s> removes all the views </s>
|
funcom_train/12159993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDocumentAsExpectedByTestCase() throws Exception {
assertEquals("elem0", rootElement.getName());
assertEquals("urn:UndoRedoTestCase:0",
rootElement.getNamespaceURI());
assertEquals("value0", rootElement.getAttributeValue("attr0"));
assertChildrenElementNamesEquals(elems1_2_3,
rootElement.getChildren());
}
COM: <s> testcase self sanity check </s>
|
funcom_train/35224093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void startRun() {
(new Thread() {
@Override
public void run() {
while (JsDebugServer.this.isRunning()) {
try {
Socket conn = JsDebugServer.this.serverSocket.accept();
new JsConnectionThread(conn, JsDebugServer.this
.getThread(), JsDebugServer.this);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}).start();
}
COM: <s> every js connection thread handle a http request </s>
|
funcom_train/3785621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTransformsEnable(boolean flag)
{ /* setTransformsEnable */
for(int i=0;i<nXformMenuCmds;i++)
if(xformMenuCmds[i]!=null && !disableXformMenuCmds[i])
xformMenuCmds[i].setEnabled(flag);
} /* setTransformsEnable */
COM: <s> set transforms enable enable disable gui transforms menu operations </s>
|
funcom_train/8436860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLength() {
System.out.println("length");
Rule instance = Rule.loadRule("r(1,2) ; r(2,3) -> r(1,3)", new RuleSymbol());
int expResult = 3;
int result = instance.length();
assertEquals(expResult, result);
assertTrue(instance.isOK());
}
COM: <s> test of length method of class nii </s>
|
funcom_train/42429281 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Rect doshrink(int w, int h, int thickness) {
Rect r = new Rect();
r.x = this.x + w;
r.y = this.y + h;
r.width = this.width*2 - thickness * 2;
r.height = this.height*2 - thickness * 2;
r.thickness = thickness;
return r;
}
COM: <s> shrinks the object size by the specified width and height </s>
|
funcom_train/45761236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cut(int startIndex, int endIndex) {
try {
((XAccessibleEditableText) unoObject).cutText(startIndex, endIndex);
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
} catch (com.sun.star.uno.RuntimeException e) {
}
}
COM: <s> cuts the text between two indices into the system clipboard </s>
|
funcom_train/32040727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSearchTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SearchType_searchType_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SearchType_searchType_feature", "_UI_SearchType_type"),
ImsldPackage.eINSTANCE.getSearchType_SearchType(),
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the search type feature </s>
|
funcom_train/49409868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testValidation() throws Exception {
try {
IESRCollection coll = new IESRCollection();
;
coll.read(new ByteArrayInputStream(emptydoc.getBytes()));
assertFalse("validation doesn't work", true);
} catch (SerializationException ex) {
assertTrue("pass validation test", true);
}
}
COM: <s> test validation by throwing in some bad documents validation is </s>
|
funcom_train/47673461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Boolean getBooleanAttribute(String p_objectName, String p_attribute) throws MalformedObjectNameException, MBeanException, AttributeNotFoundException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException {
ObjectName objectName = new ObjectName(p_objectName);
return getBooleanAttribute(objectName, p_attribute);
}
COM: <s> gets a boolean attribute from mules mbean server </s>
|
funcom_train/8886689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resetUI() {
// Header
getView().setHeaderText("(No snippet selected.)");
// Messages table
panelMessages.setTitle(PANEL_MESSAGES_TITLE);
messagesTableModel.setMessages(EMPTY_LIST_OF_MESSAGES);
// Paraphrase text-area
panelParaphrase.setTitle(PANEL_PARAPHRASES_TITLE);
textareaParaphrase.setText("");
// Annotations table
panelAnnotations.setTitle(PANEL_ANNOTATIONS_TITLE);
// Axioms editor pane
panelAxioms.setTitle(PANEL_AXIOMS_TITLE);
editorpaneAxioms.setText(ACETextManager.wrapInHtml(""));
// Similar snippets table
panelSimilarSnippets.setTitle(PANEL_SIMILAR_SNIPPETS_TITLE);
similarSnippetsTableModel.setData(EMPTY_SET_OF_SNIPPETS);
}
COM: <s> p resets the snippet editor ui </s>
|
funcom_train/11012352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPageBreakClones() {
HSSFWorkbook b = new HSSFWorkbook();
HSSFSheet s = b.createSheet("Test");
s.setRowBreak(3);
s.setColumnBreak((short) 6);
HSSFSheet clone = b.cloneSheet(0);
assertTrue("Row 3 not broken", clone.isRowBroken(3));
assertTrue("Column 6 not broken", clone.isColumnBroken((short) 6));
s.removeRowBreak(3);
assertTrue("Row 3 still should be broken", clone.isRowBroken(3));
}
COM: <s> ensures that pagebreak cloning works properly </s>
|
funcom_train/38309220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void prefetchRow() {
try {
while (tableIterator.hasNext()) {
Row row = (Row) tableIterator.next();
if (filterRule.test(row)) {
prefetchedRow = row;
break;
}
}
} catch (TableException ex) {
throw new RuntimeException("Unexpected error while prefetching next valid row.", ex);
}
}
COM: <s> prefetches the next valid row </s>
|
funcom_train/3115373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void gotoNextPanel() {
if (!nextPanels.empty()) {
prevPanels.push(currentPanel);
//debug.println("new previous = " + currentPanel.getUniqueID());
currentPanel = (DenimPanel) nextPanels.pop();
renderPanel(currentPanel);
//debug.println("displaying = " + currentPanel.getUniqueID());
}
} // of method
COM: <s> goes to the next panel in the history stack or does nothing if </s>
|
funcom_train/50912148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteColumns(int low, int high) {
high = (high > cols - 1) ? cols - 1 : high;
low = (low < 0) ? 0 : low;
for (int i = 0; i < rows; i++) {
this.flmat[i] = IntArray.deleteElements(this.flmat[i], low, high);
}
this.cols -= (high - low + 1);
}
COM: <s> delete 2 or more adjacent columns inclusive from matrix and close up </s>
|
funcom_train/3143694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getQuotedName(File file) {
String quote = (File.separatorChar == '/' ? "'" : "\"");
String name = file.getAbsolutePath();
if ((name.indexOf(' ') != -1) && !name.startsWith(quote)) {
return quote + name + quote;
} else
return name;
}
COM: <s> helper function to surround a filename with quotes if necessary </s>
|
funcom_train/3370862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBoundsForFrame(JComponent f, int newX, int newY, int newWidth, int newHeight) {
boolean didResize = (f.getWidth() != newWidth || f.getHeight() != newHeight);
f.setBounds(newX, newY, newWidth, newHeight);
if(didResize) {
f.validate();
}
}
COM: <s> this moves the code jcomponent code and repaints the damaged areas </s>
|
funcom_train/37027077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connectToDatabase() throws Exception {
if (m_Debug) {
System.err.println("Connecting to " + m_DatabaseURL);
}
if (m_Connection == null) {
m_Connection = DriverManager.getConnection(m_DatabaseURL);
m_Statement = m_Connection.createStatement();
}
}
COM: <s> opens a connection to the database </s>
|
funcom_train/3394119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printFlags(long flags) throws IOException {
if ((flags & SYNTHETIC) != 0) print("/*synthetic*/ ");
print(TreeInfo.flagNames(flags));
if ((flags & StandardFlags) != 0) print(" ");
if ((flags & ANNOTATION) != 0) print("@");
}
COM: <s> print a set of modifiers </s>
|
funcom_train/25536188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MMTImage execute(MMTImage img){
Collections.sort(sequence);
Iterator<Integer> it = sequence.iterator();
Integer tmp;
IWorkstep workstep;
MMTImage retImg = img;
while(it.hasNext()){
tmp = it.next();
workstep = worksteps.get(tmp);
retImg = workstep.processImage(retImg);
}
return retImg;
}
COM: <s> executes all processing steps within the worksteps list </s>
|
funcom_train/18365836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setLanguage() {
/*Set panel labels language*/
lbTextLine1.setText(STGlobal.strLabel("PHAL_HELP_TEXT_LINE1"));
lbTextLine2.setText(STGlobal.strLabel("PHAL_HELP_TEXT_LINE2"));
/*Set panel buttons language*/
bCancel.setText(STGlobal.strButton("PHAB_CANCEL"));
bSelect.setText(STGlobal.strButton("PHAB_SELECT"));
}
COM: <s> set the interface language </s>
|
funcom_train/10212647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void postHandle(WebRequest request, ModelMap model) throws DataAccessException {
SessionHolder sessionHolder =
(SessionHolder) TransactionSynchronizationManager.getResource(getSessionFactory());
log.debug("Flushing single Force Session in OpenSessionInViewInterceptor");
try {
flushIfNecessary(sessionHolder.getSession(), false);
} catch (ApiFault ex) {
throw convertApiFault(ex);
} catch (RemoteException re) {
throw new WebServicesCallException(re);
}
}
COM: <s> flush the force session before view rendering if necessary </s>
|
funcom_train/3898293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveUp() {
if(canMoveUp()) {
// Save parent
DataComponent parent = getParent();
// Move up in the Data Model
int index = parent.indexOfChild(this);
parent.removeChild(this);
parent.addChildAt(this, index - 1);
if(getDataModel() != null) {
getDataModel().fireDataComponentMoved(this);
}
}
}
COM: <s> move this component up </s>
|
funcom_train/14640274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFileHeader(String fileHeader) {
if (fileHeader==null)
{
throw new RuntimeException("fileHeader must not be null.");
}
String oldFileHeader = this.fileHeader;
this.fileHeader = fileHeader;
this.firePropertyChange("fileHeader",oldFileHeader,this.fileHeader);
}
COM: <s> sets the file header </s>
|
funcom_train/4285802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addRefersToPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ForeignKey_refersTo_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ForeignKey_refersTo_feature", "_UI_ForeignKey_type"),
RdbmsMMPackage.Literals.FOREIGN_KEY__REFERS_TO,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the refers to feature </s>
|
funcom_train/38322046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String baseCommand(CoefficientContext ctx) {
StringBuffer sb = new StringBuffer();
Project project = ctx.getProject();
HashMap map = new HashMap();
map.put(MODULE, this);
if (project != null) {
return null;
} else {
map.put(ERROR, NOPROJECT);
sb = VelocityScreenUtil.getProcessedScreen(ERRORPAGE, map);
}
return sb.toString();
}
COM: <s> returns null if ok otherwise it returns an error message </s>
|
funcom_train/12156637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPathInfo() {
String pathInfo = request.getPathInfo();
if (pathInfo != null) {
if (pathInfo.startsWith(URL_SEPARATOR)) {
pathInfo = pathInfo.substring(1);
}
if (pathInfo.length() == 0) {
pathInfo = null;
}
}
return pathInfo;
}
COM: <s> get the servlet relative path info </s>
|
funcom_train/3640427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doConsume(DataSink<E> consumer, DataSample<E> sample) {
// VT: FIXME: This is not error proof yet - need to catch all the
// crap they may throw
// VT: FIXME: This can be launched into a separate thread - but then
// again, how do I notify the caller about a possible problem?
consumer.consume(sample);
}
COM: <s> make sure the consumer consumes the data sample and doesnt cause us any </s>
|
funcom_train/9919016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setupGeometryShader(int inGeoPrim, int outGeoPrim) {
// Setting up the geometry shader.
int inGeo = GLUtils.parsePrimitive(inGeoPrim);
int outGeo = GLUtils.parsePrimitive(outGeoPrim);
setupGeometryShaderImpl(inGeo, outGeo, maxOutVertCount);
}
COM: <s> configures the geometry shader by setting the primitive types that it will </s>
|
funcom_train/23928694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void modifyWeightsStructuralRichnessDependentEvaluators( PropertiesModifier modifier, double rate ) {
// Remove global evaluators from properties object
for (String evaluator : structuralRichnessDependentGlobalEvaluators)
modifier.modifyGlobalEvaluatorWeight(evaluator, rate);
// Remove corr evaluators from properties object
for (String evaluator : structuralRichnessDependentCorrEvaluators)
modifier.modifyCorrEvaluatorWeight(evaluator, rate);
}
COM: <s> modifies weights of evaluators depending on structural richness </s>
|
funcom_train/29922619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void revokeRemove(UserDO user, ResourceDO resource, UserGroupDO userGroup ) throws ResourceStoreAuthorisationException {
//verify method attribute
this.verifyAttribute(removeResourceAttr);
//checking user is valid
this.authenticatedCheck(user);
this.administratorCheck(user,resource);
//removing attribute from user or group
this.revokeAttribute(userGroup,removeResourceAttr,resource);
}//end method
COM: <s> revokes the remove resource attribute </s>
|
funcom_train/7745920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doTagInheritance(String uri, String localName, String qName, Attributes attributes, XMLMappingData data) {
XMLInheritanceMappingData inheritanceMappingData = new XMLInheritanceMappingData();
inheritanceMappingData.setClazz(Constants.OBJECT_CLASS);
if (attributes.getValue("class") != null) {
inheritanceMappingData.setClazz(attributes.getValue("class"));
}
inheritanceMappingData.setTable(attributes.getValue("table"));
data.setInheritanceMappingData(inheritanceMappingData);
}
COM: <s> this method will be executed when the parser encounters the inheritance tag </s>
|
funcom_train/44771659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void evict(LRUEntry entry, boolean removeFromPathCache) {
synchronized (cacheMonitor) {
if (removeFromPathCache) {
PathMap.Element element = entry.getElement();
evict(element);
element.remove();
} else {
idCache.remove(entry.getId());
entry.remove();
}
}
}
COM: <s> evict item from cache </s>
|
funcom_train/21999582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void propertyChange(PropertyChangeEvent event) {
String property = event.getPropertyName();
// Window closed? Close window!
if (property.equals(WINDOW_CLOSE_PROPERTY)) {
dispose();
}
// Window hide?
if (property.equals(WINDOW_HIDE_PROPERTY)) {
setVisible(false);
}
// Title changed? Change title!
else if (property.equals(TITLEBAR_CHANGED_PROPERTY)) {
setTitle(module.getTitle());
// Update menu containing list of windows
if (!hideMenu) {
desktopManager.fireModuleRenamed(module);
}
}
}
COM: <s> standard property change handler that listens for a window close event </s>
|
funcom_train/44626805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testQuantifiedNonExFlow() {
helpTCF("A.java","public class A { \n"
+" public static void m() {\n"
+" //@ ghost int n = (\\num_of int i; ; n>i);\n"
+"}}"
,"/A.java:3: variable n might not have been initialized",39
);
}
COM: <s> flow checks for a non executable quantified expression </s>
|
funcom_train/43567484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean includes(RNGDocument test) throws Exception {
List<RNGIncludeElement> includes = getRNGIncludes();
URI testURI = test.getFile().toURI();
for(RNGIncludeElement included : includes) {
URI includedURI = this.getFile().toURI().resolve(included.getAttributeValue("href"));
if(includedURI.equals(testURI)) {
return true;
}
}
return false;
}
COM: <s> whether this rng document includes given rng document using the rng include element </s>
|
funcom_train/45146397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeArguments(PrintIndentWriter out) {
out.print("(");
boolean first = true;
for (Iterator it = arguments.iterator(); it.hasNext(); ) {
if (!first)
out.print(", ");
first = false;
out.print(it.next());
}
out.print(")");
if (!thrownExceptions.isEmpty()) {
out.print(" throws ");
Iterator it = thrownExceptions.iterator();
out.print(it.next());
while (it.hasNext()) {
out.print(", "+it.next());
}
}
}
COM: <s> write arguments and thrown exception for this entity </s>
|
funcom_train/7418818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateUndirectedDataAssociationsRefs() {
for (Shape shape : this.diagram.getShapes()) {
if (!shape.getStencilId().equalsIgnoreCase("sequenceflow"))
continue;
/* Retrieve sequence flow connector element */
BPMNElement seqFlowEle = this.bpmnElements.get(shape
.getResourceId());
if (seqFlowEle.getNode() instanceof SequenceFlow)
((SequenceFlow) seqFlowEle.getNode())
.processUndirectedDataAssociations();
}
}
COM: <s> an undirected association that connects a sequence flow and a data object </s>
|
funcom_train/2436591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void restore() {
treeMapper.m_sourceTreeComponent.m_root.restoreExpandedNodes(expandedSourceNodes, 0);
treeMapper.m_targetTreeComponent.m_root.restoreExpandedNodes(expandedTargetNodes, 0);
treeMapper.m_sourceTreeComponent.refresh();
treeMapper.m_targetTreeComponent.refresh();
}
COM: <s> restores the stored expansion state </s>
|
funcom_train/36957323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMaxCallDepth() {
int maxCallDepth;
IPreferenceStore settings = RubyPlugin.getDefault().getPreferenceStore();
maxCallDepth = settings.getInt(PREF_MAX_CALL_DEPTH);
if (maxCallDepth < 1 || maxCallDepth > 99) {
maxCallDepth= DEFAULT_MAX_CALL_DEPTH;
}
return maxCallDepth;
}
COM: <s> returns the maximum tree level allowed </s>
|
funcom_train/44627930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean process(Declaration ast) {
errors = false;
localScopes = new LinkedList<HashMap<String, VariableDecl>>();
symbolTable = new SymbolTable();
gc = new GlobalsCollector();
arrayCnt = 0;
lookInLocalScopes = true;
boolean e = gc.process(ast);
ast.eval(this);
return errors || e;
}
COM: <s> builds a symbol table </s>
|
funcom_train/48749323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove() throws ControllerException {
String myName = new String(thisClass + "remove()");
if (parent == null) {
throw new ControllerException(myName + ":This item is not nested "
+ "in another item - cannot remove");
}
parent.removeNested(this);
} /* remove() */
COM: <s> remove this item from the nested items of its parent </s>
|
funcom_train/18742147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getIndexAt(Point point) {
int result = getEntryArea().locationToIndex(point);
Rectangle cellBounds = getEntryArea().getCellBounds(result, result);
boolean cellSelected = cellBounds != null && cellBounds.contains(point);
return cellSelected ? result : -1;
}
COM: <s> returns the index of the list component under a given point or </s>
|
funcom_train/33412779 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BeanDescriptorEntity setEntityName( String entityName ) {
String v = null;
if (Configurator.isLowerCase()) {
v = entityName.toLowerCase();
} else {
v = entityName;
}
//this.setValue(ENTITY_NAME, Configurator.variableSubstitution(v));
this.setValue(ENTITY_NAME, v);
return this;
}
COM: <s> set entity name mapped with bean </s>
|
funcom_train/44457806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addParamCombo(String type, List<String> parameters) {
Element paramCombo = _errors.addToDataElement("param-combo");
paramCombo.setAttribute("type", type);
for (String parameter : parameters) {
Element param = _errors.createElement("param");
param.setAttribute("name", parameter);
paramCombo.appendChild(param);
}
}
COM: <s> adds an invalid combination of parameters </s>
|
funcom_train/20270810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Result processTask() {
Node subtree = getTask();
try {
if (subtree == null) {
return null;
} else {
return taskSupply.get().processSubtree(subtree);
}
} catch (Exception e) {
Result r = new Result(true);
r.exceptions.add(e);
return r;
}
}
COM: <s> get a subtree from the work list and work on it </s>
|
funcom_train/24087262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String logout() {
if (loadPlan != null) {
loadPlan.unlockProject();
}
String username = (user == null ? "" : user.getUsername());
log.info("User " + username
+ " logging out, Session is being invalidated.");
endSession();
return "logout";
}
COM: <s> logs out the user neatly with unlocking the project and invalidating </s>
|
funcom_train/42012731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextArea getJTANuevaConsumicion() {
if (jTANuevaConsumicion == null) {
jTANuevaConsumicion = new JTextArea("escriba aquí la nueva observación");
jTANuevaConsumicion.setWrapStyleWord(true);
jTANuevaConsumicion.setEnabled(true);
jTANuevaConsumicion.setEditable(true);
jTANuevaConsumicion.requestFocus(); //pedimos el foco de teclado para el JTex
jTANuevaConsumicion.addKeyListener(this);
}
return jTANuevaConsumicion;
}
COM: <s> this method initializes j tanueva consumicion </s>
|
funcom_train/9163053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Type resolveCompoundType() {
if (left.isCompound() && right.isCompound()) {
if (operator.isCompound()) {
// Must be either == or !=
return BooleanType.INSTANCE;
} else {
reporter.error(BAD_COMPOUND_OPERATOR, place, operator.getSymbol());
return ErrorType.INSTANCE;
}
} else {
reporter.error(BAD_COMPOUND_ARGUMENTS, place, operator.getSymbol());
return ErrorType.INSTANCE;
}
}
COM: <s> invoked by resolve type when either left or right is a compound type </s>
|
funcom_train/28368146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void parseEnd(final Element cur, final Species species) {
final Element elm = cur.getChild("end");
if (elm == null) { return; }
endAction = ActionPrototype.buildFromXML(elm, species);
// @AD FIXME et si on veut faire un "set" ou un "add/remove" ???
}
COM: <s> parses the end </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.