__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/5315796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void on_execute_button_released(GtkEvent event) {
try {
String cmd = this.gcu.getCandidateCommand();
this.hc.execute(this.queryField.getText(), cmd);
// Debug.printMessage("executing: " + cmd ,DebugType.HC_GTK_GUI);
} catch (CommandExecutionException e) {
System.out.println(e.getMessage());
}
}
COM: <s> execute button wrapper </s>
|
funcom_train/40623859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetWidgetToNull() {
Label widget = new Label("Test");
FastTreeItem item = new FastTreeItem(widget);
assertEquals("Test", widget.getText());
item.setWidget(null);
assertEquals("Test", widget.getText());
}
COM: <s> test that setting the widget to null does not modify the widget </s>
|
funcom_train/37263016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Transformation substemPosition(Transformation trf,double where) {
if (lpar.nCurveV>=0) { // normal segment
return trf.translate(transf.getZ().mul(where*length));
}
// helix
// get index of the subsegment
int i = (int)(where*(subsegments.size()-1));
// interpolate position
Vector p1 = subsegments.elementAt(i).pos;
Vector p2 = subsegments.elementAt(i+1).pos;
Vector pos = p1.add(p2.sub(p1).mul(where - i/(subsegments.size()-1)));
return trf.translate(pos.sub(posFrom()));
}
COM: <s> calcs the position of a substem in the segment given </s>
|
funcom_train/45252768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void hideFastView(IViewReference ref, int steps) {
setFastViewIconSelection(ref, false);
// Note: We always do at least one step of the animation.
// Note: This doesn't take into account the overhead of doing
if (ref == activeFastView) {
saveFastViewWidthRatio();
fastViewPane.hideView();
}
}
COM: <s> hides a fast view </s>
|
funcom_train/27905740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void flush() throws java.io.IOException {
super.flush();
if (position > 0) {
if (encode) {
out.write(Base64.encode3to4(buffer, position));
position = 0;
} else {
throw new java.io.IOException("Base64 input not properly padded.");
}
// end else: decoding
}
// end if: buffer partially full
out.flush();
}
COM: <s> appropriately pads base64 notation when encoding </s>
|
funcom_train/3904087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addRollupProgressCompletionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RollupRulesType_rollupProgressCompletion_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_RollupRulesType_rollupProgressCompletion_feature", "_UI_RollupRulesType_type"),
ImsssPackage.Literals.ROLLUP_RULES_TYPE__ROLLUP_PROGRESS_COMPLETION,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the rollup progress completion feature </s>
|
funcom_train/34642257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String trimEndOfString(String trim) {
StringBuilder sb = new StringBuilder(trim);
while(sb.length() > 0 &&
(sb.charAt(sb.length()-1) == ' ' || sb.charAt(sb.length()-1) == '\t')) {
sb.deleteCharAt(sb.length()-1);
}
return sb.toString();
}
COM: <s> removes whitespaces from end of string </s>
|
funcom_train/28298169 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean saveMap() {
if (getFileName()=="") {
return saveAsMap();
}
err=writeFile(getFileName());
if (err==0) setChanged(false);
else TransBaseText.printError(err,mainPane);
return (err==0);
}
COM: <s> saves a map </s>
|
funcom_train/8353875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startupProcessor() {
synchronized (lock) {
if (processor == null) {
processor = new Processor();
executor.execute(new NamePreservingRunnable(processor,
threadName));
}
}
// Just stop the select() and start it again, so that the processor
// can be activated immediately.
wakeup();
}
COM: <s> starts the inner processor asking the executor to pick a thread in its </s>
|
funcom_train/10654881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStyleContext() {
int count = 0;
Enumeration<?> names = sc.getStyleNames();
Object name = null;
while (names.hasMoreElements()) {
name = names.nextElement();
count++;
}
assertEquals(1, count);
assertEquals("default", (String) name);
}
COM: <s> makes sure that after initialization any style context will </s>
|
funcom_train/33418320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void scanPCData(final StringBuffer data) throws IOException {
for (;;) {
char ch = this.readChar();
if (ch == '<') {
ch = this.readChar();
if (ch == '!') {
this.checkCDATA(data);
} else {
this.unreadChar(ch);
return;
}
} else if (ch == '&') {
this.resolveEntity(data);
} else {
data.append(ch);
}
}
}
COM: <s> scans a pcdata element </s>
|
funcom_train/39396394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getHeader(String name, String delimiter) {
String[] h = getHeader(name);
if (h == null) {
return null;
}
if (delimiter == null || h.length == 1) {
return h[0];
}
StringBuffer buffer = new StringBuffer();
for (int i = 0; i < h.length; i++) {
if (i > 0) {
buffer.append(delimiter);
}
buffer.append(h[i]);
}
return buffer.toString();
}
COM: <s> returns all the headers for this header name as a single string </s>
|
funcom_train/32649086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createSizeThemeTextField() {
GridData gridData7 = new GridData();
gridData7.widthHint = 30;
sizeThemeTextField = new ThemeTextField(textAboveComposite, SWT.NONE);
sizeThemeTextField.setEmbeddedInBindableGroup(false);
sizeThemeTextField.setBindingSubPath("fontSize");
sizeThemeTextField.setIntValued(true);
sizeThemeTextField.setLayoutData(gridData7);
}
COM: <s> this method initializes size theme text field </s>
|
funcom_train/13892262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void afficherResultat() {
System.out.println("********************************");
System.out.println("Statistiques: ");
System.out.println("Nb segments total vers "+this.destination.toString()+": "+nbSegmentsTotal);
System.out.println("Nb segments reussi vers "+this.destination.toString()+": "+nbSegmentsReussi);
System.out.println("********************************");
}
COM: <s> p afficher les resultats p </s>
|
funcom_train/31661156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean grabElement(float DX_Arg, float DY_Arg) {
DTopLeftCorner = new Point2D.Float(DX_Arg, DY_Arg);
boolean Result = true;
if (Mode!=DRAGGING) {
Result = fireDSElementDraggingEvent();
}
if (Result)
Mode = DRAGGING;
return Result;
} // grabElement()
COM: <s> make the element to been dragged </s>
|
funcom_train/17577177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getNewMenuItem() {
if (newMenuItem == null) {
newMenuItem = new JMenuItem();
newMenuItem.setText("New");
newMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
setOpenedFile(null);
javbotPanel.scriptPanel.scriptInput.setText("");
}
});
}
return newMenuItem;
}
COM: <s> this method initializes new menu item </s>
|
funcom_train/9805095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean randomTestDontCare(int dc) {
Random generator = new Random();
for (int i=0; i<NUM_RANDOM_TESTS; i++) {
int indexOrig = 0;
int indexFlipped = Integer.MAX_VALUE;
while(indexFlipped > _numBits-1 || indexFlipped < 0) {
indexOrig = generator.nextInt(_numBits);
indexFlipped = indexOrig ^ (1 << dc);
}
if (_lookupTable[indexOrig] != _lookupTable[indexFlipped]) {
return false;
}
}
return true;
}
COM: <s> testing method given a dont care index test a large number </s>
|
funcom_train/29580994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ASN1Type run(java.awt.Frame pC, Map env, ASN1Type a, Registry r) throws ACCreationException{
Vector v = null;
if (a!=null){
v=((issrg.ac.Attribute)a).getValues();
}
return (v=buildValues(pC, env, v, r))==null?
null: // thus the spec says: return null, if cancelled editing
new issrg.ac.Attribute(getOID(),
v);
}
COM: <s> this method is called by the kernel application to actually run gui </s>
|
funcom_train/9279775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNullStringExecuteStatement() throws SQLException {
String nullString = null;
try {
// test null String in execute statement
Statement stmt = createStatement();
stmt.execute(nullString);
fail("execute(nullString) should have failed.");
} catch (SQLException e) {
assertSQLState("XJ067", e);
}
}
COM: <s> testing null string in execute statement </s>
|
funcom_train/13993525 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj == null) { return false; }
if (obj.getClass() != getClass()) { return false; }
VOElementValue value = ((VOElementValue) obj);
return (value.getID().equals(getID()) && value.getDisplay().equals(
getDisplay()));
}
COM: <s> checks for equality </s>
|
funcom_train/34525956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateCurrent() throws Exception {
String elementString = "<?xml version=\"1.0\"?>\n" + "<item date=\"20080603\"/>";
Node element = NodeXmlHelper.createCurrentNode(doc);
String string = XmlUtils.getStringFromElement(element);
// System.out.println(string);
assertEquals(false, NodeXmlHelper.isWatched(element));
assertEquals(elementString, string);
}
COM: <s> test create item </s>
|
funcom_train/8086947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
Enumeration enm;
StringBuffer result;
result = new StringBuffer();
enm = elements();
while (enm.hasMoreElements()) {
result.append(enm.nextElement().toString());
if (enm.hasMoreElements())
result.append(",");
}
return result.toString();
}
COM: <s> returns the current stopwords in a string </s>
|
funcom_train/20928031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void ensureIndex() {
if (indexingRequired) {
synchronized (this) {
for (VisualizationPrimitive o : objects) {
List<Point> selectablePoints = o.getSelectablePoints();
DataRecord associatedRecord = o.getAssociatedRecord();
if (selectablePoints != null && associatedRecord != null)
for (Point p : selectablePoints)
quadtree.put(new PointValuePair<DataRecord>(p,
associatedRecord));
}
indexingRequired = false;
}
}
}
COM: <s> ensures that the objects have been indexed </s>
|
funcom_train/2578052 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void applyToBlock(Block b) {
if (b instanceof Title) {
applyToTitle((Title) b);
}
else if (b instanceof LabelBlock) {
LabelBlock lb = (LabelBlock) b;
lb.setFont(this.regularFont);
lb.setPaint(this.legendItemPaint);
}
}
COM: <s> applies the attributes of this theme to the specified block </s>
|
funcom_train/13319517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValues(Object[][] values) {
if (values == null) {
throw new NullPointerException("Column names are null");
}
// data = new Object[values.length][values[0].length];
data = values;
table.setPreferredScrollableViewportSize(new Dimension(500, 300));
}
COM: <s> sets the specified values as data for this table model </s>
|
funcom_train/35727449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getString(int i, String tenc) throws UnsupportedEncodingException {
if (i < 0 || i >= getStringCount()) throw new IndexOutOfBoundsException();
int p = 2;
while (i > 0) {
p += (data[p] & 0xFF)+1;
i--;
}
return new String(data, p+1, data[p] & 0xFF, tenc);
}
COM: <s> retrieves a string from the string list using the specified text encoding </s>
|
funcom_train/48600794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAvailable(Resource actor, Date instant) {
int i;
for (i = 0; i < project.teams.size(); i++) {
Team team = ((ProjectTeam)project.teams.get(i)).team;
for (Member member: team.members) {
if (member.actor == actor) {
return member.isAvailable(instant);
}
}
}
return false;
}
COM: <s> indicates if the actor is available at the instant </s>
|
funcom_train/51184505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCloneable() throws Exception {
byte [] code = CompilerTestMethods.compileSourceToBytes(CLASSNAME, cloneableSource, false);
ClassLoader cl =
new ByteArrayClassLoader(this.getClass().getClassLoader(), Collections.singleton(code));
cl.loadClass(CLASSNAME);
}
COM: <s> arrays should implement cloneable </s>
|
funcom_train/8436115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void forEachRHS(String term1, EachTermPairAction etpa) {
Iterator<String> i = termPairs.subSet(term1 + " => \0", true, term1 + " =>~",true).iterator();
while(i.hasNext()) {
String s = i.next();
String []ss = s.split(glue);
etpa.doAction(term1,ss[1]);
}
}
COM: <s> apply an action to each term pair whose left hand side is term1 </s>
|
funcom_train/28744113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WorkflowInfo getWorkflowInfoById(Integer id) throws SimsException {
//String errMsg = clsName + ".getWorkflowInfoById(): ";
WorkflowInfo info;
try {
local = this.getWorkflowLocalById(id);
info = local.getWorkflowInfo();
}
catch (RuntimeException e) {
//Propergate Exception.
throw e;
}
return info;
}
COM: <s> get workflow info object by id </s>
|
funcom_train/16684683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void recurseDir(List<String> files, String dir, String allowedExtensions []) throws IOException {
try {
String wDir;
if (appsPath.equals("/"))
wDir = appsPath + dir;
else
wDir = appsPath + "/" + dir;
recurseDirFirst(wDir, appsPath, files, allowedExtensions);
}
finally {
unlockAvailable();
}
}
COM: <s> returns list with files witch given extensions included in folder specified </s>
|
funcom_train/23617059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initParts(LPart lfrom, LPart lto, LPart[] lpmorph, int morphLength) {
this.lfrom = lfrom.copy();
this.lto = lto.copy();
// convert into desck (degree, scale, key) representatation
this.defrom = lfrom.copy().convertToDEPA();
this.deto = lto.copy().convertToDEPA();
}
COM: <s> lpmorph is unused in thie implementation </s>
|
funcom_train/19815418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLoggedIn(boolean b) {
if (b) {
this.getRequest().getSession().setAttribute("login", "true");
}
else {
this.getRequest().getSession().setAttribute("login", "false");
}
}
COM: <s> sets the login attribute to true </s>
|
funcom_train/7733950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
return new Integer(mask).hashCode()
^ new Integer(minJobInterval).hashCode() ^ monId.hashCode()
^ new Boolean(prefixMonId).hashCode()
^ varId.hashCode()
^ new Boolean(prefixVarId).hashCode();
}
COM: <s> create an integer hash of the object </s>
|
funcom_train/51572078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save() throws IOException {
if (host != null) {
removeLocalStorageDirectory(true);
}
storeFingerprint(null, selfFp);
for (Target source : sourceFps.keySet()) {
storeFingerprint(source, sourceFps.get(source));
}
for (TargetSignature guest : guests.values()) {
guest.save();
}
}
COM: <s> persist this signature along with any source signatures for which it </s>
|
funcom_train/46694302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBuildQuery() {
System.out.println("buildQuery");
boolean not = false;
ActorQuery sourceQuery = new NullActorQuery();
ActorQuery destinationQuery = new NullActorQuery();
SetOperation op = SetOperation.AND;
LinkByActor instance = new LinkByActor();
instance.buildQuery(not, sourceQuery, destinationQuery, op);
}
COM: <s> test of build query method of class link by actor </s>
|
funcom_train/44465939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void populateTree(DefaultMutableTreeNode top) {
DefaultMutableTreeNode bookNode = null;
Collection<AbstractBook> cv = books.values();
//String x;
for( AbstractBook book : cv) {
bookNode = new DefaultMutableTreeNode(book);
top.add(bookNode);
book.populateTree(bookNode);
}
}
COM: <s> displays books and chapters as a tree </s>
|
funcom_train/38381498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected VertexView createVertexView(Object v, CellMapper cm) {
if (v instanceof UIEllipseCell)
return new UIEllipseView(v, this, cm);
else if (v instanceof UIImageCell)
return new ScaledVertexView(v, this, cm);
else if ((v instanceof UITextCell) &&
((UITextCell) v).isMultiLined())
return new MultiLinedView(v, this, cm);
return super.createVertexView(this, cm, v);
}
COM: <s> creates and returns a default code graph view code </s>
|
funcom_train/10251859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
while (keepGoing) {
TriggerData triggerData = popPair();
if (triggerData != null) {
if (triggerData.username != null) {
trigger.fire(this.triggerType, name.name,
table.getName().name, triggerData.oldRow,
triggerData.newRow);
}
}
}
}
COM: <s> run method declaration p </s>
|
funcom_train/43261462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getScreenCommand2() {
if (screenCommand2 == null) {//GEN-END:|169-getter|0|169-preInit
// write pre-init user code here
screenCommand2 = new Command("Screen", Command.SCREEN, 0);//GEN-LINE:|169-getter|1|169-postInit
// write post-init user code here
}//GEN-BEGIN:|169-getter|2|
return screenCommand2;
}
COM: <s> returns an initiliazed instance of screen command2 component </s>
|
funcom_train/20614680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean locationClicked(Location loc) {
if (this.getGrid().get(loc) == null) {
new Cell().putSelfInGrid(this.getGrid(), loc);
} else {
this.getGrid().get(loc).removeSelfFromGrid();
} // End If
this.updateMessage();
return true;
} // End boolean locationClicked
COM: <s> manages the mouse behavior </s>
|
funcom_train/9885321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double getGroupMean(double[] group) {
double sum = 0;
int n = 0;
for (int i = 0; i < group.length; i++) {
if (!Double.isNaN(group[i])) {
sum = sum + group[i];
n++;
}
}
if (n == 0) {
return Double.NaN;
}
double mean = sum / n;
if (Double.isInfinite(mean)) {
return Double.NaN;
}
return mean;
}
COM: <s> get group mean obtain the mean value for a given group </s>
|
funcom_train/7661558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testResetAfterCancel() {
PublicFutureTask task = new PublicFutureTask(new NoOpCallable());
assertTrue(task.cancel(false));
assertFalse(task.runAndReset());
assertTrue(task.isDone());
assertTrue(task.isCancelled());
}
COM: <s> run and reset after cancellation fails </s>
|
funcom_train/3002931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateSizes() {
if (startLine < 0) {
return;
}
if (structureChanged) {
int count = getAdjustedLineCount();
sizes = new SizeSequence(count);
for (int i = 0; i < count; i++) {
sizes.setSize(i, getLineHeight(i));
}
structureChanged = false;
} else {
sizes.setSize(startLine, getLineHeight(startLine));
}
startLine = -1;
}
COM: <s> update the line heights as needed </s>
|
funcom_train/12086472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean doesAnyHarvesterRetirementPolicyAlreadyExist(EditServiceMBeanConnection conn, ObjectName serverDiagConf) throws WebLogicMBeanException {
ObjectName[] retirementPolicies = conn.getChildren(serverDiagConf, WLDF_DATA_RETIREMENT);
for (ObjectName rtmntPolicy : retirementPolicies) {
if (conn.getTextAttr(rtmntPolicy, ARCHIVE_NAME).equals(HAVESTER_ARCHIVE_NAME)) {
return true;
}
}
return false;
}
COM: <s> for a given server sees if a wldf harvester archive retirement policy </s>
|
funcom_train/37083666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDataAdapter(DataAdapter driver) {
if (op.equals(ApolloDataAdapterI.OP_WRITE_DATA))
super.setDataAdapter(driver);
else
this.driver = driver;
if (driver == null) {
logger.error("GenbankAdapterGUI.setDataAdapter: driver is null!");
}
}
COM: <s> data adapter has to be a genbank adapter no way to enforce this </s>
|
funcom_train/27728903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set_use_moon(boolean b){
this.use_moon = b;
if(b){
if(jpl_ephem == null){
String fs = FileUtil.file_separator();
String dir_in = FileUtil.getClassFilePath("jat.eph","DE405")+fs+"DE405data"+fs;
jpl_ephem = new DE405(dir_in);
}
}
}
COM: <s> set the flag whether to calculate the moons position </s>
|
funcom_train/1958497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Element elementWrite(Element element, String attribute, String value) {
logger.info("elementWrite + "+element.toString()+" "+attribute+" "+concatenator+" "+childName+" "+separator);
String[] values = value.split(separator);
element.removeChildren(childName, VerinecNamespaces.NS_NODE);
for (int iter=0; iter < values.length; iter++){
Element child = new Element(childName, VerinecNamespaces.NS_NODE);
child.setAttribute(attribute, values[iter]);
element.addContent(child);
}
return element;
}
COM: <s> overwrites the method of editor text field to work for several values </s>
|
funcom_train/3025778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JEditorPane getCurrentEditorPane(EditorCookie cookie) {
if (cookie==null) {
return null;
}
JEditorPane[] panes = cookie.getOpenedPanes();
JRefactory.log("Panes: " + panes);
if (panes.length == 1) {
return panes[0];
}
return null;
}
COM: <s> gets the current editor pane attribute of the net beans pretty printer object </s>
|
funcom_train/9851330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sortAlgs(){
Collections.sort(getAlgs(), new Comparator<Alg>() {
public int compare(Alg o1, Alg o2) {
String s1 = o1.getParameter(Alg.paramSequence);
String s2 = o2.getParameter(Alg.paramSequence);
int i1 = Integer.parseInt(s1);
int i2 = Integer.parseInt(s2);
if(s1==null || s2==null) return 0;
return i1-i2;
}
});
}
COM: <s> sort algorithm according sequence </s>
|
funcom_train/3412586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WritableRaster createCompatibleWritableRaster(int w, int h) {
if (w <= 0 || h <=0) {
throw new RasterFormatException("negative " +
((w <= 0) ? "width" : "height"));
}
SampleModel sm = sampleModel.createCompatibleSampleModel(w,h);
return new SunWritableRaster(sm, new Point(0,0));
}
COM: <s> create a compatible writable raster with the specified size a new </s>
|
funcom_train/3176369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mousePressed(MouseEvent me) {
// Check wether some valid path has been clicked on
TreePath path = tree.getPathForLocation(me.getX(),me.getY());
if (path==null)
return;
// last segment is the path we're interested in
model.toggleSelection((TagPath)path.getLastPathComponent());
// done
}
COM: <s> callback for mouse click </s>
|
funcom_train/45389423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getStringFromRecord(byte[] data) {
byte[] string = new byte[128];
int i;
for (i = 0; i < 128; i++) {
string[i] = data[i];
if (data[i] == 0)
break;
}
String s = new String(string, 0, i);
return s;
}
COM: <s> method get string from record description </s>
|
funcom_train/49026832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getRicettaB() {
if (ricettaB == null) {
ricettaB = new JButton();
ricettaB.setFont(new Font("Dialog", Font.BOLD, 12));
ricettaB.setText("Inserisci");
ricettaB.setIcon(new ImageIcon(getClass().getResource("/icone/folder-full-add-icon.png")));
ricettaB.setEnabled(false);
ricettaB.addActionListener(this);
}
return ricettaB;
}
COM: <s> this method initializes ricetta b </s>
|
funcom_train/23827445 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void up() {
for (Bookmark bookmark : getSelection()) {
int index = indexOf(bookmark);
if (index > 0) {
viewer.remove(bookmark);
viewer.insert(bookmark, index - 1);
viewer.getTable().setSelection(index - 1);
BrowserPlugin.getDefault().getBookmarkManager().moveBookmark(
bookmark, true);
ApplicationPlugin.getDefault().notifyMovesBookmark(bookmark,
true);
}
}
}
COM: <s> move up bookmarks </s>
|
funcom_train/20825423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isRowWithSpecialGridLine(final int row) {
boolean result = false;
// special grid line under first row (with timing info)
if (row == 0) {
result = true;
}
// special grid line between submasters and channels
else if (row == getShow().getNumberOfSubmasters()) {
result = true;
}
return result;
}
COM: <s> indicates whether given row has a special grid line </s>
|
funcom_train/17290771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private LockItem findLock(LockContext lockState) {
for (Iterator<LockItem> iter = lockState.bucket.chain.iterator(); iter
.hasNext();) {
LockItem item = iter.next();
if (item.target == null) {
iter.remove();
continue;
}
if (lockState.parms.lockable == item.target
|| lockState.parms.lockable.equals(item.target)) {
return item;
}
}
return null;
}
COM: <s> search for the specified lockable object </s>
|
funcom_train/19416496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createComponents() {
GridBagLayout layout = new GridBagLayout();
GridBagConstraints cons = new GridBagConstraints();
chatPanel = new ChatPanel();
JPanel playerPanel = new PlayerPanel();
serverPanel = new ServerPanel();
setLayout(new BorderLayout());
add(BorderLayout.SOUTH, chatPanel);
add(BorderLayout.CENTER, playerPanel);
add(BorderLayout.EAST, serverPanel);
}
COM: <s> create and layout the components used by this class </s>
|
funcom_train/43933857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleOpen(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
// Skip sent data
skipData(req);
// TODO: should we evaluate the pathinfo?
RTMPTConnection connection = createConnection();
connection.setServlet(this);
if (connection.getId() == 0) {
// no more clients are available for serving
returnMessage((byte) 0, resp);
return;
}
// Return connection id to client
returnMessage(connection.getId() + "\n", resp);
}
COM: <s> start a new rtmpt session </s>
|
funcom_train/43911109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getTypeNames() {
Set set = new HashSet();
for (Iterator i = data.getFeatureTypeInfos().values().iterator(); i.hasNext();) {
FeatureTypeInfo type = (FeatureTypeInfo) i.next();
if (type.getNameSpace() == this) {
set.add(type.getName());
}
}
return set;
}
COM: <s> this should be a list of available type names for the namespace </s>
|
funcom_train/34422813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private State parseSum() {
State left = parseProduct();
if (left.ok) {
do {
if (lexer.acceptToken(TokenType.ADD)) {
left =
produceSum(left, parseExpectedProduct(),
OperationType.ADDITION);
} else if (lexer.acceptToken(TokenType.SUB)) {
left =
produceSum(left, parseExpectedProduct(),
OperationType.SUBTRACTION);
} else
break;
} while (true);
return left;
}
return FAILED_STATE;
}
COM: <s> parses the sum </s>
|
funcom_train/46190200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testViewHomePage() throws Exception {
View view = action.process(request, response);
Model model = action.getModel();
assertEquals(blog.getBlogForThisMonth(), model.get(Constants.MONTHLY_BLOG));
assertEquals(blog.getRecentBlogEntries(), model.get(Constants.BLOG_ENTRIES));
assertTrue(view instanceof BlogEntriesView);
}
COM: <s> tests what happens when the default home page is requested </s>
|
funcom_train/39549778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void gvtRenderingCompleted(GVTTreeRendererEvent e) {
haltProgressivePaintThread();
if (doubleBufferedRendering) {
paintingTransform = null;
suspendInteractions = false;
}
gvtTreeRenderer = null;
if (needRender) {
renderGVTTree();
needRender = false;
} else {
image = e.getImage();
immediateRepaint();
}
if (eventDispatcher != null) {
eventDispatcher.setEventDispatchEnabled(true);
}
}
COM: <s> called when a rendering was completed </s>
|
funcom_train/43245975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetEthinicity() {
System.out.println("getEthinicity");
PatientDataObject instance = new PatientDataObject();
String expResult = "";
String result = instance.getEthnicity();
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 ethnicity method of class org </s>
|
funcom_train/35223167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String readSymbol() throws JFugueException, IOException, ParserError {
final String type = "symbol";
checkReady();
int cp = read();
if (cp == '[') {
String id = readIdentifier();
cp = read();
if (cp == ']') {
return "[" + id + "]";
} else {
unread(cp);
throw new ParserError(ParserError.CHAR_UNEXPECTED, (char) cp, type);
}
} else {
unread(cp);
String id = readIdentifier();
return "[" + id + "]";
}
}
COM: <s> tries to read a symbol for use in looking up dictionary elements </s>
|
funcom_train/45761347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkImpressDocument(){
XComponent xDoc = null;
try{
xDoc = m_SOF.createImpressDoc("ImpressTest");
} catch (com.sun.star.uno.Exception e){
failed("Could not create an impress document: " +e.toString());
}
checkListener(xDoc);
closeDoc(xDoc);
}
COM: <s> creates an impress document and check the code xmouse click handler code and </s>
|
funcom_train/9284992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void positionInLastFetchedRow() throws StandardException {
if (positionInSource > 0) {
positionInHashTable.setValue(positionInSource);
DataValueDescriptor[] hashRowArray = (DataValueDescriptor[])
ht.get(positionInHashTable);
RowLocation rowLoc = (RowLocation) hashRowArray[POS_ROWLOCATION];
((NoPutResultSet)target).positionScanAtRowLocation(rowLoc);
currentPosition = positionInSource;
}
}
COM: <s> positions the cursor in the last fetched row </s>
|
funcom_train/18079478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueChanged(TreeSelectionEvent e) {
DefaultMutableTreeNode node = (DefaultMutableTreeNode)
tree.getLastSelectedPathComponent();
if (node == null) return;
Object nodeInfo = node.getUserObject();
if (node.isLeaf()) {
BookInfo book = (BookInfo)nodeInfo;
displayURL(book.bookURL);
} else {
displayURL(helpURL);
}
}
COM: <s> required by tree selection listener interface </s>
|
funcom_train/3605822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createSashForm() {
GridData gridData = new GridData();
gridData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
gridData.grabExcessHorizontalSpace = true;
gridData.grabExcessVerticalSpace = true;
gridData.verticalAlignment = org.eclipse.swt.layout.GridData.FILL;
sashForm = new SashForm(this, SWT.NONE);
sashForm.setLayoutData(gridData);
featuresList = new List(sashForm, SWT.NONE);
createDetailsComposite();
sashForm.setWeights(new int[]{30,70});
}
COM: <s> this method initializes sash form </s>
|
funcom_train/4557893 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSignUpTickOnIAgreeTo() {
repEng.newStep("324", "Sign up-Tick on I agree to");
//1. Launch http://hobbes.ontometrics.com/magnetportal/
//2. Click the Manage You Assets link.
//3. Click the Publish Magnet link in the Albums/Tracks page.
//4. Click the cart icon.
//5. Click Sign up button.
//6. Fill all requird fields with valid data.
//7. Tick on I agree to.
// The Sign up button will turn to enabled.
}
COM: <s> 324 sign up tick on i agree to </s>
|
funcom_train/124262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void incompleteReadError() throws XmlPullParserException {
if (_parser.getEventType() == XmlPullParser.START_TAG) {
throw new XmlException("Incomplete read error (nested "
+ _parser.getQName() + " has not been read)");
} else {
throw new XmlException("Incomplete read error (character data"
+ "has not been read)");
}
}
COM: <s> notifies that an xml element has not been read fully </s>
|
funcom_train/21982750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JBarcode createCode39Extended(){
JBarcode jbc = new JBarcode(Code39ExtEncoder.getInstance(), WideRatioCodedPainter.getInstance(), BaseLineTextPainter.getInstance());
jbc.setBarHeight(17);
try {
jbc.setXDimension(0.264583333);
} catch (InvalidAtributeException e) {}
jbc.setShowText(true);
jbc.setCheckDigit(false);
jbc.setShowCheckDigit(false);
return jbc;
}
COM: <s> creates a new jbarcode instance to code39 extended barcode type </s>
|
funcom_train/2293481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionCommentImages() throws JspException {
// save initialized instance of this class in request attribute for included sub-elements
getJsp().getRequest().setAttribute(SESSION_WORKPLACE_CLASS, this);
try {
performDialogOperation();
// if no exception is caused comment operation was successful
actionCloseDialog();
} catch (Throwable e) {
// error during rename images, show error dialog
includeErrorpage(this, e);
}
}
COM: <s> performs the comment images action will be called by the jsp page </s>
|
funcom_train/46980015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getMethod(String name) {
for(Iterator i = obsoleteFeatures.iterator(); i.hasNext(); ) {
Object mFeature = i.next();
if(ModelFacade.isAMethod(mFeature) && name.equals(ModelFacade.getName(mFeature))) {
return mFeature;
}
}
return null;
}
COM: <s> get a method from the current classifier not yet modeled </s>
|
funcom_train/35835369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateDiagram() {
Object col = null;
Object ns = ProjectManager.getManager().getCurrentProject().
getCurrentNamespace();
col = Model.getCollaborationsFactory().buildCollaboration(ns);
ArgoDiagram newDiagram = new SequenceDiagramFactory().
createDiagram(col, col);
assertEquals(newDiagram.getClass(), sequence2DiagramClass);
}
COM: <s> tests than the created diagrams are of the correct type </s>
|
funcom_train/22901877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWriteDuringReadTimeout() throws Exception {
TestEntry entry = new TestEntry();
ReadWaiter waiter = new ReadWaiter();
waiter.start();
Thread.sleep(50);
javaSpace.write(entry, null, TEN_MINUTES);
waiter.join();
assertEquals(entry, waiter.getSpaceEntry());
}
COM: <s> tests a read request acts like a read if exists except </s>
|
funcom_train/12183117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireSelectionEvent(Object target, boolean selected) {
if (!targetSelectionListeners.isEmpty()) {
TargetSelectionEvent tse = new TargetSelectionEvent(this, target, selected);
Iterator it = targetSelectionListeners.iterator();
while (it.hasNext()) {
TargetSelectionListener listener = (TargetSelectionListener) it.next();
listener.targetSelectionChanged(tse);
}
}
}
COM: <s> helper method to fire an event for the selection deselection of </s>
|
funcom_train/22757579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void registerStartHandlers() {
super.registerStartHandlers();
// add property handling:
registerStartHandler(new IPaloStartHandler() {
public String getPath() {
return "view/property";
}
public void startElement(String uri, String localName, String qName, Attributes attributes) {
try {
String id = attributes.getValue("id");
String value = attributes.getValue("value");
cubeView.addProperty(id, value);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
COM: <s> adds the viw property path of the xml description to the loader </s>
|
funcom_train/1378009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onRenderStacktrace( IRequestCycle cycle ) {
try {
for(ExceptionDescription e : getExceptions()){
LOG.error(e);
}
//getMessageService().sendException( getExceptions(), getVisit().getAuthenticatedUser().getProfile().getName().toString() );
} catch (Exception e) {
LOG.warn("onRenderStacktrace", e );
}
}
COM: <s> listener method that is called by the rendering of the stack trace </s>
|
funcom_train/10791480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getOpenJPA3GeneratedKeySequenceName(Column col) {
Table table = col.getTable();
DBIdentifier sName = DBIdentifier.preCombine(table.getIdentifier(), "SEQ");
return toDBName(getNamingUtil().makeIdentifierValid(sName, table.getSchema().
getSchemaGroup(), maxTableNameLength, true));
}
COM: <s> returns a open jpa 3 compatible name for an auto assign sequence </s>
|
funcom_train/45050255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected HttpClient createClient() {
mgr.setMaxConnectionsPerHost(Integer.MAX_VALUE);
final HttpClient client = new HttpClient(mgr);
final HostConfiguration config = new HostConfiguration();
config.setHost(hostname, port, "http");
client.setHostConfiguration(config);
return client;
}
COM: <s> creates a new http client </s>
|
funcom_train/22206779 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSubject(Locator subject) throws PropertyVetoException {
if (staticallyMerged()) {
m_baseTopic.setSubject(subject);
return;
}
fireVetoableChange("subject", m_subject, subject);
Locator oldSubject = m_subject;
m_subject = subject;
firePropertyChange("subject", oldSubject, m_subject);
}
COM: <s> sets the subject constituting resource of this topic </s>
|
funcom_train/12192448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int findListener(RemovalListener listener) {
// Iterate over the existing array looking for the listener.
int found = -1;
for (int i = 0; i < listeners.length && found == -1; i++) {
RemovalListener removalListener = listeners[i];
if (removalListener == listener) {
found = i;
}
}
return found;
}
COM: <s> find the listener in the list </s>
|
funcom_train/13771862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void add(String typeNameWithNamespace, IOpenClass type) throws OpenLCompilationException {
if (internalTypes.containsKey(typeNameWithNamespace)) {
throw new OpenLCompilationException("The type " + typeNameWithNamespace + " has been already defined.");
}
internalTypes.put(typeNameWithNamespace, type);
}
COM: <s> adds type to map of internal types </s>
|
funcom_train/48645979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getMultiplTextField() {
if (multiplTextField == null) {
multiplTextField = new JTextField();
multiplTextField.setPreferredSize(new Dimension(60, 21));
multiplTextField.addPropertyChangeListener("value",
new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
multiplOldValue = (String) evt.getOldValue();
}
});
}
return multiplTextField;
}
COM: <s> this method initializes multipl text field </s>
|
funcom_train/19672073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void mainLoop() {
while (!Keyboard.isKeyDown(Keyboard.KEY_ESCAPE)
&& !Display.isCloseRequested()) {
// allow subsystem to get a chance to run too
Display.update();
if (Display.isVisible()) {
// check keyboard input
processKeyboard();
processMouse();
render();
} else {
// no need to render/paint if nothing has changed (ie. window dragged over)
if (Display.isDirty()) {
render();
}
// don't waste cpu time, sleep more
try {
Thread.sleep(100);
} catch (InterruptedException inte) {
}
}
}
}
COM: <s> runs the main loop of the test </s>
|
funcom_train/43683455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getOrderHQL(String initHQL) {
if(StringUtils.isBlank(getSortProperty())) {
return initHQL;
}
return new StringBuffer(100).append(initHQL).append(" order by r.")
.append(getSortProperty()).append(" ").append(getSortDir()).toString();
}
COM: <s> build a hql with order clause </s>
|
funcom_train/24370287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public GeoConicPart CircumcircleSector(String label, GeoPoint A, GeoPoint B, GeoPoint C) {
AlgoConicPartCircumcircle algo = new AlgoConicPartCircumcircle(cons, label, A,B, C,
GeoConicPart.CONIC_PART_SECTOR);
processCreateCommand(algo.getConicPart()); //VMT modification
return algo.getConicPart();
}
COM: <s> circle sector from three points </s>
|
funcom_train/6489116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintIcon(Component c, Graphics g, int x, int y) {
g.setColor(edgeColour);
g.fillOval(x,y,diam,diam);
g.setColor(coreColour);
g.fillOval(x+1,y+1,diam-2,diam-2);
}
COM: <s> part of icon interface </s>
|
funcom_train/22929434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNormalizeName() {
assertEquals("XXX", "XXX", Command.normalizeName("XXX"));
assertEquals("xxx", "XXX", Command.normalizeName("xxx"));
assertEquals("Xxx", "XXX", Command.normalizeName("Xxx"));
}
COM: <s> test the normalize name method </s>
|
funcom_train/5395759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDiscLoadTime() {
System.out.println("getDiscLoadTime");
GZipProcess instance = null;
long expResult = 0L;
long result = instance.getDiscLoadTime();
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 disc load time method of class org </s>
|
funcom_train/44822020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDefaultDefinition() {
if (defaultValue != null && defaultValue.length() > 0) {
if (dataType == java.sql.Types.CHAR || dataType == java.sql.Types.VARCHAR) {
return "DEFAULT '" + defaultValue + "'";
} else {
return "DEFAULT " + defaultValue;
}
} else {
return "";
}
}
COM: <s> get the default definition that should be used to define this column </s>
|
funcom_train/15608343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Map buildAttributesMap(Attributes lAttrs) {
Map returnMap = new HashMap(); // Guarantees SOMETHING always returns.
for (int i = 0; i < lAttrs.getLength(); i++) {
returnMap.put(lAttrs.getLocalName(i), lAttrs.getValue(i));
} // For all input attributes
return returnMap;
} // End method: buildAttributesMap
COM: <s> given a list of attributes as provided to start element create </s>
|
funcom_train/44823717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean processEvent(ApplicationEvent evt) {
boolean success = true;
synchronized(_eventQueue) {
try {
EventTask newTask = new EventTask(evt, _eventHandlers);
_eventQueue.add(newTask);
} catch(QueueClosedException qcx)
{
// nothing we can do; may as well bail
// Log this event when logging is integrated
_workers.shutdown();
success = false;
}
}
return(success);
}
COM: <s> add an event to the dispatchers queue to be processed </s>
|
funcom_train/44690599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JButton addButton(String fieldName, String text, String toolTipText) {
JButton button = new JButton(text);
addRow(fieldName, new JLabel(fieldName), button, null, toolTipText, LEFT_LABEL, NONE);
return button;
}
COM: <s> adds a jbutton to this dialog </s>
|
funcom_train/21503381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ExpressionParameter_type_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ExpressionParameter_type_feature", "_UI_ExpressionParameter_type"),
DMLPackage.Literals.EXPRESSION_PARAMETER__TYPE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the type feature </s>
|
funcom_train/20846666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getFaultParameters(String faultName) {
if (faultName == null) return null;
Vector ret = new Vector();
Hashtable faultParameters = parameterValues.getFaultParameters();
if (faultParameters == null) return ret;
Hashtable faultParameterMap = (Hashtable) faultParameters.get(faultName);
if (faultParameterMap == null) return ret;
Enumeration pk = faultParameterMap.keys();
while (pk.hasMoreElements())
ret.addElement(faultParameterMap.get((String) pk.nextElement()));
return ret;
}
COM: <s> vector containing the names of parameters of the fault with the given </s>
|
funcom_train/34965401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void assertSharingText(TableCell sharingTextCell, String group) {
String expected = null;
if (group == null || group.length() == 0) {
expected = "Public";
} else {
expected = "Group: " + group;
}
log("Asserting sharing: " + expected);
assertEquals(expected, sharingTextCell.asText().trim());
}
COM: <s> asserts text from sharing cell </s>
|
funcom_train/625952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startTest(String name) throws EveException, IOException, ClassNotFoundException {
if(name == "MBM"){
//this.myMMD = "uml14";
this.myServiceName = name;
System.out.println("");
System.out.println("Test: Starting the test for MBM service");
this.checkStaticStubClient();
}
if(name == "NOP"){
//this.myMMD = "uml14";
this.myServiceName = name;
System.out.println("");
System.out.println("Test: Starting the test for NOP service");
this.checkStaticStubClient();
}
}
COM: <s> starts the test for the client </s>
|
funcom_train/45708010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(String filepath) {
System.out.println("ODWAClient: Report: save executed");
/*try {
FileOutputStream fileOutputStream = new FileOutputStream(filepath);
ObjectOutputStream objectStream = new ObjectOutputStream(
fileOutputStream);
objectStream.writeObject(this);
objectStream.close();
System.out.println("Report saved to file " + filepath);
} catch (IOException e) {
System.out.println("Error in saving " + e);
throw e;
}*/
}
COM: <s> method responsible for saving report to the file declared by the path filepath </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.