__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/25750262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addJob(Job newJob) {
ScopeRegistry scopeReg = ScopeRegistry.getInstance();
if (newJob.isAddToRegistry()) {
String msg = scopeReg.checkIntersection(newJob.getScope());
if (msg != null)
return false;
}
// For update requests only check for queue intersections
// Allow duplicate in queue if the existing queue item is being processed
else if (scopeReg.intersectsInactiveQueue(newJob.getScope()))
return false;
addUncheckedJob(newJob);
return true;
}
COM: <s> adds the given job the indexing queue </s>
|
funcom_train/50804257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setText(final String msg) {
this.msg = msg;
try {
superSetText("<html><div color=\""+StringConverter.color2html(getForeground())+"\">loading...</div></html>");
} catch (Throwable t) {
}
new Thread() {
public void run() {
try {
superSetText("<html><div color=\""+StringConverter.color2html(getForeground())+"\">"+msg+"</div></html>");
} catch (Throwable e) {
try {
superSetText("<i>broken</i>");
} catch (Throwable t) {
}
}
}
}.start();
}
COM: <s> sets the text as html text </s>
|
funcom_train/40943706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loginClicked() {
username.setVisible(false);
loginPwd.setVisible(false);
if (username.getValue().toString().length() < 1) {
username.setValue("Anonymous");
}
mainLayout.replaceComponent(loginButton, new Label("Welcome user <em>"
+ username.getValue() + "</em>", Label.CONTENT_XHTML));
}
COM: <s> login button clicked </s>
|
funcom_train/40845501 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addRef( PuzzleDescription puzzle, MagicCube.Stickerspec sticker ) {
assert(nrefs<Macro.MAXREFS);
if( !refDeterminesUniqueOrientation( puzzle, sticker ) )
return false;
refStickers[nrefs++] = sticker;
if(nrefs == Macro.MAXREFS) {
curMacro = new Macro( puzzle.getFullPuzzleString(), refStickers );
}
return true;
}
COM: <s> adds a reference sticker to the currently open macro </s>
|
funcom_train/12786947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIteratorExample4APMustMustNot() throws SafeException, Exception {
TypestateRegressionUnit test = new TypestateRegressionUnit("j2se.typestate.iterator.IteratorExample4", 0);
test.selectTypestateRule("IteratorHasNext");
test.selectAPMustMustNotTypestateSolver();
SafeRegressionDriver.run(test);
}
COM: <s> this produces no false alarm with mmn engine the engine gets the required </s>
|
funcom_train/10625561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetWordSize() {
int version = 1;
int rounds = 5;
int wordSize = 16;
RC5ParameterSpec ps = new RC5ParameterSpec(version, rounds, wordSize);
assertTrue("The returned wordSize value should be equal to the "
+ "value specified in the constructor.",
ps.getWordSize() == wordSize);
}
COM: <s> get word size method testing </s>
|
funcom_train/28339306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UserInfo getUserInfo(Object identifier) {
UserInfo info = (UserInfo) userInfoMap.get(identifier);
if (info == null) {
log.debug("Returning null user info.");
return null;
} else {
log.debug("Returning cloned user info.");
return (UserInfo)info.clone();
}
}
COM: <s> retrieve a user info object for a user </s>
|
funcom_train/20813966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void broadcastServicesChanged(String eventTopic){
if(classes!=null && classes.size()>0){
Dictionary<String, Object> properties = new Hashtable<String, Object>();
properties.put(OSGIConstants.SERVICE_CLASS_SET, classes);
EventAdmin eadmin=getEventAdmin();
if(eadmin!=null){
eadmin.sendEvent(new Event(eventTopic,properties));
}else{
if(log.isErrorEnabled())
log.error("EventAdmin is unavailable, cannot broadcast Event!!!");
}
}
}
COM: <s> broadcast service change </s>
|
funcom_train/28158618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawGeometry(final Geometry shape, final Point pos) {
if (shape instanceof Circle) {
drawCircle((Circle) shape, pos);
} else if (shape instanceof Rectangle) {
drawRectangle((Rectangle) shape, pos);
} else if (shape instanceof Point) {
final Point p = (Point) shape;
drawPoint(p.x() + pos.y(), p.y() + pos.y());
}
}
COM: <s> draw a geometry shape </s>
|
funcom_train/51100664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDomain(DataDomain domain) {
this.dataDomains.put(domain.getName(), domain);
// inject EventManager
if (domain != null) {
domain.setEventManager(getEventManager());
}
logObj.debug("added domain: " + domain.getName());
}
COM: <s> adds new data domain to the list of registered domains </s>
|
funcom_train/22168776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StructItem addAnswer(String text, String language, float score) throws DataModelException {
StructItem result = answers.addStruct();
result.put("text", text);
result.put("language", language);
result.put("score", score);
return result;
}
COM: <s> adds an answer with the obligatory and optional fields </s>
|
funcom_train/7482605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void init(Directory directory, Analyzer analyzer, boolean create) throws CorruptIndexException, LockObtainFailedException, IOException {
this.directory = directory;
synchronized(this.directory) {
this.analyzer = analyzer;
indexWriter = new IndexWriter(directory, analyzer, create);
open = true;
}
}
COM: <s> initialize an index writer </s>
|
funcom_train/31208438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDriverName() throws SQLException {
try {
if(Trace.isEnabled()) Trace.trace(getId());
checkClosed();
String driver=meta.getDriverName();
String line="LDBC "+getFirstLine(driver);
if(Trace.isEnabled()) Trace.traceResultQuote(line);
return line;
} catch(Throwable e) {
throw convertThrowable(e);
}
}
COM: <s> gets the name of the jdbc driver </s>
|
funcom_train/32874586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int totalEncumberance() {
int iEncumberance = 0;
Iterator iter = items.values().iterator();
while(iter.hasNext()) {
Vector v = (Vector)iter.next();
Enumeration enum = v.elements();
while(enum.hasMoreElements()) {
Item i = (Item)enum.nextElement();
iEncumberance += i.getEncumberance();
}
}
return iEncumberance;
}
COM: <s> calculate the total encumberance of all the items in this container </s>
|
funcom_train/51649305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setForeground (Color value) {
checkWidget ();
if (value != null && value.isDisposed ()) {
SWT.error (SWT.ERROR_INVALID_ARGUMENT);
}
if (foreground == value) return;
if (foreground != null && foreground.equals (value)) return;
foreground = value;
if ((parent.style & SWT.VIRTUAL) != 0) cached = true;
redrawItem ();
}
COM: <s> sets the receivers foreground color to the color specified </s>
|
funcom_train/44185039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Document getDomDocument(File f) {
try {
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
return docBuilder.parse(f);
} catch (ParserConfigurationException e) {
return null;
} catch (SAXException e) {
return null;
} catch (IOException e) {
return null;
}
}
COM: <s> read a file to a dom document return null if this isnt possible </s>
|
funcom_train/20790934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isBelow(CShape after) {
if (canvas == null)
return false;
boolean hasSeenMe = false;
boolean res = false;
synchronized(canvas.displayOrder) {
for (Iterator<CShape> i = canvas.displayOrder.iterator(); i.hasNext();) {
CShape shape = i.next();
if (shape == after) {
res = hasSeenMe;
break;
} else {
if (shape == this) {
hasSeenMe = true;
}
}
}
}
return res;
}
COM: <s> tests if this shape is before another shape in the display list </s>
|
funcom_train/28355353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createMathModels() {
final int count = 3;
mathModels = new MathModel[count];
for ( int index = 0 ; index < count ; index++ ) {
String mathId = "math" + (index+1);
MathModel mathModel = new MathModel(mathId, channelModels, timeModel);
mathModels[index] = mathModel;
}
}
COM: <s> create the math models for the scope </s>
|
funcom_train/18870671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTransactionReconciled(final Transaction transaction, final Account account, final ReconciledState state) {
try {
final Transaction clone = (Transaction) transaction.clone();
clone.setReconciled(account, state);
if (removeTransaction(transaction)) {
addTransaction(clone);
}
} catch (CloneNotSupportedException e) {
logSevere("Failed to reconcile the Transaction");
}
}
COM: <s> changes the reconciled state of a transaction </s>
|
funcom_train/44782008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void keyPressed(KeyEvent e) {
// '1' is 'a', can't find any other constants for that tragically enough
if(e.stateMask == SWT.CTRL && e.character == 1) {
getText().setSelection(0,getText().getText().length());
}
}
COM: <s> implements ctrl a select all which doesnt seem to be standard in swt </s>
|
funcom_train/20244104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void hit() {
switch (status) {
case HOT:
hotHit();
break;
case COLD:
coldHit();
break;
case NONRES:
throw new IllegalStateException("Can't hit a non-resident entry!");
default:
throw new AssertionError("Hit with unknown status: " + status);
}
}
COM: <s> records a cache hit </s>
|
funcom_train/43421303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getColumnID(int column) {
int length = columnNames.length;
int selectedColumns = 0;
for (int i=0; i<length; i++) {
if (isSelectedColumn(i)) {
if (selectedColumns == column) {
selectedColumns = i;
break;
}
selectedColumns++;
}
}
return selectedColumns;
}
COM: <s> returns absolute column number identified by given visible column number </s>
|
funcom_train/24558636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IContribution createPersonalWorkspace() {
try {
IContributionService contributionService = (IContributionService) ac.getBean("contributionService");
IContribution dataSetContribution = contributionService.getDataSet(workspace,
ReservedTypes.PERSONAL_WORKSPACE_CACE_DATASET_NAME, user);
return dataSetContribution;
} catch (ContributionServiceException e) {
e.printStackTrace();
}
return null;
}
COM: <s> creates the data set </s>
|
funcom_train/26612842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getProperty( String id, boolean searchParents ) {
if (searchParents) {
RunStateImpl lookat = this;
while (lookat!=null) {
Map props = lookat.getProperties();
if ( props!=null && props.containsKey(id) )
return props.get( id );
lookat = lookat.getParentState();
}
return null;
} else {
Map props = getProperties();
if ( props!=null )
return props.get(id);
else
return null;
}
}
COM: <s> get the specified property optionally searching all the parents for the property </s>
|
funcom_train/8483614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ATObject meta_eval(ATContext ctx) throws InterpreterException {
NATTable arg = NATTable.of(valueExp_.meta_eval(ctx));
ATObject result = null;
InvocationStack stack = InvocationStack.getInvocationStack();
try {
stack.functionCalled(this, null, arg);
result = ctx.base_lexicalScope().impl_callMutator(variableName_.asAssignmentSymbol(), arg);
} finally {
stack.funcallReturned(result);
}
return result;
}
COM: <s> to evaluate a variable assignment evaluate the right hand side and ask </s>
|
funcom_train/16769877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyModified() {
if (updateCounter.get() > 0) {
// we're inside a beginUpdate...endUpdate block
return;
}
if (modified) {
// The client sent at least one update -> increase version of SO
updateVersion();
lastModified = System.currentTimeMillis();
}
if (modified && storage != null) {
if (!storage.save(this)) {
log.error("Could not store shared object.");
}
}
sendUpdates();
//APPSERVER-291
modified = false;
}
COM: <s> send notification about modification of so </s>
|
funcom_train/24512964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected List getAdditionalActions() {
Object[] actionKeys = getColumnControlActionKeys();
List actions = new ArrayList();
for (int i = 0; i < actionKeys.length; i++) {
actions.add(table.getActionMap().get(actionKeys[i]));
}
return actions;
}
COM: <s> creates and returns a list of additional actions to add to the popup </s>
|
funcom_train/35559433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void computeProbas() {
debug("computeProbas()");
// update the max and total word counts
maxWordCount = 0;
totalWordsCounts = 0;
for (Word w : selection.getWords()) {
int thisCount = w.getCount();
maxWordCount = Math.max(maxWordCount, thisCount);
totalWordsCounts += thisCount;
}
// once the indices are updated, update the probas
for (Word w : selection.getWords()) {
w.computeProba(this);
}
}
COM: <s> compute the proba of every word </s>
|
funcom_train/50141750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBytes(int parameterIndex, byte x[]) throws SQLException{
try{
ps.setBytes(parameterIndex, x);
}
catch (SQLException sqlex){
log.debug(getLogString() + " Exception: " + sqlex);
throw sqlex;
}
setContent(parameterIndex, x);
}
COM: <s> sets the designated parameter to a java array of bytes </s>
|
funcom_train/18854976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean userExists(int id) throws HibernateException {
int count = queryCountValue(" select count(*) from net.sf.jagzilla.hibernate.Profile p where p.id="+id);
log.debug("count userid: "+id+" = "+count);
return count>=1;
}
COM: <s> tells if the given user profile exists </s>
|
funcom_train/36259373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkDatabaseClose() throws CheckFailedException {
progressHandler.setActivityDescription("closing database");
try {
dbConnection.close();
} catch (final SQLException e) {
throw new CheckFailedException("database close failed with exception: " + e.getMessage());
}
dbConnection = null;
progressHandler.stepForwardByOne();
checkStop();
}
COM: <s> check the database closing </s>
|
funcom_train/5075467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int processControlCode() throws IOException {
int b;
b = is.read();
if (b != ESCAPE_CODE) {
boolean eor = (b & 1) > 0;
boolean eof = (b & 2) > 0;
if (eof) {
completed = true;
}
if (eor) {
eorMarkerIdx = 0;
b = read();
}
}
return b;
}
COM: <s> processes the control code and returns the next data byte </s>
|
funcom_train/23234156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getDamage(ConfigurableFactoryContext ctx) throws IllegalArgumentException {
String s;
if ((s = ctx.getAttribute("maximum-damage")) == null) {
return 0;
// For now, unused.. require later
// throw new IllegalArgumentException("Required attribute 'maximum-damage' missing");
}
try {
return Integer.parseInt(s);
} catch (NumberFormatException ex) {
throw new IllegalArgumentException("Invalid 'damage' attribute: " + s);
}
}
COM: <s> extract the maximum damage amount from a context </s>
|
funcom_train/11662759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getChildCollectionCount() throws XMLDBException {
checkOpen();
try {
Hashtable params = new Hashtable();
params.put(RPCDefaultMessage.COLLECTION, collPath);
Integer result = (Integer) runRemoteCommand("GetCollectionCount", params);
return result.intValue();
} catch (Exception e) {
throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e);
}
}
COM: <s> returns the number of child collections under this </s>
|
funcom_train/18730098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComponent createValueLabel(Attribute a) {
JPanel valueLabel = new JPanel();
float[] rgb = (float[]) a.getValue();
Color color = rgbToColor(rgb);
valueLabel.setOpaque(true);
Border blackline = BorderFactory.createLineBorder(Color.black);
valueLabel.setBorder(blackline);
valueLabel.setBackground(color);
return valueLabel;
}
COM: <s> create a value label </s>
|
funcom_train/47572594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getTxtTerminoDia() {
if (txtTerminoDia == null) {
txtTerminoDia = new JTextField();
txtTerminoDia.setPreferredSize(new Dimension(20, 20));
txtTerminoDia.setLocation(new Point(5, 5));
txtTerminoDia.setSize(new Dimension(20, 20));
txtTerminoDia.setToolTipText("dd/mm/yyyy");
txtTerminoDia.setText("15");
}
return txtTerminoDia;
}
COM: <s> this method initializes txt termino dia </s>
|
funcom_train/23777744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private AircraftTypeBO marshallFromForm(AircraftTypeBO oType) {
oType.setModel(this.getModel());
oType.setManufacturer(this.getManufacture());
oType.setAbbreviation(this.getShortName());
oType.setCharacteristics(this.getCharacteristics());
return oType;
}
COM: <s> marshall a reference object from the form information and </s>
|
funcom_train/49608645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertStayExtension(String username,EntityManager em,StayExtension vo) throws Throwable {
try {
JPAMethods.persist(em, username, DefaultFieldsCallabacks.getInstance(), vo);
}
catch (Throwable ex) {
Logger.error(null, ex.getMessage(), ex);
throw ex;
}
finally {
em.flush();
}
}
COM: <s> insert a stay extension </s>
|
funcom_train/28346911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getAllForShowBPMs_DiffY() {
Vector v = new Vector();
for(int i = 0, n = bpmV.size(); i < n; i++) {
RingBPM rbpm = (RingBPM) bpmV.get(i);
RingBPMtbtAvg rbpmPV = rbpm.getBPM_Y();
if(rbpmPV.show()) {
v.add(rbpmPV.getRingBPMtsDiff());
}
}
return v;
}
COM: <s> returns all ring bpms pvs with show true for y position difference </s>
|
funcom_train/49049887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean insertItemAfter (ItemType srcItem, ItemType destItem) {
// Don't do the insertion if <srcItem> is the ancestor of
// <destItem>.
//
boolean result = false;
if (isItemAncestor (srcItem, destItem) == false)
result = insertItemAfter (srcItem, destItem.getIdentifier());
return result;
} // end insertItemAfter (srcItem, destItem).
COM: <s> insert an item after the given item </s>
|
funcom_train/42134991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getName() {
String name = (String) parameterMap.get(NAME);
String note = (String) parameterMap.get(NOTE);
if (name == null) {
if (note != null) {
return note;
}
return "";
}
if (note != null) {
return name + NAME_SEPARATOR + note;
}
return name;
}
COM: <s> returns the name of the stream </s>
|
funcom_train/33776552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void locateAtChair(int pos) {
this.myPosition = pos;
this.myColor = pos;
float angle = pos/WeSketchConstants.MAX_SESSION_PARTICIPANTSF;
float angleRad=angle*360*FastMath.DEG_TO_RAD;
avModel.setLocalTranslation(FastMath.cos(angleRad)*ORIGIN_RADIUS,
9,
FastMath.sin(angleRad)*ORIGIN_RADIUS);
avModel.setLocalRotation(RotationModel.rotateY( -angle*360-90 ));
System.out.println("Located coloured avatar "+pos);
}
COM: <s> translates and orients this avatar to the specified angle </s>
|
funcom_train/1482341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void init(Directory directory, Analyzer analyzer, boolean create) throws CorruptIndexException, LockObtainFailedException, IOException {
this.directory = directory;
synchronized(this.directory) {
this.analyzer = analyzer;
indexWriter = new IndexWriter(directory, analyzer, create, IndexWriter.MaxFieldLength.LIMITED);
open = true;
}
}
COM: <s> initialize an index writer </s>
|
funcom_train/7630536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void disconnect() {
synchronized (this) {
if (mConnected) {
if (Config.LOGV) {
Log.v(TAG, "Disconnecting from Media Scanner");
}
try {
mContext.unbindService(this);
} catch (IllegalArgumentException ex) {
if (Config.LOGV) {
Log.v(TAG, "disconnect failed: " + ex);
}
}
mConnected = false;
}
}
}
COM: <s> releases the connection to the media scanner service </s>
|
funcom_train/5345659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseProxiesHeader(String str) {
str = HTTPUtils.extractHeaderValue(str);
if (_rfd.getPushAddr()==null || str==null || str.length()<12)
return;
try {
PushEndpoint.overwriteProxies(_rfd.getClientGUID(),str);
updatePEAddress();
}catch(IOException tooBad) {
// invalid header - ignore it.
}
}
COM: <s> parses the header containing the current set of push proxies for </s>
|
funcom_train/32982229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getNetworkStatus() {
if (networkStatus == null) {
networkStatus = new JTextField();
networkStatus.setBackground(Color.gray);
networkStatus.setText("Status: -");
networkStatus.setHorizontalAlignment(JTextField.CENTER);
// networkStatus.setEditable(false);
networkStatus.setEditable(false);
networkStatus.setMinimumSize(new Dimension(200, 20));
}
return networkStatus;
}
COM: <s> this method initializes network status </s>
|
funcom_train/23645201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(Atom atom, Match match) {
set(atom.getResidue());
AbstractResidue res = atom.getResidue();
substructure = res instanceof MacmolResidue ? Character.toString(((MacmolResidue)res).getAtomSubstructureCode(atom)) : null;
motifType = MotifType.PROSITE;
motif_id = match.getDatabaseId();
motif_code = match.getMotif();
begSeqId = match.getFirstResidueDatabaseId();
endSeqId = match.getLastResidueDatabaseId();
}
COM: <s> initialise the instance with values from pdb atom and the corresponding prosite motif </s>
|
funcom_train/3830376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String exportAsXML() {
StringBuffer sb = new StringBuffer ();
sb.append ("<Exception>");
Iterator it = formats.iterator ();
while (it.hasNext ()) {
sb.append ("<Format>")
.append (XMLTools.validateCDATA ((String) it.next ()))
.append ("</Format>");
}
sb.append ("</Exception>");
return sb.toString ();
}
COM: <s> returns an xml representation of this object </s>
|
funcom_train/31039589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillContextMenu(IMenuManager mng) {
IStructuredSelection selection = (IStructuredSelection) treeViewer.getSelection();
if (!selection.isEmpty()) {
Object item = selection.getFirstElement();
if (item instanceof Holder) {
SpindleFormPage page = (SpindleFormPage) getParentPage(item);
if (page != null) {
page.fillContextMenu(mng);
}
}
}
}
COM: <s> method fill context menu </s>
|
funcom_train/7427986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintAsGreek(final PPaintContext ppc) {
final Graphics2D g2 = ppc.getGraphics();
if (greekColor != null) {
g2.setBackground(greekColor);
((SWTGraphics2D) g2).fillRect(0, 0, getWidth(), getHeight());
}
}
COM: <s> paints this object as greek </s>
|
funcom_train/1304231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMaxFrequency() {
if (_maxFrequency == null) {
final DbMap onomasticon = getOnomasticon();
final FreqName freqName = doLookup(MAX_FREQ_KEY);
if (freqName != null) {
_maxFrequency = freqName.getFrequency();
}
else _maxFrequency = 0;
}
return _maxFrequency;
}
COM: <s> get the maximum frequency of any name in this onomasticon </s>
|
funcom_train/26395768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void notifyChanged(final String event, final String data) {
final Notification notification = new Notification(
"cruisecontrol." + event + ".event", this.registeredName,
nextSequence());
notification.setUserData(data);
sendNotification(notification);
LOG.debug("Sent " + event + " event.");
}
COM: <s> send a jmx notification that the list of projects has changed </s>
|
funcom_train/50585842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream getBodyInputStream()throws Exception {
byte[] bodyarray = null;
if (this.body != null) {
Vector mimetypes;
mimetypes = CodingHandler.getInstance().getBinaryMimes();
if (mimetypes.contains(this.getContentType())) {
bodyarray = Base64.decode(this.body);
}
else {
ByteArray bytearray = new ByteArray(this.body);
bodyarray = bytearray.getBytes();
}
}
return new ByteArrayInputStream(bodyarray);
}
COM: <s> httpunit requests the body content for postrequests as an input stream </s>
|
funcom_train/49995834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test
public void testProjectsNewPage() throws Exception { // NOPMD WicketTester has its own assert
// classes.
Properties testProperties = getTestProperties();
testProperties.put(ProjectBrowserProperties.AVAILABLEPAGE_KEY + PROJECTS, TRUE);
WicketTester tester = new WicketTester(new ProjectBrowserApplication(testProperties));
// Login
login(tester);
// Create new project and test it
createNewProject(tester);
}
COM: <s> test creating a new project </s>
|
funcom_train/26594856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean first() throws DException {
direction = FORWARD;
boolean leftFlag = leftIterator.first();
boolean rightFlag = rightIterator.first();
state = leftFlag ? rightFlag ?
compare(leftIterator.getColumnValues(orderLeftCD),
rightIterator.getColumnValues(orderRightCD)) <= 0 ?
FIRSTISCURRENT : SECONDISCURRENT
: ONLYFIRSTHAVEDATA
: rightFlag ? ONLYSECONDHAVEDATA
: AFTERLAST;
return state != AFTERLAST;
}
COM: <s> this method is responsible for retriving first record of union iterator </s>
|
funcom_train/27710155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInfoNodesVisible(boolean visible) {
infoNodesVisible = visible;
for (Iterator it = featureLayer.getChildrenIterator(); it.hasNext();) {
Object elem = it.next();
if (elem instanceof PFeature) {
((PFeature) elem).setInfoNodeVisible(visible);
}
}
log.debug("setInfoNodesVisible()");
rescaleStickyNodes();
}
COM: <s> sets the visibility of all infonodes </s>
|
funcom_train/17904867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireTabSelected(DockedTabEvent e) {
if (tabListeners == null || tabListeners.isEmpty()) {
return;
}
for (int i = 0, k = tabListeners.size(); i < k; i++) {
tabListeners.get(i).tabSelected(e);
}
}
COM: <s> notifies all registered listeners of a tab selected event </s>
|
funcom_train/34314418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHiddenLayers(int[] hiddenLayers) {
if (hiddenLayers != null) {
for (int value : hiddenLayers) {
if (value <= 0) {
throw new IllegalArgumentException("Invalid hidden layer topology definition. " +
"Number of neurons in hidden layer must be larger than zero.");
}
}
}
hiddenLayersTopology = hiddenLayers;
}
COM: <s> sets the topology of hidden layers for neural network </s>
|
funcom_train/16454587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeToLogManagerState(YASLLogManagerEvent event) {
int eventId = event.getEventID();
switch (eventId) {
case YASLLogManagerEvent.ID_LOGMANAGER_CLOSED:
setToInitialState();
break;
case YASLLogManagerEvent.ID_LOGMANAGER_OPENED:
setEnabled(false);
break;
}
}
COM: <s> when the log manager is closed the action will be returned </s>
|
funcom_train/49425548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insert(final char c) {
if (hasSelection()) {
text.delete(selectionStart, selectionEnd);
cursorPosition = selectionStart;
resetSelection();
}
if (maxLength == -1 || text.length() < maxLength) {
text.insert(cursorPosition, c);
cursorPosition++;
}
}
COM: <s> insert character at cursor position </s>
|
funcom_train/4468894 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void notifyGridListenersOnCellClick(int rowIndex , String colField , int colIndex){
for (Iterator<GridListener> iterator = gridListeners.iterator(); iterator.hasNext();) {
GridListener gridListener = iterator.next();
gridListener.onCellClick(this , rowIndex, colIndex , colField);
}
}
COM: <s> notifies grid listeners that a cell click occured </s>
|
funcom_train/1973816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getEval(long zobrist) {
int hashkey = (int) (zobrist % HASHSIZE) * SLOTS;
if (hashtable[hashkey + 2] == (int) (zobrist >> 32) && hashtable[hashkey + 3] == (int) (zobrist & 0xFFFFFFFF))
return ((hashtable[hashkey] & 0x3FFFF) - 0x1FFFF);
return 0;
} // END getEval
COM: <s> returns the eval at the right index if the zobrist matches </s>
|
funcom_train/3764592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String libString(Iterator extLibs) {
String endLine = System.getProperty("line.separator");
StringBuffer buf = new StringBuffer();
buf.append("<array>");
if (task.hasClasses()) {
buf.append(endLine).append("\t\t<string>").append(getJarName())
.append("</string>");
}
if (extLibs != null) {
while (extLibs.hasNext()) {
String libFile = (String) extLibs.next();
buf.append(endLine).append("\t\t<string>");
buf.append(libFile);
buf.append("</string>");
}
}
buf.append(endLine).append("\t</array>");
return buf.toString();
}
COM: <s> returns a string that can be used in info </s>
|
funcom_train/50569706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent event) {
String cmd = event.getActionCommand();
if (cmd.equals("OK")) {
// Validate the input before saving the data and closing.
if (validateInput()) {
okayToGo = true;
inputDialog.dispose();
}
} else {
inputDialog.dispose();
}
}
COM: <s> invoked by the press of a button </s>
|
funcom_train/16444915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIdPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_AbstractCmdEngineAction_id_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_AbstractCmdEngineAction_id_feature", "_UI_AbstractCmdEngineAction_type"),
EnginePackage.Literals.ABSTRACT_CMD_ENGINE_ACTION__ID,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the id feature </s>
|
funcom_train/2624383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createProject() {
icon.setIcon(new ImageIcon(getClass().getResource("/resources/Android_Busy.jpg")));
projectManagement.commitTemporary();
progressBar.setString("0/4 tasks complete");
lblStatusMessage.setText("Setting up tools");
btnRipApplication.setEnabled(false);
btnCancel.setEnabled(true);
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
// Instances of javax.swing.SwingWorker are not reusuable, so
// we create new instances as needed.
task = new Task();
task.addPropertyChangeListener(this);
task.execute();
// preliminaryGUI.resetHome();
}
COM: <s> handles the creation of the project </s>
|
funcom_train/32986847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumberOfNonHAtoms() throws Exception {
List v = this.getDBAtoms();
int k = 0;
for (int i = 0; i < v.size(); i++) {
if (!((DBAtom) v.get(i)).getSymbol().equals("H")) {
k++;
}
}
return (k);
}
COM: <s> gets the number of non h atoms of the dbmolecule object </s>
|
funcom_train/12171546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return new StringBuffer().append("x='").append(x).
append("' y='").append(y).
append("' width='").append(width).
append("' height='").append(height).append("'").toString();
}
COM: <s> for debug purposes only </s>
|
funcom_train/7440519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAdvanceDenyMethod() throws ServletException, IOException {
assertEquals(AdvanceInterceptor.RETURN, invoke("/inters2/advanceDeny/method"));
assertNull(request.getAttribute(SimpleInterceptor.AFTER_COMPLETION));
assertEquals(true, request.getAttribute(AdvanceInterceptor.AFTER_COMPLETION));
}
COM: <s> inters2 advance deny method intercepted advance </s>
|
funcom_train/45502931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public void leave( Individual individual ) throws IllegalArgumentException {
// if( !(individual.getCell() instanceof DoorCell) &&
// !(individual.getCell() instanceof ExitCell) ) {
// throw new IllegalArgumentException( "The individual is not standing on a cell, from which it can leave the Room!" );
// }
// this.leave( individual.getCell() );
// }
COM: <s> the individual defined by the parameter individual leaves the room </s>
|
funcom_train/26409151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean mouseUp(java.awt.Event evt, int x, int y) {
for (int i = 0; i < areas.length; i++) {
if (areas[i].inside(pressX, pressY)) {
areas[i].lift(x, y);
if (areas[i].terminal) {
break;
}
}
}
return true;
}
COM: <s> inform all active image areas of a mouse release </s>
|
funcom_train/36888122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteCostElement(int costElementId) throws CostElementException{
CostElementDAO costElementDAO = null;
try{
costElementDAO = new CostElementDAO();
costElementDAO.deleteCostElement(costElementId);
}
catch (CostElementException costElementException){
throw costElementException;
}
catch (Exception exception){
CostElementException costElementException = null;
exception.printStackTrace();
costElementException= new CostElementException (costElementException, CornPPException.LAYER_SERVICE,CornPPException.ACTION_DELETE);
throw costElementException;
}
}
COM: <s> delete a cost element </s>
|
funcom_train/2583506 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMs2SegmentedTimeline() {
// verify attributes set during object construction
assertEquals(1, this.ms2Timeline.getSegmentSize());
assertEquals(1, this.ms2Timeline.getStartTime());
assertEquals(2, this.ms2Timeline.getSegmentsIncluded());
assertEquals(2, this.ms2Timeline.getSegmentsExcluded());
assertEquals(this.ms2BaseTimeline, this.ms2Timeline.getBaseTimeline());
}
COM: <s> tests that the new method that created the ms2 timeline segmented </s>
|
funcom_train/15607734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEvidenceList(List lEvidenceOIDList) {
if ((lEvidenceOIDList != null) && (lEvidenceOIDList.size() > 0))
System.out.println("Attention, developer: "+
getClass().getName()+
" Not yet usable for human curated features. Consider extending!");
} // End method
COM: <s> dummied up to protect against the eventuality of a decision to use </s>
|
funcom_train/50775561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object get() {
// get "getter" method
if (getter==null)
try {
getter = obj.getClass().getMethod("get" + name, null);
} catch (Exception e1) {
try {
getter = obj.getClass().getMethod("is" + name, null);
} catch (Exception e2) {
}
}
// invoke
try {
return getter.invoke(obj,null);
} catch (Exception e) {
return null;
}
}
COM: <s> returns the value of the property </s>
|
funcom_train/39167994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkParameters() throws ResourceInstantiationException {
boolean set = null!=gazetteerName;
set &= null!=listsURL;
set&=null!=mappingURL;
if (!set) {
throw new ResourceInstantiationException("some parameters are not set (e.g.gazetteerName,"
+"listURL,mappingDefinition, document");
}
} // checkParameters
COM: <s> checks the parameters set to this gazetteer </s>
|
funcom_train/9298590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fill_collections(String [] columns) throws ConnectorConfigException{
for (int i=0; i<columns.length; i++){
String name = resolve_parameter(columns[i]);
String data = "";
BaseConnector option_connector = options.get(name);
if (option_connector==null){
option_connector = new DistinctOptionsConnector(get_connection(),db_type);
DataConfig c = new DataConfig(config);
DataRequest r = new DataRequest(request);
c.minimize(name);
option_connector.render_connector(c,r);
}
data = option_connector.render();
extra_output.append("<coll_options for='"+columns[i]+"'>");
extra_output.append(data);
extra_output.append("</coll_options>");
}
}
COM: <s> fill collections of options with data from db </s>
|
funcom_train/32791095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String handleCollSize(String collection, Guide guide) {
assert(guide != null) : "size(): guide may not be null";
guide.reset();
Template template = templateEngine.getTemplate("feature_call_size");
template.setAttribute("source", guide.getFrom());
template.setAttribute("element", guide.getSelect());
template.setAttribute("collection", collection);
return template.toString();
}
COM: <s> generates a code fragment for a size operation </s>
|
funcom_train/550417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open(File file) {
this.file = file;
fileRecordable = open(file.getAbsolutePath());
attributeTable.setSynchronizedPeriod(synchroBox.isSelected());
attributeTableModel.setSynchronizedPeriod(synchroBox.isSelected());
commandTableModel.setSynchronizedPeriod(synchroBox.isSelected());
}
COM: <s> opens a file </s>
|
funcom_train/1942461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isPluginFilter(AbstractFilter f) throws SQLException {
boolean ret = false;
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT count(*) from Plugin WHERE filter_id="+f.getDBID());
if ((rs.first()) && (rs.getInt(1) > 0)) ret = true;
stmt.close();
return ret;
}
COM: <s> check if given code filter code is used by a code plugin code </s>
|
funcom_train/31077253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDefaultScale(double scale) {
Double oldValue = new Double(this.defaultScale);
this.defaultScale = scale;
if (DEBUG) {
System.out.println("scale = " + scale);
}
Double newValue = new Double(this.defaultScale);
Object source = (this.source == null) ? this : (Object) this.source;
propertyChange(new PropertyChangeEvent(source, "defaultScale", newValue, oldValue));
}
COM: <s> sets the default scaling factor </s>
|
funcom_train/47943576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StatusModeResponse executeActionDeleteFile(String file) throws MotuRequestException {
setActionDeleteFile(file);
StatusModeResponse statusModeResponse = (StatusModeResponse) executeAsXML();
if (statusModeResponse == null) {
throw new MotuRequestException("ERROR in executeActionDeleteFile - no status response (statusModeResponse is null");
}
return statusModeResponse;
}
COM: <s> execute action delete file </s>
|
funcom_train/644327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean saveConfig() {
boolean confOk;
String fn = getConfigFilePath();
confOk = saveConfig(new File(fn));
if (confOk) {
LoggerManager.info(Constants.CONFIG_LOGGER,
rb.getString("Exit.Config.SavingTo") + ": " + fn + ".");
} else {
LoggerManager.warn(Constants.CONFIG_LOGGER,
rb.getString("Exit.Config.SavingError") + ": " + fn + ".");
}
return confOk;
}
COM: <s> saves the configuration </s>
|
funcom_train/18118645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString()
{
if (string == null)
{
StringBuffer s = new StringBuffer();
for (int i=0; i<list.length; ++i)
{
if (i > 0) s.append(' ');
s.append(list[i].encodeVal());
}
string = s.toString();
}
return string;
}
COM: <s> return space separated list of uris </s>
|
funcom_train/19887190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetQuantity() {
System.out.println("getQuantity");
testRevenueSource instance = null;
double expResult = 0.0;
double result = instance.getQuantity();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get quantity method of class edu </s>
|
funcom_train/17877486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConcurentRemoveDuringNextIteration1() {
final String[] strings = new String[] { "a", "b", "c" };
add(strings);
final Iterator<String> iterator = createIterator();
remove("a");
if (concurrentAccess()) {
final String[] strings2 = new String[] { "b", "c" };
assertContentNextToNext(strings2, 0, iterator);
} else {
assertConcurrentException(iterator);
}
}
COM: <s> remove first element after iterator creation </s>
|
funcom_train/44715980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element newChildElement(String name, String uri) {
if (m_doc == null) {
m_doc = this.m_element.getOwnerDocument();
}
Element result = new Element();
result.m_element = m_doc.createElementNS(uri, name);
this.m_element.appendChild(result.m_element);
return result;
}
COM: <s> creates a new element </s>
|
funcom_train/51344240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public void shutdown() {
if (!isOpen())
return;
if (concurrencyManager != null) {
concurrencyManager.shutdown();
// concurrencyManager = null;
}
if (localTransactionManager != null) {
localTransactionManager.shutdown();
// localTransactionManager = null;
}
if (resourceManager != null) {
resourceManager.shutdown();
// resourceManager = null;
}
super.shutdown();
}
COM: <s> polite shutdown does not accept new requests and will shutdown once the </s>
|
funcom_train/13558710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSecondaryIdentifierComponents(String[] secondaryIdentifiers) {
if (secondaryIdentifiers == null) {
this.secondaryIdentifier = null;
} else {
StringBuffer stringBuffer = new StringBuffer();
for (int i = 0; i < secondaryIdentifiers.length; i++) {
stringBuffer.append(secondaryIdentifiers[i]);
if (i < secondaryIdentifiers.length - 1) {
stringBuffer.append('<');
}
}
}
checkDigit();
}
COM: <s> sets the passport holders first names </s>
|
funcom_train/2882429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sfStart() throws SmartFrogException , RemoteException{
super.sfStart();
// System.out.println( "SLPResults Collector : Locator access point started ");
serviceURLFinder = getSearchThread((String) this.sfResolve(refThreadType),getDestination());
if (serviceURLFinder !=null) {
serviceURLFinder.start();
}
}
COM: <s> retrieve the results by launching the specified thread </s>
|
funcom_train/48336212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public STourId (int port, String userid, WidgetHandles widgets, String configFile) {
this(port, userid, false, widgets, configFile);
//this(port, userid, true, widgets, configFile);
}
COM: <s> constructor that creates a user server for user id </s>
|
funcom_train/1151806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getItemCommand19() {
if (itemCommand19 == null) {//GEN-END:|403-getter|0|403-preInit
// write pre-init user code here
itemCommand19 = new Command("Item", Command.ITEM, 0);//GEN-LINE:|403-getter|1|403-postInit
// write post-init user code here
}//GEN-BEGIN:|403-getter|2|
return itemCommand19;
}
COM: <s> returns an initiliazed instance of item command19 component </s>
|
funcom_train/23944087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void importSigningResponse(String alias, char[] password, String data) {
KeystoreManager mgr = new KeystoreManager();
mgr.load(locationPrefix + location, password());
try {
mgr.installReply(alias, password,
new ByteArrayInputStream(data.getBytes("UTF-8")),
true); // FIXME not sure
} catch (UnsupportedEncodingException ex) {
LOG.error(ex.toString(), ex);
}
mgr.save(locationPrefix + location, password());
}
COM: <s> import an rsa signing response text </s>
|
funcom_train/28672764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDefaultDestroyMethodPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BeansType_defaultDestroyMethod_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BeansType_defaultDestroyMethod_feature", "_UI_BeansType_type"),
BeansPackage.Literals.BEANS_TYPE__DEFAULT_DESTROY_METHOD,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the default destroy method feature </s>
|
funcom_train/2676886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean serviceCall(IConnection conn, IServiceCall call) {
final IContext context = conn.getScope().getContext();
if (call.getServiceName() != null) {
context.getServiceInvoker().invoke(call, context);
} else {
context.getServiceInvoker().invoke(call,
conn.getScope().getHandler());
}
return true;
}
COM: <s> remote method invokation </s>
|
funcom_train/17416278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getOk() {
if (ok == null) {
ok = new JButton();
ok.setText(java.util.ResourceBundle.getBundle("config/languages").getString("OK"));
ok.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
getMainWindow().dispose();
}
});
}
return ok;
}
COM: <s> this method initializes ok </s>
|
funcom_train/46841010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setViewTranslationScale(double x, double y, double scale) {
// m_view2D.setViewTranslation(x, y, m_panel2D.getCenterPoint());
// m_view2D.setViewScale(scale, scale, m_panel2D.getCenterPoint());
setViewTranslationX(x);
setViewTranslationY(y);
setViewScale(scale);
}
COM: <s> translation is calculated as translation x scroller xvalue kx nx and </s>
|
funcom_train/1731218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DynamicPhysicsNode makePhysicsNode(Spatial bounds) {
//Make physics node to represent plane for non-bullet collision
DynamicPhysicsNode physicsNode = physicsSpace.createDynamicNode();
bounds.setModelBound(new OrientedBoundingBox());
bounds.updateModelBound();
physicsNode.attachChild(bounds);
physicsNode.generatePhysicsGeometry();
worldNode.attachChild( physicsNode );
physicsNode.computeMass();
return physicsNode;
}
COM: <s> make a dynamic physics node representing the specified spatial </s>
|
funcom_train/22365142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getDefaultColor(String styleName) {
String retVal = "0,0,0";
if(styleName.equals(S_KEYWORD)) {
retVal = "0,0,255";
} else if(styleName.equals(S_STRING)) {
retVal = "192,0,0";
} else if(styleName.equals(S_NUMBER)) {
retVal = "0,0,0";
} else if(styleName.equals(S_ID)) {
retVal = "168,103,0";
} else if(styleName.equals(S_COMMENT)) {
retVal = "0,128,0";
}
return retVal;
}
COM: <s> return the default color as a string for the specified token style </s>
|
funcom_train/4397507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFacility() {
facility = "";
int nFacility = facilities.size();
if (nFacility != 0) {
int i = 0;
for(; i < nFacility-1; i++)
facility += facilities.get(i) + ", ";
facility += facilities.get(i);
return facility;
}
else
return facility;
}
COM: <s> getter for the pubs facilities </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.