__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/46821888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void register(IUpdateListener listener, Node node) {
List<IUpdateListener> listeners = this.listenerMap.get(node);
if (null == listeners) {
listeners = new ArrayList<IUpdateListener>();
this.listenerMap.put(node, listeners);
}
if (!listeners.contains(listener))
listeners.add(listener);
}
COM: <s> registers a listener for the given subject node </s>
|
funcom_train/46682055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setTrainingInputs(List<EntryStructure> inputs){
for(int i=0; i<inputs.size(); i++){
EntryStructure e1 = inputs.get(i);
//System.out.println("EntryStructure: "+e1);
LearningConcept lc = (LearningConcept) e1.getConcept();
if(lc != null && lc.isInput()){
InputLearningConcept ilc = (InputLearningConcept) lc;
ilc.setInput(e1.getValue());
}
}
}
COM: <s> set the inputs to the map from the given training set entry </s>
|
funcom_train/32959909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRealValue() {
// resolve top-level property
te.setValue( "#{val}", 12345.6, Double.class);
Object result0 = te.evaluate("#{val}");
assertTrue( result0 instanceof Double );
assertTrue( ((Double)result0 == 12345.6) );
TolvenLogger.info("testRealValue: " + result0, ExpressionTest.class);
}
COM: <s> create a variable containing a double </s>
|
funcom_train/4348751 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void suspendTimeline(Timeline timeline) {
getAnimatorThread();
if (this.runningTimelines.contains(timeline)) {
TimelineState oldState = timeline.getState();
if ((oldState != TimelineState.PLAYING_FORWARD)
&& (oldState != TimelineState.PLAYING_REVERSE)
&& (oldState != TimelineState.READY)) {
return;
}
timeline.pushState(TimelineState.SUSPENDED);
this.callbackCallTimelineStateChanged(timeline, oldState);
}
}
COM: <s> suspends the specified timeline instance </s>
|
funcom_train/50299284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getdbpath(String name) {
if ("EMBEDDED".equalsIgnoreCase(getProperty("test.gds_type", null)))
return DB_PATH + "/" + name;
else if ("LOCAL".equalsIgnoreCase(getProperty("test.gds_type", null)))
return DB_PATH + "/" + name;
else
return DB_SERVER_URL + "/" + DB_SERVER_PORT + ":" + DB_PATH + "/"
+ name;
}
COM: <s> builds an firebird database connection string for the supplied database </s>
|
funcom_train/27718353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void itemStateChanged(ItemEvent e) {
try {
fMethod.invoke(fTarget, new Object[]{e});
} catch (InvocationTargetException ex1) {
// should I throw an unchecked exception?
ex1.printStackTrace();
} catch (IllegalAccessException ex2) {
// should I throw an unchecked exception?
// cannot happen here!?
ex2.printStackTrace();
}
}
COM: <s> invoked when an item has been selected or deselected by the user </s>
|
funcom_train/38560550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addState(StateElement newState) {
if (newState.getOperator() == "" || newState.getPlaceB() == "") {
if (newState.getPlaceA() != "") {
elements.remove(newState.getPlaceA());
}
} else {
elements.put(newState.getPlaceA(), newState);
}
}
COM: <s> this method adds a state element to the current state group </s>
|
funcom_train/21413806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private HotelBooking createBooking() {
GregorianCalendar bookCal = new GregorianCalendar(2006, 7, 9);
GregorianCalendar arrivalCal = new GregorianCalendar(2006, 10, 16);
GregorianCalendar checkoutCal = new GregorianCalendar(2006, 10, 26);
HotelBooking booking = new HotelBooking(
new Integer(138989),
"Tijs Rademakers",
"High Tech Campus 52",
bookCal.getTime(),
RoomType.DOUBLE_ROOM,
Boolean.FALSE,
arrivalCal.getTime(),
checkoutCal.getTime()
);
return booking;
}
COM: <s> creates a hotel booking </s>
|
funcom_train/22166237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void notifyMouseListeners(int button) {
if (m_Listeners != null) {
ActionEvent evt = null;
if (button == 0) evt = new ActionEvent(this,0,"Left");
else evt = new ActionEvent(this,0,"Right");
for (Enumeration enum = m_Listeners.elements(); enum.hasMoreElements(); ) {
ActionListener listener = (ActionListener)enum.nextElement();
listener.actionPerformed(evt);
}
}
}
COM: <s> private method called by native library when user clicks mouse button </s>
|
funcom_train/48630752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testProchaineVille() {
System.out.println("prochaineVille");
Itineraire instance = new Itineraire();
Ville expResult = null;
Ville result = instance.prochaineVille();
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 prochaine ville method of class itineraire </s>
|
funcom_train/48045454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PeriodFields multipliedBy(long scalar) {
if (scalar == 1 || isZero()) {
return this;
}
TreeMap<PeriodUnit, PeriodField> copy = createMap();
for (PeriodField field : this) {
copy.put(field.getUnit(), field.multipliedBy(scalar));
}
return create(copy);
}
COM: <s> returns a copy of this period with each amount in this period multiplied </s>
|
funcom_train/29372910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu getJMenu_HO() {
if (jMenu_HO == null) {
jMenu_HO = new JMenu();
jMenu_HO.setText("Hands Off");
jMenu_HO.setEnabled(false);
jMenu_HO.setVisible(false);
jMenu_HO.setFont(new Font("Helvetica", java.awt.Font.PLAIN, 11));
}
return jMenu_HO;
}
COM: <s> this method initializes j menu ho </s>
|
funcom_train/40337577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setColorsPreferences() {
IEclipsePreferences node =
new InstanceScope().getNode(Resources.PLUGIN_ID);
Color back = Tools.getRgb(node.get(
ColorPreferencesIds.COLOR_BACKGROUND, "255,255,255"));
Color front = Tools.getRgb(node.get(
ColorPreferencesIds.COLOR_FOREGROUND, "0,0,0"));
renderer.setColors(back, front);
}
COM: <s> read and setup color preferences </s>
|
funcom_train/8763399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JToggleButton getAddControlPoint() {
if (addControlPoint == null) {
addControlPoint = new JToggleButton();
addControlPoint.setText("Add Control Point");
addControlPoint.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent e) {
defView.setHintMouseMode(ActionHint.addControlPoint);
canvasContext.getCanvas().repaint();
}
});
}
return addControlPoint;
}
COM: <s> this method initializes add control point </s>
|
funcom_train/9235519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueChanged(final TreeSelectionEvent selectionEvent) {
final String path = nodes.get(((JTree) selectionEvent.getSource()).getSelectionPath().
getLastPathComponent());
cardLayout.show(mainPanel, path);
if (selected != null) {
selected.fireCategoryDeselected();
}
selected = paths.get(path);
selected.fireCategorySelected();
}
COM: <s> called when the selection in the tree changes </s>
|
funcom_train/6452261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean remove(Atom pLabel, Term source) {
// find the plan
Plan p = get(pLabel.getFunctor());
if (p != null) {
boolean hasSource = p.getLabel().delSource(source);
// if no source anymore, remove the plan
if (hasSource && !p.getLabel().hasSource()) {
remove(pLabel.getFunctor());
}
return true;
}
return false;
}
COM: <s> remove a plan represented by the label i p label i </s>
|
funcom_train/16987732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTexture(PImage img, int ewRepeats, int nsRepeats){
ewRepeats = Math.max(1, ewRepeats);
nsRepeats = Math.max(1, nsRepeats);
while(ewPieces % ewRepeats != 0){
ewRepeats--;
}
deltaU = ewRepeats / (float)(ewSteps - 1);
while(nsPieces % nsRepeats != 0){
nsRepeats--;
}
deltaV = nsRepeats / (float)(nsSteps - 1);
nearlyOne = 1.0f - Math.min(deltaU, deltaV)/10.0f;
skin = img;
}
COM: <s> set the image to be used for this shape and the number of </s>
|
funcom_train/652262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IProfile instantiateProfile(IProfileDescriptor descriptor) {
try {
Class clazz = Class.forName(descriptor.getClassName());
Constructor ctor = clazz.getConstructor(
new Class[] { IProfileDescriptor.class });
return (IProfile) ctor.newInstance(new Object[] { descriptor });
} catch (Exception e) {
CssCore.log("Failed to get CSS profile", e); //$NON-NLS-1$
}
return null;
}
COM: <s> instantiates and the returns the profile </s>
|
funcom_train/23335390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean postfire() throws IllegalActionException {
boolean result;
int i;
result = super.postfire();
if (!_stopRequested) {
if ((trigger.getWidth() > 0) && trigger.hasToken(0)) {
for (i = 0; i < trigger.getWidth(); i++) {
if (trigger.isKnown(i) && trigger.hasToken(i))
result = true;
}
}
}
return result;
}
COM: <s> returns true as long as there are trigger events otherwise false </s>
|
funcom_train/45623065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAssemblyFilePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_UsingTaskType_assemblyFile_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_UsingTaskType_assemblyFile_feature", "_UI_UsingTaskType_type"),
MSBPackage.eINSTANCE.getUsingTaskType_AssemblyFile(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the assembly file feature </s>
|
funcom_train/2893335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isDocSpatialInMyList(String key) {
List objects = getDBObjects(DBObjects.MYARGISALLDOCS);
for (Iterator iObjects = objects.iterator(); iObjects.hasNext();) {
DocSearchResult doc = (DocSearchResult) iObjects.next();
if (doc.getParentDocType() == DBObjects.DOCUMENTSPATIAL) {
if (doc.getParentDocId().equals(key))
return true;
}
}
return false;
}
COM: <s> determines if the given document spatial object is in the </s>
|
funcom_train/23932073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object execute(ExecutionEvent event) throws ExecutionException {
IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
if(window==null){
return null;
}
if(window != null) {
try {
window.getActivePage().showView(ToolSchemaView.ID);
} catch (PartInitException e) {
e.printStackTrace();
MessageDialog.openError(window.getShell(), "Error", "Error opening view:" + e.getMessage());
}
}
return null;
}
COM: <s> the command has been executed so extract extract the needed information </s>
|
funcom_train/93777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean useContainer() throws StandardException {
if (SanityManager.DEBUG) {
SanityManager.ASSERT(!active);
SanityManager.ASSERT(container != null);
}
// always set forUpdate to false
if (!container.use(this)) {
container = null;
return false;
}
active = true;
// watch transaction and close ourseleves just before it completes.
if (!hold)
{
xact.addObserver(this);
xact.addObserver(new DropOnCommit(identity, true));
}
return true;
}
COM: <s> attach me to a container </s>
|
funcom_train/42181110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDoorOrWindow(boolean doorOrWindow) {
if (doorOrWindow != this.doorOrWindow) {
this.doorOrWindow = doorOrWindow;
this.propertyChangeSupport.firePropertyChange(Property.DOOR_OR_WINDOW.toString(), !doorOrWindow, doorOrWindow);
}
}
COM: <s> sets whether imported piece is a door or a window </s>
|
funcom_train/34636100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void applyCss(String cssFilename) {
String script = "if (document.getElementsByTagName(\"link\").length < 1) {"
+ "var linkElement = document.createElement(\"link\");"
+ "linkElement.rel=\"stylesheet\";"
+ "linkElement.type=\"text/css\";"
+ "linkElement.href=\"\";"
+ "document.getElementsByTagName(\"head\")[0].appendChild(linkElement);"
+ "}"
+ "document.getElementsByTagName(\"link\")[0].href=\""
+ cssFilename + "\";";
browser.execute(script);
}
COM: <s> this method will replace the link to the css file in the current </s>
|
funcom_train/46743649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOrderTemplateRef(DisplayModel orderTemplateRef) {
if (Converter.isDifferent(this.orderTemplateRef, orderTemplateRef)) {
DisplayModel oldorderTemplateRef= new DisplayModel(this);
oldorderTemplateRef.copyAllFrom(this.orderTemplateRef);
this.orderTemplateRef.copyAllFrom(orderTemplateRef);
setModified("orderTemplateRef");
firePropertyChange(String.valueOf(ORDERLOGS_ORDERTEMPLATEREFID), oldorderTemplateRef, orderTemplateRef);
}
}
COM: <s> order template used to start order </s>
|
funcom_train/12906097 | /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 instanceof PartialBinding))
return false;
PartialBinding other = (PartialBinding) obj;
return expression.equals(other.expression) && value.equals(other.value)
&& location.equals(other.location);
// Note: isExact is derived from Expression, so needn't be
// checked.
}
COM: <s> compares based on attributes </s>
|
funcom_train/43360669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getRetrypause() {
int ret = 0;
int numGrabbers = setupInternalGrabbers();
if (numGrabbers > 0) {
Grabber grabber = (Grabber)m_grabbers.get(ZAPSCRAPER);
if (grabber instanceof ZapScraperGrabber) {
ret = ((ZapScraperGrabber)grabber).getRetrypause();
}
}
return ret;
}
COM: <s> getter for property retrypause </s>
|
funcom_train/23297207 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File exportTreeFile() {
JFileChooser chooser = new JFileChooser();
chooser.setMultiSelectionEnabled(false);
/*
* Set up file filters (in this case, only Newick)
*/
chooser.setAcceptAllFileFilterUsed(false);
chooser.addChoosableFileFilter( (new NewickReader()).getFileFilter());
/*
* Set up save dialog
*/
this.setTitle("Export");
int option = chooser.showDialog(this,"Export");
if (option == JFileChooser.APPROVE_OPTION) {
return chooser.getSelectedFile();
}
else {
return null;
}
} // exportTreeFile
COM: <s> selects a file to export a tree phylogeny </s>
|
funcom_train/22210593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeInstance(int exitCode) {
try {
if (tmnavContext != null) {
TMNavSession session = tmnavContext.getSession();
if (session != null) {
session.storeSession();
}
}
System.exit(exitCode);
} catch (Exception e) {
LogManager.logEx("While closing tmnav", e);
System.exit(1);
}
}
COM: <s> saves the session and shutdown tmnav </s>
|
funcom_train/22259651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String formatLocation(Location location) {
String chrom = location.getSeqRegionName();
int start = location.getStart();
int end = location.getEnd();
int strand = location.getStrand();
String locStr = "chromosome:" + chrom + " strand:" + strand + " range:" + start + "-" + end;
if (location.hasNext())
return locStr + ";" + formatLocation(location.next());
return locStr;
}
COM: <s> formats a location into a single string </s>
|
funcom_train/3076275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean containLatestVersion() {
BufferedReader reader = new BufferedReader(new StringReader(viewCfgSpec.replace(';', '\n')));
try {
String line;
Pattern pattern = Pattern.compile("^\\s*element(.*)", Pattern.CASE_INSENSITIVE);
while ((line = reader.readLine()) != null) {
Matcher matcher = pattern.matcher(line);
if (matcher.find()) {
if (matcher.group(1).matches(".*LATEST.*"))
return true;
}
}
} catch (IOException e) {
}
return false;
}
COM: <s> determines if a given config spec denotes some latest version </s>
|
funcom_train/5020238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void catchUpWithHeadRevision() throws WorkflowException {
try {
while (!atHead()) {
updateToNextRevision();
}
state = WorkflowState.AT_HEAD;
} catch (Exception e) {
WorkflowException wfe = new WorkflowException("Problem in catchUpwithHead", e);
logger.throwing(this.getClass().getSimpleName(), "catchUpWithHeadRevision", wfe);
throw wfe;
}
}
COM: <s> will update to each new revision using update to next revision e </s>
|
funcom_train/22769578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PathNode addPath(XElement[] path) {
PathNode node = getTreeRoot();
int newIndex= -1 ;
final int size = path.length;
for (int i = 0; i < size; i++) {
PathNode nextNode = node.findNode(path[i]);
if(nextNode == null) {
newIndex = i;
break;
}
else {
node = nextNode;
}
}
if(newIndex >=0){
for(int i= newIndex; i< size; i++) {
node = node.addPathNode(path[i]);
}
}
node.setOpen(true);
return node;
}
COM: <s> adds path to the tree </s>
|
funcom_train/1045474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeShortCorrect(short val) throws IOException {
if (bigendian) {
writeShort(val);
}
else {
int byte0 = (int) val & 0xff;
int byte1 = ((int)val>>8) & 0xff;
// swap the byte order
writeShort((short) ((byte0<<8) | (byte1))) ;
}
return;
}
COM: <s> write short correct will write a short to the stream </s>
|
funcom_train/5726049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(UserInfo user1, UserInfo user2) {
if (user1 != null && user1.getLastName() != null && user2 != null && user2.getLastName() != null) {
return user1.getLastName().toLowerCase(Locale.ENGLISH).compareTo(user2.getLastName().toLowerCase(Locale.ENGLISH));
} else {
return 0;
}
}
COM: <s> compares last name of user </s>
|
funcom_train/48151462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update() {
super.update();
triangle.repaint();
typeGraph.repaint();
typeTable.update();
getRecordTable().append(
"\t" + format(triangle.getCutPoint(0)) + "\t"
+ format(triangle.getCutPoint(1)) + "\t"
+ triangle.getType());
}
COM: <s> this method updates the display including the triangle the random </s>
|
funcom_train/46055990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doFileDelivery(UserRequest ureq, Long forumKey) {
OlatRootFolderImpl forumContainer = getForumContainer(forumKey);
VFSLeaf vl = (VFSLeaf) forumContainer.getItems(new VFSLeafFilter()).get(0);
//ureq.getDispatchResult().setResultingMediaResource(new FileDialogMediaResource(vl));
ureq.getDispatchResult().setResultingMediaResource(new VFSMediaResource(vl));
}
COM: <s> deliver the selected file and show in a popup </s>
|
funcom_train/25389381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void performActionDelete(Content content) {
Repository repo = getRepository(content.getContentUrl());
String objectID = getObjectID(content.getContentUrl());
Session session = repo.createSession();
CmisObject cmisObject = session.getObject(objectID);
// delete current version
boolean allVersions = false;
cmisObject.delete(allVersions);
try {
this.removeContent(content.getContentUrl());
} catch (IQserException e) {
throw new IQserRuntimeException(e);
}
}
COM: <s> perform delete action </s>
|
funcom_train/12595485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAllConnectMenuItems(boolean connect) {
for (int i = 0; i < this.openVPNConfigCount; i++) {
PopupMenu popupMenu = (PopupMenu) this.trayIcon.getPopupMenu().getItem(i);
popupMenu.getItem(0).setEnabled(connect);
}
}
COM: <s> sets enabled disabled state to all connect menu items </s>
|
funcom_train/10179667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void renderName(StringBuffer results) {
if (this.isXhtml()) {
if (getStyleId() == null) {
renderAttribute(results, "id", beanName);
} else {
renderAttribute(results, "id", getStyleId());
}
} else {
renderAttribute(results, "name", beanName);
renderAttribute(results, "id", getStyleId());
}
}
COM: <s> renders the name of the form </s>
|
funcom_train/13915437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCurrentDBTimeStamp(String pServerID) {
try {
synchronized (XMLMetadataBridge.mLock) {
Metadata md = this.getMetadataByServer(pServerID);
Date currDate = md.getCurrentDBTimeStamp();
return currDate == null ? "" : this.mDefaultDateFormat.format(currDate);
}
} catch (Exception e1) {
return this.handleError(e1);
}
}
COM: <s> gets the current db time stamp </s>
|
funcom_train/6504498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GitElement getGlobalElement() {
if (_globalElement == null) {
try {
_globalElement = new GitElement(_random, null);
} catch (NoSuchAlgorithmException ne) {
if (category.isEnabledFor(Priority.ERROR)) category.error(ne);
}
}
return _globalElement;
}
COM: <s> returns the session global element </s>
|
funcom_train/15895012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isObjectPersisted(EfreeModelObject efreeModelObject) {
boolean bReturn = false;
try {
EfreeModelObject efreeModelObject1 = getSingleObject(efreeModelObject.getId());
if (efreeModelObject1 != null) {
bReturn = true;
}
} catch (ObjectRetrievalFailureException e) {
// expect an error when it doesn't find one.
bReturn = true;
}
return bReturn;
}
COM: <s> returns yes no if the object passed in is persisted </s>
|
funcom_train/41593400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addContextControlCodePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_POCDMT000040RecordTarget_contextControlCode_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_POCDMT000040RecordTarget_contextControlCode_feature", "_UI_POCDMT000040RecordTarget_type"),
V3Package.eINSTANCE.getPOCDMT000040RecordTarget_ContextControlCode(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the context control code feature </s>
|
funcom_train/19072832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireNetConverged(Monitor aMonitor) {
Object[] myList;
synchronized (this) {
myList = listeners.toArray();
}
ConvergenceEvent myEvent = new ConvergenceEvent(aMonitor);
for (int i = 0; i < myList.length; ++i) {
((ConvergenceListener)myList[i]).netConverged(myEvent, this);
}
}
COM: <s> fires a net converged event </s>
|
funcom_train/786642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Spring getSpring(ForceItem f1, ForceItem f2, float k, float length) {
if ( springs.size() > 0 ) {
Spring s = (Spring)springs.remove(springs.size()-1);
s.item1 = f1;
s.item2 = f2;
s.coeff = k;
s.length = length;
return s;
} else {
return new Spring(f1,f2,k,length);
}
}
COM: <s> get a spring instance and set it to the given parameters </s>
|
funcom_train/10231280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUseInterface(boolean a_bUseInterface) {
super.setUseInterface(a_bUseInterface);
m_bUseInterface = a_bUseInterface;
if (isValid() && isAuthenticationUsed() && m_passwordReader != null
&& m_authenticationPassword == null) {
// read the password, if it is not done before
getAuthenticationPassword();
}
}
COM: <s> activates and deactivates the proxy </s>
|
funcom_train/50395104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkAndExtendLT(Calendar newTT) throws UnableToSetTerminationTimeException {
if (getTerminationTime().compareTo(newTT) < 0) {
logger.debug("Job termination time exceeds BES termination time, extending BES lifetime...");
Calendar tt = (Calendar) newTT.clone();
tt.add(Calendar.DATE, 1);
setTerminationTime(tt);
}
}
COM: <s> extends termination time of a job </s>
|
funcom_train/4904945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream encryptStream(InputStream stream) throws Exception {
if (encryptionKey == null) {
throw new IOException(Messages.getString("Encryptor.ErrorNoKey")); //$NON-NLS-1$
}
Cipher cipher = Cipher.getInstance("AES"); //$NON-NLS-1$
cipher.init(Cipher.ENCRYPT_MODE, getEncryptionKey());
CipherInputStream cis = new CipherInputStream(stream, cipher);
return cis;
}
COM: <s> encrypt an input stream </s>
|
funcom_train/49464380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void mergeFileList(List<FileState> allFiles, List<FileState> newFiles) throws Exception {
if (allFiles == null)
throw new IllegalArgumentException("allFiles must not be null");
if (newFiles == null || newFiles.size() == 0)
return; // nothing to do
for (FileState fs : newFiles)
allFiles.add(fs);
_logger.debug("mergeFileList ok");
}
COM: <s> add new files to all files </s>
|
funcom_train/35111795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void percolateUpHeap(final int index) {
int hole = index;
PathfindingNode element = heap[hole];
while (hole > 1 && compare(element, heap[hole / 2]) < 0) {
// save element that is being pushed down
// as the element "bubble" is percolated up
final int next = hole / 2;
heap[hole] = heap[next];
hole = next;
}
heap[hole] = element;
}
COM: <s> percolates element up heap from the position given by the index </s>
|
funcom_train/3443579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setColumn(NumberColumn column) {
if (column == this.column)
return;
if (this.column != null)
this.column.removeChangeListener(this);
this.column = column;
if (this.column != null)
this.column.addChangeListener(this);
update();
}
COM: <s> sets the column </s>
|
funcom_train/34340535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExit1() {
if (Exit1 == null) {//GEN-END:|31-getter|0|31-preInit
// write pre-init user code here
Exit1 = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|31-getter|1|31-postInit
// write post-init user code here
}//GEN-BEGIN:|31-getter|2|
return Exit1;
}
COM: <s> returns an initiliazed instance of exit1 component </s>
|
funcom_train/12194974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddConnection() throws RepositoryException {
JDBCRepositoryImpl repository = (JDBCRepositoryImpl)
createTestableRepository();
Collection connections = repository.connections;
connections.clear();
repository.addConnection(repository.openConnection());
assertEquals("The connections collection should contain 1 connection",
1, connections.size());
}
COM: <s> test that the add connection method adds a connection to the </s>
|
funcom_train/31042020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setItems(String[] items) {
if (items == null)
SWT.error(SWT.ERROR_NULL_ARGUMENT);
int style = getStyle();
if ((style & SWT.READ_ONLY) != 0)
label.setText("");
list.setItems(items);
}
COM: <s> sets all items </s>
|
funcom_train/20801183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRowSelection(Object pRow, boolean pScroll) {
int index = ((TableViewAdapter) getModel()).indexOf(pRow);
addRowSelectionInterval(index, index);
scrollRectToVisible(this.getCellRect(index, index, true));
}
COM: <s> select a new row </s>
|
funcom_train/8084088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyInstanceAvailable(InstanceEvent e) {
Vector l;
synchronized (this) {
l = (Vector)m_instanceListeners.clone();
}
if (l.size() > 0) {
for(int i = 0; i < l.size(); i++) {
((InstanceListener)l.elementAt(i)).acceptInstance(e);
}
}
}
COM: <s> notify all instance listeners that an instance is available </s>
|
funcom_train/21953992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showPopupMenu(MouseEvent e) {
if (popupMenu == null) {
popupMenu = new ConfigurablePopupMenu();
popupMenu.configureComponent("ConnectionMonitor.popupMenu", Pooka.getResources());
popupMenu.setActive(getActions());
}
popupMenu.show(this, e.getX(), e.getY());
}
COM: <s> this creates and shows a popup menu for this component </s>
|
funcom_train/12647229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateAtts() {
Dimension d = panel.getSize();
Insets in = panel.getInsets();
panel.atts.put("width",
new Integer(d.width - (in.left + in.right)).toString());
panel.atts.put("height",
new Integer(d.height - (in.top + in.bottom)).toString());
}
COM: <s> make sure the atrributes are uptodate </s>
|
funcom_train/16646875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(PastExamples pastExamples){
if (pastExamples==null)
throw new IllegalArgumentException("PastExamples can not be null");
if (find(pastExamples.getId())==null)
throw new IllegalArgumentException("PastExamples doesn't exists.");
super.update(pastExamples);
}
COM: <s> update a past examples resource </s>
|
funcom_train/9894977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addParamSet(String paramSetMapName, String paramSetName, ParamSet ps) {
ParamSetMap psm = paramsetmaps.get(paramSetMapName);
if (psm == null) {
psm = new ParamSetMap();
paramsetmaps.put(paramSetMapName, psm);
}
psm.addParamSet(paramSetName, ps);
}
COM: <s> add a paramset to the named map </s>
|
funcom_train/2955012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startApp() {
// exit = new Command("Exit", Command.EXIT, 1);
// start = new Command("Start", Command.OK, 1);
Gfx.load();
screen = new World( this);
/*
screen.setCommandListener(this);
screen.addCommand(exit);
screen.addCommand(start);
*/
Display.getDisplay(this).setCurrent(screen);
}
COM: <s> this is where the app starts </s>
|
funcom_train/14322557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void extend(OpPrototype parentPrototype) {
Iterator<OpMember> parentMemebersIt = parentPrototype.getDeclaredMembers();
while (parentMemebersIt.hasNext()) {
OpMember parentMember = parentMemebersIt.next();
if (this.declaredMembers.get(parentMember.getName()) == null) {
this.declaredMembers.put(parentMember.getName(), parentMember);
}
}
}
COM: <s> extends this prototype with the information from the parent prototype extension means </s>
|
funcom_train/36191405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /*public void testIm_Rate_OK(){
Hashtable<String, Object> params = new Hashtable<String, Object>();
params.put("serviceId", "push OK button");
Object tmp = (Object)feedback.getImplicitFB(
FeedbackGUITypes.RATING, params);
Integer returned_feedback = (Integer)tmp;
assertTrue(returned_feedback!=-1);
}*/
COM: <s> call implicit rating gui and press ok button </s>
|
funcom_train/18728217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSetBooleanPref() {
JaxoPrefs.setPref(JaxoPrefs.Preferred.ARROW, true);
assertTrue((Boolean) JaxoPrefs.getPref(JaxoPrefs.Preferred.ARROW));
JaxoPrefs.setPref(JaxoPrefs.Preferred.ARROW, false);
assertFalse((Boolean) JaxoPrefs.getPref(JaxoPrefs.Preferred.ARROW));
}
COM: <s> test of get set boolean pref method of class jaxo prefs </s>
|
funcom_train/802651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMsLevelPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PrecursorType_msLevel_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PrecursorType_msLevel_feature", "_UI_PrecursorType_type"),
MzdataPackage.Literals.PRECURSOR_TYPE__MS_LEVEL,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the ms level feature </s>
|
funcom_train/18007113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getHeaderHeight() {
float total = 0;
int size = Math.min(rows.size(), headerRows);
for (int k = 0; k < size; ++k) {
PdfPRow row = (PdfPRow)rows.get(k);
total += row.getMaxHeights();
}
return total;
}
COM: <s> gets the height of the rows that constitute the header as defined by </s>
|
funcom_train/13969396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL getEndpointUrl () {
// default address used?
if (endpointURL == null) {
try {
return new URL(service.getChannel1EndpointPortAddress());
} catch (java.net.MalformedURLException e) {
// dont log the exception, it is already known since the constructor call
return null;
}
} else {
return endpointURL;
}
}
COM: <s> returns the url of the service endpoint </s>
|
funcom_train/2885324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected FarmNode createFarmNode(int nodeCounter) {
ClusterNode node = new ClusterNode();
String machinename = "host" + nodeCounter;
node.setId(machinename);
node.setHostname(machinename + "." + domain);
node.setExternalHostname(machinename + "." + externalDomain);
FarmNode fnode = new FarmNode(node, null, null);
return fnode;
}
COM: <s> creates a farm node entry </s>
|
funcom_train/18743807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private RefreshableMenuItem getEditMenuItem() {
if (this.editGraphItem == null) {
this.editGraphItem = new RefreshableMenuItem() {
@Override
protected void refresh(ResourceKind resource) {
setAction(getActions().getEditAction(resource));
}
};
this.editGraphItem.setAccelerator(Options.EDIT_KEY);
}
return this.editGraphItem;
}
COM: <s> returns the menu item in the edit menu that specifies editing the </s>
|
funcom_train/28661392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TransformData getTransformWizardSettings(final TransformData predefined) {
ModifyWizard wizard = new ModifyWizard();
wizard.setPredefinedData(predefined);
WizardDialog dialog =
new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
wizard);
if (dialog.open() == Dialog.OK) {
return wizard.getWizardData();
} else {
return null;
}
}
COM: <s> executes a text modify wizard </s>
|
funcom_train/51622388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initializeEnablement(IConfigurationElement definingElement) {
IConfigurationElement[] elements = definingElement
.getChildren(CHILD_ENABLED_WHEN);
if (elements.length == 0)
return;
try {
IConfigurationElement[] enablement = elements[0].getChildren();
if (enablement.length == 0)
return;
enablementExpression = ExpressionConverter.getDefault().perform(
enablement[0]);
} catch (CoreException e) {
WorkbenchPlugin.log(e.getStatus());
}
}
COM: <s> initialize the enablement expression for this decorator </s>
|
funcom_train/15624171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public byte lookup(final Segment text, final int offset, final int length) {
Node node = rootNode;
for (int i = offset, end = offset + length; i < end; i++) {
node = node.lookup(ignoreCase ? Character.toUpperCase(text.array[i]) : text.array[i]);
if (node == null) {
return Token.NULL;
}
}
return node.getId();
}
COM: <s> looks up a key </s>
|
funcom_train/46787051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addProcessorPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_Task_processor_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_Task_processor_feature", "_UI_Task_type"),
EZRealtimePackage.Literals.TASK__PROCESSOR, true, false, true,
null, null, null));
}
COM: <s> this adds a property descriptor for the processor feature </s>
|
funcom_train/37863242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeEntry(Entry<V> entry) {
if(entry.prev == null) {
if(entry.next == null) {
first = null;
last = null;
} else {
entry.next.prev = null;
first = entry.next;
}
} else {
entry.prev.next = entry.next;
if(entry.next == null)
last = entry.prev;
else
entry.next.prev = entry.prev;
}
entry.prev = null;
entry.next = null;
}
COM: <s> remove an entry </s>
|
funcom_train/32638342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DefaultMutableTreeNode addObject(Object child) {
DefaultMutableTreeNode parentNode = null;
TreePath parentPath = getSelectionPath();
if (parentPath == null) {
parentNode = root;
} else {
parentNode = (DefaultMutableTreeNode) (parentPath.getLastPathComponent());
}
return addObject(parentNode, child, true);
}
COM: <s> add child to the currently selected node </s>
|
funcom_train/68376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMeasure(Measure w, double mult) {
// measures.setSelectedItem(w);
for (int i=0; i<measures.getItemCount(); i++) {
Measure m = (Measure)measures.getItemAt(i);
if (m.equals(w)) {
measures.setSelectedIndex(i);
break;
}
}
multiplier.setValue(mult);
fireChangeEvent();
}
COM: <s> set the weight to display </s>
|
funcom_train/44136427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveMediaFile() {
try {
File f = new File(getAbsoluteFileName());
FileOutputStream fos = new FileOutputStream(f);
ImageIO.write(m_elementImg, "png", fos);
fos.close();
}
catch(Exception e) {
}
}
COM: <s> method save media file saves the bitmap image associated to the current </s>
|
funcom_train/20404760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPreferredResolution(int pixelsPerDay) {
final int halfWidth = scenesScrollPanel.getOffsetWidth() / 2;
final Long time = positionResolver.getTime(scenesScrollPanel
.getHorizontalScrollPosition()
+ halfWidth);
if (pixelsPerDay < MINIMUM_RESOLUTION)
pixelsPerDay = MINIMUM_RESOLUTION;
positionResolver.setPreferredResolution(pixelsPerDay);
updateTimeline();
updateScenePositions();
final int position = positionResolver.getPosition(time);
scenesScrollPanel.setHorizontalScrollPosition(position - halfWidth);
}
COM: <s> sets the timelines preferred resolution and updates the position of all </s>
|
funcom_train/25707515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String guidUpperCase = guid.toUpperCase();
StringBuilder sb = new StringBuilder();
sb.append(guidUpperCase.substring(0, 8));
sb.append("-");
sb.append(guidUpperCase.substring(8, 12));
sb.append("-");
sb.append(guidUpperCase.substring(12, 16));
sb.append("-");
sb.append(guidUpperCase.substring(16, 20));
sb.append("-");
sb.append(guidUpperCase.substring(20));
return sb.toString();
}
COM: <s> this method returns a string representation of the guid in </s>
|
funcom_train/4211016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rejectStream(final StreamInitiation si) {
XMPPError error = new XMPPError(XMPPError.Condition.forbidden, "Offer Declined");
IQ iqPacket = createIQ(si.getPacketID(), si.getFrom(), si.getTo(),
IQ.Type.ERROR);
iqPacket.setError(error);
connection.sendPacket(iqPacket);
}
COM: <s> reject a stream initiation request from a remote user </s>
|
funcom_train/35281408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void release() {
if (!isUsed) {
throw new IllegalStateException("This instance of TempVars was already released!");
}
isUsed = false;
TempVarsStack stack = varsLocal.get();
// Return it to the stack
stack.index--;
// Check if it is actually there
if (stack.tempVars[stack.index] != this) {
throw new IllegalStateException("An instance of TempVars has not been released in a called method!");
}
}
COM: <s> releases this instance of temp vars </s>
|
funcom_train/37430174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long estimateObjectEnd(int n) {
if (_usage[n] != ENTRY_IN_USE) {
return -1;
}
long start = _index[n];
int x = Arrays.binarySearch(_index_sorted, start);
while ( (x < _index_sorted.length) && (_index_sorted[x] == start) ) {
x++;
}
if (x < _index_sorted.length) {
return _index_sorted[x];
} else {
return -1;
}
}
COM: <s> returns an offset estimated to be relatively close to the </s>
|
funcom_train/30178632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dataset loadDataAndMetadata(String metaFileName, InputStream metaInputStream, String dataFileName, InputStream dataInputStream) {
System.out.println("DatasetLoader - MATADATA FILE NAME: " + metaFileName);
Dataset datasetWithOnlyMetadata = loadMetaData(metaFileName, metaInputStream);
Dataset dataset = loadDataset(dataFileName, dataInputStream, datasetWithOnlyMetadata);
return dataset;
}
COM: <s> for dog and upload servlet </s>
|
funcom_train/2024965 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector get(Element node, String path) {
Vector result;
result = new ProperVector();
// start from root?
if ( (path.startsWith("/")) || (path.startsWith("//")) )
node = (Element) node.getRoot();
result.add(node);
result = search(result, path);
return result;
}
COM: <s> returns all the nodes that fulfilled the path criteria </s>
|
funcom_train/8376885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setExtent(int n) {
int newExtent = Math.max(0, n);
if(outerValue + newExtent > getMaximum()) {
newExtent = getMaximum() - outerValue;
}
setRangeProperties(getInnerValue(), outerValue, newExtent, getMinimum(), getMaximum(), getValueIsAdjusting());
}
COM: <s> sets the extent to i n i after ensuring that i n i </s>
|
funcom_train/47872515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(@NonNull A object, Object other) {
BasicEquals be = BasicEquals.from(object, other);
if (be.isEqualsDone())
return be.toEquals();
EqualsStateBuilder sb = new EqualsStateBuilder(relevantAttributesCount);
collectStateInTwoPhases(object, other, sb);
return sb.isEquals();
}
COM: <s> answers if the given code object code is equal to code other code </s>
|
funcom_train/50697585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Track getCurrentTrack() {
//return (Track)this.players.elementAt(this.currentSlideNumber) ;
if ( this.players == null ) { initPlayers() ; }
if ( this.players[this.currentSlideNumber]==null ) {
this.loadSlide(this.currentSlideNumber);
}
return this.players[this.currentSlideNumber] ;
}
COM: <s> lazy initialisation of current track is loading when called </s>
|
funcom_train/40809522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeToLucene(long fileLen, LoggingEvent event) {
Document doc = new Document();
if (populateDocument(fileLen, event, doc)) {
try {
indexWriter.addDocument(doc);
} catch (IOException e) {
LogLog.error("Could not add doc to index ", e);
}
}
}
COM: <s> writes to lucene index </s>
|
funcom_train/20883160 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireSpeakableEnded(SpeakableEvent event) {
if (listener != null) {
listener.speakableEnded(event);
}
Enumeration E;
if (synth.speakableListeners != null) {
E = synth.speakableListeners.elements();
while (E.hasMoreElements()) {
SpeakableListener sl = (SpeakableListener) E.nextElement();
sl.speakableEnded(event);
}
}
}
COM: <s> utility function that sends a code speakable ended code event </s>
|
funcom_train/14655546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getButtonPanel() {
if (buttonPanel == null) {
FlowLayout flowLayout = new FlowLayout();
flowLayout.setAlignment(java.awt.FlowLayout.RIGHT);
buttonPanel = new JPanel();
buttonPanel.setLayout(flowLayout);
buttonPanel.add(getCancelButton(), null);
buttonPanel.add(getOkButton(), null);
}
return buttonPanel;
}
COM: <s> this method initializes button panel </s>
|
funcom_train/22783733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void toggleDetail() {
Dimension newSize = getSize();
if (isExpanded) {
detail.setText("Show Details");
remove(detailPanel);
newSize.height = collapsedHeight;
} else {
detail.setText("Hide Details");
add(detailPanel, BorderLayout.CENTER);
newSize.height = Math.max(expandedHeight, newSize.height);
}
isExpanded = !isExpanded;
setSize(newSize);
validate();
}
COM: <s> toggle expansion state </s>
|
funcom_train/1958947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private XSLTransformer getResolver() throws VerinecException {
URL u = getClass().getResource("/res/resolve.xsl");
if (u==null) throw new VerinecException("Could not locate resource /res/resolve.xsl within classpath");
try {
return new XSLTransformer(getClass().getResourceAsStream("/res/resolve.xsl"));
} catch (Throwable t) {
throw new VerinecException("Error creating resolver xsl transformer.", t);
}
}
COM: <s> get the resolver xslt translator to resolve node types </s>
|
funcom_train/39309614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getStandardHTML() {
StringBuffer sb = new StringBuffer();
String val = this.getValue();
val.replaceAll("<","<");
val.replaceAll(">",">");
val = StringUtils.lf2br(val);
sb.append( val +"\n");
return sb.toString();
}
COM: <s> constructs standard html representation of this fields value </s>
|
funcom_train/10482326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mergeStatus(IMAPSizeResponse source) throws MessagingException {
if (source != null) {
String name = source.getKeyword();
// untagged exists response
if (source.isKeyword("EXISTS")) {
messages = source.getSize();
}
// untagged resent response
else if (source.isKeyword("RECENT")) {
recentMessages = source.getSize();
}
}
}
COM: <s> gather mailbox status information from mailbox status </s>
|
funcom_train/31953086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int nextUniqueID(String counterName) {
if(Boolean.valueOf(PropertyManager.getProperty("Sequence.UseDatabase")).booleanValue()){
return getNextDbID((String)keys.get(counterName))+1;
} else {
Counter counter = (Counter)uniqueIDCounters.get(counterName);
return counter.next();
}
}
COM: <s> provides the next available unique id for a particular object type </s>
|
funcom_train/1302266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NormalizedString normalize(String string) {
NormalizedString result = null;
if (string == null || string.length() == 0) return NormalizedString.EMPTY;
final StringWrapper.SubString subString = new StringWrapper(string).getSubString(0);
if (subString != null) {
result = normalize(subString);
}
return result;
}
COM: <s> normalize the string </s>
|
funcom_train/223296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print(String... strings) {
String name = new String();
String value = new String();
for (int i = 0; i < strings.length; i++) {
try {
name = strings[i];
value = get(name);
} catch (Exception e) {
value = "null";
}
println(name + ": " + value);
}
}
COM: <s> prints the keys represented by string </s>
|
funcom_train/24622332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu createProjectMenu(){
JMenu projectMenu = new JMenu (I18N.instance.getMessage("MainWindow.ProjectMenuLabel"));
JMenuItem menuItem = new JMenuItem(ActionRegistry.instance.getAction(RunOsmosisAction.class));
projectMenu.add(menuItem);
menuItem = new JMenuItem(ActionRegistry.instance.getAction(QuickViewAction.class));
projectMenu.add(menuItem);
return projectMenu;
}
COM: <s> creates the project menu with its entries </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.