__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/46058552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InstantMessagingClient getInstantMessagingClient(String username) {
// no need to sync over whole method (get/put) since only called once per
// UserRequest and username.
// we do not sync since "new InstantMessagingClient(...)" may last quite
// long.
InstantMessagingClient client;
client = clients.get(username);
if (client == null) {
String password = getInstantMessagingCredentialForUser(username);
client = new InstantMessagingClient(username, password);
clients.put(username, client);
return client;
} else {
return client;
}
}
COM: <s> creates an new instant messaging client and connects automatically </s>
|
funcom_train/37014496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void process() throws IOException {
if (fConnections.size() > 0) {
int n = fSelector.select();
if (n > 0) {
processSelectedKeys(fSelector.selectedKeys().iterator());
}
}
//ProcesssSelectedKey could fire a Event which remove a connection, so we have to
//check it again.
if (fConnections.size() > 0) {
fContext.handleMessage(new Message(new ProcessCodeBlock(this)));
}
}
COM: <s> looks if a connection is ready for i o operations </s>
|
funcom_train/8528422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void send(String line, File destination) throws IOException {
String sapiVoiceSelection = mParams.get("sapiVoiceSelection");
if (sapiVoiceSelection != null) {
line = "<voice optional=\"" + sapiVoiceSelection + "\">" + line
+ "</voice>";
}
mLastText = line;
mWriter.write(destination.getAbsolutePath());
mWriter.write("\n");
mWriter.write(line);
mWriter.write("\n");
mWriter.flush();
}
COM: <s> sends a job to the tts </s>
|
funcom_train/444582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visitDisjunction(Disjunction expr) {
if (!body) {
addError(expr, ValidationError.AX_HEAD_ERR + ": Must not " +
"contain a Disjunction:\n" + leSerializer.serialize(expr));
}
else {
expr.getLeftOperand().accept(this);
expr.getRightOperand().accept(this);
}
}
COM: <s> checks if a disjunction is valid to wsml rule </s>
|
funcom_train/22316429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumberOfTransforms(int frame) {
SingleVOITransforms useTransform = ((this.arrayOfTransforms == null) || (frame >= this.arrayOfTransforms.length)) ? this.commonTransforms
: this.arrayOfTransforms[frame];
// System.err.println("VOITransform.getNumberOfTransforms(): from frame "+frame+" has useTransform="+useTransform);
return useTransform == null ? 0 : useTransform.size();
}
COM: <s> get the number of transforms available for a particular frame </s>
|
funcom_train/25195886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected CZTDefEntry getUnmatchedDefEntryByLocAnn(ZName zName){
Map<String, CZTDefEntry> entries = defTable.get(zName.getWord());
if (entries != null)
for (CZTDefEntry entry : entries.values()){
if (entry.matches((ZName) zName) && (entry.reallyEntry == null))
return entry;
}
return null;
}
COM: <s> utility to find a typechecker generated def entry that matches the current one </s>
|
funcom_train/16795191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unzoom() {
double imag = imp.getWindow().getInitialMagnification();
if (magnification==imag)
return;
srcRect = new Rectangle(0, 0, imageWidth, imageHeight);
ImageWindow win = imp.getWindow();
setDrawingSize((int)(imageWidth*imag), (int)(imageHeight*imag));
setMagnification(imag);
setMaxBounds();
win.pack();
setMaxBounds();
repaint();
}
COM: <s> implements the image zoom original scale command </s>
|
funcom_train/33728271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isOptEnabled(Object obj, SerializerOption opt) {
if (obj instanceof ISerializerOptionAware) {
// Get flag
Flag flag = ((ISerializerOptionAware) obj).getSerializerOption(opt);
// Check against Default first
if (flag != Flag.Default) {
return (flag == Flag.Enabled);
}
}
// Check against Enabled flag
return getSerializerOption(opt) == Flag.Enabled;
}
COM: <s> check serializer options whether given object turned on </s>
|
funcom_train/51101562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map nextObjectId(DbEntity entity) throws CayenneException {
if (!hasNextRow()) {
throw new CayenneException("An attempt to read uninitialized row or past the end of the iterator.");
}
try {
// read
Map row = readIdRow(entity);
// rewind
checkNextRow();
return row;
}
catch (SQLException sqex) {
throw new CayenneException("Exception reading ResultSet.", sqex);
}
}
COM: <s> returns a map of object id values from the next result row </s>
|
funcom_train/43233321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTeam(final Team team) throws NoValidValueException, ConsistencyException {
if (team == null) {
throw new NoValidValueException(fhdw.ipscrum.shared.constants.ExceptionConstants.NO_TEAM_SELECTED_ERROR);
} else {
if (!team.getProjects().contains(this.getProject())) {
throw new ConsistencyException(ExceptionConstants.TEAM_NOT_ASSIGNED_ERROR);
}
this.team = team;
this.changed();
}
}
COM: <s> method set team </s>
|
funcom_train/1024088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object set(Object member, Object newValue) throws IllegalArgumentException, IllegalAccessException {
if (!isWritable())
throw new IllegalStateException("Property " + propertyName + " of " + memberClass
+ " not writable");
try {
return setter.invoke(member, new Object[] { newValue });
} catch (InvocationTargetException e) {
throw new UndeclaredThrowableException(e.getTargetException());
}
}
COM: <s> sets the value of this property for the specified object </s>
|
funcom_train/3887641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addUriPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_LearningDesignType_uri_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_LearningDesignType_uri_feature", "_UI_LearningDesignType_type"),
ImsldV1p0Package.Literals.LEARNING_DESIGN_TYPE__URI,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the uri feature </s>
|
funcom_train/50081081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadModelFromUrl(URL fileURL, AbstractJChemPaintPanel panel) {
try {
IChemModel chemModel = JChemPaint.readFromFileReader(fileURL,
fileURL.toString(), null, panel);
theJcpp.setChemModel(chemModel);
} catch (Exception exception) {
theJcpp.announceError(exception);
}
}
COM: <s> loads a molecule from a url into jcp </s>
|
funcom_train/40433765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MendozaCommandResult reset(final MendozaRequest request) {
log.trace("Entering reset");
proxyMessages = new TransportProxyMessages();
MendozaResetCommand command =
new MendozaResetCommand(request, this, serverState);
command.execute();
log.trace("Leaving reset");
return command.getResult();
}
COM: <s> sets the mendoza server to the initial state </s>
|
funcom_train/37776730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void registerStatement(Statement statement, ResultSet resultSet) {
try {
ResultSet currentResultSet = (ResultSet) m_statements.get(statement);
if (currentResultSet != null && currentResultSet != resultSet)
currentResultSet.close();
} catch (SQLException e) {
// do nothing
}
m_statements.put(statement, resultSet);
}
COM: <s> adds the input statement to the map </s>
|
funcom_train/38530431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void settingGate1d(final Polygon gatePoints) {
clipPlot();
if (gatePoints.npoints > 0) {
final int xValue = gatePoints.xpoints[gatePoints.npoints - 1];
if (gatePoints.npoints > 1) {
markAreaOutline1d(
toDataHorz(gatePoints.xpoints[gatePoints.npoints - 2]),
toDataHorz(xValue));
} else {
graphics2d.drawLine(xValue, view.getBottom(), xValue,
border.top);
}
}
}
COM: <s> setting a 1d gate </s>
|
funcom_train/35356943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(Point p) {
return p.getX() >= this.nTlx && p.getX() <= this.nTlx + this.nWidth &&
p.getY() <= this.nTly && p.getY() >= this.nTly + this.nHeight;
}
COM: <s> test a point for inclusion in a rectangle including </s>
|
funcom_train/23393869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPerformancePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MatchmakerResult_performance_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_MatchmakerResult_performance_feature", "_UI_MatchmakerResult_type"),
ActionPackage.Literals.MATCHMAKER_RESULT__PERFORMANCE,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the performance feature </s>
|
funcom_train/35682615 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getHostCharset(final int ccsid) {
String num = Integer.toString(ccsid);
if (num.startsWith("11") || num.equals("37")) {
return "IBM0" + num;
}
if (num.equals("838")) {
return "IBM-Thai";
}
return "IBM" + Integer.toString(ccsid);
}
COM: <s> the java character set is derived from the ccsid </s>
|
funcom_train/25496356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getIocs() throws SQLException {
Object[] columns = {"ioc_id"};
Object[][] conditions = {{}, {}};
ResultSet set = helper.loadRows("ioc", columns, conditions, null, "ioc_id");
Vector iocs = new Vector();
while (set.next()) {
iocs.add(set.getString(1));
}
return iocs;
}
COM: <s> returns vector of string objects representing iocs </s>
|
funcom_train/6359937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object toCooked(Object obj) {
if (obj == null) return null; // shortcut
if(isCooked(obj)) return obj; // no op
if (obj instanceof JmeTreeNode) {
JmeTreeNode raw = (JmeTreeNode)obj;
return toTreeNodeBean(raw);
}
if (obj instanceof Spatial) {
Spatial raw = (Spatial)obj;
return toSceneNodeBean(raw); // handles superclass
}
return null;
}
COM: <s> adapts a model object raw or cooked to its cooked form i </s>
|
funcom_train/19333710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MAcctStatementType getStatementType ()
{
if (m_StatementType!=null && m_StatementType.getUTIL_AcctStatementType_ID()==getUTIL_AcctStatementType_ID())
return m_StatementType;
m_StatementType = new MAcctStatementType(getCtx(), getUTIL_AcctStatementType_ID(), null);
return m_StatementType;
} // getStatementType
COM: <s> get create entry for account element </s>
|
funcom_train/8362943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void informListenersAboutError(Exception e) {
setStatus(STATUS_ERROR);
// inform al listeners that execution is continued
Iterator listenersIterator = this.scraperRuntimeListeners.iterator();
while (listenersIterator.hasNext()) {
ScraperRuntimeListener listener = (ScraperRuntimeListener) listenersIterator.next();
listener.onExecutionError(this, e);
}
}
COM: <s> inform all scraper listeners that an error has occured during scraper execution </s>
|
funcom_train/41478593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUp() {
classes = new HashMap<String, PersistanceClass>();
for (int i = 1; i < 4; i++) {
PersistanceClass temp = new PersistanceClass();
temp.setName("Class" + i);
temp.setFanInCount((int) 20 * i);
temp.setFanOutCount((int) 100 / i);
classes.put(("Class" + i), temp);
}
}
COM: <s> initialize the map classes of persistance class </s>
|
funcom_train/31823729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setThumb (int value) {
checkWidget();
if (value < 1) return;
SCROLLINFO info = new SCROLLINFO ();
info.cbSize = SCROLLINFO.sizeof;
int hwnd = hwndScrollBar (), type = scrollBarType ();
info.fMask = OS.SIF_PAGE | OS.SIF_RANGE | OS.SIF_DISABLENOSCROLL;
OS.GetScrollInfo (hwnd, type, info);
info.nPage = value;
if (info.nPage != 0) info.nPage++;
SetScrollInfo (hwnd, type, info, true);
}
COM: <s> sets the size of the receivers thumb relative to the </s>
|
funcom_train/14026085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void goToInactiveMode() {
if (_lastValidSelection != null) {
_selection = _lastValidSelection;
_lastValidSelection = null;
} else {
// This should already be the case, but what's the harm in making certain?
_selection = null;
}
setTextInternal(_selection);
setSearchContentTFCaret(_searchCaret);
deactivate();
}
COM: <s> return this component to an inactive state </s>
|
funcom_train/22092946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void subRequest( String strMime ) {
_log.entering( "SymbolRequest", "subRequest( "+strMime+" )" );
filter( _iRequest, _iSubreq, strMime, c_yaNull );
_log.exiting( "SymbolRequest", "subRequest( "+strMime+" )" );
}
COM: <s> when a subreq is received with no data </s>
|
funcom_train/12565717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDisplay(final boolean newDisplay) {
if (!isInherited(PROPERTY_DISPLAY)
&& newDisplay == getDisplay()) {
return;
}
modifyingNode();
setInheritedQuiet(PROPERTY_DISPLAY, false);
setComputedDisplay(newDisplay);
propagatePackedPropertyState(PROPERTY_DISPLAY, pack & DISPLAY_MASK);
modifiedNode();
}
COM: <s> setting the display property clears its inherited flag </s>
|
funcom_train/3371022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getNumExpandedChildrenTo(int stopIndex) {
FHTreeStateNode aChild;
int retCount = stopIndex;
for(int counter = 0, maxCounter = getChildCount();
counter < maxCounter; counter++) {
aChild = (FHTreeStateNode)getChildAt(counter);
if(aChild.childIndex >= stopIndex)
return retCount;
else {
retCount += aChild.getTotalChildCount();
}
}
return retCount;
}
COM: <s> returns the number of children that are expanded to </s>
|
funcom_train/8709652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInputStream(InputStream ins) throws IOException {
byte data[] = new byte[1024];
ByteArrayOutputStream baos = new ByteArrayOutputStream();
int bytes_read = 0;
// check that we can actually read
while((bytes_read = ins.read(data)) >0)
baos.write(data, 0, bytes_read);
ins.close();
// convert the buffer into a string
// popuplate the buffer
text_buffer = baos.toString();
// place in the text area
text_area.setText(text_buffer);
}
COM: <s> set the data stream component to assume it is ready to </s>
|
funcom_train/31659121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLabelPanel(JComponent c) {
if (FormUtil.hasType(this.formModelNode.getFormItem().getParent(),
FormVocabulary.Section)) {
return;
}
this.labelPanel = new JPanel();
this.labelPanel.setLayout(new BoxLayout(this.labelPanel,
BoxLayout.X_AXIS));
this.labelPanel.setBorder(null);
addLabel(this.labelPanel);
setLabelPanelColor(this.labelPanel);
c.add(this.labelPanel);
}
COM: <s> adds the label panel </s>
|
funcom_train/14170548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getCurrentInstance(UnmarshallingContext context) {
if (context.currentObject() != null) {
return context.currentObject();
} else {
// alright we need to check if we're dealing with a plugin...
Class<?> clazz = context.getRequiredType();
if (PluginUtil.isPluginClass(clazz)) {
return PluginUtil.getInstance(clazz);
} else {
try {
return clazz.newInstance();
} catch (IllegalAccessException e) {
return null;
} catch (InstantiationException e) {
return null;
}
}
}
}
COM: <s> this method returns an instance of an object that is being unmarshalled </s>
|
funcom_train/40702737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void groupsGet(List<Long> gids, AsyncCallback<List<Group>> callback) {
Json j = new Json ().put ( "gids", gids );
callMethodRetList ( "groups.get", j.getJavaScriptObject (), Group.class, callback );
}
COM: <s> returns all visible groups according to the filters specified </s>
|
funcom_train/47509460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Tramite entity) {
EntityManagerHelper.log("saving Tramite instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved tramite entity </s>
|
funcom_train/44712813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void alphabetizeChildCategories() {
DataAssociationCursor cursor = getRelatedCategories(CHILD);
cursor.addOrder("lower(" + NAME + ")");
int count = 0;
while (cursor.next()) {
DataObject link = cursor.getLink();
link.set("sortKey", new Integer(count));
count++;
}
}
COM: <s> this alphabetizes the child categories so that they </s>
|
funcom_train/24052827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object assignIdValue(Object data, Number val, ObjectCache objectCache) throws SQLException {
Object idVal = dataPersister.convertIdNumber(val);
if (idVal == null) {
throw new SQLException("Invalid class " + dataPersister + " for sequence-id " + this);
} else {
assignField(data, idVal, false, objectCache);
return idVal;
}
}
COM: <s> assign an id value to this field </s>
|
funcom_train/25484791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Relation getMappedRelation() {
if (!fType.equals(kMultivalued) || fAttributedElement == null) return null;
Relation relation = new Relation(fAttributedElement.getName() + "_" + getName(), false);
relation.addAllKeyAttributes(fAttributedElement.getPrimaryKey());
relation.addKeyAttribute(this);
return relation;
}
COM: <s> returns the mapped relation of this attribute null when type multivalued </s>
|
funcom_train/37836122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ActionType getActionType() {
Sign sign = entity;
if (sign == null) {
// The user switched maps, but we still need a reasonable return
// value
return ActionType.LOOK;
}
String action = sign.getAction();
if (action == null) {
return ActionType.LOOK;
}
try {
return ActionType.valueOf(action.toUpperCase(Locale.ENGLISH));
} catch (IllegalArgumentException e) {
logger.error("Unknown action for sign: " + action);
return ActionType.LOOK;
}
}
COM: <s> gets the action type for the requested action </s>
|
funcom_train/1552934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCDXML() {
StringBuilder sb = new StringBuilder();
sb.append("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
sb.append("<geogebra format=\"" + GeoGebra.XML_FILE_FORMAT + "\">\n");
sb.append("<construction>\n");
for (GeoElement geo : defaultGeoElements.values()) {
geo.getXML(sb);
}
sb.append("</construction>\n");
sb.append("</geogebra>\n");
return sb.toString();
}
COM: <s> returns the xml of the default geos just used by </s>
|
funcom_train/7628934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void disableDnsCheck(boolean b) {
mDnsCheckDisabled = b;
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext());
SharedPreferences.Editor editor = sp.edit();
editor.putBoolean(DNS_SERVER_CHECK_DISABLED_KEY, b);
editor.commit();
}
COM: <s> disables the dns check i </s>
|
funcom_train/2708507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changePassword(String oldPassword, String newPassword) throws ServerExceptions {
try {
Persistence pers = getPersistence();
if (pers == null) throw new ServerExceptions ("Change Password Failed. User not logged in");
else {
pers.changePassword(oldPassword, newPassword);
}
}catch (PersistenceException e) {
throw new ServerExceptions("Change Password Failed: " +
"Unable to communicate with the database server or old password may be wrong. Verify old password is correct or try again later");
}
}
COM: <s> changes a users password </s>
|
funcom_train/25365938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addGotoIdFailPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DialogSkillTest_gotoIdFail_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DialogSkillTest_gotoIdFail_feature", "_UI_DialogSkillTest_type"),
LeveleditorPackage.Literals.DIALOG_SKILL_TEST__GOTO_ID_FAIL,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the goto id fail feature </s>
|
funcom_train/10947868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List filesOnly(Collection results) {
List list = new ArrayList(results.size());
for (Iterator it = results.iterator(); it.hasNext(); ) {
File file = (File) it.next();
if (file.isFile()) {
list.add(file);
}
}
return list;
}
COM: <s> extract the files </s>
|
funcom_train/37017901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setMBounds(int x0, int y0, int width, int height, int w, int h){
setPosition(x0, y0);
setContainerSize(width, height);
setComponentsSize(w, h);
resetBounds(false);
}
COM: <s> set the new bounds </s>
|
funcom_train/37508226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createNewAlbum() {
m_panel.setTitle("[unknown]");
m_fileAlbum = null;
((AlbumTableModel)m_panel.getTable().getModel()).clearAll();
fireAlbumCreatedEvent();
//do this at least, because when the table is cleared, a modfied
// event is fired!!
m_modified = false;
}
COM: <s> creates a new album </s>
|
funcom_train/2970063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getSkills() throws Exception {
List skills = null;
String query = "from skill in class inklings.jgatms.skill.SkillInfo";
if (sessionFactory == null)
throw new Exception("No session factory.");
try {
skills = DataUtils.getItems(sessionFactory, query);
} catch (Exception e) {
throw new Exception("Error getting skills list.", e);
}
return skills;
}
COM: <s> returns all skill objects registered in the system </s>
|
funcom_train/1571319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean close() {
if (this.connection == null)
return true; /* consider closing a closed connection OK ... */
try {
this.connection.close();
return true;
}
catch (SQLException e) {
// TBD: set lastException?
log.warn("failed to close connection", e);
return false;
}
}
COM: <s> closes the jdbc connection </s>
|
funcom_train/18366209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initPanel() throws SQLException {
//Fill Document Type Combo
cbType.setModel(STGlobal.getDocumentTypesComboModel());
cbType.repaint();
//Fill Security Class Combo with user security options
STSecurityHandler hSecurity = STGlobal.getSecurityHandler();
cbSecurityClass.setModel(STGlobal.getSecurityClassComboModel(
hSecurity.getCurrentUser().getUserRights().trim()));
cbSecurityClass.repaint();
}
COM: <s> initialise panel components </s>
|
funcom_train/9809893 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return "source[x="
+ source.x + ",y=" + source.y + ",width=" + source.width
+ ",height=" + source.height + "]" + "dest[x=" + dest.x + ",y="
+ dest.y + ",width=" + dest.width + ",height=" + dest.height + "]"
+ "scaleX=" + scaleX + ", scaleY=" + scaleY;
}
COM: <s> returns a string representation of this </s>
|
funcom_train/26335831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MapTile getMapTile( int x, int y ) {
if( x >= 0 && x < this.width &&
y >= 0 && y < this.height )
{
MapTile tile = new MapTile( this.map[x][y] );
// daylight?
if( this.outside && !this.daylight )
tile.lighted = false;
return tile;
}
// out of bounds
return null;
}
COM: <s> get map tile at coordinate </s>
|
funcom_train/13673124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInterface() throws Exception {
deleteBase(NAME);
Class1 class1 = new Class1("olivier");
Class2 class2 = new Class2(10, class1);
ODB odb = open(NAME);
odb.store(class2);
odb.close();
odb = open(NAME);
Class2 c2 = (Class2) odb.getObjects(Class2.class).getFirst();
assertEquals(class2.getNb(), c2.getNb());
assertEquals(class2.getInterface1().getName(), c2.getInterface1().getName());
odb.close();
}
COM: <s> test persistence of attributes declared by an interface </s>
|
funcom_train/5853904 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsAll(Events e) {
boolean test = false;
boolean contains = true;
Vector c = e.getAll();
Event tmp1, tmp2;
int size_c = c.size();
int size_this = events.size();
for (int i=0; i<size_c; i++) {
tmp1 = (Event)c.get(i);
for (int j=0; j<size_this; j++) {
tmp2 = (Event)events.get(j);
if (tmp1.equals(tmp2)) {
test = true;
break;
}
test = false;
} // end j for
contains = test;
} // end i for
return contains;
}
COM: <s> returns true if all the event objects in e are included in this </s>
|
funcom_train/48562193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addValidationError(String fieldName, Error error) {
List<Error> errors;
if (errorList.containsKey(fieldName))
errors = errorList.get(fieldName);
else
errors = new ArrayList<Error>();
errors.add(error);
errorList.put(fieldName, errors);
}
COM: <s> adds an validation error to the list of errors founded for the bean </s>
|
funcom_train/8096901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Filter getFilter(String rangelist) {
try {
Copy af = new Copy();
af.setAttributeIndices(rangelist);
return af;
} catch (Exception ex) {
ex.printStackTrace();
fail("Exception setting attribute range: " + rangelist
+ "\n" + ex.getMessage());
}
return null;
}
COM: <s> creates a specialized copy </s>
|
funcom_train/25329460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getValue(String[] values) {
try {
for (int i = 0; i < strings.length; i++) {
values[i] = strings[i];
}
}
catch (ArrayIndexOutOfBoundsException e) {
System.out.println(" string array lengths must match better ");
}
}
COM: <s> gets the value attribute of the mfstring object </s>
|
funcom_train/45770685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Vector cellRefEncoder(Token t) {
Vector tmpByteArray = new Vector();
tmpByteArray.add(new Byte((byte)t.getTokenID()));
byte cellRefBytes[] = encodeCellCoordinates(t.getValue());
for(int i = 0;i < cellRefBytes.length;i++) {
tmpByteArray.add(new Byte(cellRefBytes[i]));
}
return tmpByteArray;
}
COM: <s> a cell reference encoder </s>
|
funcom_train/19380876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isNewJob() {
try {
int jobId = getJobJobid();
if (jobId == -1)
return true;
else {
JobModel dsJob = new JobModel(getAppName());
dsJob.retrieve(JobModel.JOB_JOBID + "=" + jobId);
return dsJob.getRowCount() == 0;
}
} catch (Exception e) {
return true;
}
}
COM: <s> checks if the current job row is a new one </s>
|
funcom_train/9079251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startThreads() throws InterruptedException {
Code.Logger.put(this, "Starting threads");
internalThread.start();
requestFactory.start();
dma.start();
HeadLatencyGraph graph = (HeadLatencyGraph) callBack.jPanel10;
try {
disk.start();
} catch (IllegalThreadStateException e) {
disk.join();
}
}
COM: <s> start all four threads </s>
|
funcom_train/45483425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop() {
logger.debug("stop...");
final IWorkbench workbench = PlatformUI.getWorkbench();
if (workbench == null) {
logger.warn("Stop called, but workbench was null");
return;
}
final Display display = workbench.getDisplay();
logger.debug("Stopping display in a seperate thread...");
display.syncExec(new Runnable() {
public void run() {
if (!display.isDisposed()) {
workbench.close();
logger.debug("Workbench closed");
} else {
logger.warn("Workbench already closed");
}
}
});
}
COM: <s> starts the application </s>
|
funcom_train/25099064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAutosarSystemPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ImplementationLevel_autosarSystem_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ImplementationLevel_autosarSystem_feature", "_UI_ImplementationLevel_type"),
SystemmodelingPackage.Literals.IMPLEMENTATION_LEVEL__AUTOSAR_SYSTEM,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the autosar system feature </s>
|
funcom_train/42272948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append(getRank());
buffer.append(" ");
buffer.append(getTitle());
buffer.append(" ");
buffer.append(getAuthor());
return buffer.toString();
}
COM: <s> convert the book to a string </s>
|
funcom_train/17926924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Item getItemForPage(final Page page, final List<Item> items) {
for(Item i:items) {
if(i.getID().equals(page.getID())) {
return i;
}
if(i.getItems()!=null) {
final Item r=getItemForPage(page, i.getItems());
if(r!=null) {
return r;
}
}
}
return null;
}
COM: <s> returns the code item code that references the given code page code </s>
|
funcom_train/14122205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean validateForm(ActionMapping mapping, HttpServletRequest request, ActionForm form) {
ActionMessages errors = form.validate(mapping, request);
if ((errors != null) && (!errors.isEmpty())) {
if (isCancelled(request)) {
return true;
}
saveErrors(request.getSession(), errors);
return false;
}
return true;
}
COM: <s> validates form retruns true if it is ok or user clicked cancel </s>
|
funcom_train/4425871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getComponents(Set<String> components, Network network) {
for (Instance instance : network.getInstances()) {
String component = mapping.get(instance.getHierarchicalName());
if (component != null) {
components.add(component);
}
}
for (Entity entity : network.getEntities()) {
Network subNetwork = (Network) entity;
getComponents(components, subNetwork);
}
}
COM: <s> fills the components set with all the components that instance and if </s>
|
funcom_train/27711206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDynamicValidationEnabled(boolean flag) throws Exception {
fDynamicValidation = flag;
fDynamicDisabledByValidation = false;
if (!fDynamicValidation) {
if (fValidationEnabledByDynamic) {
fValidationEnabled = false;
fValidationEnabledByDynamic = false;
}
} else if (!fValidationEnabled) {
fValidationEnabled = true;
fValidationEnabledByDynamic = true;
}
fValidating = fValidationEnabled;
}
COM: <s> sets whether validation is dynamic </s>
|
funcom_train/48523910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyCertificateAvailable(Identifier id) {
Collection<IncompleteStatementInfo<Handle, Identifier>> foo = incompleteStatement.get(id);
if (foo != null) {
for (IncompleteStatementInfo<Handle, Identifier> is : foo) {
if (!is.isFinished() && is.isMissingCertificate()) {
makeProgressOnStatement(is);
}
}
}
}
COM: <s> called if we have received a certificate for a new node id </s>
|
funcom_train/33945642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Parse cleanseTable(Parse table) throws Exception {
String tag = table.tag.toLowerCase();
if(!tag.startsWith("<table")) {
throw new Exception("ERROR: Cannot find \"<table>\" tag in ParseCleanser.cleanseTable()");
}
table.parts = cleanseTableRecursively(table.parts);
return table;
}
COM: <s> cleanse table marked by lttable gt tags </s>
|
funcom_train/11322398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addStatefulFields(final Container container, final List<Field> fields) {
for (Control control : container.getControls()) {
if (control instanceof Label || control instanceof Button) {
// Skip buttons and labels
continue;
}
if (control instanceof Field) {
fields.add((Field) control);
} else if (control instanceof Container) {
Container childContainer = (Container) control;
addStatefulFields(childContainer, fields);
}
}
}
COM: <s> add fields for the given container to the specified field list </s>
|
funcom_train/7702037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkWorkingMemory(Fact fact) {
for (int i = 0; i < this.workingMemory.size(); i++) {
if (this.workingMemory.get(i).getId() == fact.getId()) {
return true;
}
}
// no fact in working memory match
return false;
}
COM: <s> check if the fact exist in current working memory </s>
|
funcom_train/48579116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getTxtReason() {
if (txtReason == null) {//GEN-END:|207-getter|0|207-preInit
// write pre-init user code here
txtReason = new TextField("Reason", null, 32, TextField.ANY);//GEN-LINE:|207-getter|1|207-postInit
// write post-init user code here
}//GEN-BEGIN:|207-getter|2|
return txtReason;
}
COM: <s> returns an initiliazed instance of txt reason component </s>
|
funcom_train/32060654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toggleMirroredSelection() {
if( selectedhullpart < 0 ) return;
if( hullparts.size() == 0 ) return;
Boolean b = partmirrored.get( selectedhullpart );
partmirrored.insertElementAt( new Boolean( ! b.booleanValue() ),
selectedhullpart );
partmirrored.remove( selectedhullpart + 1);
}
COM: <s> toggles the mirrored flag of the currently selected part </s>
|
funcom_train/37856120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void applyTextDelta(String token, String baseChecksum) throws SVNException {
if (myCurrentFile == null) {
myCurrentFile = SVNFileUtil.createUniqueFile(myTmpDirectory, "annotate", ".tmp", false);
}
myDeltaProcessor.applyTextDelta(myPreviousFile, myCurrentFile, false);
}
COM: <s> creates a temporary file for delta application </s>
|
funcom_train/785591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void damageReport(VisualItem item, Rectangle2D region) {
for ( int i=0; i<m_displays.size(); ++i ) {
Display d = getDisplay(i);
if ( d.getPredicate().getBoolean(item) ) {
d.damageReport(region);
}
}
}
COM: <s> report damage to associated displays indicating a region that will need </s>
|
funcom_train/2688639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document getSphereDefinition(String systemSphereName) {
GetSphereDefinitionCommand command = new GetSphereDefinitionCommand();
command.putArg(SC.SPHERE_ID, systemSphereName );
command.putArg(SC.SUPRA_SPHERE, systemSphereName);//systemSphereName );
command.putArg(SC.CREATE_SPHERE_DEFINITION_IF_NO_DEFINITION_FOUND, false ); // Was true but true will create definitions for p2p spheres
return command.execute(this, AbstractDocument.class);
}
COM: <s> gets the sphere definition </s>
|
funcom_train/33604375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateBounds(){
if(desiredMin.x>desiredMax.x){double temp=desiredMin.x;desiredMin.x=desiredMax.x;desiredMax.x=temp;}
if(desiredMin.y>desiredMax.y){double temp=desiredMin.y;desiredMin.y=desiredMax.y;desiredMax.y=temp;}
}
COM: <s> ensures min is really min and max is really max </s>
|
funcom_train/10836092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Session getNamespaceAwareSession(final Session session) throws RepositoryException {
if ( session == null ) { // sanity check
return null;
}
defineNamespacePrefixes(session);
// to support namespace prefixes if session.impersonate is called
// we have to use a proxy
final SessionProxyHandler localHandler = this.sessionProxyHandler;
if ( localHandler != null ) {
return localHandler.createProxy(session);
}
return session;
}
COM: <s> return a namespace aware session </s>
|
funcom_train/24558962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IWorkspace getMockWorkspace(String seed) {
IWorkspace w = new Workspace();
w.setId("Workspace.id " + seed);
w.setName("Workspace.name " + seed);
Set<IRole> roles = new HashSet<IRole>();
roles.add(getMockRole(seed));
w.setRoles(roles);
return w;
}
COM: <s> gets a mock workspace </s>
|
funcom_train/36961260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTypeContainerName() {
if (fEnclosingNames != null && fEnclosingNames.length > 0) {
StringBuffer buf= new StringBuffer();
if (fPackage.length() > 0) {
buf.append(fPackage);
}
for (int i= 0; i < fEnclosingNames.length; i++) {
if (buf.length() > 0) {
buf.append("::");
}
buf.append(fEnclosingNames[i]);
}
return buf.toString();
}
return fPackage;
}
COM: <s> gets the fully qualified type container name package name or </s>
|
funcom_train/50615078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel() {
if (jPanel == null) {
jPanel = new JPanel();
jPanel.setLayout(new BoxLayout(jPanel, BoxLayout.Y_AXIS));
jPanel.setBackground(java.awt.SystemColor.activeCaptionBorder);
jPanel.add(getSSettingRow(), null);
jPanel.add(getSSaveCancel(), null);
}
return jPanel;
}
COM: <s> this method initializes j panel </s>
|
funcom_train/1589188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Interval overlap(ReadableInterval interval) {
interval = DateTimeUtils.getReadableInterval(interval);
if (overlaps(interval) == false) {
return null;
}
long start = Math.max(getStartMillis(), interval.getStartMillis());
long end = Math.min(getEndMillis(), interval.getEndMillis());
return new Interval(start, end, getChronology());
}
COM: <s> gets the overlap between this interval and another interval </s>
|
funcom_train/3471036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTrackEnabled(boolean enabled) {
BlockType type = this.viewPanelHelper.getClickedTrack(this.rightClickPosition);
if (type != null) {
if (type.equals(BlockType.AUDIO)) {
this.parentFrame.setAudioEnabled(enabled);
} else if (type.equals(BlockType.VIDEO)) {
this.parentFrame.setVideoEnabled(enabled);
}
}
}
COM: <s> p enables disables the currently selected track </s>
|
funcom_train/9327505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SourceValidity getValidity() {
if (this.validity == null) {
// Only use the DSpaceValidity object is someone is logged in.
if (context.getCurrentUser() != null) {
try {
DSpaceValidity validity = new DSpaceValidity();
validity.add(eperson);
Group[] groups = Group.allMemberGroups(context, eperson);
for (Group group : groups) {
validity.add(group);
}
this.validity = validity.complete();
} catch (SQLException sqle) {
// Just ignore it and return invalid.
}
} else {
this.validity = NOPValidity.SHARED_INSTANCE;
}
}
return this.validity;
}
COM: <s> generate the validity object </s>
|
funcom_train/39185032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float jackknife (int gene1, double[] gene2) {
float j = 0;
for (int missing = 0; missing < genes.size(); missing++) {
if (missing == 0)
j = correlation(gene1, gene2, missing);
else
j = Math.max(j, correlation(gene1, gene2, missing));
}
return j;
}
COM: <s> returns the jacknife correlation for a gene location and an array of data </s>
|
funcom_train/21772225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCachedTermXML(String ont_url) throws IOException{
String xml = null;
init();
OntResource requested_ont = ct.getOntResource(ont_url);
String local_xml = "";
local_xml = requested_ont.getProperty(termFile).getString();
if(local_xml!=null){
BufferedReader read = new BufferedReader(new FileReader(local_xml));
if(read==null){
return xml;
}
String line = read.readLine();
xml="";
while(line!=null){
xml+=line;
line = read.readLine();
}
}
closeConnection();
return xml;
}
COM: <s> looks for a cached xml term file and returns its contents </s>
|
funcom_train/5081892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCommand(Request request) {
if (REQ_CREATE.equals(request.getType()))
return getCreateCommand((CreateRequest)request);
if (REQ_ADD.equals(request.getType()))
return getAddCommand((GroupRequest)request);
if (REQ_CLONE.equals(request.getType()))
return getCloneCommand((ChangeBoundsRequest)request);
if (REQ_ORPHAN_CHILDREN.equals(request.getType()))
return getOrphanChildrenCommand((GroupRequest)request);
return null;
}
COM: <s> overridden to check for add create and orphan </s>
|
funcom_train/25291041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPointSize(float pointSize) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_SIZE_WRITE))
throw new CapabilityNotSetException(Ding3dI18N.getString("PointAttributes0"));
if (isLive())
((PointAttributesRetained)this.retained).setPointSize(pointSize);
else
((PointAttributesRetained)this.retained).initPointSize(pointSize);
}
COM: <s> sets the point size for this appearance component object </s>
|
funcom_train/24118790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doResizeSelectedTab(Event event) {
// logger.debug(event.toString());
if (tabbox_OfficeMain.getSelectedTab() == tabOfficeDetail) {
getOfficeDetailCtrl().doFitSize(event);
} else if (tabbox_OfficeMain.getSelectedTab() == tabOfficeList) {
// resize and fill Listbox new
getOfficeListCtrl().doFillListbox();
}
}
COM: <s> resizes the container from the selected tab </s>
|
funcom_train/50074772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireScreenSizeChanged() {
if (listeners != null) {
int size = listeners.size();
for (int i = 0; i < size; i++) {
iOhioScreenListener target =
(iOhioScreenListener)listeners.elementAt(i);
target.onScreenChanged(OS_OHIO_SIZE_CHANGED, null, null);
}
}
}
COM: <s> notify all registered listeners of the on screen changed event </s>
|
funcom_train/38552975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSeverity() {
Cube42Exception entry = new Cube42Exception(
ExceptionTestCodes.TEST_CODE,
new Object[] {});
entry.setSeverity(LogSeverity.FATAL);
assertTrue("severity should be FATAL",
entry.getSeverity().equals(LogSeverity.FATAL));
entry.setSeverity(LogSeverity.INFO);
assertTrue("severity should be INFO",
entry.getSeverity().equals(LogSeverity.INFO));
}
COM: <s> test setting and getting the severity level in the cube42 runtime exception </s>
|
funcom_train/2579774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doEditChartProperties() {
ChartEditor editor = ChartEditorManager.getChartEditor(this.chart);
int result = JOptionPane.showConfirmDialog(this, editor,
localizationResources.getString("Chart_Properties"),
JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
if (result == JOptionPane.OK_OPTION) {
editor.updateChart(this.chart);
}
}
COM: <s> displays a dialog that allows the user to edit the properties for the </s>
|
funcom_train/5342000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addListeners() {
TABLE.addMouseListener(DEFAULT_LISTENER);
TABLE.getSelectionModel().addListSelectionListener(SELECTION_LISTENER);
TABLE.getTableHeader().addMouseListener(HEADER_LISTENER);
TABLE.getTableHeader().addMouseMotionListener(HEADER_LISTENER);
TABLE.addKeyListener(AUTO_NAVIGATION_KEY_LISTENER);
}
COM: <s> adds the listeners to the table </s>
|
funcom_train/47514305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ColtMatrix mult(Matrix B) {
// note could use cern.colt.matrix.linalg.Algebral.mult(A,B) instead
return new ColtMatrix(coltMat.zMult(((ColtMatrix)B).coltMat, null,
1, 0, false, false));
}
COM: <s> required b is a colt matrix </s>
|
funcom_train/9567119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean verify() throws SignatureException {
if (verified)
return verifyResult;
if (sigAttr != null) {
sig.update(sigAttr);
if (rsaData != null) {
byte msd[] = messageDigest.digest();
messageDigest.update(msd);
}
verifyResult = (Arrays.equals(messageDigest.digest(), digestAttr) && sig.verify(digest));
} else {
if (rsaData != null)
sig.update(messageDigest.digest());
verifyResult = sig.verify(digest);
}
verified = true;
return verifyResult;
}
COM: <s> verify the digest </s>
|
funcom_train/4520071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateRowScrollBar(int max, int pos, int thumbSize) {
if (_orientation == Orientation.HORIZONTAL) {
_tbvi.updateYScrollBar(max, pos, thumbSize);
} else if (_orientation == Orientation.VERTICAL) {
_tbvi.updateXScrollBar(max, pos, thumbSize);
}
}
COM: <s> update the scroll bar controlling the rows </s>
|
funcom_train/778658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(int b) throws IOException {
if (debug > 1) {
System.out.println("write "+b+" in CompressionResponseStream ");
}
if (closed)
throw new IOException("Cannot write to a closed output stream");
if (bufferCount >= buffer.length) {
flushToGZip();
}
buffer[bufferCount++] = (byte) b;
}
COM: <s> write the specified byte to our output stream </s>
|
funcom_train/16392620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add( Vertex newvertex ) throws Exception {
GraphAddVertexListener listener;
if (this.containsVertex(newvertex)) {
// vertex is already part of this graph; nothing to do
return;
}
GraphAddVertexEvent event =
new GraphAddVertexEvent(this,newvertex,null);
invokeAddVertexListeners(event,true);
addVertexUnconditionally(event);
}
COM: <s> this implementation of add vertex should not normally be </s>
|
funcom_train/10591135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canCancel(OutputStream stream) {
if (stream instanceof WebDAVSourceOutputStream) {
WebDAVSourceOutputStream wsos = (WebDAVSourceOutputStream) stream;
if (wsos.source == this) {
return wsos.canCancel();
}
}
throw new IllegalArgumentException("The stream is not associated to this source");
}
COM: <s> can the data sent to an code output stream code returned by </s>
|
funcom_train/3046398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JoinSequence createJoinSequence(boolean implicit, AssociationType associationType, String tableAlias, int joinType, String[] columns) {
JoinSequence joinSequence = createJoinSequence();
joinSequence.setUseThetaStyle( implicit ); // Implicit joins use theta style (WHERE pk = fk), explicit joins use JOIN (after from)
joinSequence.addJoin( associationType, tableAlias, joinType, columns );
return joinSequence;
}
COM: <s> generate a join sequence representing the given association type </s>
|
funcom_train/24271505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getVertices(double[] coords) {
for (int i = 0; i < numVertices; i++) {
Point3d pnt = pointBuffer[vertexPointIndices[i]].pnt;
coords[i * 3 + 0] = pnt.x;
coords[i * 3 + 1] = pnt.y;
coords[i * 3 + 2] = pnt.z;
}
return numVertices;
}
COM: <s> returns the coordinates of the vertex points of this hull </s>
|
funcom_train/11317325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Stanza getStanza(Entity client, Entity pubsub, String id, String node) {
StanzaBuilder stanzaBuilder = StanzaBuilder.createIQStanza(client, pubsub, getStanzaType(), id);
stanzaBuilder.startInnerElement("pubsub", getNamespace());
buildInnerElement(client, pubsub, stanzaBuilder, node);
stanzaBuilder.endInnerElement();
return stanzaBuilder.build();
}
COM: <s> creates a stanza wrapper for the publish subscribe extension </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.