__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/45391845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setToLoop(Node tree) {
IIOMetadataNode application =
new IIOMetadataNode("ApplicationExtensions");
IIOMetadataNode applicationNode =
new IIOMetadataNode("ApplicationExtension");
applicationNode.setAttribute("applicationID",
"NETSCAPE");
applicationNode.setAttribute("authenticationCode",
"2.0");
byte[] codes = {1, 0, 0};
applicationNode.setUserObject(codes);
application.appendChild(applicationNode);
tree.appendChild(application);
}
COM: <s> sets metadata to put animation in loop </s>
|
funcom_train/34563132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addColl(final NodIter ni, final byte[] name) {
if(colls == collect.length) {
collect = Arrays.copyOf(collect, colls << 1);
collName = Arrays.copyOf(collName, colls << 1);
}
collect[colls] = ni;
collName[colls++] = name;
}
COM: <s> adds a collection </s>
|
funcom_train/4757244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Line intersection(final Plane other) {
final Vector3D direction = Vector3D.crossProduct(w, other.w);
if (direction.getNorm() < 1.0e-10) {
return null;
}
final Vector3D point = intersection(this, other, new Plane(direction));
return new Line(point, point.add(direction));
}
COM: <s> build the line shared by the instance and another plane </s>
|
funcom_train/18804982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTitle(String title) {
if (title != null) {
if (this.title == null) {
setTitle(new TextTitle(title, JFreeChart.DEFAULT_TITLE_FONT));
}
else {
this.title.setText(title);
}
}
else {
setTitle((TextTitle) null);
}
}
COM: <s> sets the chart title </s>
|
funcom_train/20876895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void allowAllStudentConflicts(ExamPeriod period) {
for (ExamStudent s : getStudents()) {
for (Exam exam : s.getExams(period)) {
if (exam.equals(this))
continue;
exam.setAllowDirectConflicts(true);
setAllowDirectConflicts(true);
s.setAllowDirectConflicts(true);
}
}
}
COM: <s> allow all direct student conflict for the given period see </s>
|
funcom_train/4584473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void validateExtraAttributes(org.apache.axiom.om.OMAttribute[] param){
if ((param != null) && (param.length > 1)){
throw new java.lang.RuntimeException();
}
if ((param != null) && (param.length < 1)){
throw new java.lang.RuntimeException();
}
}
COM: <s> validate the array for extra attributes </s>
|
funcom_train/2893515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IPropDefinition getExistingDef(IPropDefinition[] existing, String propDefKey) {
if (existing != null) {
for (int i = 0; i < existing.length; i++) {
if (existing[i].getId().equals(propDefKey)) {
return existing[i];
}
}
}
return null;
}
COM: <s> retrieve an existing prop definition by id </s>
|
funcom_train/3413694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsAll(Collection<?> c) {
if (!(c instanceof JumboEnumSet))
return super.containsAll(c);
JumboEnumSet es = (JumboEnumSet)c;
if (es.elementType != elementType)
return es.isEmpty();
for (int i = 0; i < elements.length; i++)
if ((es.elements[i] & ~elements[i]) != 0)
return false;
return true;
}
COM: <s> returns tt true tt if this set contains all of the elements </s>
|
funcom_train/12806599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRunDirection(final int runDirection) {
if (runDirection < PdfWriter.RUN_DIRECTION_DEFAULT || runDirection > PdfWriter.RUN_DIRECTION_RTL)
throw new RuntimeException(MessageLocalization.getComposedMessage("invalid.run.direction.1", runDirection));
this.runDirection = runDirection;
}
COM: <s> sets the run direction </s>
|
funcom_train/4882797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getNumFalta () {
if (numFalta == null) {//GEN-END:|286-getter|0|286-preInit
// write pre-init user code here
numFalta = new TextField ("N\u00FAmero de Aulas (decimal):", null, 32, TextField.DECIMAL);//GEN-LINE:|286-getter|1|286-postInit
// write post-init user code here
}//GEN-BEGIN:|286-getter|2|
return numFalta;
}
COM: <s> returns an initiliazed instance of num falta component </s>
|
funcom_train/29027344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCanSearchPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Column_canSearch_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Column_canSearch_feature", "_UI_Column_type"),
DbdesignerPackage.Literals.COLUMN__CAN_SEARCH,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the can search feature </s>
|
funcom_train/44011377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetCreditCardExpMonth() {
System.out.println("getCreditCardExpMonth");
MembershipBO instance = null;
int expResult = 0;
int result = instance.getCreditCardExpMonth();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get credit card exp month method of class edu </s>
|
funcom_train/37649143 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getExamplesString() {
StringBuffer buffer = new StringBuffer();
Iterator<String> i = this.editedRule.getExamples().iterator();
boolean first = true;
while (i.hasNext()) {
if (first) {
first = false;
} else {
buffer.append("\n\n");
}
buffer.append(i.next().trim());
}
return buffer.toString();
}
COM: <s> concatenate all the rule examples in one string </s>
|
funcom_train/44106057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String handleRequest(final ControllerContext ctx) throws Exception {
String name = ctx.getRequest().getParameter("bookmarkName");
if (name == null || name.length() == 0) {
ctx.getVelocityContext().put("error", Messages.getString("AddCategoryController.ENTER_NAME"));
return Messages.getString("AddCategoryController.ERROR_TEMPLATE");
} else {
addUpdateCategory(ctx, name);
return getController("display-photo").handleRequest(ctx);
}
}
COM: <s> fuegt eine kategorie hinzu </s>
|
funcom_train/16454323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addElement(JComponent item) {
if(item == null) {
return; // bail out
}
int insertIndex = 0;
synchronized(componentList) {
componentList.add(item);
insertIndex = componentList.size() - 1;
}
fireListDataEvent(new ListDataEvent(this,
ListDataEvent.INTERVAL_ADDED,
insertIndex,
insertIndex));
}
COM: <s> adds a component to the end of the component list </s>
|
funcom_train/9785643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Shape getClip() {
if (_clip == null) {
return null;
}
else {
try {
AffineTransform t = _transform.createInverse();
t.concatenate(_clipTransform);
return t.createTransformedShape(_clip);
}
catch (Exception e) {
throw new EpsException("Unable to get inverse of matrix: " + _transform);
}
}
}
COM: <s> gets the current clipping area </s>
|
funcom_train/31127835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void boot() throws IOException {
if (!open)
throw new IOException("NXTCommand is closed");
byte[] request = {SYSTEM_COMMAND_NOREPLY, BOOT};
request = appendString(request, "Let's dance: SAMBA");
nxtComm.sendRequest(request, 0);
// Connection cannot be used after this command so we close it
open = false;
}
COM: <s> put the nxt into samba mode ready to update the firmware </s>
|
funcom_train/12165177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testVisitFullWithAttributes() throws Exception {
Visitor visitor = new BaseVisitTrackingVisitor() {
// javadoc inherited
public Visitor.Action visit(Attribute attribute) {
actualAttributeCount++;
return Visitor.Action.CONTINUE;
}
};
walker.visit(document.getRootElement(), visitor, Walker.ATTRIBUTES);
assertEquals("Number of attributes not as",
numberOfAttributes,
actualAttributeCount);
}
COM: <s> verifies that a full visitation can be performed that only includes </s>
|
funcom_train/34510511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getCells(int left, int top, int right, int bottom, List list) {
final List rowIndexes = getRowIndexes(top, bottom);
for(final Iterator it = rowIndexes.iterator(); it.hasNext();) {
final RowIndex ri = (RowIndex) it.next();
ri.getCells(left, right, list);
}
return list;
}
COM: <s> return existing cells inside the specified square range as a list </s>
|
funcom_train/22581543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_zeroLengthRecord() throws IOException {
recman.insert(new byte[]{},MyNopSerializer.INSTANCE);
try {
recman.commit();
assertTrue("Zero length records are not allowed.",false);
}
catch( IllegalArgumentException ex ) {
System.err.println("Ignoring expected exception: "+ex);
recman.rollback(); // discard the changes so that we can close the file!
}
}
COM: <s> correct rejection test for a zero length record </s>
|
funcom_train/36202478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteArticle(KnowWEArticle article) {
KnowWEEnvironment.getInstance().buildAndRegisterArticle("",
article.getTitle(), web, true);
articleMap.remove(article.getTitle());
Logger.getLogger(this.getClass().getName()).log(Level.INFO,
"-> Deleted article '" + article.getTitle() + "'" + " from " + web);
}
COM: <s> deletes the given article from the article map and invalidates all </s>
|
funcom_train/3045303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean previous() throws HibernateException {
if ( currentPosition <= 1 ) {
currentPosition = 0;
currentRow = null;
return false;
}
Object loadResult = getLoader().loadSequentialRowsReverse(
getResultSet(),
getSession(),
getQueryParameters(),
false,
( maxPosition != null && currentPosition > maxPosition.intValue() )
);
currentRow = new Object[] { loadResult };
currentPosition--;
afterScrollOperation();
return true;
}
COM: <s> retreat to the previous result </s>
|
funcom_train/3447833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RowIterator reverseIterator() {
return new TableIterator(direct.size() - 1, -1, false) {
public int nextRow() {
return direct.get(super.nextRow());
}
public int peekRow() {
return direct.get(super.peekRow());
}
};
}
COM: <s> returns an iterator over the indexes maintained by the permutation in </s>
|
funcom_train/18480071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int preferredHeight(Container parent,int sz_width) {
Insets ins = parent.getInsets() ;
int minh = 0 ;
for(Component child: children) {
minh = Math.max(minh,preferredHeight(child,sz_width - ins.left - ins.right)) ;
}
if (min_height >= 0 && minh < min_height) minh = min_height ;
return minh + ins.top + ins.bottom ;
}
COM: <s> returns the preferred height given the width </s>
|
funcom_train/20054473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void xLine(Graphics g, int x1, int y1, int x2, int y2) {
g.drawLine(scale_x(x1) + x_origin, scale_y(y1) + x_origin,
scale_x(x2) + x_origin, scale_y(y2) + x_origin);
}
COM: <s> draws a scaled and translated line </s>
|
funcom_train/31179431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setName(String name) {
if (remote) {
RenameMailboxAction rma =
new RenameMailboxAction(this, name);
addAction(rma);
} else {
rename(name);
}
/*MailboxEvent e = new MailboxEvent(this, this, 0);
for (int i = 0; i < mailboxListeners.size(); i++) {
((MailboxListener) mailboxListeners.elementAt(i)).mailboxRenamed(e);
}*/
}
COM: <s> sets the name attribute of the mailbox object </s>
|
funcom_train/174425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int moveForward(int start) {
if (start < 0) {
start = 0;
}
for (int i = start; i < ContentList.this.size(); i++) {
Object obj = ContentList.this.get(i);
if (filter.matches(obj)) {
return i;
}
}
return ContentList.this.size();
}
COM: <s> returns index in the backing list of the next object matching </s>
|
funcom_train/15810537 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LinkedList getMessageAsEncodedStrings() {
LinkedList retval = new LinkedList();
synchronized (headers) {
ListIterator li = headers.listIterator();
while (li.hasNext()) {
SIPHeader sipHeader = (SIPHeader) li.next();
if (sipHeader instanceof SIPHeaderList) {
SIPHeaderList shl = (SIPHeaderList) sipHeader;
retval.addAll(shl.getHeadersAsEncodedStrings());
} else {
retval.add(sipHeader.encode());
}
}
}
return retval;
}
COM: <s> get the headers as a linked list of encoded strings </s>
|
funcom_train/3447375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMaxMemory(int max) {
int maxPages = (max + CHUNK_SIZE - 1) >> CHUNK_BITS;
if (maxPages == this.maxPages)
return;
if (maxPages < this.maxPages) {
while (size >= maxPages) {
delete(header.prev);
}
}
this.maxPages = maxPages;
}
COM: <s> sets the maximum memory this pool is allowed to allocate </s>
|
funcom_train/23680119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void guest_view(){
setContentView(R.layout.guest); //Change screen to "guest.xml" screen
Button GuestDone = (Button)findViewById(R.id.GuestDone);
GuestDone.setOnClickListener(GuestDoneListener);
Button GuestDelete = (Button)findViewById(R.id.GuestDelete);
GuestDelete.setOnClickListener(GuestDeleteListener);
}
COM: <s> switches to individual guest view </s>
|
funcom_train/45774108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setImageUrl(Object _ocontrolmodel, int _nResId, int _nhcResId){
ImageUrlTask oImageUrlTask = new ImageUrlTask(_ocontrolmodel, new Integer(_nResId), new Integer(_nhcResId));
this.aImageUrlTasks.add(oImageUrlTask);
}
COM: <s> assigns an image to the property image url of a dialog control </s>
|
funcom_train/43245864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetIVVStatus() {
System.out.println("setIVVStatus");
String IVVStatus = "";
InsuranceBufferObject instance = new InsuranceBufferObject();
instance.setIVVStatus(IVVStatus);
// 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 ivvstatus method of class org </s>
|
funcom_train/46458428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndTime(double millis) {
millis = Math.abs(millis);
millis = Math.min(getDuration(), millis);
for (int i = 0; i < startTimes.length; i++) {
int t = startTimes[i];
if (millis < t) { // find first frame with later start time
setEndFrameNumber(i - 1);
break;
}
}
}
COM: <s> sets the end time in milliseconds </s>
|
funcom_train/32040957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addStructureTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ActivityStructureType_structureType_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ActivityStructureType_structureType_feature", "_UI_ActivityStructureType_type"),
ImsldPackage.eINSTANCE.getActivityStructureType_StructureType(),
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the structure type feature </s>
|
funcom_train/27947551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStartState(IStatePro state) {
if ((state instanceof StatePro)==false) throw new IllegalArgumentException("state is no state of mine");
final StatePro wrapper = (StatePro)state;
if (wrapper.state.parent()!=this.automaton) throw new IllegalArgumentException("state is no state of mine");
this.automaton.setStartState(wrapper.state);
}
COM: <s> sets the automatons start state to the specified state </s>
|
funcom_train/15680553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int dotNumber() throws IOException {
loop: for (;;) {
switch (nextChar()) {
default:
break loop;
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
}
}
return numberUnit(false);
}
COM: <s> scans the decimal part of a number </s>
|
funcom_train/36780109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void activateOptions() {
/*
* AudioSystem.getAudioInputStream requires jdk 1.3,
* so we use applet.newaudioclip instead
*
*/
try {
clip = Applet.newAudioClip(new URL(audioURL));
} catch (MalformedURLException mue) {
LogLog.error("unable to initialize SoundAppender", mue);}
if (clip == null) {
LogLog.error("Unable to initialize SoundAppender");
}
}
COM: <s> attempt to initialize the appender by creating a reference to an audio clip </s>
|
funcom_train/30177151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() throws ServletException {
ServletContext servletContext = this.getServletConfig().getServletContext();
WebApplicationContext wac = WebApplicationContextUtils
.getRequiredWebApplicationContext(servletContext);
this.layerDao = (LayerDao)wac.getBean("layerDao");
this.datasetDao = (DatasetDao)wac.getBean("datasetDao");
this.layerViewDao = (DatasetLayerViewDao)wac.getBean("datasetLayerViewDao");
}
COM: <s> initialize the servlet </s>
|
funcom_train/491242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JSONWriter array() throws JSONException {
if (this.mode == 'i' || this.mode == 'o' || this.mode == 'a') {
this.push('a');
this.append("[");
this.comma = false;
return this;
}
throw new JSONException("Misplaced array.");
}
COM: <s> begin appending a new array </s>
|
funcom_train/12768083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addKeyListener() {
final IKeyLookup lookup = KeyLookupFactory.getSWTKeyLookup();
final int F2 = lookup.formalKeyLookup(IKeyLookup.F2_NAME);
tree.addKeyListener(new KeyAdapter() {
public void keyReleased(KeyEvent e) {
int code = e.keyCode;
if (code == F2) {
TreeItem[] selection = tree.getSelection();
if (selection.length == 1) {
renameTreeItem(selection[0]);
}
}
}
});
}
COM: <s> adds a key listener to watch for rename f2 events </s>
|
funcom_train/46377056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void releaseControl () {
if (app == null) return;
if (!app.isInSas()) {
if (SwingUtilities.isEventDispatchThread()) {
releaseControlPerform();
} else {
try {
SwingUtilities.invokeLater(new Runnable () {
public void run () {
releaseControlPerform();
}
});
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
}
}
COM: <s> tell the arbiter that you are releasing control of the app </s>
|
funcom_train/7367879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSeeds(final int row, final int col, final byte value) {
try {
board[1][row * nbrCol + col] = value;
} catch (Throwable e) {
e.printStackTrace();
//#ifdef DLOGGING
logger.severe("setSeeds error row,col,value=" + row + "," + col + "," + value, e);
//#endif
}
}
COM: <s> set the number of seeds for the coordinates </s>
|
funcom_train/25713589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ledButtonPressed() {
logger.info("Setting up LED Display");
if (displayled == null)
try {
this.setFlowclientDisplayLED(new FlowclientDisplayLED(gui
.getPort()));
} catch (SerialPortNotFoundException e) {
gui.setNotification("Port not found");
logger.error("Serial Port not found");
} catch (SerialPortCommunicationFailure e) {
gui.setNotification("Serial communicatie failure");
logger.error("Serial Port communication failure");
}
this.updateGUI();
}
COM: <s> setup the leddisplay </s>
|
funcom_train/4521142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(TipoEleccion entity) {
LogUtil.log("saving TipoEleccion instance", Level.INFO, null);
try {
entityManager.persist(entity);
LogUtil.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
LogUtil.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved tipo eleccion entity </s>
|
funcom_train/46759989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Long storeChildReference(final int parentRefId, final int childRefId, final ReferenceRelationReference relation, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return BaseData.getReference().storeChildReference(parentRefId, childRefId, relation, call);
}}; return (Long) call(method, call);
}
COM: <s> store the relationship between the child and parent </s>
|
funcom_train/18583699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAlertStartDate(String date) {
SimpleDateFormat fmt = new SimpleDateFormat(this.DATE_FMT);
try {
Date dateDate = fmt.parse(date);
GregorianCalendar cal = new GregorianCalendar();
cal.setTime(dateDate);
}
catch (ParseException ex) {
ex.printStackTrace();
}
}
COM: <s> sets the start date with the supplied string representation </s>
|
funcom_train/50253735 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Transition getDefaultLeavingTransition() {
Transition defaultTransition = null;
if (leavingTransitions != null) {
// Select the first unconditional transition
for (Transition auxTransition : leavingTransitions) {
if (auxTransition.getCondition() == null) {
defaultTransition = auxTransition;
break;
}
}
} else if (superState != null) {
defaultTransition = superState.getDefaultLeavingTransition();
}
return defaultTransition;
}
COM: <s> is the default leaving transition </s>
|
funcom_train/42012719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJBCancelar() {
if (jBCancelar == null) {
jBCancelar = new JButton();
jBCancelar.setLocation(new Point(124, 280));
jBCancelar.setMnemonic(KeyEvent.VK_CANCEL);
jBCancelar.setIcon(new ImageIcon(getClass().getResource("/iconos/cancel.png")));
jBCancelar.setText("Cancelar");
jBCancelar.setSize(new Dimension(110, 30));
jBCancelar.addActionListener(this);
}
return jBCancelar;
}
COM: <s> this method initializes j bcancelar </s>
|
funcom_train/33162854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TreeItem getExistingParentItem(String dirName, HashMap folders) {
String parentDir = dirName;
TreeItem item = null;
while (parentDir.indexOf(BACKSLASH) != -1) {
parentDir = parentDir
.substring(0, parentDir.lastIndexOf(BACKSLASH));
if (folders.containsKey(parentDir)) {
item = (TreeItem) folders.get(parentDir);
return item;
} // if
} // while
return item;
}
COM: <s> locates the deepest existing parent dir of the specified dir </s>
|
funcom_train/28297598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getNextMessage(String type,String param) {
String msg=null;
beginCriticalMsg();
int idx=getIndexOfMessage(type,param);
if (idx>=0) {
msg=(String)msgBuffer.remove(idx);
}
endCriticalMsg();
return msg;
}
COM: <s> returns the next message with the given type and removes it </s>
|
funcom_train/48869626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Session updateSession(String password) throws DataException {
e = EmployeeDAO.getInstance().validateAndRead(password);
// Check to make sure that store and employee can be found then put the session in cache
if (s != null && e != null) {
setEmployee(e);
Cache.getInstance().put(sessionId, this);
}
else {
instance = null;
}
return instance;
}
COM: <s> this method should be called everytime an employee logs onto a computer </s>
|
funcom_train/50873007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemoveVariable() {
OMBinding binding = new OMBinding();
OMVariable variable = new OMVariable( "a" );
binding.setBody( new OMInteger( "1" ) );
binding.addVariable( variable );
binding.removeVariable( variable );
assertTrue( binding.getVariables().isEmpty() );
}
COM: <s> test of remove variable method of class nl </s>
|
funcom_train/12191178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setParameter(Element elem, PropertySetter propSetter) {
String name = subst(elem.getAttribute("name"));
String value = elem.getAttribute("value");
if ("File".equals(name)) {
value = resolveLogFileName(value);
} else {
value = OptionConverter.convertSpecialChars(value);
}
value = subst(value);
propSetter.setProperty(name, value);
}
COM: <s> this is overridden to resolve any filenames specified in the </s>
|
funcom_train/44707096 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getImage ( FormSectionEvent event ) {
FormData data = event.getFormData();
String filename = getImageFilename(event);
File image = null;
if ( filename != null && filename.length() > 0) {
image = ((MultipartHttpServletRequest)event.getPageState().getRequest())
.getFile(m_name + IMAGE);
}
return image;
}
COM: <s> return a file object from the file upload widget </s>
|
funcom_train/44515467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void copy(List genericValueList) throws GenericEntityException {
int cnt = 0;
Iterator gvlI = genericValueList.iterator();
while (gvlI.hasNext() && (limit < 0 || cnt++ < limit) ) {
GenericValue gv = (GenericValue) gvlI.next();
DynaBean bean = createDynaBean();
for (int i = 0; i < properties.length; i++) {
String name = properties[i].getName();
bean.set(name, gv.get(name));
}
rows.add(bean);
}
}
COM: <s> p copy the column values for each row in the specified </s>
|
funcom_train/39059393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDecimalPlaces(int number) {
if (_type == LabelType.Numeric) {
_decimalPlaces = number;
}
else {
throw new IllegalArgumentException(
"GraphTickLabelFormatter object has incorrect LabelType. " +
"The DecimalPlaces property cannot be set with " + number +
" when LabelType is " + _type.toString() + "."
);
}
} // End of property.
COM: <s> sets number of decimal places for numeric label label must be of numeric </s>
|
funcom_train/40885022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextBounds setText (CharSequence str, float x, float y, int start, int end) {
reset(end - start);
y += font.data.ascent;
textBounds.width = addToCache(str, x, y, start, end);
textBounds.height = font.data.capHeight;
return textBounds;
}
COM: <s> caches a substring with the specified position </s>
|
funcom_train/32056488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemoveGraphModelProvider() {
System.out.println("testRemoveGraphModelProvider");
GraphModelProvider p = new TPGraphModelProvider();
try {
GraphModelProviderRegistry.addGraphModelProvider(p);
assertTrue(GraphModelProviderRegistry.graphModelProviders.contains(p));
GraphModelProviderRegistry.removeGraphModelProvider(p);
assertTrue(!GraphModelProviderRegistry.graphModelProviders.contains(p));
} catch (Exception e) {
fail();
}
}
COM: <s> test of remove graph model provider method of class </s>
|
funcom_train/2844985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setViewerNames(Object[] names) {
viewerChoice.addItem(NONE);
Arrays.sort(names);
for (int ni = 0; ni < names.length; ni++) {
viewerChoice.addItem(((String) names[ni]).replace('_', ' '));
}
}
COM: <s> sets the list of displayed viewer names to the specified names array </s>
|
funcom_train/21847669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int shrink(int startPos, int endPos) throws BadLocationException {
try {
int rel = compare(startPos, endPos);
switch (rel) {
case OVERLAP_BEGIN:
case INSIDE_BEGIN:
doc.op.moveMark(startMark, endPos);
break;
case OVERLAP_END:
case INSIDE_END:
doc.op.moveMark(endMark, startPos);
break;
}
return rel;
} catch (InvalidMarkException e) {
if (Boolean.getBoolean("netbeans.debug.exceptions")) { // NOI18N
e.printStackTrace();
}
return INVALID;
}
}
COM: <s> shrink this mark block by the block specified </s>
|
funcom_train/14329373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_portNumber() {
String fieldName = "portNumber";
String messageKey = Driver.PORTNUMBER;
assertDefaultPropertyByServerType(
URL_SQLSERVER, messageKey, fieldName, DefaultProperties.PORT_NUMBER_SQLSERVER);
if (!isOnlySqlServerTests()) {
assertDefaultPropertyByServerType(
URL_SYBASE, messageKey, fieldName, DefaultProperties.PORT_NUMBER_SYBASE);
}
}
COM: <s> test the code port number code property </s>
|
funcom_train/11734419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DataSource getDataSource(String logicalName) throws RepositoryException {
synchronized (lock) {
sanityCheck();
DataSource ds = nameToDataSource.get(logicalName);
if (ds == null) {
throw new RepositoryException("DataSource with logicalName " + logicalName
+ " has not been configured");
}
return ds;
}
}
COM: <s> retrieves a configured data source by logical name </s>
|
funcom_train/7421740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createReceiveActivity(MessageFlow messageFlow, Element element) {
Activity target = messageFlow.getTarget();
if (target.isReceiving()) {
element.setAttribute("receiveActivity", target.getName());
} else {
this.output.addError("The target object of message flow " +
"is not a receiving activity.", messageFlow.getId());
}
}
COM: <s> adds a receive activity attribute to the given element </s>
|
funcom_train/4312303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getOkButton() {
if (okButton == null) {
okButton = new JButton();
okButton.setBounds(new Rectangle(529, 140, 50, 19));
okButton.setFont(new Font("Tahoma", Font.PLAIN, 11));
okButton.setText("OK");
okButton.addActionListener(this);
}
return okButton;
}
COM: <s> this method initializes ok button </s>
|
funcom_train/17998288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void afterCompletion() throws DataAccessException {
if (isSingleSession()) {
// single session mode
SessionHolder sessionHolder =
(SessionHolder) TransactionSynchronizationManager.unbindResource(getSessionFactory());
logger.debug("Closing single Hibernate Session in OpenSessionInViewInterceptor");
SessionFactoryUtils.releaseSession(sessionHolder.getSession(), getSessionFactory());
}
else {
// deferred close mode
SessionFactoryUtils.processDeferredClose(getSessionFactory());
}
}
COM: <s> unbind the hibernate session from the thread and closes it in single session </s>
|
funcom_train/8461305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Note getReferenceNote() {
if (m_referenceNote == null) {
if (getName() != null) {
byte octav = 0;
if (isG())
m_referenceNote = new Note(Note.G);
else if (isF()) {
m_referenceNote = new Note(Note.F);
octav = -1;
}
else //C and Perc
m_referenceNote = new Note(Note.C);
m_referenceNote.setOctaveTransposition((byte)
(octav + getOctaveTransposition()));
}
}
return m_referenceNote;
}
COM: <s> returns the reference note tt g tt for g clef </s>
|
funcom_train/12807494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected PdfStream copyStream(PRStream in) throws IOException, BadPdfFormatException {
PRStream out = new PRStream(in, null);
for (Object element : in.getKeys()) {
PdfName key = (PdfName) element;
PdfObject value = in.get(key);
out.put(key, copyObject(value));
}
return out;
}
COM: <s> translate a prstream to a pdf stream </s>
|
funcom_train/48151216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double simulate() {
int[] count = new int[popSize];
double distinct = 0;
for (int i = 1; i <= sampleSize; i++) {
int j = (int) (popSize * Math.random());
if (count[j] == 0) distinct++;
count[j] = count[j]++;
}
return distinct;
}
COM: <s> this method simulates a value from the distribution as the number of </s>
|
funcom_train/50864300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setState(int newState) {
state = newState;
sufferer.fireUnitUpdate(PhysicalCondition.ILLNESS_EVENT, illness);
// logger.info(getSufferer().getName() + " " + toString() + " setState(" + getStateString() + ")");
}
COM: <s> sets the health problem state </s>
|
funcom_train/21022017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final AsyncCallback<List<String>> callbackGetUngrantedUsers = new AsyncCallback<List<String>>() {
public void onSuccess(List<String> result) {
for (Iterator<String> it = result.iterator(); it.hasNext(); ) {
String userName = it.next();
unassignedUser.addRow(userName);
}
}
public void onFailure(Throwable caught) {
Main.get().showError("GetUngrantedUsers", caught);
}
};
COM: <s> call back get ungranted users </s>
|
funcom_train/44994521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() throws BuildException {
if (getFile() == null) {
String msg = "XmlProperty task requires a file attribute";
throw new BuildException(msg);
}
try {
log("Loading " + src.getAbsolutePath(), Project.MSG_VERBOSE);
if (src.exists()) {
load(new FileInputStream(src));
} else {
log("Unable to find property file: " + src.getAbsolutePath(),
Project.MSG_VERBOSE);
}
}catch(SAXException se){
throw new BuildException(se);
} catch (IOException ioe) {
// I/O error
throw new BuildException(ioe);
}
}
COM: <s> run the task </s>
|
funcom_train/50116197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UMLDefaultCell getNodeCell(RoseItemView view) {
UMLNodeCell cell = new UMLNodeCell(view.getName());
if (view instanceof ProcessorView) {
cell.setIsInstance(false);
ProcessorView pv = (ProcessorView) view;
cell.setIsProcessesShown(pv.isProcessesShown());
cell.setIsSchedulingShown(pv.isSchedulingShown());
}
else {
cell.setIsInstance(true);
}
return cell;
}
COM: <s> returns the cell for rendering a b uml node b </s>
|
funcom_train/38871837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSyntaxEditingStyle(String styleKey) {
if (styleKey==null) {
styleKey = SYNTAX_STYLE_NONE;
}
if (!styleKey.equals(syntaxStyleKey)) {
String oldStyle = syntaxStyleKey;
syntaxStyleKey = styleKey;
((RSyntaxDocument)getDocument()).setSyntaxStyle(styleKey);
firePropertyChange(SYNTAX_STYLE_PROPERTY, oldStyle, styleKey);
}
}
COM: <s> sets what type of syntax highlighting this editor is doing </s>
|
funcom_train/48895497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getinsercao() {
if (insercao == null) {
insercao = new JButton();
insercao.setText("Inserir");
insercao.setBounds(new Rectangle(424, 465, 87, 22));
getRootPane().setDefaultButton(insercao);
insercao.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
System.out.println("insercao danos no prontuario");
insereProntuario();
}
});
}
return insercao;
}
COM: <s> this method initializes insercao </s>
|
funcom_train/17499094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize(SwimlaneImpl other) {
this.assignee = other.getAssignee();
if (other.getParticipations()!=null) {
for (ParticipationImpl otherParticipation: other.getParticipations()) {
addParticipation(
otherParticipation.getUserId(),
otherParticipation.getGroupId(),
otherParticipation.getType()
);
}
}
}
COM: <s> initialize this swimlanes assignee and participations from the </s>
|
funcom_train/11724910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public QValue getValue() throws ValueFormatException {
if (isMultiValued()) {
throw new ValueFormatException("'getValue' may not be called on a multi-valued state.");
}
QValue[] values = getValues();
if (values == null || values.length == 0) {
return null;
} else {
return values[0];
}
}
COM: <s> convenience method for single valued property states </s>
|
funcom_train/10209310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String toOSSpecificPath(String path, String separator) {
String[] parts = path.split(separator);
String result = "";
for(String part : parts) {
result += part + File.separator;
}
if(path.lastIndexOf(separator)<path.length())
result= result.substring(0, result.length()-1);
return result;
}
COM: <s> converts a path that is separated by the given separator into a </s>
|
funcom_train/19142539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getShortDescription() {
String desc = StringUtils.trimToNull(description);
if (desc == null) {
return null;
}
int pos = desc.indexOf('.');
if (pos == -1) {
pos = desc.indexOf('<');
if (pos == -1) {
pos = desc.length();
}
}
return StringUtils.left(desc, pos);
}
COM: <s> returns a short description </s>
|
funcom_train/4024974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Collection collectSampleUtterances() {
Set set = new HashSet();
for (int i = 0; i < 100; i++) {
String s = getGrammar().getRandomSentence();
if (!set.contains(s)) {
set.add(s);
}
}
List sampleList = new ArrayList(set);
Collections.sort(sampleList);
return sampleList;
}
COM: <s> collects the set of possible utterances </s>
|
funcom_train/25212447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void applyInteraction() throws InteractionUnknownException {
String interaction = properties.getProperty(PROP_INTERACTION);
try {
interactionObserver.receiveInteractionChange(null,
Interaction.get(interaction));
} catch (InteractionUnknownException e) {
throw e;
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {
throw new InteractionUnknownException(interaction);
}
}
COM: <s> propagate the settings for the interaction mode to the </s>
|
funcom_train/38542942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected MouseEvent changeMouseEventSource(MouseEvent e, Component source) {
return new MouseEvent(source, e.getID(), e.getWhen(), e.getModifiers(),
e.getX(), e.getY(), e.getClickCount(), e.isPopupTrigger());
}
COM: <s> this method creates a new mouse event that mimics the parameter e except </s>
|
funcom_train/21016436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Rectangle2D getManipulationBox() {
double x = _manipulationRectangleDelta.getX();
double y = _manipulationRectangleDelta.getY();
double width = _boundingRectangle.getWidth()
+ _manipulationRectangleDelta.getWidth();
double height = _boundingRectangle.getHeight()
+ _manipulationRectangleDelta.getHeight();
return new Rectangle2D.Double(x, y, width, height);
}
COM: <s> returns a rectangle that corresponds to the current manipulation of the </s>
|
funcom_train/1570427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EOGlobalID globalIDForObject(final Object _object) {
if (_object == null)
return null;
final EOGlobalID gid = (EOGlobalID)
NSKeyValueCoding.Utility.valueForKey(_object, "globalID");
if (gid != null)
return gid;
return (EOGlobalID)UMap.anyKeyForValue(this.gidToObject, _object);
}
COM: <s> retrieve the eoglobal id of a registered object </s>
|
funcom_train/46654784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showUserTests(String alias) {
String noElementString;
if (alias.equalsIgnoreCase(Global.currentUser.getAlias())) {
noElementString = Global.constantsTest.noTestsByMe();
} else {
noElementString = Global.constantsTest.noTestsUser(alias);
}
SearchOptions searchOptions = new SearchOptions();
searchOptions.setTestautogenerated(0);
searchOptions.setTestexam(1);
searchOptions.setTestnormal(1);
searchOptions.setQuestionsindividual(0);
searchOptions.setAuthor(alias);
Global.content.add(new TestsPaging(searchOptions, noElementString));
}
COM: <s> show user tests </s>
|
funcom_train/31871512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testForkEntryAction() {
State fork = (State)_ctx.getBean("SimpleForkModel.fork");
fork.setEntryAction(new AbstractAction() {
public void execute(ProcessObject processObject) {
throw new RuntimeException("Fork entry action was executed and should not have been");
}
});
_engine.executeProcess(_model, _processObject);
}
COM: <s> validate that entry actions to a fork are not executed </s>
|
funcom_train/18257448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRunDataStream(DataOutputStream runDataStream) {
if (this.runDataStream != null) {
try {
this.runDataStream.close();
} catch (IOException e) {
} //Don't care, the stream might not be open
}
this.runDataStream = runDataStream;
runHeadersWritten = false;
}
COM: <s> defines the data stream that run output will be written to </s>
|
funcom_train/2388129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean delete () throws IOException {
final String hash = account.getHashedName();
try {
if (myBucketExists()) {
s3.deleteObject(hash, DEFAULT_KEY);
s3.deleteBucket(hash);
return true;
} else {
return false;
}
} catch (IOException anIoEx) {
throw anIoEx;
} catch (Exception anEx) {
throw new IOException("Unable to delete bucket " + account.getHashedName()+": " + anEx.getMessage());
}
}
COM: <s> tries to delete the password safe on s3 and the bucket </s>
|
funcom_train/7621502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private View fillFromTop(int nextTop) {
mFirstPosition = Math.min(mFirstPosition, mSelectedPosition);
mFirstPosition = Math.min(mFirstPosition, mItemCount - 1);
if (mFirstPosition < 0) {
mFirstPosition = 0;
}
return fillDown(mFirstPosition, nextTop);
}
COM: <s> fills the list from top to bottom starting with m first position </s>
|
funcom_train/1572769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String contentString() {
byte[] lcontent;
if ((lcontent = this.content()) == null) {
this.lastException = null;
return null;
}
try {
return new String(lcontent, 0, lcontent.length, this.contentEncoding());
}
catch (UnsupportedEncodingException uee) {
this.lastException = uee;
return null;
}
}
COM: <s> returns the content of the message as a string </s>
|
funcom_train/8326629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getDateHeader(String name) {
String header = getHeader(name);
if (header == null) {
return -1;
}
try {
Date dateValue = new SimpleDateFormat(DATE_FORMAT_HEADER, Locale.US).parse(header);
return dateValue.getTime();
} catch (ParseException exc) {
throw new IllegalArgumentException(exc.getMessage());
}
}
COM: <s> returns the value of the specified request header as a long value that </s>
|
funcom_train/44174246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIO(){
assertEquals(0, list.size());
assertTrue(list.isEmpty());
assertTrue(list.add(ITEM_0));
assertEquals(1, list.size());
assertFalse(list.isEmpty());
assertTrue(list.add(ITEM_1));
assertEquals(2, list.size());
final Iterator it = list.iterator();
assertTrue(it.hasNext());
assertEquals(ITEM_0, it.next());
assertTrue(it.hasNext());
assertEquals(ITEM_1, it.next());
assertFalse(it.hasNext());
}
COM: <s> tests adding code object code s to the list </s>
|
funcom_train/44840283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isA(Class elmoClass) {
Collection types = getType();
if (types.contains(elmoClass))
return true;
for (Iterator it = types.iterator(); it.hasNext();) {
Class tClass = (Class) it.next();
if (tClass.getSubClassOf().contains(elmoClass))
return true;
}
return false;
}
COM: <s> determine if this resource is a rdf subclass of the resource </s>
|
funcom_train/4881482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getTFturma () {
if (TFturma == null) {//GEN-END:|120-getter|0|120-preInit
// write pre-init user code here
TFturma = new TextField ("Turma", aluno.getTurma(), 32, TextField.NUMERIC);//GEN-LINE:|120-getter|1|120-postInit
// write post-init user code here
}//GEN-BEGIN:|120-getter|2|
return TFturma;
}
COM: <s> returns an initiliazed instance of tfturma component </s>
|
funcom_train/24379116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document getTypeAsDOM(PromptType type) {
Document dom = null;
if (type!=null){
QName qname = new QName("http://www.imsglobal.org/xsd/imsqti_v2p1", "prompt");
JAXBElement<PromptType> jaxbe =
new JAXBElement<PromptType>(qname, PromptType.class, type);
dom = getDOM(jaxbe);
}
return dom;
}
COM: <s> gets the prompt type as a dom document </s>
|
funcom_train/43181447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public M get(String kind, Key key, EntityCacheMissHandler<M> cacheMissHandler) {
String cacheKey = kind + key;
Object o = Memcache.get(cacheKey);
if (ENTITY_NOT_EXISTED.equals(o))
return null;
M m = (M)o;
if (m==null) {
m = cacheMissHandler.get(key);
Memcache.put(cacheKey, m!=null ? m : ENTITY_NOT_EXISTED);
}
return m;
}
COM: <s> get the entity of kind with primary key from memcache </s>
|
funcom_train/50587704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void remove(Show show) {
GregorianCalendar start = new GregorianCalendar();
start.setTime(show.getScheduledShowing().getStart());
GregorianCalendar stop = new GregorianCalendar();
stop.setTime(show.getScheduledShowing().getStop());
showList.remove(show.episodeID);
while (start.before(stop)) {
schedule.remove(start.getTime());
start.add(Calendar.MINUTE, 1);
}
show.setScheduledShowing(null);
}
COM: <s> no error checking </s>
|
funcom_train/17713970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setCenterToParent() {
Frame parent = (Frame) getParent();
Point parentLocation = parent.getLocation();
Dimension d = parent.getSize();
int x = parentLocation.x + ((d.width - getWidth()) / 2);
int y = parentLocation.y + ((d.height - getHeight()) / 2);
setLocation(x, y);
}
COM: <s> this method will set the position to centre of parent window </s>
|
funcom_train/25010482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void convertHTMLString(final String text) {
attributedStrings = new ArrayList<AttributedString>();
String fixed = text.replaceAll("<p>", "");
String[] split = fixed.split("</p>");
for (int i = 0; i < split.length; i++) {
if (split[i].length() > 0) {
attributedStrings.add(new AttributedString(split[i],
WH40KToolTipUI.map));
}
}
}
COM: <s> converts an html string of text </s>
|
funcom_train/14080253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testQuotedText() throws IOException, ParserException {
Calendar calendar = Calendars.load("etc/samples/valid/mansour.ics");
Component event = calendar.getComponent(Component.VEVENT);
assertEquals("A colon with spaces on either side : like that", event.getProperty(Property.SUMMARY).getValue());
}
COM: <s> test correct parsing of quoted text </s>
|
funcom_train/48338999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(TestCollection c) {
if (null == c) {
throw new NullPointerException("Null test collection");
} else if (testCollections.containsKey(c.getName())) {
throw new IllegalArgumentException("Test collection " + c.getName() +
" has already been added");
} else {
testCollections.put(c.getName(), c);
}
}
COM: <s> add the specified test collection to this exercise </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.