__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/2328019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fft2Slices() {
if (content instanceof DenseLargeDComplexMatrix3D) {
if (this.isNoView == true) {
((DenseLargeDComplexMatrix3D) content).fft2Slices();
} else {
DenseLargeDComplexMatrix3D copy = (DenseLargeDComplexMatrix3D) copy();
copy.fft2Slices();
assign(copy);
}
} else {
throw new IllegalArgumentException("This method is not supported");
}
}
COM: <s> computes the 2 d discrete fourier transform dft of each slice of this </s>
|
funcom_train/39534400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JTextField getTextField(Container c){
JTextField textField=null;
for(int i=0; i<c.getComponentCount(); i++){
Component cnt=c.getComponent( i );
if(cnt instanceof JTextField){
return (JTextField)cnt ;
}
if(cnt instanceof Container){
textField=getTextField((Container)cnt) ;
if(textField!=null){
return textField;
}
}
}
return null;
}
COM: <s> returns the text field that could be found into the container </s>
|
funcom_train/29883923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image cropImage(Image img, int x, int y, int width, int height) {
Toolkit toolkit = Toolkit.getDefaultToolkit();
Image image = toolkit.createImage(new FilteredImageSource(img
.getSource(), new CropImageFilter(x, y, width, height)));
return image;
}
COM: <s> crop the tile image </s>
|
funcom_train/48982939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDisciplineInfo() {
XStream xStream = new XStream(new JettisonMappedXmlDriver());
xStream.alias("discipline", Discipline.class);
discipline = disciplineRemote.get(discipline.getId());
setInputStream(new ByteArrayInputStream(xStream.toXML(discipline).getBytes()));
return "json";
}
COM: <s> retrieves a info about a discipline in the json format </s>
|
funcom_train/43101393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isClassifierScope(Object handle) {
if (handle instanceof MAttribute) {
MAttribute a = (MAttribute) handle;
return MScopeKind.CLASSIFIER.equals(a.getOwnerScope());
}
if (handle instanceof MFeature) {
MFeature f = (MFeature) handle;
return MScopeKind.CLASSIFIER.equals(f.getOwnerScope());
}
// ...
return illegalArgumentBoolean(handle);
}
COM: <s> recognizer for attributes with classifier scope </s>
|
funcom_train/8803267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer getReasonCode() throws IOException {
Object obj = this.getExtension(PKIXExtensions.ReasonCode_Id);
if (obj == null)
return null;
else {
CRLReasonCodeExtension reasonCode = (CRLReasonCodeExtension)obj;
return (Integer)(reasonCode.get(reasonCode.REASON));
}
}
COM: <s> get reason code from crl entry </s>
|
funcom_train/17705591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void play(Key pianoKey, int oldOctaveIndex) {
int o = piano.getStartOctave() + oldOctaveIndex;
try {
Octave octave = new Octave(o);
play(pianoKey, octave);
} catch (OctaveScaleOutofBoundsException e) {
e.printStackTrace();
}
}
COM: <s> performs the actual playing of note to the nxtbrick </s>
|
funcom_train/12311444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getRemoteTypes() {
List result = new ArrayList(10);
if (defaultTypes != null && !defaultTypes.isEmpty()) {
Iterator iter= defaultTypes.iterator();
while (iter.hasNext()) {
Type type = (Type) iter.next();
if (!type.isEclipseRuntimeRequired()) {
result.add(type);
}
}
}
if (customTypes != null && customTypes.length != 0) {
result.addAll(Arrays.asList(customTypes));
}
return result;
}
COM: <s> returns the default and custom types that are relevant when there is no </s>
|
funcom_train/41164851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(CoLanguage entity) {
EntityManagerHelper.log("deleting CoLanguage instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(CoLanguage.class, entity.getLanguageId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent co language entity </s>
|
funcom_train/3472036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void read(InputStream inputStream) throws IOException {
try {
SAXBuilder builder = new SAXBuilder();
Document xmlEventRecordDocument = builder.build(inputStream);
Element rootElement = xmlEventRecordDocument.getRootElement();
addXMLTree(rootElement, "");
} catch (JDOMException ex) {
throw new IOException(
"Customization: Could not parse a given input stream.");
}
}
COM: <s> reads the customization from an input stream and stores it to </s>
|
funcom_train/18624936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMultipleTokensAllFuzzy() {
// create request object
JDOMFactory factory = new DefaultJDOMFactory();
Element request = factory.element("request");
Element any = factory.element("all");
any.addContent("fucking hell");
request.addContent(any);
Element similarity = factory.element("similarity");
similarity.addContent("0.6885496183206108");
request.addContent(similarity);
// build lucene query
Query query = new LuceneQueryBuilder(_tokenizedFieldSet, _analyzer).build(request);
// verify query
assertEquals("+(+any:fucking~0.68854964 +any:hell~0.68854964) +_isTemplate:n", query.toString());
}
COM: <s> all parameter with multiple token values and with fuzziness </s>
|
funcom_train/10619342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCLong(long[] src, int offset, int length) {
checkArraysBounds(offset, src.length, length, CLONG_SIZE == 8 ? 8 : 4);
for (int i = 0, j = offset; i < length; i++, j++) {
setCLong(i * CLONG_SIZE, src[j]);
}
}
COM: <s> this method transfers c long values from the given destination array </s>
|
funcom_train/20949468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processLocalUrls(OntModel model, ZipOutputStream zous) {
ExportVisitor visitor = new ExportVisitor(model, zous);
for (StmtIterator iter = model.listStatements((Resource) null,
RDF.type, (Resource) null); iter.hasNext();) {
Individual ii = (Individual) iter.nextStatement().getSubject().as(
Individual.class);
IRelationsModel rm = findModel(ii);
if (rm != null) {
rm.visitIndividualLocalUrls(ii, visitor);
}
}
visitor.removeOldLocalUrls();
}
COM: <s> iterates over all local urls of the code model code </s>
|
funcom_train/19977808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean writeLine(String[] text, String sep) {
String string = "";
for (int i = 0; i < text.length; i++) {
string += text[i] + sep;
}
if (!writeOnce(string.substring(0, string.length() - sep.length()))) {
return false;
}
return true;
}
COM: <s> write one line representing the given array </s>
|
funcom_train/22001627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadCommon(String setting, String value) {
if (setting.equals("buy_threshold") && !value.equals("")) {
buyThresholdTextRow.setText(value);
}
if (setting.equals("sell_threshold") && !value.equals("")) {
sellThresholdTextRow.setText(value);
}
}
COM: <s> load the thresholds preferences </s>
|
funcom_train/43885142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
if (pool != null) {
try {
this.pool.close();
pool = null;
LOGGER.fine("SDE connection pool closed. ");
} catch (Exception e) {
LOGGER.log(Level.WARNING, "Closing pool: " + e.getMessage(), e);
}
}
}
COM: <s> closes all connections in this pool </s>
|
funcom_train/25471455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected char encodeShift (char ch, int k) throws Exception{
if (!alphabet.isInAlphabet(ch))
return ch;
while (k < 0)
k += alphabet.getSize();
return cipherAlphabet.intToChar((alphabet.charToInt(ch) + k) % alphabet.getSize());
} // encodeShift
COM: <s> this method shifts a character in the alphabet ahead the specified </s>
|
funcom_train/3104225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedValues(Object[] values) {
int[] selectedIndices = new int[values.length];
for(int i = 0; i < values.length; i++) {
for(int j = 0; j < mappings.length; j++) {
if(values[i] == mappings[j])
selectedIndices[i] = j;
}
}
this.setSelectedIndices(selectedIndices);
}
COM: <s> selects appropriate elements in the list box </s>
|
funcom_train/23181757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addNewTab(Plotter plotter) {
tabs.addTab(plotter.getPlotterName(), plotter);
tabs.setTabComponentAt(tabs.getTabCount() - 1, new PlotterTabHeader(
this));
tabs.setToolTipTextAt(tabs.getTabCount() - 1, plotter.getPlotterName());
// mainGuiController.getCtrlMainFrame().getView().pack();
}
COM: <s> add new tab to tabs </s>
|
funcom_train/801742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cleanFlagReactiveCenter(IMolecule molecule){
for(int j = 0 ; j < molecule.getAtomCount(); j++)
molecule.getAtom(j).setFlag(CDKConstants.REACTIVE_CENTER, false);
for(int j = 0 ; j < molecule.getBondCount(); j++)
molecule.getBond(j).setFlag(CDKConstants.REACTIVE_CENTER, false);
}
COM: <s> clean the flags cdkconstants </s>
|
funcom_train/25069764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ExecutorService getThreadPool(String filename){
ExecutorService e=null;
for(String s: tpes.keySet()){
String searchName = new java.io.File(filename).getParent().replace("..", "");
if(s.indexOf(searchName)>=0){
Logging.log("Using Fixed Thread Pool");
e = tpes.get(s);
}
}
if(e == null){
Logging.log("Using Non Fixed Thread Pool");
e = nonfixedtpes;
}
return e;
}
COM: <s> method returns thread pool for the requesting service </s>
|
funcom_train/4359457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void deregister(String ssoId) {
if (cluster != null) {
messageNumber++;
SingleSignOnMessage msg =
new SingleSignOnMessage(cluster.getLocalMember(),
ssoId, null);
msg.setAction(SingleSignOnMessage.LOGOUT_SESSION);
cluster.sendClusterDomain(msg);
if (containerLog.isDebugEnabled())
containerLog.debug("SingleSignOnMessage Send with action "
+ msg.getAction());
}
deregisterLocal(ssoId);
}
COM: <s> notifies the cluster that a single sign on session </s>
|
funcom_train/32353571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected GPXCopyright parseCopyright(final XMLNode node) {
if (node != null) {
final String nodeName = node.getName();
if (nodeName.equals(TAGNAME_COPYRIGHT)) {
final String author = node.getAttribute(ATTRIBUTE_AUTHOR);
final String year = node.getNodeSubNodeValue(TAGNAME_YEAR);
final String license = node
.getNodeSubNodeValue(TAGNAME_LICENSE);
final GPXCopyright copyright = new GPXCopyright(author, year,
license);
return copyright;
}
}
return null;
}
COM: <s> parse the copyright tag </s>
|
funcom_train/20645565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String generateSectionLabel(final PieDataset dataset, final Comparable key) {
assert key instanceof FillerNodePieChart :
"key must be instance of FillerNodePieChart";
if ( key instanceof FillerNodePieChart ) {
FillerNodePieChart s = (FillerNodePieChart) key;
return s.getChartTitle();
}
return "??";
}
COM: <s> generates a label for a pie section </s>
|
funcom_train/29829354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void combineWithJIDPresences() {
// for all individual presences for JIDs
Enumeration jidEnum = jids.elements();
while (jidEnum.hasMoreElements()) {
BSIndividualPresenceItem newIpi = (BSIndividualPresenceItem) jidEnum.nextElement();
if (newIpi.jid == null || newIpi.presence == null) continue;
maybeUpdateResultPresence(newIpi.jid, newIpi.presence);
}
}
COM: <s> combines resultant presences according to settings for jids </s>
|
funcom_train/43097966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CR representationFor(int nIdx) {
if ((nIdx < 0) || (nIdx >= theMAlConstraints.size())) {
return null;
}
Object/*MConstraint*/ mc = theMAlConstraints.get(nIdx);
if (mc != null) {
return new CR(mc, nIdx);
}
return new CR(nIdx);
}
COM: <s> create a representation adapter for the given constraint </s>
|
funcom_train/35019676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getVersion() {
String version = null;
Properties props = new Properties();
InputStream is = ClassLoader.getSystemResourceAsStream("version.properties");
try {
props.load(is);
version = props.getProperty("version");
} catch (IOException ioe) {
ioe.printStackTrace();
}
return version;
}
COM: <s> get the version number of the product from the properties file </s>
|
funcom_train/29611232 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setScope(String scope) {
try {
this.scope = ContainerScope.valueOf(scope.toUpperCase());
} catch (IllegalArgumentException e) {
this.scope = ContainerScope.REQUEST;
throw(new IllegalArgumentException("Component tag accepts scopes: REQUEST, SESSION and APPLICATION"));
}
}
COM: <s> sets the scope </s>
|
funcom_train/51357685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean complete() {
LOG.info("Test if Complete");
if ((jarFile != null) && (jadFile != null)) {
LOG.info("Complete!");
return true;
}
if (jarFile == null) {
LOG.info("Missing Jar File");
}
if (jadFile == null) {
LOG.info("Missing Jad File");
}
return false;
}
COM: <s> returns true if both the jar and jad file have been set </s>
|
funcom_train/9727303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ParamValueHolder getValue(RSLInstance rsl, RSLParam rslparam, SLParamHolder param) throws RIBException {
ParameterAssignment pa = param.checkHashtable(parameterAssignments);
if (pa != null)
return pa.getValue(rsl, rslparam, param);
else
return new ParamValueHolder();
}
COM: <s> get the value assigned to a given named parameter </s>
|
funcom_train/33232560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void componentChanged () {
// retrieve colour values from each of the components
for (int index = 0; index < ColorInput.COMPONENT_COUNT; index++) {
this.color[index] = this.componentSlider[index].getComponentValue();
}
// tell our colour display to change accordingly
this.colorDisplay.setColor(color);
// tell the color mixer to remix
this.mixFrame.mixColors();
}
COM: <s> delegate method to be called by the component sliders whenever they </s>
|
funcom_train/45347212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Category getCategoryById(Long id) {
// cia tik developinant del patogumo, kad nereiktu perkraut programos
if (allCategories == null || sortedCategories == null) {
buildCategories();
}
Category categoryToReturn = null;
for (Category category : allCategories) {
if (category.getId().equals(id)) {
categoryToReturn = category;
}
}
return categoryToReturn;
}
COM: <s> gets category by given id </s>
|
funcom_train/39396875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFileName() throws MessagingException {
String filename = null;
String header = getHeader(MimeBodyPart.CONTENT_DISPOSITION_NAME,null);
if (header != null) {
ContentDisposition cd = new ContentDisposition(header);
filename = cd.getParameter("filename");
}
if (filename == null) {
header = getHeader(MimeBodyPart.CONTENT_TYPE_NAME,null);
if (header != null) {
ContentType contentType = new ContentType(header);
filename = contentType.getParameter("name");
}
}
return filename;
}
COM: <s> returns the filename associated with this message </s>
|
funcom_train/15605808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseReleased(MouseEvent e) {
if (e.isPopupTrigger() && (e.getSource() instanceof JTextComponent)) {
JTextComponent component = (JTextComponent) e.getSource();
displayMenuAt(e.getPoint(), component);
} // Will present the menu.
} // End method: mouseReleased
COM: <s> override of mouse released </s>
|
funcom_train/5797853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRandomEvent() throws Exception {
SecurityAuthenticationEventOnmsEventBuilder builder = new SecurityAuthenticationEventOnmsEventBuilder();
builder.setEventProxy(m_eventProxy);
builder.afterPropertiesSet();
m_mocks.replayAll();
builder.onApplicationEvent(new TestApplicationEvent("Hello!"));
m_mocks.verifyAll();
}
COM: <s> this shouldnt trigger an open nms event </s>
|
funcom_train/3411300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void insertNoInvalidate(String item, int index) {
if (item == null) {
throw new
NullPointerException("cannot add null item to Choice");
}
pItems.insertElementAt(item, index);
ChoicePeer peer = (ChoicePeer)this.peer;
if (peer != null) {
peer.addItem(item, index);
}
// no selection or selection shifted up
if (selectedIndex < 0 || selectedIndex >= index) {
select(0);
}
}
COM: <s> inserts an item to this code choice code </s>
|
funcom_train/48906451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shuffle() {
Random randomNumberGenerator = new Random();
for(int i = 0; i < size(); i++) {
Card aRandomCard = _cards.remove(randomNumberGenerator.nextInt(size() - _nextCard) + _nextCard);
_cards.add(randomNumberGenerator.nextInt(size() - _nextCard) + _nextCard , aRandomCard);
}
Collections.shuffle(_cards);
}
COM: <s> shuffles this deck </s>
|
funcom_train/19423659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean notifyForgotPassword(User profile, String newPassword) {
boolean result = false;
String noticeId = "forgotpassword";
Map sourceData = new HashMap();
sourceData.put("useName", profile.getPerson().getUseName());
sourceData.put("password", newPassword);
String sendTo = getPrimaryEmail(profile);
if (!StringUtils.nullOrBlank(sendTo)) {
EaasyStreet.notify(sendTo, noticeId, sourceData);
result = true;
}
return result;
}
COM: <s> notify forgot password </s>
|
funcom_train/11040584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBigInteger() {
List l = new ArrayList();
l.add("23445");
l.add("23446");
l.add("23456646");
l.add("1113646");
Object convertedObj = ConverterUtil.convertToArray(
BigInteger.class, l);
assertTrue(convertedObj.getClass().isArray());
assertTrue(convertedObj.getClass().equals(BigInteger[].class));
}
COM: <s> test conversion of big integer </s>
|
funcom_train/11362899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unbindService(TradeServices tradeServices, Map props) {
if (Log.doTrace())
Log.trace("TradeServicesManagerImpl:unbindService()", tradeServices, props);
if (tradeServices != null) {
String mode = (String) props.get("mode");
tradeServicesList[Enum.valueOf(TradeConfig.ModeType.class, mode).ordinal()] = null;
}
}
COM: <s> unbind a trade services implementation </s>
|
funcom_train/44287322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void xmlIn(String uri, FactoryWriterXML out, boolean validating) {
try {
xmlIn(new InputSource(uri), out, validating);
} catch (SAXException e) {
System.err.println(uri.toString());
xmlException(e);
}
}
COM: <s> runs the parser based on an uri </s>
|
funcom_train/25370190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWrappedAlgorithm(Object algorithm) {
if (!(algorithm instanceof com.sodad.weka.filters.Filter)) {
throw new IllegalArgumentException(algorithm.getClass()+" : incorrect "
+"type of algorithm (Filter)");
}
setFilter((com.sodad.weka.filters.Filter)algorithm);
}
COM: <s> set the filter to be wrapped by this bean </s>
|
funcom_train/48195889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFieldValue(String name) throws FieldNotFoundException {
if ((getFormField(name)) != null) {
if (getFormField(name).getFieldValue() != null) {
return getFormField(name).getFieldValue();
} else {
return "Empty Field!";
}
}
throw new FieldNotFoundException("The Parameter field you are looking for does not exist.");
}
COM: <s> returns the value of a field or thows an exceptions </s>
|
funcom_train/45451805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void validateOrganizationIndex(final ActionErrors errors) {
if (organizationIndex == null) {
errors.add("organization", new ActionError("AdminForm.organizationRequired"));
return;
}
try {
getOrganizationIndexValue();
} catch (NumberFormatException e) {
errors.add("organization", new ActionError("AdminForm.organizationRequired"));
return;
}
}
COM: <s> validates the organization by making it required and a number </s>
|
funcom_train/3641175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void controlSignalChanged(Object signal) {
// logger.info("CO: " + signal);
for (Iterator<ThermostatListener> i = new CollectionSynchronizer<ThermostatListener>().copy(listenerSet).iterator(); i.hasNext();)
{
i.next().controlSignalChanged(this, signal);
}
}
COM: <s> broadcast the notification about the </s>
|
funcom_train/48749724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void calculateHandlerName(String stateName) {
FastStringBuffer fsb = new FastStringBuffer(stateName.length() + 8);
fsb.append("run");
fsb.append(Character.toUpperCase(stateName.charAt(0)));
fsb.append(stateName.substring(1));
fsb.append("State");
handlerName = fsb.toString();
}
COM: <s> calculates the appropriate method name based upon the name of the state </s>
|
funcom_train/41755669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean eval(Map<String, Object> context) {
try{
Map<String, Object> contextOgnl = Ognl.createDefaultContext(null);
contextOgnl.putAll(context);
Object result = Ognl.getValue(this.conditionRoot, contextOgnl);
if(result instanceof Boolean){
return (Boolean) result;
} else {
return false;
}
} catch (Exception e) {
// no log exception
return false;
}
}
COM: <s> evaluate the condition based on a context </s>
|
funcom_train/12712360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getString( String key ) {
if( !loaded ) {
log.info( "Lazily loading dictionary from XLIFF file" );
load();
}
if( containsKey( key ) ) {
TransUnit tu = get( key );
return tu.getTarget();
}
log.warn( String.format( "Missing key %s", key ) );
return key;
}
COM: <s> retrieve one value from the dictionary </s>
|
funcom_train/34197604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deletePermission(final List<Permission> permissions) {
getJpaTemplate().execute(new JpaCallback() {
public Object doInJpa(EntityManager entityManager) throws PersistenceException {
for (Permission permission :permissions) {
Permission p = entityManager.merge(permission);
entityManager.remove(p);
}
return null;
}
});
}
COM: <s> delete all the code permissions code </s>
|
funcom_train/43245935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetMothersMaidenName() {
System.out.println("getMothersMaidenName");
PatientDataObject instance = new PatientDataObject();
String expResult = "";
String result = instance.getMothersMaidenName();
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 mothers maiden name method of class org </s>
|
funcom_train/17783730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeConversation(Conversation conv) {
for (int i=0; i < conv.getIdentities().size(); i++) {
java.util.List<Conversation> convs=m_conversations.get(conv.getIdentities().get(i));
if (convs != null) {
convs.remove(conv);
if (convs.size() == 0) {
m_conversations.remove(conv.getIdentities().get(i));
}
}
}
}
COM: <s> this method removes the supplied conversation instance </s>
|
funcom_train/33428561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loop() {
if(_closingMenu) {
if(Rokon.time > _closingMenuTimeout) {
if(_closingMenuNext == null)
_rokon.removeMenu();
else {
_rokon.freeze();
_rokon.showMenu(_closingMenuNext);
}
onExit();
}
return;
}
for(a = 0; a < _menuObjects.length; a++)
if(_menuObjects[a] != null)
_menuObjects[a].loop();
if(_startTransition != null)
_startTransition.loop();
if(_exitTransition != null)
_exitTransition.loop();
}
COM: <s> used to manage animations and sprites called every time frame renders </s>
|
funcom_train/29031522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long waitFromInitToThis100ms() {
int timeToWaitInMilliS = 100;
long diff = 0;
if (System.currentTimeMillis() < (timeAtStart + timeToWaitInMilliS)) {
diff = System.currentTimeMillis() - timeAtStart;
do {
try {
Thread.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
}
} while ((timeAtStart + timeToWaitInMilliS) >= System.currentTimeMillis());
}
return diff;
}
COM: <s> method waits than 2000m secs since initialize core was called </s>
|
funcom_train/12781813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void and(FixedSizeBitVector set) {
if (set == null) {
throw new IllegalArgumentException("null set");
}
if (this == set) {
return;
}
int n = bits.length;
for (int i = n; i-- > 0;) {
bits[i] &= set.bits[i];
}
}
COM: <s> logically ands this bit set with the specified set of bits </s>
|
funcom_train/40826489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawDisplay(SimGraphics arg0) {
if( this.image == null ){
try {
this.image = ImageIO.read( new File( backPath ) );
}
catch ( IOException e ) {
System.err.print( "Error reading the water image!" );
}
}
if( this.view )
arg0.getGraphics().drawImage( image, 0, 0, null );
}
COM: <s> draws the background map </s>
|
funcom_train/20977907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getArrowPreferredSize(int direction) {
switch (direction) {
case NORTH:
return up.getPreferredSize();
case SOUTH:
return down.getPreferredSize();
case WEST:
return left.getPreferredSize();
case EAST:
return right.getPreferredSize();
default:
throw new Error("Invalid direction " + direction);
}
}
COM: <s> gets the arrow preferred size attribute of the gtk scrollbar object </s>
|
funcom_train/24039305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ImageIcon getIcon(String imageName) {
File iconpath = new File("images" + File.separator + imageName + ".png");
if (iconpath.exists()) {
return new ImageIcon(iconpath.getAbsolutePath());
}
else {
System.err.println("Couldn't find icon: " + iconpath.getAbsolutePath());
log("Couldn't find icon: " + iconpath.getAbsolutePath(), this);
return null;
}
}
COM: <s> get an icon of </s>
|
funcom_train/10628827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUnscaledValue() {
String a = "1231212478987482988429808779810457634781384756794987";
int aScale = 100;
BigInteger bNumber = new BigInteger(a);
BigDecimal aNumber = new BigDecimal(bNumber, aScale);
assertTrue("incorrect unscaled value", aNumber.unscaledValue().equals(bNumber));
}
COM: <s> check the unscaled value </s>
|
funcom_train/43106803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void setTabDelegate(final JTabbedPane p, final int num_tabs) {
change_tab = new D<Integer>() {
public void call(Integer index) {
// force a switch if necessary
if(p.getSelectedIndex() == index)
p.setSelectedIndex((index+1) % num_tabs);
p.setSelectedIndex(index);
}
};
}
COM: <s> a delegate that will force a change tab </s>
|
funcom_train/47546348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void redraw () {
checkWidget();
if (!OS.GTK_WIDGET_VISIBLE (topHandle ())) return;
forceResize ();
int /*long*/ paintHandle = paintHandle ();
int width = OS.GTK_WIDGET_WIDTH (paintHandle);
int height = OS.GTK_WIDGET_HEIGHT (paintHandle);
redrawWidget (0, 0, width, height, false);
}
COM: <s> causes the entire bounds of the receiver to be marked </s>
|
funcom_train/41441228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeNamingBindings() {
ActivityContextNamingFacility acf = sleeContainer
.getActivityContextNamingFacility();
for (Object obj : cacheData.getNamesBoundCopy()) {
String aciName = (String) obj;
try {
acf.removeName(aciName);
} catch (Exception e) {
logger.warn("failed to unbind name: " + aciName + " from ac:"
+ getActivityContextHandle(), e);
}
}
}
COM: <s> this is called to release all the name bindings after the activity end </s>
|
funcom_train/18305194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireSubjectUpdatedListeners(String subject, String from) {
SubjectUpdatedListener[] listeners = null;
synchronized (subjectUpdatedListeners) {
listeners = new SubjectUpdatedListener[subjectUpdatedListeners.size()];
subjectUpdatedListeners.toArray(listeners);
}
for (int i = 0; i < listeners.length; i++) {
listeners[i].subjectUpdated(subject, from);
}
}
COM: <s> fires subject updated listeners </s>
|
funcom_train/45935979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void generateTree(List list, Hierarchy section) {
if (list.size() > 0) {
ClassDoc firstClassDoc = (ClassDoc) list.get(0);
println(new TagBuilder("h2").add("id", section.id).getOpenTextClose(
section.heading));
indent = 0;
generateLevelInfo(!firstClassDoc.isInterface()
? firstClassDoc
: null, list, list == CONF.classTree.baseEnums());
println();
}
}
COM: <s> generate the heading for the tree depending upon tree type if its a </s>
|
funcom_train/16909652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize() {
environment.startSevenUp();
// You can only push UI settings back to Seven Up after it has started, so these events are critical
// For the UI to be able to know when it can configure 7up
outlet(eOutlets.LifecycleDataOutlet.ordinal(), Atom.newAtom(eLifecycle.started.toString()));
}
COM: <s> initializes seven up with the current connection settings and starts its heart </s>
|
funcom_train/2935907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addExitActionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SimpleState_exitAction_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SimpleState_exitAction_feature", "_UI_SimpleState_type"),
StatemPackage.Literals.SIMPLE_STATE__EXIT_ACTION,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the exit action feature </s>
|
funcom_train/12628168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start(final String[] args, ClassRealm mainRealm) throws Exception {
Project project = createProject();
Java forker = createJavaTask(project, RUNNER_CLASS);
Path classpath = getClasspath(project, mainRealm);
forker.setClasspath(classpath);
forker.setDescription("forker");
for (int i=0; i < args.length; i++) {
forker.createArg().setValue(args[i]);
}
forker.execute();
}
COM: <s> the main starter method </s>
|
funcom_train/3371036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean findNextValidParent() {
if(parent == root) {
// mark as invalid!
parent = null;
return false;
}
while(parent != null) {
FHTreeStateNode newParent = (FHTreeStateNode)parent.
getParent();
if(newParent != null) {
nextIndex = parent.childIndex;
parent = newParent;
childCount = treeModel.getChildCount
(parent.getUserObject());
if(updateNextIndex())
return true;
}
else
parent = null;
}
return false;
}
COM: <s> finds the next valid parent this should be called when next index </s>
|
funcom_train/20149640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ModelAndView help(HttpServletRequest request, HttpServletResponse response){
Map<String, Object> model;
model = new HashMap<String, Object>();
List<HelpDTO> help = getHelpDso().findAllFaqs();
if(help != null && !help.isEmpty())
{
model.put("help", help);
}
return new ModelAndView("help", model);
}
COM: <s> help action helps the new user or viewer by faqs </s>
|
funcom_train/34244410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Matrix generateWeightsMinusPlusOneInt(int row, int col) {
Matrix b = new Matrix(row, col);
int[] picks = {-1,1};
for(int r = 0; r < row; r++) {
for(int c = 0; c < col; c++) {
b.set(r, c, picks[Utils.rand.nextInt(1)]);
}
}
return b;
}
COM: <s> generate a weighted matrix with elements in 1 1 </s>
|
funcom_train/46523563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isInside(Vector point) {
boolean result = false;
Vector N = getNormal();
for (int i = 1; point != null && !result && i < size() - 1; i++) {
result = result
|| isInside(N, point, getVertex(0), getVertex(i),
getVertex(i + 1));
}
return result;
}
COM: <s> test if a given point is contained in the face </s>
|
funcom_train/22101636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getCalendars(RoleCalendarType type) {
List res = new ArrayList();
for (Iterator i=getCalendars().iterator(); i.hasNext(); ) {
RoleCalendar c = (RoleCalendar)i.next();
if (c.getType().equals(type))
res.add(c.getCalendar());
}
return res;
}
COM: <s> get a collection of </s>
|
funcom_train/4916667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNoAdministratorName() {
// Record no name
this.recordReturn(this.configuration,
this.configuration.getAdministratorName(), "");
this.issues.addIssue(this.assetType, this.assetName,
"Administrator added without a name");
// Construct the administrators
this.replayMockObjects();
this.constructRawAdministrator(0, this.configuration);
this.verifyMockObjects();
}
COM: <s> ensures issue if not </s>
|
funcom_train/49630319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean loadImage(String pathToImage) {
boolean success;
// Read file
BufferedImage image = null;
// Try to read file and load the image in it
try {
File imgFile = new File(pathToImage);
image = ImageIO.read(imgFile);
} catch (IOException e) {
} finally {
if (image != null) {
setImage(image);
success = true;
} else {
success = false;
}
}
return success;
}
COM: <s> tries to load the given filesystem file as an image </s>
|
funcom_train/550194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addColumn(String name) {
boolean found = false;
int i = 0;
while (!found && i < getColumnCount()) {
found = name.equalsIgnoreCase(columnIdentifiers.get(i).toString());
if (!found)
i++;
}
// Column already entered and visible
if (found)
return;
columnIdentifiers.add(name);
putIndex(name, columnIdentifiers.size() - 1);
}
COM: <s> adds a column in the table </s>
|
funcom_train/18199836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTierCode(String animalName) throws StatementNotExecutedException {
String query = "SELECT TierCode " +
"FROM " + databaseName + ".tierart " +
"WHERE TierName = '" + animalName + "' " +
"AND geloescht='N';";
try {
ResultSet rs = executeSelect(query);
if (rs.next()) {
return rs.getString("TierCode");
}
return "-999";
} catch (SQLException e) {
log.error("MySQL Error occurred.", e);
throw new StatementNotExecutedException(query);
}
}
COM: <s> converts an animal name to the correspondenting animal id </s>
|
funcom_train/22232946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIgnoreVertexColors(boolean ignoreVertexColors) {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_IGNORE_VERTEX_COLORS_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes12"));
if (isLive())
((RenderingAttributesRetained)this.retained).setIgnoreVertexColors(ignoreVertexColors);
else
((RenderingAttributesRetained)this.retained).initIgnoreVertexColors(ignoreVertexColors);
}
COM: <s> sets a flag that indicates whether vertex colors are ignored </s>
|
funcom_train/3026924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRoot(String name) {
if (inOldRoot) {
System.out.println(" ");
}
if (name.endsWith(".stub")) {
name = name.substring(0, name.length() - 5);
ch = '#';
} else {
ch = '.';
}
System.out.println("Loading all the classes in " + name);
}
COM: <s> sets the root attribute of the load status object </s>
|
funcom_train/30194545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void chooseParser() {
numbAtoms = 0;
atoms = new Atom[100];
if (fileType.equalsIgnoreCase("dat"))
datParse();
else if (fileType.equalsIgnoreCase("ent"))
entParse();
else if (fileType.equalsIgnoreCase("gjf"))
gjfParse();
else if (fileType.equalsIgnoreCase("hin"))
hinParse();
else if (fileType.equalsIgnoreCase("pdb"))
pdbParse();
else if (fileType.equalsIgnoreCase("mol"))
molParse();
else {
System.err.println("File type not supported");
}
atoms = ChemXmlUtil.setAtoms(atoms, numbAtoms);
}
COM: <s> selects appropriate parser method determined by filetype </s>
|
funcom_train/16749223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(final Selectable component) {
// not so much to do here, just reset current to null, because we must not
// use any dangling references to components that have been remove anymore.
if (current == component) {
current = null;
SelectionChainEvent event = new SelectionChainEvent(this);
fireSelectionChainEvent(event);
}
// removal of listeners not necessary since the components are probably not in use
// anymore.
}
COM: <s> remove a component from this chain of selectable components </s>
|
funcom_train/36190766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public void testExternalServiceDiscovery() throws Exception {
// IExternalServiceDiscovery external = (IExternalServiceDiscovery) externalDiscoveryFinder
// .getService();
//
//
// assertNotNull(external);
// assertNotNull(external.findPssService(new PssServiceIdentifier(SERVICE_NAME_1, OPERATOR_ID_1)));
// assertTrue(external.findPssService(new PssServiceIdentifier(SERVICE_NAME_1, OPERATOR_ID_1)) instanceof PssExternalService);
// }
COM: <s> find an external service i </s>
|
funcom_train/45147523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPropertyName(Method getter) {
String name = (String) propertyNameCache.get(getter);
if(name == null){
name = getter.getName().substring(3);
char ch = name.charAt(0);
ch = Character.toLowerCase(ch);
name = ch + name.substring(1);
propertyNameCache.put(getter, name);
}
return name;
}
COM: <s> construct a property name based on the given getter method name </s>
|
funcom_train/26085767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getColumnText(final Object element, final int columnIndex) {
Comparable<?>[] row = (Comparable[]) element;
if (row[columnIndex].getClass() == Money.class) {
Currency cur = Currency.getInstance(Locale.getDefault());
return cur + " " + row[columnIndex].toString();
}
return row[columnIndex].toString();
}
COM: <s> returns the textual representation of each row at a given column index </s>
|
funcom_train/41209308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean initTransition(Transition transition, Form source, Form dest) {
try {
dest.setVisible(true);
transition.init(source, dest);
animationQueue.addElement(transition);
if (animationQueue.size() == 1) {
transition.initTransition();
}
} catch (Throwable e) {
e.printStackTrace();
transition.cleanup();
animationQueue.removeElement(transition);
return false;
}
return true;
}
COM: <s> initialize the transition and add it to the queue </s>
|
funcom_train/5459930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextArea getSummaryArea() {
if (summaryArea == null) {
summaryArea = new JTextArea();
summaryArea.setEditable(false);
summaryArea.setWrapStyleWord(true);
summaryArea.setLineWrap(true);
summaryArea.setOpaque(false);
}
return summaryArea;
}
COM: <s> this method initializes summary area </s>
|
funcom_train/46457738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void refreshGUI() {
super.refreshGUI();
newButton.setToolTipText(ToolsRes.getString("ParamEditor.Button.New.Tooltip")); //$NON-NLS-1$
setBorder(BorderFactory.createTitledBorder(ToolsRes.getString("ParamEditor.Border.Title"))); //$NON-NLS-1$
}
COM: <s> refreshes the gui </s>
|
funcom_train/181229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProperty(Object value) {
try {
getPrivateField().set(getSource(), value);
} catch (IllegalAccessException e) {
throw new DeveloperException("<" + getSource().getClass().getName() + "#field" + getPropertyUpper() + "> must be PUBLIC!");
}
}
COM: <s> set the property by its b field b with given value </s>
|
funcom_train/36259595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getBundleUrl(final VersionNumber version, final String type) {
final Release release = releases.get(version);
if (release == null) {
return null;
}
final Bundle bundle = release.bundles.get(type);
if (bundle == null) {
return null;
}
return bundle.url;
}
COM: <s> get bundle url of the specified type for a version </s>
|
funcom_train/8632208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillAligned() {
// TODO datapage: fillAligned should not use a fixed constant '2'
// 0..6 > 8, 7..14 > 16, 15..22 > 24, ...
fill(MathUtils.roundUp(pos + 2, Constants.FILE_BLOCK_SIZE));
}
COM: <s> fill up the buffer with empty space and an initially empty checksum </s>
|
funcom_train/49164864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void genericCallback(String function, Object[] param) {
if (jsListener == null) {
return;
}
try {
jsListener.call(function, param);
} catch (Exception ex) {
System.err.println(ex.toString() + " " + jsListener.toString());
}
}
COM: <s> callback to javascript </s>
|
funcom_train/48151699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void itemStateChanged(ItemEvent event) {
if (event.getSource() == testJComboBox) {
testType = testJComboBox.getSelectedIndex();
setParameters();
} else if (event.getSource() == levelJComboBox) {
selectedLevel = level[levelJComboBox.getSelectedIndex()];
setParameters();
} else super.itemStateChanged(event);
}
COM: <s> this method handles the choice events associated with changing the type </s>
|
funcom_train/36392322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Float getPreferenceValue(long userID, long itemID) throws TasteException {
if (hasRatingValues) {
return mahoutDataModelMappingDAO.getPreferenceValue(tenantId, cutoffDate, userID, itemID, actionTypeId);
} else {
return mahoutDataModelMappingDAO.getBooleanPreferenceValue(tenantId, cutoffDate, userID, itemID, actionTypeId);
}
}
COM: <s> retrieves the preference value for a single user and item </s>
|
funcom_train/44790320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void marshall(OutputStream stream) {
try {
JAXBContext context = JAXBContext.newInstance(ColorReferenceSystem.class);
Marshaller m = context.createMarshaller();
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
m.marshal(this, stream);
} catch (JAXBException e) {
e.printStackTrace();
}
}
COM: <s> save the crs color reference system in the given file </s>
|
funcom_train/50150515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean testOpto22() {
boolean success=true;
int count=0;
NumberFormat nf2=NumberFormat.getInstance();
nf2.setMaximumFractionDigits(2);
long before=System.currentTimeMillis();
modbus=new Modbus(settings.getOpto22IP());
long after=System.currentTimeMillis();
success=modbus.getSuccess();
if (success&&((after-before)>TIMEOUT)) success=false;
if (verbose||!success)
System.out.println("Modbus startup time = " + (after-before) + " mSec");
return success;
}
COM: <s> test modbus connection </s>
|
funcom_train/29034635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getProperty(String name) {
if(name.equals("telephoneNumbers")){
Vector result = new Vector(telephoneNumbers.length);
for(int i = 0; i < telephoneNumbers.length; i++)
result.addElement(this.telephoneNumbers[i]);
return result;
}
if(name.equals("firstName")) return this.getFirstName();
if(name.equals("lastName")) return this.getLastName();
if(name.equals("address")) return this.getAddress();
return null;
}
COM: <s> custom type interface return a named property member </s>
|
funcom_train/6266847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resendAck() throws SipException {
// Check for null.
// Bug report and fix by Antonis Karydas.
if (this.lastAck != null) {
if (lastAck.getHeader(TimeStampHeader.NAME) != null
&& sipStack.generateTimeStampHeader) {
TimeStamp ts = new TimeStamp();
try {
ts.setTimeStamp(System.currentTimeMillis());
lastAck.setHeader(ts);
} catch (InvalidArgumentException e) {
}
}
this.sendAck(lastAck, false);
}
}
COM: <s> resend the last ack </s>
|
funcom_train/36228600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleForwardFocusEventWhenTextComponentIsClicked() {
textComponent.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
FocusEvent focusEvent = new FocusEvent(textComponent, FocusEvent.FOCUS_GAINED);
for (FocusListener l : comboBox.getListeners(FocusListener.class)) {
l.focusGained(focusEvent);
}
}
});
}
COM: <s> set up handler that forwards text component focus events to all focus </s>
|
funcom_train/22285010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete() {
if (selStart < selEnd) {
System.arraycopy(text, selEnd, text, selStart, len - selEnd);
len -= (selEnd - selStart);
selEnd = selStart;
focus(selStart);
repaintText();
postEvent(new Event(this, TEXT_CHANGED_EVENT, null));
}
}
COM: <s> delete the text that is currently selected if any </s>
|
funcom_train/7679868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cellToRect(int cellX, int cellY, int cellHSpan, int cellVSpan, RectF rect) {
((CellLayout)getChildAt(mCurrentScreen)).cellToRect(cellX, cellY,
cellHSpan, cellVSpan, rect);
}
COM: <s> computes a bounding rectangle for a range of cells </s>
|
funcom_train/14082082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean callBaseRepOK(int id) {
switch (id) {
case 1: return repOK1();
case 2: return repOK2();
case 3: return repOK3();
case 4: return repOK4();
case 6: return repOK6();
case 7: return repOK7();
default:
throw new RuntimeException("Invalid repOK number!");
}
}
COM: <s> helper method executes rep ok method with given id </s>
|
funcom_train/37586929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void compileProject() throws IOException {
if (! _model.isProjectActive())
throw new UnexpectedException("compileProject invoked when DrJava is not in project mode");
if (_prepareForCompile()) { _doCompile(_model.getProjectDocuments()); }
else _notifier.compileAborted(new UnexpectedException("Project contains unsaved modified files"));
}
COM: <s> compiles all documents in the project source tree </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.