__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/22553097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMsgNone() throws Exception {
UDPCrawlerPing msgNone = new UDPCrawlerPing(new GUID(GUID.makeGuid()), 0, 0,(byte)0);
UDPCrawlerPong reply = new UDPCrawlerPong(msgNone);
byte[] payload = reply.getPayload();
assertEquals(0,payload[0]);
assertEquals(0,payload[1]);
}
COM: <s> sends a message requesting 0 leafs and 0 ups </s>
|
funcom_train/49421100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane getJScrollPane() {
if (jScrollPane == null) {
jScrollPane = new JScrollPane();
jScrollPane.setViewportView(getOrchestraTextArea());
jScrollPane.setFont(new java.awt.Font("Courier New",
java.awt.Font.PLAIN, 12));
}
return jScrollPane;
}
COM: <s> this method initializes j scroll pane </s>
|
funcom_train/47928178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetGame() {
life = maXlife;
oppLife = oppMaxLife;
damageMultiplierChar = characters.getDamageMultiplier('c');
damageMultiplierOpp = characters.getDamageMultiplier('o');
celestiaMultiplierChar = 10;
celestiaMultiplierOpp = 10;
limitBreak = 5;
showBattleMessage("");
}
COM: <s> resets the game after a match is done or cancelled </s>
|
funcom_train/3472755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setProcessLabelIsSearching(int numberSearched) {
processStatusLabel.setText(cleverPHL.getLanguage()
.getString("CleverPHL.SearchResultDialog.Message.SearchingFor") +
": " + searchString + " (" + numberSearched + "/" +
numberSessions + ")");
}
COM: <s> updates the process label during the search </s>
|
funcom_train/29882034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(File f) {
if(f != null) {
if(f.isDirectory()) {
return true;
}
String extension = getExtension(f);
if(extension != null && mFilters.get(getExtension(f)) != null) {
return true;
};
}
return false;
}
COM: <s> return true if this file should be shown in the directory pane </s>
|
funcom_train/45249537 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getIndex(IViewReference toFind) {
ToolItem[] items = tbm.getControl().getItems();
for (int i = 0; i < items.length; i++) {
if (items[i].getData(ShowFastViewContribution.FAST_VIEW) == toFind) {
return i;
}
}
return -1;
}
COM: <s> returns the index of the tool item fronting the view ref </s>
|
funcom_train/23307343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InitialContext getInitialContext() {
InitialContext initCtx = null;
Properties props = new Properties();
props.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
props.put("java.naming.provider.url", JNDI_LOCAL_SVC_URL);
try {
initCtx = new InitialContext(props);
} catch (NamingException e) {
log.error("naming error getting inital context: " + e, e);
}
return initCtx;
}
COM: <s> gets an initial context based on a naming service running on 127 </s>
|
funcom_train/12701977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Forward createMessageDialogForward(FormContext aContext, String aTitle, String aMessage, CommandList aCommandList) {
DialogConfig theConfig = new DialogConfig(aTitle, aMessage, aCommandList);
Forward theForward = aContext.getForm().getForward(MESSAGE_DIALOG_FORWARD);
theForward = theForward.modal().withParams(new Object[] { theConfig });
theForward.setGenericParam("target", aContext.getForm().getId());
return theForward;
}
COM: <s> create a message dialog forward </s>
|
funcom_train/26189430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visit(Catalog catalog) throws TechnicalException{
// init feedback to listeners
fireProgressChanged(0);
visitedNb = 0;
totalNb = catalog.getMediasNb();
// actual visit
if (totalNb == 0) {
// nothing to do
return;
}
internalVisit(catalog);
fireProgressChanged(100);
}
COM: <s> visits all the elements of the catalog beginning for each element by the </s>
|
funcom_train/32892199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getAttributeIndex (String name) throws NoSuchElementException
{ for (int t=0;t<attributes.size();t++)
{ if (name.equals(((XMLAttribute)(attributes.elementAt(t))).name))
return t;
}
throw new NoSuchElementException
("Could not find XML attribute named "+name);
}
COM: <s> get the index of an attribute in the attribute array </s>
|
funcom_train/18986271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream getBinaryStream() throws SQLException
{
//Following Native, throw HY010 after free() has been called. Note: NullPointerException if synchronized(null-ref)
if(locator_ == null)//@free
JDError.throwSQLException(this, JDError.EXC_FUNCTION_SEQUENCE); //@free
synchronized(locator_)
{
return new AS400JDBCInputStream(locator_);
}
}
COM: <s> returns the entire blob as a stream of uninterpreted bytes </s>
|
funcom_train/22402921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemAddIndex() {
if (jMenuItemAddIndex == null) {
jMenuItemAddIndex = new JMenuItem();
jMenuItemAddIndex.setText("Add Indexation");
jMenuItemAddIndex.addActionListener(new newIndex());
}
return jMenuItemAddIndex;
}
COM: <s> this method initializes j menu item add index </s>
|
funcom_train/4225105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Network createNetworkForOnlineLearning(double a, double b, double r, double t, int col) {
setParameters(a, b, r, t, col);
Network result = new Network(a, b, r, t, col);
result.learningMode(true);
return result;
}
COM: <s> use this method to create network that wont be learned using instances </s>
|
funcom_train/30196945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetCompetenza() {
System.out.println("setCompetenza");
String competenza = "test";
RicercaActionForm instance = new RicercaActionForm();
instance.setCompetenza(competenza);
String expResult = "test";
String result = instance.getCompetenza();
assertEquals(expResult, result);
}
COM: <s> test of set competenza method of class com </s>
|
funcom_train/9809480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect() throws IOException {
// Make the connect.
conn = getLocator().getURL().openConnection();
conn.connect();
connected = true;
// Figure out the content type.
String mimeType = conn.getContentType();
if( mimeType == null) {
mimeType = ContentDescriptor.CONTENT_UNKNOWN;
}
contentType = new ContentDescriptor(
ContentDescriptor.mimeTypeToPackageName(mimeType));
// Create a source stream.
sources = new URLSourceStream[1];
sources[0] = new URLSourceStream(conn, contentType);
}
COM: <s> initialize the connection with the source </s>
|
funcom_train/18213976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addQualityNodePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Timeseries_qualityNode_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Timeseries_qualityNode_feature", "_UI_Timeseries_type"),
EvaluationmodelPackage.Literals.TIMESERIES__QUALITY_NODE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the quality node feature </s>
|
funcom_train/9492884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Scriptable wrapNewObject(Context cx, Scriptable scope, Object obj) {
if (obj instanceof Scriptable)
return (Scriptable) obj;
Class<?> cls = obj.getClass();
if (cls.isArray())
return NativeJavaArray.wrap(scope, obj);
return wrapAsJavaObject(cx, scope, obj, null);
}
COM: <s> wrap an object newly created by a constructor call </s>
|
funcom_train/45596819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetMergeTries(byte maxTriesToMerge){
//value between 0 and maxTriesToMerge
if (maxTriesToMerge == 0){ // if tries off flag
numNonMerge = 0;
}
else{
Random rg = new Random();
numNonMerge = (byte)rg.nextInt(maxTriesToMerge+1); //Random is exclusive thats why 1 added
}
}
COM: <s> this function resets the num non merge variable </s>
|
funcom_train/4428008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isTimeDependent() {
if (actor.hasFsm()) {
FSM fsm = actor.getFsm();
for (State state : fsm.getStates()) {
// add anonymous actions
List<Action> actions = new ArrayList<Action>(
actor.getActionsOutsideFsm());
for (Edge edge : state.getOutgoing()) {
Transition transition = (Transition) edge;
actions.add(transition.getAction());
}
if (isTimeDependent(actions)) {
return true;
}
}
return false;
} else {
return isTimeDependent(actor.getActionsOutsideFsm());
}
}
COM: <s> returns code true code if this actor has a time dependent behavior </s>
|
funcom_train/10204894 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MTypedElement_mType_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_MTypedElement_mType_feature", "_UI_MTypedElement_type"),
ClassDiagramPackage.Literals.MTYPED_ELEMENT__MTYPE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the mtype feature </s>
|
funcom_train/34823955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear() {
try {
RecordEnumeration re = recordStore.enumerateRecords(null, this, false);
while(re.hasNextElement()) {
int id = re.nextRecordId();
recordStore.deleteRecord(id);
}
} catch(Exception ex) { Dialog.alert(ex.toString()); }
}
COM: <s> deletes all items from the record store </s>
|
funcom_train/42201356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean matchAt(long time) {
ScheduleItem match;
synchronized (data.getSchedule()) {
match = data.getSchedule().get(new SecondTime(time));
}
if (match != null)
return !AppLib.confirm(status.getWindow(), "A match is already scheduled at " +
ScheduleItem.timeFormat(time) + " on " + ScheduleItem.dateFormat(time) +
".\n\nDo you want to over-write it with this match?");
return false;
}
COM: <s> determines whether a match exists at the given time </s>
|
funcom_train/28662176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createMain() {
final Group g = new Group(this, SWT.NONE);
final GridLayout gl = new GridLayout(2, false);
//gl.horizontalSpacing = HORIZONTAL_SPACING;
g.setText(Messages.HEComposite_Scheme);
g.setLayout(gl);
g.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, true));
this.createButtonArea(g);
this.createAlgoArea(g);
}
COM: <s> creates the main area subdivided into the button area and the algorithm area </s>
|
funcom_train/12194197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSortEntriesWithEqualQvalues() {
doSortParserTest(new String[] { "C;q=0.3", "B;q=0.3", "A;q=0.3" },
new String[] { "A", "B", "C", });
}
COM: <s> test that a default accept parser works if the sorting is valid when </s>
|
funcom_train/33931622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void readDataFromSocket(SelectionKey key) throws Exception {
WorkerThread worker = pool.getWorker();
if (worker == null) {
// No threads available. Do nothing. The selection
// loop will keep calling this method until a
// thread becomes available. This design could
// be improved.
return;
}
// Invoking this wakes up the worker thread, then returns
worker.serviceChannel(key);
}
COM: <s> sample data handler method for a channel with data ready to read </s>
|
funcom_train/804094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("Yn00".equals(portName)) {
setYn00EndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/19318028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int readUnsignedByte() throws JMSException {
if(isBodyModifiable()) {
throw new MessageNotReadableException("BytesMessage write_only");
}
try {
return getInputStream().readUnsignedByte();
}
catch(EOFException e) {
throw new MessageEOFException("BytesMessageimpl end_of_message");
}
catch(IOException e) {
throw new JMSException(e.getMessage());
}
}
COM: <s> reads an unsigned 8 bit number from the bytes message stream </s>
|
funcom_train/39173279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void finishTraining() throws ExecutionException{
if(trainingFinished) return;
try{
keaFilter.batchFinished();
}catch(Exception e){
throw new ExecutionException(e);
}
// Get rid of instances in filter
Instance dummy;
while ((dummy = keaFilter.output()) != null) {};
trainingFinished = true;
}
COM: <s> stops the training phase and builds the actual model </s>
|
funcom_train/3389431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Vset checkCommon(Environment env, Context ctx, Vset vset, Hashtable exp) {
ClassDeclaration superClass = ctx.field.getClassDefinition().getSuperClass();
if (superClass == null) {
env.error(where, "undef.var", idSuper);
type = Type.tError;
return vset;
}
vset = super.checkValue(env, ctx, vset, exp);
type = superClass.getType();
return vset;
}
COM: <s> common code for check value and check ambig name </s>
|
funcom_train/21764739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void systemExit() {
int response = JOptionPane.showConfirmDialog(null, "Are you sure you want to exit?", "Confirm Exit", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if (response == 0) {
System.exit(0);
unregisterCallbackLocal();
}
}
COM: <s> this method system call system exit </s>
|
funcom_train/33368293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTerm(String term) throws SQLException {
if (term.equalsIgnoreCase("fall")) setTerm(FALL);
else if (term.equalsIgnoreCase("spring")) setTerm(SPRING);
else if (term.equalsIgnoreCase("summer")) setTerm(SUMMER);
else if (term.equalsIgnoreCase("winter")) setTerm(WINTER);
}
COM: <s> sets the term for this course section as a string </s>
|
funcom_train/17939668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onNotice(String target, IRCUser user, String msg) {
String nick = user.getNick();
int index = moep.getSelectedIndex();
String line = "* Notice: "+ nick +" to "+ target +": "+ msg;
moep.updateTab(index, line, moep.getOtherColor());
}
COM: <s> fired when a notice is received </s>
|
funcom_train/46378245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void makeEntityPickable(Entity entity, Node node) {
JMECollisionSystem collisionSystem = (JMECollisionSystem)
ClientContextJME.getWorldManager().getCollisionManager().
loadCollisionSystem(JMECollisionSystem.class);
CollisionComponent cc = collisionSystem.createCollisionComponent(node);
cc.setCollidable(false); // Not collidable
entity.addComponent(CollisionComponent.class, cc);
}
COM: <s> make this entity pickable by adding a collision component to it </s>
|
funcom_train/36184083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJTextFieldActionPar() {
if (jTextFieldActionPar == null) {
jTextFieldActionPar = new JTextField();
jTextFieldActionPar.setBounds(new Rectangle(5, 51, 143, 20));
}
return jTextFieldActionPar;
}
COM: <s> this method initializes j text field action par </s>
|
funcom_train/8742318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refreshActiveLayer(MapLayer mapLayer) {
ListModelList model = (ListModelList) activeLayersList.getModel();
int index = model.indexOf(mapLayer);
if (index >= 0) {
model.remove(index);
model.add(index, mapLayer);
activeLayersList.setSelectedIndex(index);
}
}
COM: <s> remove a maplayer from the active layers list and then </s>
|
funcom_train/32647452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String result = Integer.toString(this.getPriority())
+ COMPONENTDELIMITER + super.toString();
ArrayList removeFacts = this.getDeleteList();
for (int i = 0; i < removeFacts.size(); i++) {
result += COMPONENTDELIMITER
+ ((Compound) removeFacts.get(i)).toString();
}
return result;
}
COM: <s> code to string code returns the production rule as a </s>
|
funcom_train/1550365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addComposited(Collection<? extends E>... comps) {
ArrayList list = new ArrayList(Arrays.asList(this.all));
list.addAll(Arrays.asList(comps));
all = (Collection<E>[]) list.toArray(new Collection[list.size()]);
}
COM: <s> add these collections to the list of collections15 in this composite </s>
|
funcom_train/7520598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InfoMessage find(int emissor, int seq){
for(int i=0;i!=lista.size();i++)
if(((InfoMessage)lista.elementAt(i)).isEqual(emissor,seq))
return (InfoMessage)lista.elementAt(i);
return null;
}
COM: <s> finds and returns if available </s>
|
funcom_train/11319920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDataProvider(DataProvider<Option> dataProvider) {
this.dataProvider = dataProvider;
if (dataProvider != null) {
if (optionList != null) {
ClickUtils.getLogService().warn("please note that setting a"
+ " dataProvider nullifies the optionList");
}
setOptionList(null);
}
}
COM: <s> set the check list option list data provider </s>
|
funcom_train/4497272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long readUI32() throws IOException {
fillBitBuffer();
long result = bitBuffer;
fillBitBuffer();
result |= (bitBuffer << 8);
fillBitBuffer();
result |= (bitBuffer << 16);
fillBitBuffer();
result |= (bitBuffer << 24);
align();
return result;
}
COM: <s> reads an unsigned double word value </s>
|
funcom_train/51130807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getSecondsConnected() {
long lSeconds = 0L;
Date dateBegin = getBegin();
Date dateEnd = getEnd();
if (dateBegin != null && dateEnd != null) {
lSeconds = (dateEnd.getTime() - dateBegin.getTime()) / 1000;
}
return Math.max(lSeconds, 0L);
}
COM: <s> returns the total seconds of participation </s>
|
funcom_train/4918043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testShortOption() throws Exception {
this.record_Factory(COMMAND, "short", "s", true);
this.record_Command(COMMAND, "short", "s");
this.record_Argument(COMMAND, "short", "value");
this.doTest("-s value", COMMAND);
}
COM: <s> ensure can parse command with short parameter </s>
|
funcom_train/5377263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _headers(CommandInterpreter intp) throws Exception {
String nextArg = intp.nextArgument();
if (nextArg == null) {
intp.println(ConsoleMsg.CONSOLE_NO_BUNDLE_SPECIFIED_ERROR);
}
while (nextArg != null) {
AbstractBundle bundle = getBundleFromToken(intp, nextArg, true);
if (bundle != null) {
intp.printDictionary(bundle.getHeaders(), ConsoleMsg.CONSOLE_BUNDLE_HEADERS_TITLE);
}
nextArg = intp.nextArgument();
}
}
COM: <s> handle the headers command </s>
|
funcom_train/18739159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void testAlgebra() throws FormatException {
FormatErrorSet errors = new FormatErrorSet();
Map<VariableNode,List<Set<VariableNode>>> resolverMap =
createResolvers();
stabilise(resolverMap);
for (RuleNode node : resolverMap.keySet()) {
errors.add("Variable node '%s' cannot always be assigned", node);
}
errors.throwException();
}
COM: <s> tests if the algebra part of the target graph can be matched </s>
|
funcom_train/16533059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateColourPanel() {
String authorString = (String) authorList.getSelectedValue();
for(Map.Entry<Author, Color> authorColour : authorsColours.entrySet()) {
if(authorColour.getKey().toConcise().equals(authorString)) {
colourPanel.setBackground(authorColour.getValue());
return;
}
}
colourPanel.setBackground(null);
}
COM: <s> updates the colour shown in the code colour panel code to the colour </s>
|
funcom_train/28725143 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String previousResult() {
String retstr = GlobalSearchData.getSearchEngineAdapter().previousResult().getStringResult(true);
int idx = GlobalSearchData.getSearchEngineAdapter().getResultIndex();
if (resultList != null) {
resultList.setSelection(idx);
resultList.showSelection();
}
if (htmlDisplay != null && htmlDisplay.getBrowser() != null) {
String script = "highlightSearchItemID('"+idx+"')";
htmlDisplay.getBrowser().execute(script);
}
return retstr;
}
COM: <s> this function point the result index to the previous result and show the </s>
|
funcom_train/3651356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void caseALiteralTerm(ALiteralTerm node) {
Class literalClass = node.getLiteral().getClass();
String txt = null;
if (AStringLiteral.class == literalClass) {
txt = stripQuotes(node);
} else {
txt = node.toString();
}
pushResult(literalClass.getName(), txt);
}
COM: <s> translates the literal value as text into a java object </s>
|
funcom_train/9705591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void schedule(SchedulerTask schedulerTask, DeploymentIterator iterator) {
Date time = iterator.next();
if (time == null) {
schedulerTask.cancel();
} else {
synchronized (schedulerTask.lock) {
schedulerTask.state = SchedulerTask.SCHEDULED;
schedulerTask.timerTask = new SchedulerTimerTask(schedulerTask, iterator);
timer.schedule(schedulerTask.timerTask, time);
}
}
}
COM: <s> schedules the specified task for execution according to the specified schedule </s>
|
funcom_train/20774775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUsePrevPath(boolean usePrevPath) {
boolean old = this.usePrevPath;
this.usePrevPath = usePrevPath;
getPrefs().putBoolean("GestureBF2D.usePrevPath", usePrevPath);
support.firePropertyChange("usePrevPath",old,this.usePrevPath);
}
COM: <s> sets use prev path </s>
|
funcom_train/1842473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerCallEvent(Method method, EntityRef ref, Object[] args) {
Event ev = eventPool.get();
ev.time = currentSimulationTime;
ev.method = method;
ev.ref = ref;
ev.args = args;
if (Main.ASSERT)
Util.assertion(call == null);
call = ev;
callback = createEvent(currentEvent.method, currentEvent.ref,
currentEvent.args);
callState = Event.ContinuationFrame.BASE;
}
COM: <s> create and register an outgoing call event </s>
|
funcom_train/1957904 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PortDescriptor createPortDescriptor(String protocol, int port, String state) {
if (port <= 0) throw new IllegalArgumentException("Port number can not be <= 0: "+port);
if (protocol == null || state == null) throw new IllegalArgumentException("protocol and state may not be null");
Integer a = new Integer(port);
PortDescriptor b = new PortDescriptor(protocol, port, state);
portsMap.put(a, b);
return b;
}
COM: <s> create a new port descriptor and add it to the host </s>
|
funcom_train/41842569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void playPrevious() {
// stop playing current track, if playing is in progress
if (this.ap != null)
this.ap.setStopped(true);
// decrease current track counter
if (currentTrackNo > 0) // currently not playing first track -> continue with previous track
currentTrackNo--;
else // currently playing first track -> continue with last track of playlist
currentTrackNo = this.audioFiles.size() - 1;
// start playing previous track
playTrackNumber(currentTrackNo);
}
COM: <s> plays the previous track of the playlist </s>
|
funcom_train/11024493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testListReadMethod() {
try {
IndexedPropertyDescriptor descriptor =
(IndexedPropertyDescriptor)propertyUtilsBean.getPropertyDescriptor(bean, "stringList");
assertNotNull("No List Read Method", descriptor.getReadMethod());
} catch(Exception e) {
fail("Threw exception " + e);
}
}
COM: <s> test read method for a list </s>
|
funcom_train/17848374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCollapsed(final boolean collapsed) {
boolean oldCollapsed = this.collapsed;
if (collapsed && !oldCollapsed) {
doCollapse();
}
if (!collapsed && oldCollapsed) {
doExpand();
}
this.collapsed = collapsed;
firePropertyChange("collapsed", oldCollapsed, this.collapsed);
}
COM: <s> set to true to collapse this disclosure triangle container </s>
|
funcom_train/36943642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SymbolList cloneCurrent() {
SymbolList symbolPossList = new SymbolList();
for (Entry<String, SymbolElemStack> symbolEntry : possTable.entrySet()) {
String symbol = symbolEntry.getKey();
PredictSet possSet = symbolEntry.getValue().peek().getPoss();
symbolPossList.add(new SymbolListElem(symbol, possSet));
}
return symbolPossList;
}
COM: <s> clone the all symbols possible set of current scope </s>
|
funcom_train/42111266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readGenerators(BufferedReader buf) throws Exception {
// For each of the generators
for (int s = 0; s < ruleGenerators_.length; s++) {
String[] split = buf.readLine().split(
CrossEntropyExperiment.ELEMENT_DELIMITER);
// For each rule within the generators.
for (int i = 0; i < split.length; i++) {
ruleGenerators_[s].set(i, Double.parseDouble(split[i]));
}
}
}
COM: <s> reads the rule distributions from file </s>
|
funcom_train/6337933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doAction(Object object, GraphContext context) {
PersistenceManager pm = JDOHelper.getPersistenceManager(object);
if (pm != null) {
ids.put(object, pm.getObjectId(object));
pm.retrieve(object);
pm.makeTransient(object);
}
}
COM: <s> retrieves all persistent fields from data store and </s>
|
funcom_train/28773696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBackCommand() {
if (backCommand == null) {//GEN-END:|65-getter|0|65-preInit
// write pre-init user code here
backCommand = new Command("Back", Command.BACK, 0);//GEN-LINE:|65-getter|1|65-postInit
// write post-init user code here
}//GEN-BEGIN:|65-getter|2|
return backCommand;
}
COM: <s> returns an initiliazed instance of back command component </s>
|
funcom_train/5377342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void displayBanner() {
System.out.println();
System.out.print(Msg.ECLIPSE_OSGI_NAME); //$NON-NLS-1$
System.out.print(" "); //$NON-NLS-1$
System.out.println(Msg.ECLIPSE_OSGI_VERSION); //$NON-NLS-1$
System.out.println();
System.out.println(Msg.OSGI_VERSION); //$NON-NLS-1$
System.out.println();
System.out.println(Msg.ECLIPSE_COPYRIGHT); //$NON-NLS-1$
}
COM: <s> display the banner to system </s>
|
funcom_train/40360532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInvalidDateFormat() {
String pattern = "%d{xyzzy}";
String expected = "xyzzy";
try {
checkFormat(pattern, expected);
fail("Expected IllegalArgumentException to be thrown.");
} catch (IllegalArgumentException expect) {
assertTrue(expect.getMessage().startsWith("Illegal pattern character"));
}
}
COM: <s> test invalid date format </s>
|
funcom_train/17850427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeChannelMappings(ObjectOutputStream stream) throws IOException {
stream.writeInt(mChannels.keySet().size());
Iterator<Channel> it = mChannels.keySet().iterator();
while (it.hasNext()) {
Channel channel = it.next();
channel.writeData(stream);
stream.writeObject(mChannels.get(channel));
}
}
COM: <s> write the channel mappings to a stream </s>
|
funcom_train/25290096 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVpcToEc(Transform3D vpcToEc) {
if (!compatibilityModeEnable) {
throw new RestrictedAccessException(Ding3dI18N.getString("View6"));
}
if (!vpcToEc.isAffine()) {
throw new BadTransformException(Ding3dI18N.getString("View7"));
}
synchronized(this) {
compatVpcToEc.setWithLock(vpcToEc);
vDirtyMask |= View.COMPATIBILITY_MODE_DIRTY;
}
repaint();
}
COM: <s> compatibility mode method that specifies the view platform </s>
|
funcom_train/3026877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FileSummary query(PackageSummary summary, String typeName) {
Iterator iter = summary.getFileSummaries();
if (iter != null) {
while (iter.hasNext()) {
FileSummary fileSummary = (FileSummary) iter.next();
if (query(fileSummary, typeName)) {
return fileSummary;
}
}
}
return null;
}
COM: <s> checks the package to determine if it contains that type </s>
|
funcom_train/35996368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean declareNew(KVariable n3w){
Map<KVariable, ValuePair> tsb = (Map<KVariable, ValuePair>) _tableQueue.getFirst();
if( tsb.containsKey(n3w)){
return false;
}
tsb.put( n3w, new ValuePair() );
return true;
}
COM: <s> declases a new kvariable in the current scope </s>
|
funcom_train/30351593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBPStartWithWrongArg() throws Exception {
try{
this.bpManager.start(null);
fail("Start report success with null request");
}
catch(BPManagerException e){
}
catch(Exception e){
fail("WRONG exception is THROWED");
}
BPStartRequestVO request = new BPStartRequestVO();
request.setOrgName(CommonConfig.ORG_NAME);
request.setBpName(CommonConfig.BP_ID);
request.setVersion(CommonConfig.BP_VERSION);
try{
this.bpManager.start(request);
fail("Start report success with wrong orgId!");
}
catch(BPManagerException e){
}
catch(Exception e){
fail("WRONG exception is THROWED");
}
}
COM: <s> test of the business process start with legal argument </s>
|
funcom_train/3437604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireObjectAdded(Binding newBd, long changeID) {
if (namingListeners == null || namingListeners.size() == 0)
return;
NamingEvent e = new NamingEvent(eventSrc, NamingEvent.OBJECT_ADDED,
newBd, null, new Long(changeID));
support.queueEvent(e, namingListeners);
}
COM: <s> fire an object added event to registered naming listeners </s>
|
funcom_train/44223209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initProxy() {
this.vsm = new ViewStateMachine(ViewStateMachine.SERVER);
vsm.set_vGInstance(new viewGraphInstance(this.vsm.get_top().get_vGraphDef()));
String uri = "localhost/" + this.kbName;
this.vsm.set_uri( uri );
}
COM: <s> p initialize the vpdmf proxy which includes the instantiation </s>
|
funcom_train/26489612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element getElement() {
// If DOM not loaded, return null.
if (page == null)
return null;
// If template node not found, return null.
Element result = getElement("template");
if (result == null) {
logError("VirtualPortalPage.getElement: Couldn't find template node in DOM. " +
"Unable to return DOM fragment for virtual page: " + page_id);
return null;
}
// Remove the template id.
result.removeAttribute("id");
return result;
}
COM: <s> get the element that is the actual virtual page </s>
|
funcom_train/39315922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /** public void testPrintActionPerformed() {
System.out.println("testPrintActionPerformed");
//click System.out.print("click cancel ");
f.PrintActionPerformed(actionEvent);
//click System.out.print("click cancel ");
t.PrintActionPerformed(actionEvent);
//needs work
}
COM: <s> public void test status box action performed </s>
|
funcom_train/42766103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String open() {
// Create the dialog window
Shell shell = new Shell(getParent(), getStyle());
shell.setText(getText());
createContents(shell);
shell.pack();
placeDialogInCenter(getParent(), shell);
shell.open();
Display display = getParent().getDisplay();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
// Return the entered value, or null
return getJgwnlAddress();
}
COM: <s> opens the dialog and returns the input </s>
|
funcom_train/12762673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected CloudItem bottomOf(CloudItem item, boolean wrap) {
int line = lineOf(item);
if (line < 0) return null;
if (line == lines.length-1) {
if (wrap) line = -1;
else return null;
}
line++;
Rectangle bounds = item.getBounds();
int lineLocation = getLinePosition(line);
int lineHeight = getLineHeight(line);
Point center = new Point(bounds.x + bounds.width/2, lineLocation+lineHeight/2);
return findItemAt(center.x, center.y);
}
COM: <s> returns the item to the bottom of the given item if one exists </s>
|
funcom_train/2902927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeGroupData(){
if(currentGrp == null){
return;
}
File f = new File(grpPath.toString()+currentGrp.toString()+".xml");
if(f.exists()){
if(!f.delete()){
new JXError(getClass(), "Error removing group data, file="+f.getAbsolutePath());
}
}
String id = currentGrp.getHostName()+":"+currentGrp.getPort();
synchronized(grp){
grp.remove(id);
}
clearSelection();
ldialog.updateList(getGroups());
}
COM: <s> remove current group data </s>
|
funcom_train/43326400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print(Printf outfile) throws IOException {
for (int i=0; i<dimension(); i++) {
outfile.printf("%f ", min_v + (double)i * binsize);
outfile.printf("%f ", min_v + ((double)i+0.5) * binsize);
outfile.printf("%f ", min_v + (double)(i+1) * binsize);
outfile.printf("%d\n",data[i]);
}
}
COM: <s> print out bins to an open printf </s>
|
funcom_train/31204685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WOComponent addScreen() {
//ScreenTemplateSelector page = (ScreenTemplateSelector)pageWithName("ScreenTemplateSelector");
SelectPageInterface page = MC.mcfactory().selectPageForTypeTarget("pachyderm.template.component", "web", session());
page.setNextPageDelegate(new ScreenTemplateSelectorNPD());
return (WOComponent)page;
}
COM: <s> adds a feature to the screen attribute of the edit presentation page object </s>
|
funcom_train/9143662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean verifyInstance() {
Set<FieldNode> allFields = this.singletonCandidate.getAllFields();
for (FieldNode field : allFields) {
if (hasSingletonFieldProperties(field)) {
if (this.instanceField == null) {
this.instanceField = field;
} else {
addError(SingletonPatternChecker.MULTIPLE_SINGLETON_FIELDS_ERROR);
return false;
}
}
}
if (this.instanceField == null) {
addError(SingletonPatternChecker.NO_SINGLETON_FIELDS_ERROR);
return false;
}
return true;
}
COM: <s> this method checks whether there is at least one field of the </s>
|
funcom_train/49043690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectionChanged(IAction action, ISelection selection) {
this.solutions.clear();
if (selection instanceof StructuredSelection) {
StructuredSelection sel = (StructuredSelection) selection;
if (sel.size() > 0 && sel.getFirstElement() instanceof PddlSolution)
this.solutions.addAll(sel.toList());
}
updateActionText(action);
action.setEnabled(this.solutions.size() > 0);
}
COM: <s> selection in the workbench has been changed </s>
|
funcom_train/21225184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMinutes() throws IllegalStateException {
switch (getFormat()) {
case VALIDITY_PERIOD_HH_MM_SS:
/* Second octet */
return data[1];
default:
throw new IllegalStateException(
"The VP format does not correspond to VALIDITY_PERIOD_HH_MM_SS, "
+ "see the method getFormat() for more information.");
}
}
COM: <s> this will return the validity period in minutes </s>
|
funcom_train/25669316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValueOn(Object rootObject, Object value) throws MissingPropertyException {
if (rootObject == null) {
throw new IllegalArgumentException("Destination object shouldn't be null");
}
ParOrdenado<Object, Attribute> lastChainLink = getLastPropertyLinkFrom(rootObject);
Object currentObject = lastChainLink.getPrimero();
Attribute attribute = lastChainLink.getSegundo();
attribute.setValueOn(currentObject, value);
}
COM: <s> assigns passed value to destination object using the sequence of properties represented by </s>
|
funcom_train/40635630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addItem(TreeItem item) {
if (item instanceof FTPTreeItem) {
FTPTreeItem ftpTreeItem = (FTPTreeItem) item;
if (ftpTreeItem.getFTPFileItem().getType().equals("f")) {
fileItems.add(ftpTreeItem);
return;
}
super.addItem(ftpTreeItem);
}
super.addItem(item);
}
COM: <s> this is sort of a hack just so that </s>
|
funcom_train/12561555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getIdAtPointerPosition(int x, int y) {
int ret = -1;
int col = (x - wx) / cellSize;
int row = (y - wy) / cellSize;
if (col >= 0 && col < cols && row >= 0 && row < rows) {
ret = cols * row + col;
}
return ret;
}
COM: <s> helper function to determine the cell index at the x y position </s>
|
funcom_train/5676206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String OpenFileType(String s, String extension){
JFileChooser chooser = new JFileChooser();
chooser.setDialogTitle(s);
ExampleFileFilter filter = new ExampleFileFilter();
filter.addExtension(extension);
filter.setDescription(extension);
chooser.setFileFilter(filter);
int returnVal = chooser.showOpenDialog(this);
String result;
if(returnVal == JFileChooser.APPROVE_OPTION)
result = chooser.getSelectedFile().getAbsolutePath();
else
result = null;
return result;
}
COM: <s> file chooser for a given file type </s>
|
funcom_train/19054778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addComponentToSelectedMenuAt(QMenuPane menupane, int index) {
QMenu menu = getSelectedMenu();
if(menu != null) {
menu.add(index, menupane);
Vector path = new Vector();
Vector comp = new Vector();
path.add(this);
path.add(menuList);
path.add(menu);
comp.add(menupane);
insertionData = new QInsertionData(path, index, comp);
setSelectedMenuPane(menupane);
modified();
}
}
COM: <s> adds a component to a specified index in the menu list </s>
|
funcom_train/40532509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTabbedPane getJTabbedPane() {
if (jTabbedPane == null) {
jTabbedPane = new JTabbedPane();
jTabbedPane.setName("jTabbedPane");
jTabbedPane.addTab("AAA", null, getJPanel(), "");
jTabbedPane.addTab("BBB", null, getJPanel1(), null);
}
return jTabbedPane;
}
COM: <s> this method initializes j tabbed pane </s>
|
funcom_train/3702964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addOption(AccessOption option) {
//// 1. Save a ref to the AccessOption.
getTupleRef().addTuple(option.toTuple());
//// 2. Set the default option.
if (numOptions() == 1) {
setOptionSelected(option.getName());
}
else {
setOptionSelected(null);
}
} // of method
COM: <s> add an access option to this access description </s>
|
funcom_train/4286131 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSuperTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Generalization_superType_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Generalization_superType_feature", "_UI_Generalization_type"),
UmlMMPackage.Literals.GENERALIZATION__SUPER_TYPE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the super type feature </s>
|
funcom_train/2804891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeAddResourcePane(boolean OkButtonPressed) {
if (OkButtonPressed) {
localesResources.add(textField_1.getText(),textField_2.getText());
textField_1 = textField_2 = null;
tableModel.fireTableRowsInserted(localesResources.size(),localesResources.size());
table.setRowSelectionInterval(localesResources.size() -1, localesResources.size() -1);
}
popup2.setVisible(false);
popup2 = null;
}
COM: <s> close the add resource dialog box </s>
|
funcom_train/18583219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Object o1, Object o2) {
Act act1 = (Act) o1;
Act act2 = (Act) o2;
if (act1.getPkId() < act2.getPkId()){
return 1 ;
} else if (act1.getPkId() > act2.getPkId()){
return -1 ;
} else {
return 0 ;
}
}
COM: <s> this comparator acts inversely because of the requirement that </s>
|
funcom_train/21876784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void cleanCounterForModelAndThread(Model m, Thread t){
synchronized (modelTransactionCountersMap) {
if (modelTransactionCountersMap.containsKey(m)) {
HashMap threadTransactionCounterMap = ((HashMap) modelTransactionCountersMap.get(m));
threadTransactionCounterMap.remove(t);
if (0 == threadTransactionCounterMap.size()) {
modelTransactionCountersMap.remove(m);
}
}
}
}
COM: <s> clears a counter from the maps for a model and thread </s>
|
funcom_train/3118212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void displayPattern(final Pattern pattern) {
final Cursor oldCursor = getCursor();
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
if (currentPattern != null) {
backStack.push(currentPattern);
}
forwardStack.clear();
currentPattern = pattern;
displayCurrentPattern();
setCursor(oldCursor);
}
COM: <s> displays the pattern with the specified id in the browser </s>
|
funcom_train/795375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJAbort() {
if (jAbort == null) {
jAbort = new JButton();
jAbort.setText( "Annulla" );
jAbort.addActionListener( new java.awt.event.ActionListener() {
public void actionPerformed( java.awt.event.ActionEvent e ) {
JAgendaColors.this.setVisible( false );
}
});
}
return jAbort;
}
COM: <s> this method initializes j abort </s>
|
funcom_train/29938092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void compileSource(IFile file) {
BuilderUtil.checkIfCompilationCanceled(monitor);
CommandLine commandLine = BuilderUtil.getSourceCommandLine(this, file);
Builder.executeCommandLine(commandLine, project, file);
BuilderUtil.moveGeneratedFilesToBinaryFolder(this, file);
}
COM: <s> compiles a source file </s>
|
funcom_train/13848017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void testForNullElement(Object[] a) {
if(a == null) return;
for(int i=0;i<a.length;i++) {
if(a[i] == null) {
throw new NullPointerException
("input array contains at least one null element");
}//endif
}//end loop
}//end testForNullElement
COM: <s> examines the elements of the input set and upon finding at least one </s>
|
funcom_train/43245069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTrimPool() {
System.out.println("trimPool");
int newSize = 0;
ConnectionManager instance = new ConnectionManager();
instance.trimPool(newSize);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of trim pool method of class org </s>
|
funcom_train/9699928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testScriptlet() throws Exception {
cat.info("Testing scriptlet");
compileJsp("helloworld.jsp");
assertMappingFound("intValue()");
assertMappingFound("new Double(");
assertMappingFound("i = 13", "helloworld.jsf");
assertMappingMissing("HttpServletRequest");
assertMappingMissing("IOException");
assertMappingMissing("out.print");
cat.info("SUCCESS");
}
COM: <s> tests scriptlet block of java code </s>
|
funcom_train/1961407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(GAbstractRecord record) {
String ctxName = record.getContext();
ArrayList<GAbstractRecord> ctxContent = this.content.get(ctxName);
if (ctxContent == null) {
ctxContent = new ArrayList<GAbstractRecord>();
}
ctxContent.add(record);
this.content.put(ctxName, ctxContent);
if (record.getClass().equals(GMessage.class)) {
this.checkMessage((GMessage) record);
}
}
COM: <s> add a single record </s>
|
funcom_train/1864766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean checkMaximumVersion(final String desired, final int actual) {
int idesired;
if (desired.isEmpty()) {
return true;
}
try {
idesired = Integer.parseInt(desired);
} catch (NumberFormatException ex) {
requirementsError = "'maxversion' is a non-integer";
return false;
}
if (actual > 0 && idesired > 0 && actual > idesired) {
requirementsError = "Plugin is for an older version of DMDirc";
return false;
} else {
return true;
}
}
COM: <s> checks to see if the maximum version requirement of the plugin is </s>
|
funcom_train/4137826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SparseVector multiply(double r) {
if(isBinary()) {
val=new double[size()];
for(int i=0;i<size;i++) val[i]=r;
return(this);
}
for(int i=0;i<val.length;i++) {
val[i]=val[i]*r;
}
return(this);
}
COM: <s> multiplies this vector by a scalar </s>
|
funcom_train/35277993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public VehicleWheel addWheel(Vector3f connectionPoint, Vector3f direction, Vector3f axle, float suspensionRestLength, float wheelRadius, boolean isFrontWheel) {
return addWheel(null, connectionPoint, direction, axle, suspensionRestLength, wheelRadius, isFrontWheel);
}
COM: <s> add a wheel to this vehicle </s>
|
funcom_train/41016963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RedoableQTEditor () throws QTException {
super ("RedoableQTEditor");
setLayout (new BorderLayout());
QTSessionCheck.check();
movie = new Movie(StdQTConstants.newMovieActive);
controller = new MovieController (movie);
controller.enableEditing(true);
doMyLayout();
}
COM: <s> no arg constructor for new movie </s>
|
funcom_train/15491469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ImagePlus openTiff(String directory, String name) {
TiffDecoder td = new TiffDecoder(directory, name);
if (IJ.debugMode) td.enableDebugging();
FileInfo[] info=null;
try {info = td.getTiffInfo();}
catch (IOException e) {
String msg = e.getMessage();
if (msg==null||msg.equals("")) msg = ""+e;
IJ.error("TiffDecoder", msg);
return null;
}
if (info==null)
return null;
return openTiff2(info);
}
COM: <s> attempts to open the specified file as a tiff </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.