__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/31912326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLanguages() {
if (EventQueue.isDispatchThread()) {
return userAgent.getLanguages();
} else {
class Query implements Runnable {
String result;
public void run() {
result = userAgent.getLanguages();
}
}
Query q = new Query();
invokeAndWait(q);
return q.result;
}
}
COM: <s> returns the language settings </s>
|
funcom_train/8347572 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExitCommand3() {
if (exitCommand3 == null) {//GEN-END:|126-getter|0|126-preInit
// write pre-init user code here
exitCommand3 = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|126-getter|1|126-postInit
// write post-init user code here
}//GEN-BEGIN:|126-getter|2|
return exitCommand3;
}
COM: <s> returns an initiliazed instance of exit command3 component </s>
|
funcom_train/7354454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getInterpolatedRGB(int component, float ratio) {
for (int i=0, n = getComponentCount(); i < n; i++) {
values[i] = components[i].getValue();
}
values[component] = (int) (ratio * components[component].getMaximum());
return toRGB(values);
}
COM: <s> returns an interpolated rgb value by using the values of the color </s>
|
funcom_train/21953912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isMessageProxy(Transferable t) {
DataFlavor[] flavors = t.getTransferDataFlavors();
if (flavors == null)
return false;
for (int i = 0; i < flavors.length; i++) {
if (flavors[i] == MessageProxyTransferable.sMessageProxyDataFlavor)
return true;
}
return false;
}
COM: <s> returns if this is a message proxy </s>
|
funcom_train/34008268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void confirmPurchase(Long idPurchase) throws CommonException{
try {
this.getConfig().startTransaction();
/*cambiar de estado a la compra*/
this.getConfig().update("purchases.confirmPurchaseById", idPurchase);
this.getConfig().commitTransaction();
} catch (SQLException e) {
throw new CommonException(e);
} finally {
try {
this.getConfig().endTransaction();
} catch (SQLException e) {
e.printStackTrace();
throw new CommonException(e);
}
}
}
COM: <s> confirm a specific purchase </s>
|
funcom_train/12160493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeControl(Actionable control) {
if (control == null) {
return;
}
control.removeListener(SWT.Activate, controlListener);
control.removeListener(SWT.Deactivate, controlListener);
control.removeMouseListener(mouseAdapter);
control.removeKeyListener(keyAdapter);
this.actionable = null;
updateActionsEnableState();
}
COM: <s> removes a code actionable code actionable from the handler </s>
|
funcom_train/3133120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public T put(T name, T value) {
List<T> list = all.get(name);
T first = map.get(name);
if(list == null) {
list = new ArrayList<T>();
all.put(name, list);
}
list.add(value);
if(first == null) {
return map.put(name, value);
}
return null;
}
COM: <s> the code put code method is used to insert the name and </s>
|
funcom_train/50327830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void requestUpdateFromLayout() {
// the only known way to do this from LocoNet is to request the
// status of _all_ devices, which is here considered too
// heavyweight. Perhaps this is telling us we need
// a "update all" in the SensorManager (and/or TurnoutManager)
// interface?
}
COM: <s> request an update on status by sending a loconet message </s>
|
funcom_train/19765231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateSE() {
try {
cell_id = System.getProperty("com.sonyericsson.net.cellid");
lac = System.getProperty("com.sonyericsson.net.lac");
mcc = System.getProperty("com.sonyericsson.net.cmcc");
mnc = System.getProperty("com.sonyericsson.net.cmnc");
} catch(Exception e) {
e.printStackTrace();
}
}
COM: <s> update with sonyericsson phones </s>
|
funcom_train/669296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String genPassword(int howmany) {
String ret = "";
String core = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
Random rand = new Random();
for (int i = 0; i < howmany; i++) {
int thisOne = rand.nextInt(core.length());
char thisOne2 = core.charAt(thisOne);
ret += thisOne2;
}
return ret;
}
COM: <s> generates a random password by length </s>
|
funcom_train/35541614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testValueZERO() {
CobolDataItem dataItem = new CobolDataItem("COBOL-NAME");
dataItem.setValue("ZEROS");
emitAnnotationAndCheck(dataItem,
"<cb:cobolElement cobolName=\"COBOL-NAME\""
+ " levelNumber=\"1\"" + " value=\"0\""
+ " type=\"GROUP_ITEM\"" + "/>");
}
COM: <s> test an item with value zero </s>
|
funcom_train/16245230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized protected void addWordRule(String rule){
if(rule == null)
throw new NullPointerException("The rule cannot be null");
if( rule.equals(""))
throw new IllegalAccessError("The rule cannot be empty");
wordRules.add(rule.toUpperCase());
log.debug("Word rule added : "+rule);
}
COM: <s> adds a rule by word </s>
|
funcom_train/47825345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void populateASTTerm(final TreeItem item, final ASTTerm term) {
if (term.jjtGetNumChildren() > 0) {
int childno = 0;
while (childno < term.jjtGetNumChildren()) {
Node childnode = term.jjtGetChild(childno);
if (childnode instanceof ASTTermFunction) {
populateTermFunctionTree(item, (ASTTermFunction) childnode);
}
childno++;
}
}
}
COM: <s> populate gterm tree </s>
|
funcom_train/2465726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void configurePopup() {
setLayout( new BoxLayout( this, BoxLayout.Y_AXIS ) );
setBorderPainted( true );
setBorder(SIPCommBorders.getTextFieldBorder());
setOpaque( false );
add( scroller );
setDoubleBuffered( true );
setFocusable( false );
}
COM: <s> configures the popup portion of the combo box </s>
|
funcom_train/20885296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSimpleFieldFLR() {
check(FLR, "valid valid ", SimpleFieldTestDTO.class, VALID);
check(FLR, " invalid ", SimpleFieldTestDTO.class, INVALID);
check(FLR, " invalid ", SimpleFieldTestDTO.class, VALIDATION_OFF);
}
COM: <s> tests validation for a simple field value flr </s>
|
funcom_train/5374584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRectangle(float x, float y, float width, float height) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
/*
RectF rect = new RectF();
rect.X = x;
rect.Y = y;
rect.Width = width;
rect.Height = height;
Gdip.GraphicsPath_AddRectangle(handle, rect);
currentPoint.X = x;
currentPoint.Y = y;
*/
}
COM: <s> adds to the receiver the rectangle specified by x y width and height </s>
|
funcom_train/1302860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addElement(T element) throws IOException {
boolean result = false;
if (currentStore != null) {
boolean rollover = false;
synchronized (currentStore) {
rollover = currentStore.addElement(element);
}
if (!rollover) rollover = currentStore.shouldRoll();
if (rollover) {
roll(null, true); // rolling with add
result = true;
}
}
return result;
}
COM: <s> add the element to this store </s>
|
funcom_train/34902206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasPeptideSequence(String peptideSequence) {
// iterate over list of peptides in list
Iterator<Peptide> iterExistingPeptides = peptides.iterator();
while (iterExistingPeptides.hasNext()) {
Peptide existingPep = iterExistingPeptides.next();
if ( (existingPep.getSequence().equals(peptideSequence) )) {
return true;
}
}
return false;
}
COM: <s> see if peptide sequence is same as any others in list </s>
|
funcom_train/37607113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void endIt() {
this.dispose();
this.setVisible(false);
if (JavaDriver.amI()) {
JavaDriver.getGControl().updateCards();
JavaDriver.getGKeys().getKEPP().reDisplay();
JavaDriver.getGKeys().toFront();
} else CMapDriver.getCHart().getMCanvas().repaint();
} // end endIt()
COM: <s> closes the tt ucolor tt dialog </s>
|
funcom_train/23899583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void centerZoom(double dx, double dy, double scale, AffineTransform af) {
af.preConcatenate(AffineTransform.getTranslateInstance(-dx, -dy));
af.preConcatenate(AffineTransform.getScaleInstance(scale, scale));
af.preConcatenate(AffineTransform.getTranslateInstance(dx, dy));
transform = af;
syncScrollBars();
}
COM: <s> perform a zooming operation centered on the given point dx dy and </s>
|
funcom_train/12644576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(int newx, int newy) {
int x1 = Math.min(x, newx);
int x2 = Math.max(x + width, newx);
int y1 = Math.min(y, newy);
int y2 = Math.max(y + height, newy);
x = x1;
y = y1;
width = x2 - x1;
height = y2 - y1;
}
COM: <s> adds a point specified by the integer arguments code newx code </s>
|
funcom_train/22049581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getWastedRPCost() {
int cost_done = 0;
GenericDataManager speed_manager = BirMail.getDatabase().GetManager(
GenericDataManager.TYPE_BUILD_SPEED_DATA);
BuildSpeedData speed_inf = (BuildSpeedData)speed_manager.FindByID(iSpeed_RP);
if (speed_inf != null) {
cost_done = speed_inf.GetWasted();
}
return cost_done;
}
COM: <s> get rp wasted from action </s>
|
funcom_train/43527866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCommand(Request request) {
if (request instanceof ReconnectRequest) {
Object view = ((ReconnectRequest) request).getConnectionEditPart().getModel();
if (view instanceof View) {
Integer id = new Integer(CallGraphVisualIDRegistry.getVisualID((View) view));
request.getExtendedData().put(VISUAL_ID_KEY, id);
}
}
return super.getCommand(request);
}
COM: <s> extended request data key to hold editpart visual id </s>
|
funcom_train/27937000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printStackTrace(PrintStream ps) {
synchronized(ps) {
super.printStackTrace(ps);
if(target != null && Compatibility.getJavaVersion() < Compatibility.JAVA_1_4) {
ps.print("Caused by: ");
target.printStackTrace(ps);
}
}
}
COM: <s> prints the stack trace to a print stream </s>
|
funcom_train/12747046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copyAllChildren(XComponent component) {
this.removeAllChildren();
XComponent[] children = new XComponent[component.getChildCount()];
for (int i = 0; i < component.getChildCount(); i++) {
children[i] = (XComponent) component.getChild(i);
}
this.addAllChildren(children);
}
COM: <s> copies all the children from the given component to the current one </s>
|
funcom_train/26324574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCard(Card card, int pos) {
pos--;
if (pos < 0) {
pos = 0;
}
if (pos > _cards.size()) {
pos = _cards.size();
}
_cards.add(pos, card);
_view.add(card.getDisplay(), card.getID().toString());
}
COM: <s> adds the given card to this stack in the specified position </s>
|
funcom_train/9772587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String validateName(String name) {
String s = "";
boolean found = false;
if (name.length() < 4) {
int i;
for (i=0; i < blastomeres.length; i++) {
found = name.equals(blastomeres[i]);
if (found) break;
}
if (found) s = blastomeres[i];
}
return s;
}
COM: <s> return either s or a null string depending </s>
|
funcom_train/29718339 | /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 ConcreteActivity == false) {
return false;
}
if (this == obj) {
return true;
}
ConcreteActivity concreteActivity = (ConcreteActivity) obj;
return new EqualsBuilder().appendSuper(super.equals(concreteActivity))
.append(this.activity, concreteActivity.activity).append(
this.concreteBreakdownElements,
concreteActivity.concreteBreakdownElements).isEquals();
}
COM: <s> compares an object in parameter with the current instance of the class </s>
|
funcom_train/12159360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDescendantsKnowContextMatched() {
state.beforeStartElement();
state.contextMatched();
for (int i = 0; i < 10; i += 1) {
state.beforeStartElement();
assertTrue("Descendants should know context matched",
state.hasDirectRelationship());
}
}
COM: <s> test that state remembers that the context has been matched within </s>
|
funcom_train/32830203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected DataSetFactory getDataSetFactory(Class<? extends DataSetFactory> dataSetFactoryClass) {
DataSetFactory dataSetFactory = createInstanceOfType(dataSetFactoryClass, false);
dataSetFactory.init(configuration, getDefaultDbSupport().getSchemaName());
return dataSetFactory;
}
COM: <s> creates and initializes a data set factory of the given type </s>
|
funcom_train/15872403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveTableColumns(String sTableID) {
TableColumnCore[] tcs = getAllTableColumnCoreAsArray(sTableID);
for (int i = 0; i < tcs.length; i++) {
if (tcs[i] != null)
tcs[i].saveSettings();
}
COConfigurationManager.save();
}
COM: <s> saves all the user configurable table column settings at once complete </s>
|
funcom_train/1958208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void trim(boolean eventPendingFlag) {
if(maxSize != UNBOUNDED) {
while(packets.size() > maxSize)
packets.remove(0); // remove the oldest packet
// trim one smaller than the allowed size to prime for pending insert..
if(eventPendingFlag && packets.size() == maxSize)
packets.remove(0);
}
}
COM: <s> trim the capture history by removing the oldest packets until </s>
|
funcom_train/45462583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ImageItem getIBio () {
if (iBio == null) {//GEN-END:|37-getter|0|37-preInit
// write pre-init user code here
iBio = new ImageItem ("", null, ImageItem.LAYOUT_DEFAULT, "<Missing Image>");//GEN-LINE:|37-getter|1|37-postInit
// write post-init user code here
}//GEN-BEGIN:|37-getter|2|
return iBio;
}
COM: <s> returns an initiliazed instance of i bio component </s>
|
funcom_train/33798689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load_Lieferant_Into_Combobox() {
comboBox_Lieferant.removeAllItems();
EntityManager em = connection.getEntityManager();
Query query = em.createQuery("from Lieferant");
List<Lieferant> lieferanten = (List<Lieferant>) query.getResultList();
Iterator<Lieferant> iterator = lieferanten.iterator();
while (iterator.hasNext()) {
comboBox_Lieferant.addItem(iterator.next());
}
}
COM: <s> loads the existing lieferant objects into the combobox </s>
|
funcom_train/38551574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load(SystemTestIDCollection systemTestIDCollection) {
SystemTestID testID;
for(int i = 0; i < systemTestIDCollection.size(); i++) {
testID = systemTestIDCollection.getSystemTestIDAt(i);
this.root.addSystemTestID(testID);
}
updateTree();
}
COM: <s> loads the system test selector </s>
|
funcom_train/36949598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void insertDeltaTree(IRubyElement element, RubyElementDelta delta) {
RubyElementDelta childDelta = createDeltaTree(element, delta);
if (!this.equalsAndSameParent(element, getElement())) { // handle case
// of two jars
// that can be
// equals but
// not in the
// same project
addAffectedChild(childDelta);
}
}
COM: <s> creates the delta tree for the given element and delta and then inserts </s>
|
funcom_train/25973008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private City loadCity(int id, Ini iniFile) {
//The section of the ini file containing the city to be loaded.
Section section = iniFile.get(CITY_SECTION_PREFIX + id);
// Make sure it's valid
if (section == null) {
return null;
}
int map = Integer.parseInt(section.get(MAP_KEY));
byte x = Byte.parseByte(section.get(X_KEY));
byte y = Byte.parseByte(section.get(Y_KEY));
return new City(map, x, y);
}
COM: <s> creates a city from the given section </s>
|
funcom_train/31933351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
debug(this, "run() started, fileName=" + m_fileName);
disableMenuItemsWhileExecuting();
while (m_state.isRunning()) {
try {
Thread.sleep(500);
}
catch (InterruptedException ignoreException) {
}
}
enableMenuItemsAfterExecuting();
processResult();
debug(this, "run(), terminating");
}
COM: <s> override run the monitor and then process results </s>
|
funcom_train/15607493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireMouseMoved(SequenceMouseEvent e) {
if (sequenceMouseListeners != null) {
Vector listeners = sequenceMouseListeners;
int count = listeners.size();
for (int i = 0; i < count; i++) {
((SequenceMouseListener) listeners.elementAt(i)).mouseMoved(e);
}
}
}
COM: <s> notifies all code sequence mouse listener code s of a sequence mouse </s>
|
funcom_train/37453123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CrossReference extractBiologicalRole( Participant participant ) {
BiologicalRole role = participant.getBiologicalRole();
final String[] values = role.getXref().getPrimaryRef().getId().split( ":" );
String id = values[1];
String db = values[0];
String text = role.getNames().getShortLabel();
return new CrossReferenceImpl( db, id, text );
}
COM: <s> extracts the relevant information for the psimitab biological role </s>
|
funcom_train/37556579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFont (Font font) {
checkWidget();
if (font != null && font.isDisposed ()) {
error (SWT.ERROR_INVALID_ARGUMENT);
}
this.font = font;
if (isVisible && hasFocus ()) {
int hFont = 0;
if (font != null) hFont = font.handle;
if (hFont == 0) hFont = defaultFont ();
saveIMEFont ();
setIMEFont (hFont);
}
}
COM: <s> sets the font that the receiver will use to paint textual information </s>
|
funcom_train/936600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PlugWorkResult fireSynchronous(final PlugWorkEvent event) {
PlugWorkResult result = null;
if (event instanceof PluginEvent) {
System.out.println("Synchronous event received: "
+ event.toString());
result = new MessageResult("A message for event "
+ ((PluginEvent) event).getName());
}
return result;
}
COM: <s> this method is invoked when an synchronous event is to be handled by </s>
|
funcom_train/35870957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void stop(boolean mouseCursorToDefault) {
// thisComponent can be referenced in anonymous inner classes
if (instance != null) {
final Component thisComponent = instance;
if (mouseCursorToDefault) {
PlayerService.stop(
new CallbackAction() { public void execute() {
thisComponent.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}
}
);
}
else
PlayerService.stop(null);
}
}
COM: <s> stops player service and sets cursor to default cursor </s>
|
funcom_train/3082199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isExpanded(TreePath path) {
if (path == null)
return false;
// Is this node expanded?
Object value = expandedState.get(path);
if (value == null || !((Boolean) value).booleanValue())
return false;
// It is, make sure its parent is also expanded.
TreePath parentPath = path.getParentPath();
if (parentPath != null)
return isExpanded(parentPath);
return true;
}
COM: <s> returns true if the node identified by the path is currently expanded </s>
|
funcom_train/37858953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Source getQuerySource(DBBroker broker) {
Source querySource = null;
//try and get the XQuery from a URL
if(urlQuery != null) {
try {
querySource = SourceFactory.getSource(broker, null, urlQuery, false);
} catch(Exception e) {
LOG.error(e);
}
} else if(strQuery != null) {
//try and get the XQuery from a string
querySource = new StringSource(strQuery);
}
return querySource;
}
COM: <s> gets a source for the triggers xquery </s>
|
funcom_train/41163863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(CoTextType entity) {
EntityManagerHelper.log("deleting CoTextType instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(CoTextType.class, entity.getTextTypeId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent co text type entity </s>
|
funcom_train/28297186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEntryChangeVisualNullVisualClass() throws Exception {
Entry entry =
dvm.new Entry(Package.class, Sphere.class, Package.NAME,
Sphere.NAME);
dvm.set(entry);
TestListener listener = new TestListener();
dvm.addListener(listener);
entry.changeVisual(null, Cube.NAME);
assertNull(entry.getVisualClass());
assertEquals(Cube.NAME, entry.getVisualName());
assertTrue(listener.wasChanged());
}
COM: <s> test entry change visual null visual class </s>
|
funcom_train/25231993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getAnalysisResultsFile() {
File analysisResultsFolder = new File( GlobalPreferences.getPreferencesFolder(), "Analysis Results" );
String fileName = this.syncSettings.getSyncFile().getName();
if ( fileName.contains( "." ) ) {
fileName = fileName.substring( 0, fileName.indexOf( "." ) );
}
return new File( analysisResultsFolder, fileName );
}
COM: <s> gets the file where the analysis results for synchronizations will be saved </s>
|
funcom_train/18605608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected FilterCapabilities createFilterCapabilities() {
FilterCapabilities capabilities = new FilterCapabilities();
capabilities.addAll(FilterCapabilities.LOGICAL_OPENGIS);
capabilities.addAll(FilterCapabilities.SIMPLE_COMPARISONS_OPENGIS);
capabilities.addType(BBOX.class);
capabilities.addType(PropertyIsBetween.class);
capabilities.addType(PropertyIsLike.class);
capabilities.addType(During.class);
return capabilities;
}
COM: <s> sets the capabilities of this filter </s>
|
funcom_train/47891293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public long revisionNum(String path, SVNRevision rev) throws SVNException{
if(rev == SVNRevision.HEAD) {
DAVRepositoryFactory.setup();
File file = new File(path);
if (file.exists()) {
SVNClientManager clientManager = SVNClientManager.newInstance();
SVNWCClient wcClient = clientManager.getWCClient();
return wcClient.doInfo(file, null).getCommittedRevision().getNumber();
}
}
return rev.getNumber();
}
COM: <s> gets the actual revision number for a given file </s>
|
funcom_train/36247931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void assertValidatorStatus(AmiValidator validator, int expectedSeverity) {
for (int i = 0; i < 5; i++) {
try {Thread.sleep(1000);} catch (InterruptedException e) {}
if (validator.getStatus().getSeverity() == expectedSeverity) {
return;
}
}
fail("Expected validator status severity to be: " + expectedSeverity
+ ", but status is: " + validator.getStatus().toString());
}
COM: <s> asserts that the specified validator eventually finishes validating and </s>
|
funcom_train/42184527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String preProcessText(String rsdn) {
rsdn = HYPERLINKS_PATTERN.matcher(rsdn).replaceAll(HYPERLINKS_REPLACEMENT);
rsdn = PRE_QUOTATION_PATTERN.matcher(rsdn).replaceAll(PRE_QUOTATION_REPLACEMENT);
rsdn = MessageUtils.escapeHTML(rsdn);
// rsdn = QUOTATION_PATTERN.matcher(rsdn).replaceAll("<span class='lineQuote'>$1</span>");
return rsdn;
}
COM: <s> searches and highlight all the quotation lines in message </s>
|
funcom_train/648894 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static private int runRule(int i) throws SudokuException {
int retValue = IRule.RULE_NO_CHANGE;
IRule rule = rules[i];
// Call all the cell elements with rule
for (int x = 0; x < 9; x++) {
for (int y = 0; y < 9; y++) {
int result = rule.runRule(base.getCell(x, y));
switch (result) {
case IRule.RULE_CELL_CHANGED:
retValue = IRule.RULE_CELL_CHANGED;
break;
case IRule.RULE_NOT_POSSIBLE:
return IRule.RULE_NOT_POSSIBLE;
default:
// Do nothing
}
}
}
return retValue;
}
COM: <s> run a rule on all the cells </s>
|
funcom_train/2623671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
Map<String, String> rMap = new LinkedHashMap<String, String>();
for ( Map.Entry<String, String> me : namespacePrefixMap.entrySet() ) {
rMap.put(me.getValue(), me.getKey());
}
this.reverseMap = rMap;
}
COM: <s> initialize this class for use after configuring the class properties </s>
|
funcom_train/33003356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Session init( String hostname, boolean d )
{
Properties props = new Properties();
props.put( "mail.smtp.host", hostname );
if( debug )
props.put( "mail.debug", "true" );
this.debug = d;
Session s = Session.getDefaultInstance( props, null );
s.setDebug( debug );
return s;
}
COM: <s> creates an mail session </s>
|
funcom_train/21175494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getServiceName() {
String serviceName = null;
if (this.statusCode == 1) {
if (this.currentJob != null) {
if (this.currentJob instanceof GenericServiceJob) {
GenericServiceJob gsj = (GenericServiceJob) this.currentJob;
serviceName = gsj.getServiceName();
}
}
}
return serviceName;
}
COM: <s> returns the name of the service being run </s>
|
funcom_train/46694198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDestination() {
System.out.println("getDestination");
BasicUserLink instance = new BasicUserLink();
Actor expResult = ActorFactory.newInstance().create("Mode", "ID");
instance.setDestination(expResult);
Actor result = instance.getDestination();
assertEquals(expResult, result);
}
COM: <s> test of get destination method of class basic user link </s>
|
funcom_train/30006118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getHelpTextPanel() {
if (this.helpTextPanel == null) {
this.helpTextPanel = new JPanel();
this.helpTextPanel.setOpaque(false);
this.helpTextPanel.setLayout(new BorderLayout());
this.helpTextPanel.add(this.getHelpText(), BorderLayout.CENTER);
}
return this.helpTextPanel;
}
COM: <s> gets the help text panel </s>
|
funcom_train/22156704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeTextListener() {
text.removeListener(SWT.KeyDown, textListener);
text.removeListener(SWT.MouseDown, textListener);
text.removeListener(SWT.MouseWheel, textListener);
text.removeListener(SWT.MouseUp, textListener);
text.removeListener(SWT.Traverse, textListener);
text.removeListener(SWT.Verify, textListener);
}
COM: <s> removes the text listener for the appropriate swt events to handle incrementing fields </s>
|
funcom_train/17144125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMultipleStatements() throws Exception {
Integer expectedInt = 3;
Long expected = 3L;
context.getVars().put("a", 1);
context.getVars().put("b", 2);
String expression = "a + b";
Expression e = ExpressionFactory.createExpression( expression );
Object calcValue = e.evaluate(context);
assertEquals(expected,calcValue);
assertFalse(expectedInt.equals(calcValue)); //Notice that this is not equal
}
COM: <s> notice that the result get turned into a long </s>
|
funcom_train/5880970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateAnnotations(ComponentInfo compInfo, String propName) {
for (Iterator it = _annots.iterator(); it.hasNext();) {
final Object[] info = (Object[])it.next();
final String annotName = (String)info[0];
final Map annotAttrs = (Map)info[1];
if (propName != null)
compInfo.addAnnotation(propName, annotName, annotAttrs);
else
compInfo.addAnnotation(annotName, annotAttrs);
}
_annots.clear();
}
COM: <s> updates the annotations to the specified instance definition </s>
|
funcom_train/49329933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawCross(Graphics g, int x, int y, int width, int height) {
g.setColor(Color.black);
((Graphics2D) g).setStroke(thinStroke);
g.drawLine(x - width / 2, y, x + width / 2, y);
g.drawLine(x, y - height / 2, x, y + height / 2);
}
COM: <s> draw the center cross hair </s>
|
funcom_train/26489195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void release() {
try{
connection.close();
isReleased = true;
if ( log.isEnabled(Log.DEBUG2) ) {
log.println(Log.DEBUG2, getInfo());
}
}catch(SQLException e){
log.println(Log.ERROR, getInfo(),e);
}
}
COM: <s> return this connection to its allocator </s>
|
funcom_train/51199957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
//Unregister all key pressed
ivKeysPressed.clear();
//Clear all ACE key counts
for (int i=0; i<ivAceKeyCounts.length; i++) {
ivAceKeyCounts[i]=0;
}
//Clear all ACE key row masks
for (int i=0; i<ivAceKeyRows.length; i++) {
ivAceKeyRows[i]=0;
ivAceKeyRowsCurrent[i]=0;
}
}
COM: <s> resets the internal keyboard state it is recommended to call this </s>
|
funcom_train/12563849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseCommentExtension() {
//System.out.println("parseCommentExtension at pos " + stream.tell());
try {
int size;
do {
size = readUnsignedByte();
if (size > 0) {
byte[] data = new byte[size];
stream.read(data, 0, size);
}
} while (size != 0);
} catch (IOException e) {
}
}
COM: <s> parses the comment extension </s>
|
funcom_train/24640358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isDeletabeNodeSelected() {
TreePath [] paths = evidenceTree.getSelectionPaths();
boolean hasDeleteableElement = false;
if(paths!=null) {
for(TreePath tp : paths) {
if(tp.getLastPathComponent().equals(customEviNode))
continue;
for(Object obj : tp.getPath())
if(obj.equals(customEviNode))
hasDeleteableElement = true;
}
}
return hasDeleteableElement;
}
COM: <s> checks if a deleteable node in the evidence tree is select </s>
|
funcom_train/20885085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWithDepth0Elements() {
ListWithDepth0Elements list = new ListWithDepth0Elements();
list.list = new ArrayList<Depth0DTO>();
for (int i = 0; i < 10; i++) {
list.list.add(createDepth0DTO());
}
JSefaTestUtil.assertRepeatedRoundTripSucceeds(XML, list);
}
COM: <s> tests a list with code depth0 dto code elements </s>
|
funcom_train/38353019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addInPort(int index) {
InPort newPort = new InPort(this, index);
inPorts.add(index, newPort);
for (int i = index + 1; i < inPorts.size(); i++) {
((InPort)inPorts.get(i)).setNumber(i);
}
firePortAddedEvent(newPort);
}
COM: <s> inserts an in port with the specified number </s>
|
funcom_train/16783739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addImage(String path) {
if (path != null && !path.equals(CookbookConstants.IMAGE_LOGO) && new File(path).exists()) {
if (thumbnails.size() < MAX_IMAGES) {
Image image = createThumbnail(path);
thumbnails.add(0, new ImageItem(image, path));
setChanged();
notifyObservers();
}
}
}
COM: <s> adds an image determined by </s>
|
funcom_train/25653096 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processEvent(AWTEvent e) {
if (mouseViewpoint.drag && e instanceof MouseEvent){
mouseViewpoint.handleEvent((MouseEvent) e); //handle right here instead of in paintGL()
lastDragEvent=null;
}else{
events.add(e);
if (e.getID()==MouseEvent.MOUSE_DRAGGED) lastDragEvent=e;
else if (e.getID()==MouseEvent.MOUSE_RELEASED) lastDragEvent=null;
}
}
COM: <s> override awts event processing to scoop events for send them to the 3d </s>
|
funcom_train/14518567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean storeCertificate(Admin admin, Certificate incert, String username, String password, String userDN, String cafp, int status, int type, long revocationDate, int revocationReason, String tag, int certificateProfileId, long lastUpdate, ExtendedInformation extendedinformation) throws PublisherException {
return storeCertificate(admin, incert, username, password, cafp, status, type, revocationDate, revocationReason, tag, certificateProfileId, lastUpdate, extendedinformation);
}
COM: <s> publishes a certificate to a certificate store </s>
|
funcom_train/45248445 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JNumberFloatField getJNumberFloatFieldTaxaMtREV() {
if (jNumberFloatFieldTaxaMtREV == null) {
jNumberFloatFieldTaxaMtREV = new JNumberFloatField();
jNumberFloatFieldTaxaMtREV.setLocation(new Point(345, 186));
jNumberFloatFieldTaxaMtREV.setSize(new Dimension(65, 20));
}
return jNumberFloatFieldTaxaMtREV;
}
COM: <s> this method initializes j number float field taxa mt rev </s>
|
funcom_train/23297577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void zoomOut(Point2D pt) {
Double zoom_factor = Tree2DPanelPreferences.getDefaultZoomFactor();
this.fZoomFactor *= zoom_factor - this.fZoomIncrement;
zoom(pt, zoom_factor - this.fZoomIncrement);
if (this.fZoomFactor < zoom_factor) {
this.fZoomFactor = zoom_factor;
}
this.fTreePanel.setZoomFactor(this.fZoomFactor);
this.notifyTree2DPaneChangeListeners(new Tree2DPaneChangeEvent(this));
}
COM: <s> zoom out using the point given to center and the current zoom increment </s>
|
funcom_train/21407028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showForm(boolean studyEditingMode,String formVarName,boolean showNew){
if(!formsDownloaded2())
return;
FormDef def = formDefListViewer.getStudy().getForm(formVarName);
if(def == null){
showErrorMessage(MenuText.NO_FORM_DEF() + " " + formVarName,null);
return;
}
setStudyEditingMode(studyEditingMode);
if(showNew){
FormData data = new FormData(def);
FireSkipRules(data);
showForm(studyEditingMode,data,false);
}
else
showFormDataList(def);
}
COM: <s> shows a form given its variable name </s>
|
funcom_train/18149881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMultipleBirthOrderNumber(INT multipleBirthOrderNumber) {
if(multipleBirthOrderNumber instanceof org.hl7.hibernate.ClonableCollection)
multipleBirthOrderNumber = ((org.hl7.hibernate.ClonableCollection<INT>) multipleBirthOrderNumber).cloneHibernateCollectionIfNecessary();
_multipleBirthOrderNumber = multipleBirthOrderNumber;
}
COM: <s> sets the property multiple birth order number </s>
|
funcom_train/14282437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateToolTip() {
// in case fileName is very long, try to set tool tip on frame
Component c = getComponent(1);
// this will work at least for Metal L&F
if (c != null && c instanceof JComponent) {
((JComponent)c).setToolTipText(getUrl());
}
}
COM: <s> updates the tool tip contents </s>
|
funcom_train/12081390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getSettings() {
if (Settings == null) {//GEN-END:|21-getter|0|21-preInit
// write pre-init user code here
Settings = new Command("Settings", "Setup Budget", Command.SCREEN, 1);//GEN-LINE:|21-getter|1|21-postInit
// write post-init user code here
}//GEN-BEGIN:|21-getter|2|
return Settings;
}
COM: <s> returns an initiliazed instance of settings component </s>
|
funcom_train/31404655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set keySet() {
if (keySet == null) {
keySet = new AbstractSet() {
public Iterator iterator() {
return getHashIterator(KEYS);
}
public int size() {
return count;
}
public boolean contains(Object o) {
return containsKey(o);
}
public boolean remove(Object o) {
int oldSize = count;
HashMap.this.remove(o);
return count != oldSize;
}
public void clear() {
HashMap.this.clear();
}
};
}
return keySet;
}
COM: <s> returns a set view of the keys contained in this map </s>
|
funcom_train/976763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getColWidths() {
// Update the list with the current widths
for (int col = 0; col < numCols; col++) {
colWidth[columnMap[col]] = getColWidth(col);
}
// Convert to string
StringBuilder sb = new StringBuilder(40);
for (int i = 0; i < colWidth.length; i++) {
if (sb.length() != 0)
sb.append(',');
sb.append(colWidth[i]);
}
return sb.toString();
}
COM: <s> return the column widths as a comma delimited string for storing in </s>
|
funcom_train/19456684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isDosOrder() {
return filename.toLowerCase().endsWith(".do") //$NON-NLS-1$
|| filename.toLowerCase().endsWith(".do.gz") //$NON-NLS-1$
|| filename.toLowerCase().endsWith(".dsk") //$NON-NLS-1$
|| filename.toLowerCase().endsWith(".dsk.gz"); //$NON-NLS-1$
}
COM: <s> indicate if this disk is dos ordered t0 s0 t35 s15 </s>
|
funcom_train/38447147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IpFileObj buildIpFileObj(ResultSet rs) {
try {
IpFileObj ipFile = new IpFileObj();
ipFile.setIp(rs.getString(1));
ipFile.setIDate(rs.getDate(2));
ipFile.setFName(rs.getString(3));
ipFile.setFSuffix(rs.getString(4));
return ipFile;
} catch (SQLException eSQL) {
eSQL.printStackTrace();
return null;
}
}
COM: <s> builds ip object by a object of </s>
|
funcom_train/11299807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Class findClass(final String className) throws ClassNotFoundException {
try {
return Thread.currentThread().getContextClassLoader().loadClass(className);
} catch (ClassNotFoundException e) {
try {
return Class.forName(className);
} catch (ClassNotFoundException e1) {
return getClass().getClassLoader().loadClass(className);
}
}
}
COM: <s> find class given class name </s>
|
funcom_train/42653880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMidPoint(Interval inter) {
// System.err.println( interval);
int i = inter.lb();
int j = inter.rb();
int mid = cldtab[j];
if (i < mid && mid <= j) {
return mid;
}
else {
return cldtab[i];
}
}
COM: <s> get the mid point of an interval </s>
|
funcom_train/37463840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setUpUserPreferences(Mi25Validator validator){
// set work directory
UserPreferences preferences = new UserPreferences();
preferences.setKeepDownloadedOntologiesOnDisk(true);
preferences.setWorkDirectory(new File(System.getProperty("java.io.tmpdir")));
preferences.setSaxValidationEnabled(true);
validator.setUserPreferences(preferences);
}
COM: <s> set up the user preferences </s>
|
funcom_train/26485312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeDiffs(java.util.List diffsList, java.io.Writer writer) {
logger.info("METHOD_ENTRY: writeDiffs");
PrintWriter out = new PrintWriter(writer);
for (Iterator i = diffsList.iterator(); i.hasNext();) {
DiffData diff = (DiffData) i.next();
out.println(format(diff));
}
out.close();
out = null;
logger.info("METHOD_EXIT: writeDiffs");
}
COM: <s> formats the differences and writes them to the writer provided </s>
|
funcom_train/278371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOutputXmlPath(String outputXmlPath) throws Exception {
this.outputXmlPath = outputXmlPath;
this.outputXmlFile = new File(outputXmlPath);
if (outputXmlFile.exists() && !outputXmlFile.canWrite())
addError("{0} is not writable", new Object[] { outputXmlPath });
}
COM: <s> sets the output xml path </s>
|
funcom_train/48460080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void jumpToFile(String fileNameSubstring) {
for (int i = currentIndex; i < pathsList.size(); i++) {
File currFile = pathsList.get(i);
if (currFile.getName().contains(fileNameSubstring)) {
currentIndex = i;
DebugUtils.println("Match for [" + fileNameSubstring + "] in " + currFile);
return;
}
}
}
COM: <s> jumps to the next file with a name that contains this string </s>
|
funcom_train/9927528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMapping(Object host,Object jobId,int mid,int channel){
// System.out.println("JobToMetricMappingStore.add( h: "+host+", j: "+jobId+", mid: "+mid+", c: "+channel+")");
this.store.put(host+"@-@"+jobId, new MetricNChannelPair(mid,channel));
}
COM: <s> adds a mapping </s>
|
funcom_train/31764470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void unzip(ZipInputStream zin, String s) throws IOException {
Logger.info(this, "unzipping " + s);
File f = new File(Config.CONTEXT.getRealPath(backupTempFilePath + File.separator + s));
BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(f));
byte[] b = new byte[512];
int len = 0;
while ((len = zin.read(b)) != -1) {
out.write(b, 0, len);
}
out.close();
}
COM: <s> takes a zip input stream and filename and will extract them to the </s>
|
funcom_train/17479597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object o) {
// This is INCOMPLETE!!!!
Angle a = (Angle) o;
if (this.degrees < a.getDegrees()) return -1;
else if (this.degrees > a.getDegrees()) return 1;
// Need to consider if degrees are equal, etc.
return 0;
}
COM: <s> compares this angle to another angle </s>
|
funcom_train/23278646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double totalFundsByProject(Project p) {
if(!validate(p)) throw new NullPointerException("Must specify project");
p=projectDAO.getProject(p.getTitle());
double amount = 0;
for(ProjectFunds f:p.getFunds())
amount+=f.getAmount();
return amount;
}
COM: <s> returns the total amount of funds put towards the project is </s>
|
funcom_train/51604816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonListRemove() {
if (jButtonListRemove == null) {
jButtonListRemove = new JButton();
jButtonListRemove.setIcon(new ImageIcon(getClass().getResource("/net/sf/cannagrower/images/edit_remove_16.png")));
jButtonListRemove.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
elementRemove();
}
});
}
return jButtonListRemove;
}
COM: <s> this method initializes j button list remove </s>
|
funcom_train/16894447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unregister(String property) {
IBaseLabelProvider oldLp = (IBaseLabelProvider)propertyToLabelProvider.remove(property);
propertyToCellModifier.remove(property);
if (oldLp != null) {
// remove all active listeners from the label provider.
for (Iterator it = labelProviderListeners.iterator(); it.hasNext(); ) {
oldLp.removeListener((ILabelProviderListener)it.next());
}
}
}
COM: <s> unregister the old label provider and cell modifier for the given property </s>
|
funcom_train/45692233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPlayLevelPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Sample_playLevel_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Sample_playLevel_feature", "_UI_Sample_type"),
EsxPackage.Literals.SAMPLE__PLAY_LEVEL,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the play level feature </s>
|
funcom_train/19178726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String extractSWTRootName (GuiSubitemTestObject gstobj) {
try{
// can we use gstobj.getChildren() here? Or must we use invoke?
// TestObject[] items = gstobj.getChildren();
TestObject[] items = (TestObject[]) gstobj.invoke("getItems");
return (String) items[0].invoke("getText");
}catch(Exception x){;}
return null;
}
COM: <s> extract the text of the root node in an swt tree </s>
|
funcom_train/2953043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setOrigin(int x, int y) {
int destX = x - originX;
int destY = y - originY;
org.eclipse.swt.graphics.Rectangle ca = getClientArea();
scroll(destX, destY, 0, 0, ca.width, ca.height, false);
originX = x;
originY = y;
}
COM: <s> scrolls to the given position in the widget </s>
|
funcom_train/8484724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ATMethod meta_grabMethod(ATSymbol methodName) throws InterpreterException {
JavaMethod choices = Symbiosis.getMethods(wrappedObject_.getClass(), Reflection.upSelector(methodName), false);
if (choices != null) {
return choices;
} else {
return super.meta_grabMethod(methodName);
}
}
COM: <s> methods can be grabbed from a symbiotic java object </s>
|
funcom_train/19849318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean updateCurrentId(long rowId) {
ContentValues args = new ContentValues();
args.put(KEY_CURRENT_ID, rowId);
if (db.update(DB_TABLE_CURRENT, args, null, null) == 0) {
return db.insert(DB_TABLE_CURRENT, null, args) >= 0;
}
return true;
}
COM: <s> updates the current user event id </s>
|
funcom_train/8096877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMissingPredictors() {
int i;
for (i = FIRST_CLASSTYPE; i <= LAST_CLASSTYPE; i++) {
// does the classifier support this type of class at all?
if (!canPredict(i))
continue;
// 20% missing
checkMissingPredictors(i, 20, true);
// 100% missing
if (m_handleMissingPredictors[i])
checkMissingPredictors(i, 100, true);
}
}
COM: <s> tests whether the classifier can handle missing predictors 20 and 100 </s>
|
funcom_train/11341319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object decode(Object pObject) {
if (pObject instanceof byte[]) {
return decode((byte[]) pObject);
} else if (pObject instanceof String) {
return decode((String) pObject);
} else {
throw new IllegalArgumentException("Parameter supplied to Base64 decode is not a byte[] or a String");
}
}
COM: <s> decodes an object using the base64 algorithm </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.