__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/4013781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addQuestion(QuestionDef qtn){
if(pages == null){
pages = new Vector<PageDef>();
PageDef page = new PageDef(/*this.getVariableName()*/"Page1",Integer.parseInt("1"),null,this);
pages.addElement(page);
}
((PageDef)pages.elementAt(pages.size()-1)).addQuestion(qtn);
qtn.setParent(pages.elementAt(pages.size()-1));
}
COM: <s> adds a new question to the form </s>
|
funcom_train/3562024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer createEmptyGenre(Integer fatherGenreID) throws DbException {
LinkedList parmList;
parmList = new LinkedList();
addIfNotNull(parmList, "fatherGenreID", fatherGenreID);
return (Integer) simpleResponse(CREATE_NEW_GENRE_PAGE, parmList);
}
COM: <s> creates a new empty genre </s>
|
funcom_train/19306241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LineArea getPreviousLineArea(final LineArea lineArea) {
if (this.getChildren() == null) {
return null;
}
final int index = getChildren().indexOf(lineArea);
if (index <= 0) {
return null;
}
final Object previousObject = getChildren().get(index - 1);
if (previousObject instanceof LineArea) {
return (LineArea) previousObject;
}
return null;
}
COM: <s> return the previous line area relative to a given line area </s>
|
funcom_train/1170017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long addColorChanges(String s, Card c, boolean addToColors, boolean bIncrease) {
if (bIncrease)
Card_Color.increaseTimestamp();
globalColorChanges.add(new Card_Color(new ManaCost(s), c, addToColors, false));
return Card_Color.getTimestamp();
}
COM: <s> p add color changes </s>
|
funcom_train/23269658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void parseHTML(final Channel.ViewResponse viewResponse, final TypedInputSource proxiedDocumentInputSource, final DefaultHandler2 contentHandler) throws WWWeeePortal.Exception {
MarkupManager.parseHTMLDocument(proxiedDocumentInputSource.getInputSource(), contentHandler, false);
// We convert all HTML types to XHTML when parsing, so override Content-Type accordingly.
viewResponse.setContentType(MediaType.APPLICATION_XHTML_XML_TYPE);
return;
}
COM: <s> having determined that the document being </s>
|
funcom_train/23032547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeRule() {
List<Rule> rules = getCurrentRules();
// Look for selected Rules in the table's rows...
for (int idx : rulesTable.getSelectedRows()) {
Rule selectedRule = rules.get(idx);
// ... but only delete the Rules that this user owns
if (selectedRule.getCreatorUser().equals(
DesignContext.getCurrentUser()))
agentSystem.removeRule(selectedRule);
}
}
COM: <s> removes the selected rule from the system </s>
|
funcom_train/8325975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean computeCalculated(final MemberType memberType) {
// If the member is not created from the "with member ..." MDX, the
// calculated will be null. But it may be still a calculated measure
// stored in the cube.
return isCalculatedInQuery() || memberType == MemberType.FORMULA;
}
COM: <s> computes the value to be returned by </s>
|
funcom_train/50865417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateNavpoints() {
if ((currentMission != null) && (currentMission instanceof TravelMission)) {
navpoints.clear();
TravelMission travelMission = (TravelMission) currentMission;
for (int x=0; x < travelMission.getNumberOfNavpoints(); x++)
navpoints.add(travelMission.getNavpoint(x));
fireTableDataChanged();
}
else {
if (navpoints.size() > 0) {
navpoints.clear();
fireTableDataChanged();
}
}
}
COM: <s> updates the navpoints for the table </s>
|
funcom_train/4521082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Voto entity) {
LogUtil.log("saving Voto 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 voto entity </s>
|
funcom_train/49045290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButtonMenuItem getJRadioButtonMenuButtMethodBiLin() {
//if (buttMethodBiLin == null) {
buttMethodBiLin = new JRadioButtonMenuItem();
buttMethodBiLin.setText("Bilinear");
buttMethodBiLin.setToolTipText("bilinear registration");
buttMethodBiLin.addActionListener(this);
buttMethodBiLin.setActionCommand("parameter");
//}
return buttMethodBiLin;
}
COM: <s> this method initializes the option method bi lin </s>
|
funcom_train/47431127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTieneElemFlujoPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Link_tieneElemFlujo_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Link_tieneElemFlujo_feature", "_UI_Link_type"),
AgroEcoMAPackage.Literals.LINK__TIENE_ELEM_FLUJO,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the tiene elem flujo feature </s>
|
funcom_train/17174997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEmptyLineRead() throws IOException {
MultiFileReader mfr = new MultiFileReader();
mfr.addFile("src/util/test/file3.txt");
String line1 = mfr.readLine();
assertEquals("line 1", line1);
String line2 = mfr.readLine();
assertEquals("", line2);
String line3 = mfr.readLine();
assertEquals("line 3", line3);
String line4 = mfr.readLine();
assertNull(line4);
}
COM: <s> execute the empty line reader test </s>
|
funcom_train/49318504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JMenuItem createSaveGraphicsWithImageMenuItem() {
JMenuItem menuItem = new JMenuItem(_I18N.getString("saveGraphicsWithImage"));
menuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
canvasDraw.imageDisplay.saveGraphicsWithImage();
}
});
return menuItem;
}
COM: <s> create and return the save graphics with image menu item </s>
|
funcom_train/46457995 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void showTabbedPaneView() {
contentPane.removeAll();
if(navigationVisible&&!(this instanceof LaunchBuilder)) {
contentPane.add(navbar, BorderLayout.NORTH);
}
contentPane.add(tabbedPane, BorderLayout.CENTER);
frame.validate();
refreshGUI();
frame.repaint();
}
COM: <s> displays the standard tabbed pane view </s>
|
funcom_train/29870042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane getJEditTemplateCenterLeftScrollPane() {
if (jEditTemplateCenterLeftScrollPane == null) {
jEditTemplateCenterLeftScrollPane = new JScrollPane();
jEditTemplateCenterLeftScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
jEditTemplateCenterLeftScrollPane.setViewportView(getJEditTemplateFieldList());
}
return jEditTemplateCenterLeftScrollPane;
}
COM: <s> this method initializes j edit template center left scroll pane </s>
|
funcom_train/13479608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private long getLastInsertedId() {
List<List<String>> table = queryStatement("CALL IDENTITY()");
if (table != null) {
Iterator<List<String>> itrows = table.iterator();
if (itrows.hasNext()) {
List<String> row = itrows.next();
Iterator<String> itcols = row.iterator();
if (itcols.hasNext()) {
String result = itcols.next();
if (result == "")
return -1;
else
return Long.parseLong(result);
} else
return -1;
} else
return -1;
} else
return -1;
}
COM: <s> this function returns the last inserted id it should be used after a </s>
|
funcom_train/16524381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFrameTo(int c) {
if(c >= frames.size()) {
System.out.println("Frame past max.");
return;
}
currentTime = 0;
for(int i = 0; i < c; i++) {
currentTime += frames.get(i).getDelay();
}
//nextframedelay = frames.get(c).getDelay();
}
COM: <s> sets the current frame to c </s>
|
funcom_train/10841666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNamespaceFromManifest() throws IOException {
final String expected = "test1=http://sling.apache.org/test/one";
final String content = getContent(HTTP_BASE_URL + "/testing/NamespaceTestServlet/output",
CONTENT_TYPE_PLAIN);
assertTrue("Content contains " + expected + " (" + content + ")", content.contains(expected));
}
COM: <s> verify that sling namespaces works </s>
|
funcom_train/4917618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAsynchronous() {
// Add asynchronous node to execute
ExecutionNode<?> asyncNode = this.bindAsynchronousNode(this
.getInitialNode());
// Add next node to ensure order
ExecutionNode<?> nextNode = this.bindNextNode(this.getInitialNode());
// Execute the nodes
this.execute();
this.validateExecutionOrder(this.getInitialNode(), asyncNode, nextNode);
}
COM: <s> ensure node will be executed asynchronously </s>
|
funcom_train/24323074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PredictionClass getPredictionClass(String classID, boolean isOriginalClass){
PredictionClass c = null;
ListIterator<PredictionClass> i = this.predictionClass.listIterator();
if(isOriginalClass){
while(i.hasNext()){
c = i.next();
if(((Class)c.getOriginalClass()).getClassID().equals(classID)){
return c;
}
}
}else{
while(i.hasNext()){
c = i.next();
if(c.getClazz().getClassID().equals(classID)){
return c;
}
}
}
return null;
}
COM: <s> retrieves a prediction class identified either by the original class id or </s>
|
funcom_train/1648616 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void verifyManifest(HashMap<String, Object> metadata) {
Set<String> set = metadata.keySet();
for(String name:set) {
Object o = metadata.get(name);
if (o instanceof HashMap) {
@SuppressWarnings("unchecked")
HashMap<String, Object> hm = (HashMap<String, Object>) o;
verifyManifest(hm);
continue;
}
if (o instanceof ManifestElement) {
continue;
}
throw new IllegalArgumentException("FATAL: unknown manifest element: "+o);
}
}
COM: <s> ensure the tree contains only elements we understand so we do not </s>
|
funcom_train/42182491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL getURL() throws IOException {
URL url;
if (this.clazz != null) {
url = this.clazz.getResource(this.path);
} else {
url = this.classLoader.getResource(this.path);
}
if (url == null) {
throw new FileNotFoundException(
getDescription() + " cannot be resolved to URL because it does not exist");
}
return url;
}
COM: <s> this implementation returns a url for the underlying class path resource </s>
|
funcom_train/36993501 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private LivingProgram getPartner() {
// Search for a partner
Object[] aLivingProgramNeighbors =
this.world.getMooreNeighbors(
this.livingProgram.getX(), this.livingProgram.getY());
LivingProgram aLivingProgramNeighbor =
(LivingProgram) aLivingProgramNeighbors [
Sim.getRnd().getIntFromTo(0, aLivingProgramNeighbors.length-1)];
return aLivingProgramNeighbor;
}
COM: <s> get a random partner among neighbors of the agent </s>
|
funcom_train/8715395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteDocuments(Term[] terms) throws CorruptIndexException, IOException {
ensureOpen();
try {
boolean doFlush = docWriter.bufferDeleteTerms(terms);
if (doFlush)
flush(true, false, false);
} catch (OutOfMemoryError oom) {
handleOOM(oom, "deleteDocuments(Term[])");
}
}
COM: <s> deletes the document s containing any of the </s>
|
funcom_train/41206816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillTriangle(int x1, int y1, int x2, int y2, int x3, int y3) {
impl.fillTriangle(nativeGraphics, xTranslate + x1, yTranslate + y1, xTranslate + x2, yTranslate + y2, xTranslate + x3, yTranslate + y3);
}
COM: <s> draws a filled triangle with the given coordinates </s>
|
funcom_train/14012278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isAncestorBeingAdded(Component component) {
Component child = component;
Component parent = component.getParent();
while (parent != null) {
ServerComponentUpdate update = (ServerComponentUpdate) componentUpdateMap.get(parent);
if (update != null) {
if (update.hasAddedChild(child)) {
return true;
}
}
child = parent;
parent = parent.getParent();
}
return false;
}
COM: <s> determines if an ancestor of the given component is being added </s>
|
funcom_train/48339439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void putAll(Map<? extends K, ? extends V> t) {
int n = t.size();
if (n == 0)
return;
if (n > threshold) // conservatively pre-expand
resize(capacity(n));
for (Entry<? extends K, ? extends V> e : t.entrySet())
put(e.getKey(), e.getValue());
}
COM: <s> copies all of the mappings from the specified map to this map </s>
|
funcom_train/31539638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sbuf = new StringBuffer("SimpleBlob[");
byte[] bytes = this.getBytes();
for (int i = 0; i < bytes.length; i++) {
int c = bytes[i];
if (Character.isLetterOrDigit((char) c)) {
sbuf.append(Character.toString((char)c));
} else {
sbuf.append(".");
}
}
sbuf.append("]");
return sbuf.toString();
}
COM: <s> prints the bytes as character if it is printable or as </s>
|
funcom_train/16707299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object makeObject() throws Exception {
String cosignConListId = (s_uniqueId ++) + ":" + cosignServer.getHost();
log.info( "[" + cosignConListId + "]: making new cosign connection list" );
return new CosignConnectionList( poolId, cosignConListId, cosignServer );
}
COM: <s> this method creates a new cosign connection list object </s>
|
funcom_train/24627867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean eventBefore(AWTEvent e, Point rel, Node obsn) {
boolean ret = super.eventBefore(e, rel, obsn);
if (!ret) {
Rectangle r = getContentBounds();
warp_ = r.contains(rel);
if (warp_) {
rel_.setLocation(rel);
rel.x = (rel.x - r.x)/2 + r.x;
rel.y = (rel.y - r.y)/2 + r.y;
}
}
return ret;
}
COM: <s> transform mouse coordinates to match magnified </s>
|
funcom_train/47089296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addObjects(SceneObject sceneObject) {
String name = sceneObject.getNameTS();
String type = sceneObject.getObjectTypeTS().toString();
String mesh = sceneObject.getMeshFileTS().toString();
completeObjects.add(new AutocompleteObject(name, type, mesh, sceneObject.isVisibleTS()));
}
COM: <s> extract all the significant data from each object and then put every </s>
|
funcom_train/4437634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object extractTargetObject(ActionInvocation invocation) {
Object targetObject;
if (this.target != null) {
ValueStack stack = invocation.getStack();
targetObject = stack.findValue(this.target);
if (log.isTraceEnabled()) {
log.trace(String.format("Evaluate serializer target %s to %s.",
target, targetObject));
}
} else {
targetObject = invocation.getAction();
if (log.isTraceEnabled()) {
log.trace("Using action instance as serializer target.");
}
}
return targetObject;
}
COM: <s> find the target object according the target property parameter if not </s>
|
funcom_train/49199784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addShowTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_LinkAssociation_showType_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_LinkAssociation_showType_feature", "_UI_LinkAssociation_type"),
ExhibitionPackage.Literals.LINK_ASSOCIATION__SHOW_TYPE,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the show type feature </s>
|
funcom_train/26383007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean remove(Id id) {
if (!inTransaction) return super.remove(id);
Object removed=puts.remove(id);
// Hack: This does not generally apply (only in my case).
// Make it work to remove unexisting stuff instead
// Plus add test for add a/remove a/commit
if (removed==null)
removes.add(id);
return true;
}
COM: <s> accumulates the remove in this class until </s>
|
funcom_train/12244946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ModificationPlugin getModificationByName(String name) {
for (Iterator iter = plugins.iterator(); iter.hasNext();) {
ModificationPlugin mpi = (ModificationPlugin) iter.next();
if (mpi.getName().compareTo(name) == 0) {
return mpi;
}
}
debugLogger.warn("search for unknown name: " + name);
return null;
}
COM: <s> return a plug in for a known name </s>
|
funcom_train/7612381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void assertGroupNotContains(ViewGroup parent, View child) {
final int count = parent.getChildCount();
assertTrue("Child count should be >= 0", count >= 0);
for (int i = 0; i < count; i++) {
if (parent.getChildAt(i) == child) {
assertTrue("child " + child + " is found in parent", false);
}
}
}
COM: <s> assert that the specified group does not contain a specific child </s>
|
funcom_train/45255700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PreferenceManager getPreferenceManager() {
if (preferenceManager == null) {
preferenceManager = new WorkbenchPreferenceManager(
PREFERENCE_PAGE_CATEGORY_SEPARATOR);
//Get the pages from the registry
PreferencePageRegistryReader registryReader = new PreferencePageRegistryReader(
getWorkbench());
registryReader
.loadFromRegistry(Platform.getExtensionRegistry());
preferenceManager.addPages(registryReader.getTopLevelNodes());
}
return preferenceManager;
}
COM: <s> get the preference manager </s>
|
funcom_train/4160898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTitle(String title) {
String className = this.getClass().getName();
String shortName = className.substring(className.lastIndexOf('.')+1);
super.setTitle(title == null || title.length() == 0
? shortName
: title+" ["+shortName+"]");
}
COM: <s> sets title to title strategy plotter </s>
|
funcom_train/48054680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPackageLicense(License packageLicense) {
License oldPackageLicense = this.packageLicense;
this.packageLicense = packageLicense;
firePropertyChange("packageLicense", oldPackageLicense, packageLicense); // NO18N
jTextAreaLicense.setText(packageLicense.text);
jTextAreaLicense.setCaretPosition(0);
}
COM: <s> sets the package license </s>
|
funcom_train/44850843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringBuffer createModifiedSQL(DomainObjectHome inDomainObjectHome) {
StringBuffer outSQL = new StringBuffer();
boolean isFirst = true;
for (int i = 0; i < columnNames.length; i++) {
if (!isFirst) {
outSQL.append(", ");
}
isFirst = false;
outSQL.append(modifiers[i]).append("(").append(inDomainObjectHome.getColumnNameFor(columnNames[i])).append(")");
}
return outSQL;
}
COM: <s> creates the sql statement with the modified column names e </s>
|
funcom_train/23411316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addWhatPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DeonticStatement_what_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DeonticStatement_what_feature", "_UI_DeonticStatement_type"),
OMPackage.Literals.DEONTIC_STATEMENT__WHAT,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the what feature </s>
|
funcom_train/18862444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Translator createGlobalForwardsTranslator() {
GenericTranslator translator = new GenericTranslator(GLOBAL_FORWARDS,
STRUTS_CONFIG_PACKAGE.getStrutsConfigType_GlobalForwards());
translator.setChildren(new Translator[] {
IDTranslator.INSTANCE,
new Translator(ATTR_TYPE, STRUTS_CONFIG_PACKAGE
.getGlobalForwardsType_Type(), DOM_ATTRIBUTE
| CDATA_CONTENT),
createForwardTranslator(STRUTS_CONFIG_PACKAGE
.getForwardContainerType_Forwards()) });
return translator;
}
COM: <s> creates the translator that maps the global forwards xml element to the </s>
|
funcom_train/2585820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSubIntervalCount() {
TaskSeriesCollection tsc = createCollection3();
assertEquals(1, tsc.getSubIntervalCount(0, 0));
assertEquals(2, tsc.getSubIntervalCount(0, 1));
assertEquals(0, tsc.getSubIntervalCount(1, 0));
assertEquals(3, tsc.getSubIntervalCount(1, 1));
}
COM: <s> some tests for the bug report 1099331 </s>
|
funcom_train/9413154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object createXPathEvaluator(Document doc) {
try {
Class xpathClass = Class.forName(
"org.apache.xpath.domapi.XPathEvaluatorImpl");
Constructor constructor = xpathClass.getConstructor(new Class[] {Document.class});
return constructor.newInstance(new Object[] {doc});
}
catch (Exception ex) {
}
return doc;
}
COM: <s> creates xpath evaluator </s>
|
funcom_train/46727494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ISPanel getAddFormPanel() throws Exception {
if (addFormPanel == null) {
addFormPanel = new ISPanel(new BorderLayout());
addFormPanel.add(getFirstPanel(), BorderLayout.WEST);
addFormPanel.add(getSecondPanel(ViewReference.FORMBUILDERCONTROLADDOTHER), BorderLayout.CENTER);
newControlModel.setControlTypeRef(new DisplayModel(ControlTypeReference.CONTROL.getRefId()));
}
return addFormPanel;
}
COM: <s> reconstruct the panel </s>
|
funcom_train/11362898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bindService(TradeServices tradeServices, Map props) {
if (Log.doTrace())
Log.trace("TradeServicesManagerImpl:bindService()", tradeServices, props);
if (tradeServices != null) {
String mode = (String) props.get("mode");
tradeServicesList[Enum.valueOf(TradeConfig.ModeType.class, mode).ordinal()] = tradeServices;
}
}
COM: <s> bind a new trade services implementation </s>
|
funcom_train/25332416 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetAndSetFeatureStableID() {
FeatureQuery instance = new FeatureQuery();
String expResult = "bob";
String result = instance.getFeatureStableID();
assertNull(result);
instance.setFeatureStableID(expResult);
result = instance.getFeatureStableID();
assertEquals(expResult, result);
}
COM: <s> test of get feature stable id method of class feature query </s>
|
funcom_train/51782686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double truncateToParentX(double diffx, BooleanHolder success) {
double dx = diffx;
if (node.getParent() != null &&
node.getAbsoluteX1() + diffx < node.getParent().getAbsoluteX1()) {
dx -= ((node.getAbsoluteX1() + diffx) - node.getParent().getAbsoluteX1());
success.setValue(true);
}
return dx;
}
COM: <s> truncates the drag position to the parents absolute x position </s>
|
funcom_train/34353040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addModel(Model source, Model dest) {
dest.add(source);
Map prefixes = source.getNsPrefixMap();
for (Iterator it = prefixes.keySet().iterator(); it.hasNext();) {
String prefix = (String) it.next();
String url = (String) prefixes.get(prefix);
dest.setNsPrefix(prefix, url);
}
}
COM: <s> add statements and namespaces from a source model to a destination model </s>
|
funcom_train/37556477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cut(){
checkWidget();
int length = selection.y - selection.x;
if (length > 0) {
try {
setClipboardContent(selection.x, length);
}
catch (SWTError error) {
// Copy to clipboard failed. This happens when another application
// is accessing the clipboard while we copy. Ignore the error.
// Fixes 1GDQAVN
// Rethrow all other errors. Fixes bug 17578.
if (error.code != DND.ERROR_CANNOT_SET_CLIPBOARD) {
throw error;
}
// Abort cut operation if copy to clipboard fails.
// Fixes bug 21030.
return;
}
doDelete();
}
}
COM: <s> moves the selected text to the clipboard </s>
|
funcom_train/18091378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point2D geoToPixel(GeoPosition c, int zoom) {
int tilezoom = getTileZoom(zoom);
int scale = 1 << (tilezoom-zoom);
Point2D p = GeoUtil.getBitmapCoordinate(c, tilezoom, getInfo());
if (scale != 1) {
p.setLocation(p.getX() * scale, p.getY() * scale);
}
return p;
}
COM: <s> convert a geo position to a pixel position in the world bitmap </s>
|
funcom_train/33913654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unpack(File packedJarFile) throws IOException {
String packedName=packedJarFile.getAbsolutePath();
String jarFilename = (packedName.endsWith(".pack.gz"))
? packedName.substring(0,packedName.length()-8)
: "unpacked";
File jarFile = new File(jarFilename);
unpack(packedJarFile, jarFile, true);
}
COM: <s> unpack jar file </s>
|
funcom_train/41595065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIntegrityCheckAlgorithmPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ED_integrityCheckAlgorithm_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ED_integrityCheckAlgorithm_feature", "_UI_ED_type"),
V3Package.eINSTANCE.getED_IntegrityCheckAlgorithm(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the integrity check algorithm feature </s>
|
funcom_train/4519051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SortKey toggle(SortKey key, boolean CtrlDown) {
if (key.getSortOrder() == SortOrder.ASCENDING) {
return new SortKey(key.getColumn(), SortOrder.DESCENDING);
} else if (key.getSortOrder() == SortOrder.DESCENDING) {
return new SortKey(key.getColumn(), SortOrder.UNSORTED);
} else {
return new SortKey(key.getColumn(), SortOrder.ASCENDING);
}
}
COM: <s> next status get </s>
|
funcom_train/48402355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addTitleClickHandler(com.smartgwt.client.widgets.form.fields.events.TitleClickHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.form.fields.events.TitleClickEvent.getType()) == 0) setupTitleClickEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.form.fields.events.TitleClickEvent.getType());
}
COM: <s> add a title click handler </s>
|
funcom_train/51437793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object processValue(Object type,Object key, Object value) {
try {
double d = Double.parseDouble(value.toString());
//perhaps a descriptor
return key;
} catch (Exception x) {
Hashtable t = identifiersProcessor.getIdentifiers();
Object v = t.get(key);
if (v != null) return v.toString();
}
return key;
}
COM: <s> this is to process value when moving to the translated properties </s>
|
funcom_train/9278455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateWithInvalidEncryptionKey() {
try {
getConnection("encryptedDB_invkeyChar", INVALID_CHAR_KEY);
fail("Database creation with invalid key should fail.");
} catch (SQLException sqle) {
assertSQLState("XJ041", sqle);
assertSQLState("XBCXN", getLastSQLException(sqle));
}
}
COM: <s> try to create database with a key containing one or more invalid chars </s>
|
funcom_train/9990614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSubType(String subType, String superType) {
try {
Class sub = TypeUtil.getType(subType);
Class sup = TypeUtil.getType(superType);
if (sup.isAssignableFrom(sub)) {
return true;
}
} catch (Exception e) {
}
return false;
}
COM: <s> check whether the first argument is a sub type of the second </s>
|
funcom_train/7673493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Frame makeNewSubroutineStartFrame(int subLabel, int callerLabel) {
IntList newSubroutines = subroutines.mutableCopy();
newSubroutines.add(subLabel);
Frame newFrame = new Frame(locals.getPrimary(), stack,
IntList.makeImmutable(subLabel));
return newFrame.mergeWithSubroutineCaller(this, subLabel, callerLabel);
}
COM: <s> makes a frame for a subroutine start block given that this is the </s>
|
funcom_train/28900995 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMultipleOrdinaryBuiltinSequences() throws Exception {
program = "p1(?X) :- ?X = 1." + "p2(?X) :- ?X = 1, r(?X)."
+ "p3(?X) :- r(?X), ?X = 1." + "p4(?X) :- ?X = 1, ?X = 2."
+ "p5(?X) :- ?X = 2, ?X = 2.";
parser.parse(program);
rules = createRules();
compile();
}
COM: <s> test lots of sequences of built ins and ordinary predicates to check for </s>
|
funcom_train/3936959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ExtractedData extractGenericData(File inFile) {
ExtractedData outExtracted = new ExtractedData();
outExtracted.setTitle(inFile.getName());
outExtracted.setFileSize(inFile.length());
outExtracted.setFileType(getInputType());
outExtracted.setDateModified(inFile.lastModified());
try {
outExtracted.setFilePath(inFile.getCanonicalPath());
} catch (IOException exc) {
outExtracted.setFilePath(inFile.getAbsolutePath());
}
return outExtracted;
}
COM: <s> sets the generic data about the file i </s>
|
funcom_train/41620958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getSubmitAnswerCommand() {
if (submitAnswerCommand == null) {//GEN-END:|38-getter|0|38-preInit
// write pre-init user code here
submitAnswerCommand = new Command("Submit", Command.SCREEN, 0);//GEN-LINE:|38-getter|1|38-postInit
// write post-init user code here
}//GEN-BEGIN:|38-getter|2|
return submitAnswerCommand;
}
COM: <s> returns an initiliazed instance of submit answer command component </s>
|
funcom_train/36858629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addListener(final EventListener el, long mask) {
synchronized (EventMulticaster.treeLock) {
if (listeners.contains(el))
return;
if (el instanceof EventMulticaster) {
final EventMulticaster em = (EventMulticaster) el;
addMulticaster(em);
mask = em.enabledMask;
} else {
listeners.add(el);
}
listenerMasks.add(mask);
// log.info(("Added mask: " + mask + " " +
// listenerMasks.get(listenerMasks.size()-1));
cleanMasks();
}
}
COM: <s> adds the listener with the specified mask </s>
|
funcom_train/32720151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void append(byte[] bytes) {
byte[] newValue = new byte[value.length + bytes.length];
System.arraycopy(value, 0, newValue, 0, value.length);
System.arraycopy(bytes, 0, newValue, value.length, bytes.length);
value = newValue;
}
COM: <s> appends an array of bytes to this octet string </s>
|
funcom_train/42005180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void nb_delete(long id) {
seqno += 2; // Set of neighbors changed
int no = aodv_nbr_list.size();
for (int i = 0; i < no; i++) {
AODV_BroadcastID nbr = (AODV_BroadcastID) aodv_nbr_list.elementAt(i);
if (nbr.src == id) {
aodv_nbr_list.removeElement(nbr);
break;
}
}
}
COM: <s> called when we receive explicit notification that a neighbor </s>
|
funcom_train/22284105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProperties(PropertyList list) {
super.setProperties(list);
shadowColor = list.getColor("shadowcolor", null);
align = list.getOption("align", alignOptions, LEFT);
text = list.getString("text", null);
// WidgetLayoutMg2 support
LayoutUtil.setChildLayoutProperties(this, list);
}
COM: <s> set the properties of this label widget </s>
|
funcom_train/7711554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mousePressed(MouseEvent e) {
requestFocus();
Point p = constrainPoint(new Point(e.getX(), e.getY()));
fLastClick = new Point(e.getX(), e.getY());
editor.tool().mouseDown(e, p.x, p.y);
checkDamage();
}
COM: <s> handles mouse down events </s>
|
funcom_train/50314797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawPoint(int x, int y) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
try {
lockToolkit();
// CAIRO BEGIN
if (cairoHandle != 0) {
Cairo.cairo_rectangle(cairoHandle, x, y, 1, 1);
Cairo.cairo_fill(cairoHandle);
return;
}
// CAIRO END
setRealForeground(foreground);
Fox.FXDC_drawPoint(handle, x, y);
} finally {
unlockToolkit();
}
}
COM: <s> draws a pixel using the foreground color at the specified </s>
|
funcom_train/46847675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() throws RDFException {
// boolean retVal = Utilities.generateRDF(getRDFContainer(), new
// File(RDF_STORE_FILE));
// if (!retVal) System.out.println("Warning: ErgoBrowser.close() failed
// to write RDF to file");
}
COM: <s> closes this browser writing the current store to rdf store file </s>
|
funcom_train/973227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Boolean addBizStep(final Document document, final Element root, final String bizStep) {
if (!bizStep.equals("")) {
Element element;
element = document.createElement("bizStep");
element.appendChild(document.createTextNode(bizStep));
root.appendChild(element);
return true;
} else {
return false;
}
}
COM: <s> adds the business step to the xml file </s>
|
funcom_train/20400422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object parse(String arg) throws ParseException {
Date result = null;
try {
result = format.parse(arg);
} catch (java.text.ParseException e) {
throw (
new ParseException(
"Unable to convert '" + arg + "' to a Date.",
e));
}
return (result);
}
COM: <s> parses the specified argument using either the java </s>
|
funcom_train/28960715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsApplicable() {
System.out.println("isApplicable");
Target instance = new Target(voc.indexOf("POS"),voc.indexOf("NP"));
Target instance2 = new Target(voc.indexOf("POS"),voc.indexOf("NN"));
assertEquals(true, instance.isApplicable(vicinity));
assertEquals(false, instance2.isApplicable(vicinity));
}
COM: <s> test of is applicable method of class target </s>
|
funcom_train/30006054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private AbstractFormatter getDateFormatter() {
if (dateFormat == null) {
dateFormat = new DateFormatter(getDateFormat());
dateFormat.setCommitsOnValidEdit(true);
dateFormat.setOverwriteMode(true);
// dateFormat.setAllowsInvalid(false);
}
return dateFormat;
}
COM: <s> gets the date formatter </s>
|
funcom_train/9080253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createLabelsNTicks(double min, double max) {
AxisLabelCalculator axisCalc = new AxisLabelCalculator();
axisCalc.createNewLabels(min, max);
// System.out.println("in createLabelsNTicks: min = " + min + ", max = "
// + max);
// axisCalc.printLabels();
tickLabels = axisCalc.getLabels();
tickLocations = axisCalc.getPositions();
}
COM: <s> call the create labels nticks method if you would like the axisbuilder to </s>
|
funcom_train/6289454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleLineWithFlags(String line) {
if (!line.startsWith(" FLAGS (")) return;
String flags = line.substring(8); //length of " FLAGS ("
//length of " FLAGS ("
flags = flags.substring(0, flags.indexOf(")"));
handleFlags(actHeader, flags);
}
COM: <s> handles input line with flags set processed message header flags </s>
|
funcom_train/31930012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTopic( String id, String language ){
StringWriter sw=new StringWriter();
try{
Transformer t=tf.newTransformer
(new StreamSource(ClassLoader.getSystemResourceAsStream
("net/sf/worldsaver/util/doc/xsl/32topic.xsl")));
t.setParameter("topic",id);
t.setParameter("language",language);
t.transform(new DOMSource(doc),new StreamResult(sw));
sw.close();
}catch(Exception e){
e.printStackTrace();
}
return sw.toString();
}
COM: <s> returns the requested topic as html in the string </s>
|
funcom_train/20464322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean remove(Map.Entry entry) {
Map.Entry actual = entry(entry.getKey());
if (actual == null) {
return (false);
} else if (!entry.equals(actual)) {
return (false);
} else {
remove(entry.getKey());
return (true);
}
}
COM: <s> p remove the specified key value pair if it exists and return </s>
|
funcom_train/9110684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addMemberLoockupField(Form<Void> f, String wicketId) {
TextField<String> parentInput;
parentInput = new AutoCompleteTextField<String>(wicketId) {
private static final long serialVersionUID = 1L;
@Override
protected Iterator<String> getChoices(String input) {
if (Strings.isEmpty(input)) {
List<String> emptyList = Collections.emptyList();
return emptyList.iterator();
}
List<String> choices = UserUtil.getEmailsLikeX(input);
return choices.iterator();
}
};
f.add(parentInput);
}
COM: <s> this function adds a member lookup field to the given form </s>
|
funcom_train/44019255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getEditSelectAllMenuItem() {
if (editSelectAllMenuItem == null) {
editSelectAllMenuItem = new JMenuItem();
editSelectAllMenuItem.setText("Select All");
editSelectAllMenuItem.setMnemonic('A');
editSelectAllMenuItem.setDisplayedMnemonicIndex(7);
editSelectAllMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A, MENU_SHORTCUT_KEY_MASK));
editSelectAllMenuItem.addActionListener(eventHandler);
}
return editSelectAllMenuItem;
}
COM: <s> return the edit select all menu item </s>
|
funcom_train/5800680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int exec(String command, OutputStream stdoutStream, OutputStream stderrStream) throws IOException, InterruptedException {
PrintWriter pwOut = new PrintWriter(stdoutStream, true);
PrintWriter pwErr = new PrintWriter(stderrStream, true);
return exec(command, pwOut, pwErr);
}
COM: <s> convenience method for calling exec with output streams </s>
|
funcom_train/29716908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void renderSingleEntity(Entity en) {
SVGEntity e = wrapEntity(en);
e.setPosition(0, 0);
e.render();
width = e.getSize().width;
height = e.getSize().height;
svg.append(renderHeader());
svg.append(e.getSVG());
}
COM: <s> renders a single entity without a layout manager </s>
|
funcom_train/3468260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getIndex(TreeNode tn) {
if (!(tn instanceof FtpTreeNode)) {
return -1;
}
if (isLeaf()) {
return -1;
}
Ftp sc = ((FtpTreeNode) tn).getFtp();
return ((FtpContainer) _ftp).getFtpIndex(sc.getTitle());
}
COM: <s> gets the index attribute of the ftp tree node </s>
|
funcom_train/22864831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update() {
if (changeMask != 0) {
// calculate new shape transformation matrix
setShapeTransformationMatrix(new Matrix4d((double)halfWidth, 0.0, 0.0, 0.0,
0.0, (double)halfLength, 0.0, 0.0,
0.0, 0.0, (double)height, 0.0,
0.0, 0.0, 0.0, 1.0));
changeMask = 0;
}
// apply changes to <code>GL20ResourceShape</code>
super.update();
}
COM: <s> update this code gl20 resource shape box code is up to date </s>
|
funcom_train/8716267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Glyf getGlyph(int index) {
Object o = glyphs[index];
if (o == null) {
return null;
}
if (o instanceof ByteBuffer) {
Glyf g = Glyf.getGlyf((ByteBuffer) o);
glyphs[index] = g;
return g;
} else {
return (Glyf) o;
}
}
COM: <s> get the glyph at a given index parsing it as needed </s>
|
funcom_train/15601081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFriendDir(String friendID, String dir, ArrayList<String> list) {
GCTransferFileBrowserModel ffbm;
if ((ffbm = this.activeBrowsers.get(friendID)) == null) //no file browser for friend
//add a new one
this.activeBrowsers.put(friendID, new GCTransferFileBrowserModel(friendID, dir, list));
else //update the existing one
ffbm.changeDir(dir, list);
}
COM: <s> b purpose b updates the directory list for a friend br </s>
|
funcom_train/43324672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(String name, String val){
TableItem temp = new TableItem(this.runtime_list, SWT.NULL);
temp.setText(new String[]{name, val});
/*TableColumn[] columns = this.runtime_list.getColumns();
for (int i = 0, n = columns.length; i < n; i++)
columns[i].pack();*/
}
COM: <s> adds a new element to the list </s>
|
funcom_train/4230906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void medianPos(int i, JGraphHierarchyModel model) {
// Reverse sweep direction each time through this method
boolean downwardSweep = (i % 2 == 0);
if (downwardSweep) {
for (int j = model.maxRank; j > 0; j--) {
rankMedianPosition(j - 1, model, j);
}
} else {
for (int j = 0; j < model.maxRank - 1; j++) {
rankMedianPosition(j + 1, model, j);
}
}
}
COM: <s> performs one median positioning sweep in one direction </s>
|
funcom_train/32380403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetResourceTypesForEmptyList() {
clear();
System.out.println("testGetResourceTypesForEmptyList");
ResourceTypeManager resourceTypeManager = new ResourceTypeManager();
List result = resourceTypeManager.getResourceTypes();
assertEquals(0, result.size());
}
COM: <s> test of get resource types method of class com </s>
|
funcom_train/10541668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void runTestSet() throws T_Fail {
// get a utility helper
ContextManager cm1 = contextService.newContextManager();
contextService.setCurrentContextManager(cm1);
try {
runCostEstimationTests();
runAllocationTests();
} catch (StandardException se) {
//Assume database is not active. DERBY-4856 thread dump
cm1.cleanupOnError(se, false);
throw T_Fail.exceptionFail(se);
}
finally {
contextService.resetCurrentContextManager(cm1);
}
}
COM: <s> run the test </s>
|
funcom_train/20043188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void before() {
log.print("try to get object relation 'XUserInputInterception.XModel': ");
m_XModel = (XModel)tEnv.getObjRelation("XUserInputInterception.XModel");
if (m_XModel == null) log.println("failed => null");
else log.println("OK");
}
COM: <s> get the object rlation xuser input interception </s>
|
funcom_train/51245421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SqlTabPanel getCurrentSqlTabPanel() {
SqlTabPanel panel = null;
if (getMainTabbedPane() != null) {
Component temp = getMainTabbedPane().getSelectedComponent();
if (temp instanceof SqlTabPanel) {
panel = (SqlTabPanel) temp;
}
}
return panel;
}
COM: <s> gets the current sql tab panel </s>
|
funcom_train/31823709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMaximum (int value) {
checkWidget();
if (value < 0) return;
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
int hwnd = hwndScrollBar (), type = scrollBarType ();
info.fMask = OS.SIF_RANGE | OS.SIF_DISABLENOSCROLL;
OS.GetScrollInfo (hwnd, type, info);
if (value - info.nMin - info.nPage < 1) return;
info.nMax = value;
SetScrollInfo (hwnd, type, info, true);
}
COM: <s> sets the maximum </s>
|
funcom_train/34246188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean getIsSpecificationOwner() {
if (communityMemberAssignment != null)
isSpecificationOwner = CacheUtility.getBoolean(WorkTaskAssignmentType.REQUIREMENTS_ANALYST.getName().equals(communityMemberAssignment.getGovernanceType()));
if (isSpecificationOwner == null)
isSpecificationOwner = Boolean.FALSE;
return isSpecificationOwner;
}
COM: <s> returns the is specification owner </s>
|
funcom_train/1728083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updatePlayersClubAssociation(Repository repository, Player player) {
boolean dirty = false;
Lazy<Club> club = player.getClub();
dirty = (club.getId() != null) ? clubPlayerAssociation.associate(club, player): clubPlayerAssociation.dissassociateOne(player);
if(dirty) repository.update(this);
}
COM: <s> updates the club player association </s>
|
funcom_train/42200857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void configure() {
if (running) return;
AppLib.printDebug("Opening file " + configName);
// load config data
try {
config = new UserFile(configName);
} catch (Exception e) {
AppLib.debugException(e);
data = null;
config = null;
}
AppLib.printDebug("Opening file " + scoutName);
if (config != null) {
// load initial data
try {
data = new FileBackend(scoutName);
} catch (Exception e) {
AppLib.debugException(e);
data = null;
}
}
}
COM: <s> configures the server </s>
|
funcom_train/2883590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCaseCTN4() throws Throwable {
if (failedSolver()) return;
Context cxt = parseToContext("ctn4.sf");
Context foo1c = resolveCD(cxt, "foo1");
Context fooc = resolveCD(foo1c, "foo");
assertContextResolves(fooc, "bar", "32");
assertContextResolves(fooc, "bar2", "48");
assertContextResolves(fooc, "bar3", "51");
}
COM: <s> test case ctn4 </s>
|
funcom_train/25576769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void applyStandardFontSetting() {
if (!(this.activeView instanceof TextInputPanel)) {
if (this.synAnalysisView.isVisible()) {
this.synAnalysisView.repaintPericope();
} else if (this.semAnalysisView.isVisible()) {
this.semAnalysisView.repaintPericope();
}
this.commentArea.setFont(Options.getInstance().getStandardFont());
}
}
COM: <s> apply the current zoomed standard font to the currently displayed </s>
|
funcom_train/14365619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doCreateControl(Composite parent_p) {
// Create a canvas where charts are rendered.
_canvas = new Canvas(parent_p, SWT.NONE);
_canvas.setLayoutData(new GridData(GridData.FILL_BOTH));
// Add a chart preview composite.
_chartRenderer = new ChartRenderer(_canvas);
}
COM: <s> create the canvas to draw a chart </s>
|
funcom_train/26103337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean deleteQuickMessage(long id) {
if (Log.DEBUG) Log.v("id to delete is " + id);
if (mDb.delete(QUICKMESSAGES_DB_TABLE, KEY_ROWID + "=" + String.valueOf(id), null) > 0) {
return true;
}
return false;
}
COM: <s> deletes a quick message from the database </s>
|
funcom_train/853955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startWatchingExternalStorage() {
if (externalStorageReceiver != null) {
return;
}
externalStorageReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
updateExternalStorageState();
}
};
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_MEDIA_MOUNTED);
filter.addAction(Intent.ACTION_MEDIA_UNMOUNTED);
filter.addAction(Intent.ACTION_MEDIA_REMOVED);
filter.addDataScheme("file");
context.registerReceiver(externalStorageReceiver, filter);
}
COM: <s> creates a new broadcast receiver and registers it for media intents </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.