__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/9384457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeListener(ILayoutReloadListener listener) {
synchronized (mListenerMap) {
for (List<ILayoutReloadListener> list : mListenerMap.values()) {
Iterator<ILayoutReloadListener> it = list.iterator();
while (it.hasNext()) {
ILayoutReloadListener i = it.next();
if (i == listener) {
it.remove();
}
}
}
}
}
COM: <s> removes a listener no matter which </s>
|
funcom_train/25523902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void quietlyTryToMakeWindowNonOqaque() {
try {
Class clazz = Class.forName("com.sun.awt.AWTUtilities");
Method method = clazz.getMethod("setWindowOpaque", java.awt.Window.class, Boolean.TYPE);
method.invoke(clazz, this, false);
} catch (Exception e) {
// silently ignore this exception.
}
}
COM: <s> trys to invoke </s>
|
funcom_train/12180282 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private RGB obtainRGBFromString(String s) {
RGB rgbValue = null;
if (s != null) {
s = s.trim();
if (s.charAt(0) != '#') {
s = NamedColor.getHex(s);
}
rgbValue = Convertors.hexToRGB(s);
}
return rgbValue;
}
COM: <s> attempt to obtain an rgb from a string </s>
|
funcom_train/27839411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isApplicableTo(URL destination) {
boolean domainOK = ((getDomain() != null && destination.getHost().endsWith(getDomain()))
|| (getDomain() == null && destination.getHost().equals(getUrl().getHost())));
boolean pathOK = destination.getPath().startsWith(getPath());
return pathOK && domainOK;
}
COM: <s> p determines whether or not the cookie is applicable to </s>
|
funcom_train/18868558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BigDecimal getNetCashValue() {
BigDecimal total = getQuantity().multiply(getPrice());
switch (getTransactionType()) {
case REINVESTDIV:
case SELLSHARE:
total = total.subtract(getFees());
break;
case BUYSHARE:
total = total.add(getFees());
break;
default:
break;
}
return total;
}
COM: <s> calculates the total cash value of the transaction </s>
|
funcom_train/7313337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setStats(Element e, int exec, int match) {
e.setAttribute("probes", ""+match);
e.setAttribute("executed", ""+exec);
e.setAttribute("percent", ""+(exec*100)/match);
}
COM: <s> sets the statistics for a certain element </s>
|
funcom_train/1958555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
try {
JButton colorChooser = (JButton)e.getSource();
Color c = JColorChooser.showDialog(VerinecStudio.getInstance(), "Choose Color", colorChooser.getBackground());
if (c!=null)
colorChooser.setBackground(c);
} catch (VerinecException ex) {
LogUtil.logException(ex, getClass().getName(), "actionPerformed", "");
}
}
COM: <s> displays a color choose dialog </s>
|
funcom_train/2699458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeAt(int index) {
_size--;
// If auto-compaction is enabled, see if we need to compact
if ( _autoCompactionFactor != 0 ) {
_autoCompactRemovesRemaining--;
if ( _autoCompactRemovesRemaining == 0 ) {
// Do the compact
// NOTE: this will cause the next compaction interval to be calculated
compact();
}
}
}
COM: <s> delete the record at tt index tt </s>
|
funcom_train/44184971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected File getJobDirectoryFrom(File jobPathFile) {
try {
return new File(FileUtils.readFileToString(jobPathFile).trim());
} catch (IOException e) {
LOGGER.log(Level.SEVERE,"bad .jobpath: "+jobPathFile, e);
return null;
}
}
COM: <s> return the job directory file read from the supplied </s>
|
funcom_train/41506730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void endTarget(long revision) {
try {
myTargetPath = null;
if (revision >= 0) {
addAttribute(REVISION_ATTR, revision + "");
openTag(AGAINST_TAG);
closeTag(AGAINST_TAG);
}
closeTag(TARGET_TAG);
} catch (SAXException e) {
getDebugLog().error(e);
}
}
COM: <s> closes the formatted xml with the revision against which </s>
|
funcom_train/44702724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getVotes(int answerID) {
if (answerID<=0 || answerID>answers.size()) {
throw new IllegalArgumentException("answerID was out of bounds.");
}
int voteCount=0;
for (Integer i:votes.values()) {
if (i.intValue()==answerID-1) {
voteCount++;
}
}
return voteCount;
}
COM: <s> get the number of votes given for an answer </s>
|
funcom_train/11372857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkReplicationFactor(INodeFile file) {
int numExpectedReplicas = file.getReplication();
Block[] pendingBlocks = file.getBlocks();
int nrBlocks = pendingBlocks.length;
for (int i = 0; i < nrBlocks; i++) {
blockManager.checkReplication(pendingBlocks[i], numExpectedReplicas);
}
}
COM: <s> check all blocks of a file </s>
|
funcom_train/4517685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getIndexForDate(JaretDate jaretDate) {
for (int i = 0; i < _rows.size(); i++) {
Day day = (Day) _rows.get(i);
if (day.getDayDate().compareDateTo(jaretDate) == 0) {
return i;
}
}
return -1;
}
COM: <s> get the index for the given date or 1 </s>
|
funcom_train/23855007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCursorToFirstChild() {
VNode oldCursor = cursor;
// assure that a valid child exists
if (oldCursor == null || oldCursor.getTreeChildren().isEmpty()) {
return;
}
setNewCursor(oldCursor.getTreeChildren().get(0));
focusOnCursor();
}
COM: <s> sets the cursor to the first child of the actual cursornode </s>
|
funcom_train/1733373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String format(Date d) {
cal.setTime(d);
return cal.get(Calendar.YEAR)+delim+(cal.get(Calendar.MONTH)+1)+
delim+cal.get(Calendar.DAY_OF_MONTH)+delim+
cal.get(Calendar.HOUR_OF_DAY)+delim+cal.get(Calendar.MINUTE)+
delim+cal.get(Calendar.SECOND);
}
COM: <s> format the date as year month day hour minute second with supplied delimiter </s>
|
funcom_train/8970295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addDrillDownParameter( Map<String, Object> origParameters, Map<String, Object> result ) {
String drillDownParameter = ParameterAwareHelp.getSingleValue( origParameters, ReportChart.DRILLDOWN_PARAMETER );
if( drillDownParameter != null ) {
result.put( ReportChart.DRILLDOWN_PARAMETER, drillDownParameter );
}
}
COM: <s> always pass drilldown chart parameter to reports if it exists </s>
|
funcom_train/46452173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean signOff() throws XmlRpcException {
OpProjectSession session = OpProjectSession.getSession();
OpBroker broker = session.newBroker();
try {
impl.signOff(session, broker);
} catch (XServiceException exc) {
throw new XmlRpcException(exc.getError().getCode(), exc.getLocalizedMessage(), exc);
}
finally {
broker.close();
}
return true;
}
COM: <s> sign off the currently signed on user </s>
|
funcom_train/18808252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPowerRegression2a() {
final double[][] data = createSampleData2();
final double[] result = Regression.getPowerRegression(data);
assertEquals(106.1241681, result[0], 0.0000001);
assertEquals(-0.8466615, result[1], 0.0000001);
}
COM: <s> checks the results of a power regression on sample dataset 2 </s>
|
funcom_train/6290093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bufferContent(String bf) throws Exception {
try {
if (isContentRaw()) {
decodeAndBufferRawContent(bf);
} else {
decodeAndBufferContent(bf);
}
} catch (Exception e) {
e.printStackTrace();
//throw new Exception(); //TODO: why to throw new _empty_ exception ?
throw e; // rethrow
} finally {
}
ensurePrealocating();
}
COM: <s> decodes given string according to the encoding of the body part that </s>
|
funcom_train/18548011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Timestamp getDateField(String dateField, UserTO uto, Locale loc){
Timestamp response = null;
try {
if (dateField!=null && !dateField.trim().equals("")){
response = DateUtil.getDateTime(dateField, uto.getCalendarMask(), loc);
response = DateUtil.getDate(response, false);
}
} catch(Exception e){
response = null;
}
return response;
}
COM: <s> get the a date value from form </s>
|
funcom_train/33835009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand2() {
if (okCommand2 == null) {//GEN-END:|52-getter|0|52-preInit
// write pre-init user code here
okCommand2 = new Command("Send Text", Command.OK, 0);//GEN-LINE:|52-getter|1|52-postInit
// write post-init user code here
}//GEN-BEGIN:|52-getter|2|
return okCommand2;
}
COM: <s> returns an initiliazed instance of ok command2 component </s>
|
funcom_train/51207968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void download() throws Exception {
String encryptedData = NetworkEngine.postViaHttpConnection(getParameter(RS.PARAM_URL_DOWNLOAD), "");
System.out.println(encryptedData);
if (encryptedData.startsWith(RS.DAZIO)) {
hardStore(encryptedData.substring(RS.DAZIO.length()));
} else
throw new Exception("Wrong reply.");
}
COM: <s> download encrypted data from network and overwrite current data </s>
|
funcom_train/41594855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCellpaddingPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_StrucDocTable_cellpadding_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_StrucDocTable_cellpadding_feature", "_UI_StrucDocTable_type"),
V3Package.eINSTANCE.getStrucDocTable_Cellpadding(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the cellpadding feature </s>
|
funcom_train/5384276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispose() {
if (tabs != null) {
for (int i = 0; i < tabs.length; i++) {
GraphicsTab tab = tabs[i];
tab.dispose();
}
}
tabs = null;
if (images != null) {
for (int i = 0; i < images.size(); i++) {
((Image)images.elementAt(i)).dispose();
}
}
images = null;
if (customColor != null) customColor.dispose();
customColor = null;
if (customImage != null) customImage.dispose();
customImage = null;
}
COM: <s> disposes all resources created by the receiver </s>
|
funcom_train/31702726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setXScaleModus(int scaleModusX) {
this.scaleModusX = scaleModusX;
switch (scaleModusX) {
case SCALE_AUTO :
scaleToleranceX = 0.2;
break;
case SCALE_BALLOON :
scaleToleranceX = 0.5;
break;
case SCALE_HEART_BEAT :
scaleToleranceX = 0.5;
break;
case SCALE_NONE :
default :
this.scaleToleranceX = 0.0;
}
}
COM: <s> sets the scale modus for the x axis </s>
|
funcom_train/16892576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Variables getVariables() {
if (lastSelection instanceof Scope) {
Scope scope = (Scope) lastSelection;
if ( scope.getVariables() == null) {
scope.setVariables( BPELFactory.eINSTANCE.createVariables() );
}
return scope.getVariables();
}
Process process = getProcess();
if (process.getVariables() == null) {
process.setVariables( BPELFactory.eINSTANCE.createVariables() );
}
return process.getVariables();
}
COM: <s> we show scoped variables if a scope is the current selection </s>
|
funcom_train/18875982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Position getCenter() {
double dLon = northWest.getDeltaLonInDeg(southEast);
double dLat = northWest.getDeltaLatInDeg(southEast);
double midLat = northWest.getLat().toDegrees() + dLat / 2;
double midLon = northWest.getLon().toDegrees() + dLon / 2;
return new Position(new Latitude(midLat), new Longitude(midLon));
}
COM: <s> return the center position of the sector </s>
|
funcom_train/21324148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean handleMessage(Message m, Object o){
if(!super.handleMessage(m, o)){
if(m.getType().equals(INFOMESSAGE)){
System.out.println("Received: " + o);
}
else if(m.getType().equals(SUICIDEMESSAGE)){
System.out.println("Received: " + o);
fireMessage(m.getSender(),INFOMESSAGE,"I'll be back.");
suicide();
}
else return false;
}
return true;
}
COM: <s> prints each message received </s>
|
funcom_train/3597051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NFile getNFileByName(String name) {
NFile nf = getCodingByName(name);
if (nf!=null) { return nf; }
nf = getCorpusResourceByName(name);
if (nf!=null) { return nf; }
nf = getOntologyByName(name);
if (nf!=null) { return nf; }
nf = getObjectSetByName(name);
return nf;
}
COM: <s> get the nfile with the given name or null if it doesnt exist </s>
|
funcom_train/6343907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void dump (int threshold) {
lastFlushTime = System.currentTimeMillis();
if (sb.length() > threshold) {
synchronized (sbLock) {
if (sb.length() > threshold) {
LoggerManager.getInstance().getLogEventQ().addDumpEvent(logname, sb);
sb = new StringBuffer(BUFFER_CAPACITY);
}
}
}
}
COM: <s> flushes the current log asynchronously if the size </s>
|
funcom_train/14462795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getSeriesIndex() {
ArrayList cr = this.getChartRecords();
for (int i=0;i<cr.size();i++) {
BiffRec b = (BiffRec)cr.get(i);
if (b.getOpcode()==DATAFORMAT) {
DataFormat df = (DataFormat)b;
return (int)df.getSeriesIndex();
}
}
return -1;
}
COM: <s> get the series index file relative </s>
|
funcom_train/28346922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getAllForShowBPMs_DiffAMP() {
Vector v = new Vector();
for(int i = 0, n = bpmV.size(); i < n; i++) {
RingBPM rbpm = (RingBPM) bpmV.get(i);
RingBPMtbtAvg rbpmPV = rbpm.getBPM_AMP();
if(rbpmPV.show()) {
v.add(rbpmPV.getRingBPMtsDiff());
}
}
return v;
}
COM: <s> returns all ring bpms pvs with show true for amplitude difference </s>
|
funcom_train/35460998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void debugLoaderChain(final ClassLoader startCl) {
_log.debug("--- Class loader chain starts");
ClassLoader cl = startCl;
while (cl != null) {
_log.debug(cl);
cl = cl.getParent();
}
_log.debug("--- chain ends");
}
COM: <s> help debug class loading issues </s>
|
funcom_train/44156580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFormattedString() {
return m_id + ", " + m_seq + ", " + m_client + ", " + m_level + ", "
+ m_startTime + ", " + "("
+ ((m_service == null) ? "<undef>" : m_service)
+ ", " + ((m_method == null) ? "<undef>" : m_method) + "), "
+ m_duration;
}
COM: <s> returns a human readable representation of the measure </s>
|
funcom_train/19244810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPredicate(final PredicateDefinition definition, final ModuleContext context) {
final String identifier = definition.getName() + "_" + definition.getArgumentNumber();
getPredicateDefinitions().put(identifier, definition);
predicateContexts.put(identifier, new ModuleContext(context));
}
COM: <s> add predicate definition </s>
|
funcom_train/12128064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) {
int block;
if(orientation == javax.swing.SwingConstants.VERTICAL) {
block = (int)(visibleRect.height * 0.9);
} else {
block = (int)(visibleRect.width * 0.9);
}
if(block < 1)
block = 1;
return(block);
}
COM: <s> returns 90 of the view area dimension that is in the orientation </s>
|
funcom_train/28366744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void deliverEvent(EventObject evt) {
if (evt instanceof TextEvent) {
TextEvent event = (TextEvent)evt;
Vector<TextListener> l;
synchronized (textListeners) { l = new Vector<TextListener>(textListeners); }
int size = l.size();
for (int i = 0; i < size; i++)
l.elementAt(i).textValueChanged(event);
}
}
COM: <s> this function delivers text listener events when the ok </s>
|
funcom_train/29922651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getRecursiveChildCount(ForumMessage parent) {
int numChildren = 0;
int num = getChildCount(parent);
numChildren += num;
for (int i=0; i<num; i++) {
ForumMessage child = getChild(parent,i);
if (child != null) {
numChildren += getRecursiveChildCount(child);
}
}
return numChildren;
}
COM: <s> returns the total number of recursive children of a parent </s>
|
funcom_train/9869754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int deleteByWhere(String where) throws SQLException {
Connection c = null;
PreparedStatement ps = null;
try {
c = getConnection();
String delByWhereSQL = "DELETE FROM USUARIO " + where;
ps = c.prepareStatement(delByWhereSQL);
return ps.executeUpdate();
} finally {
getManager().close(ps);
freeConnection(c);
}
}
COM: <s> deletes rows from the usuario table using a where clause </s>
|
funcom_train/43579799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeGraphXMLToFile(ArrayList<RDFModel> rdfModelList, String fileName){
if(!InputValidator.isInvalidString(fileName)){
File file = new File(fileName);
Writer output = null;
try {
output = new BufferedWriter(new FileWriter(file));
output.write(createRDF(rdfModelList).toString());
output.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
COM: <s> writes the rdf file to the disk </s>
|
funcom_train/8339353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRenderSuccessWithEmptyRS() throws Exception {
ResultSetRenderer renderer = new ResultSetRenderer(query);
renderer.refresh();
Image image = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);
Graphics2D g = (Graphics2D) image.getGraphics();
renderer.renderReportContent(g, 1, 1, 1, 1, false, null);
}
COM: <s> tests calling render success with an empty result set works without </s>
|
funcom_train/12156242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getProjectRelativePath(String contextRelativePath) {
if (contextRelativePath.startsWith(contextRelativeProjectRoot)) {
return contextRelativePath.substring(projectRelativeStart);
} else {
throw new IllegalStateException("Path '" + contextRelativePath +
"' is not relative to '" + contextRelativeProjectRoot +
"'");
}
}
COM: <s> make a project relative path from the context relative one </s>
|
funcom_train/47886692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createSpinPanel() {
win.panSpinCtl = new JPanel();
win.panCtl.add(win.panSpinCtl,
new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0,
GridBagConstraints.NORTH,
GridBagConstraints.BOTH,
new Insets(0, 0, 0, 0), 0, 0));
win.panSpinCtl.setLayout(null);
}
COM: <s> create the spin panel </s>
|
funcom_train/42943880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DeviceID getDeviceId() throws PacketParseException {
if (this.deviceId == null) {
// throw termination error if the device hasn't been defined
PacketParseException ppe = new PacketParseException(ServerErrors.NAK_DEVICE_INVALID, null);
ppe.setTerminate();
throw ppe;
}
return this.deviceId;
}
COM: <s> returns a device id or null </s>
|
funcom_train/44994538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addProperty(String name, String value, String id) {
String msg = name + ":" + value;
if (id != null) {
msg += ("(id=" + id + ")");
}
log(msg, Project.MSG_DEBUG);
getProject().setProperty(name, value);
if (id != null) {
getProject().addReference(id, value);
}
}
COM: <s> actually add the given property value to the project </s>
|
funcom_train/5183423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PaletteContainer createForkJoinNode5Group() {
PaletteStack paletteContainer = new PaletteStack(Messages.ForkJoinNode5Group_title, null, null);
paletteContainer.setId("createForkJoinNode5Group"); //$NON-NLS-1$
paletteContainer.setDescription(Messages.ForkJoinNode5Group_desc);
paletteContainer.add(createForkNode1CreationTool());
paletteContainer.add(createJoinNode2CreationTool());
return paletteContainer;
}
COM: <s> creates fork join node palette tool group </s>
|
funcom_train/23232519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addImage(Image image) {
int t;
if ((t = Integer.parseInt((String)queryImageId(image))) >= 0) {
return t;
} else {
//image ids should be unique.
t = images.size();
addImage(image, Integer.toString(t));
return t;
}
}
COM: <s> adds the specified image to the image cache </s>
|
funcom_train/46680472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isConsistent(){
double minTime = 0;
for (int pos=0; pos<getNumberOfTimelineItems(); pos++){
double currentTime=getTimelineItemAt(pos).getTime();
if (currentTime>=0){
if (currentTime<minTime) {return false;}
else {minTime = currentTime;}
}
}
return true;
}
COM: <s> returns true if absolute time values are monotonously increasing </s>
|
funcom_train/31361505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String replaceString(String value, String src, String dest) {
StringBuffer result = new StringBuffer();
int pos = 0;
int index = value.indexOf(src);
while (index >= 0) {
if (index > pos)
result.append(value.substring(pos,index - 1));
result.append(dest);
pos = pos + src.length();
index = value.indexOf(src,index + dest.length());
}
result.append(value.substring(pos));
return result.toString();
}
COM: <s> repleace a string with special string </s>
|
funcom_train/8094379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BIFReader processFile(String sFile) throws Exception {
m_sFile = sFile;
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setValidating(true);
Document doc = factory.newDocumentBuilder().parse(new File(sFile));
doc.normalize();
buildInstances(doc, sFile);
buildStructure(doc);
return this;
} // processFile
COM: <s> process file reads a bifxml file and initializes a bayes net </s>
|
funcom_train/18570226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void okPressed() {
ISelection selection = tree.getSelection();
if (selection != null && selection instanceof IStructuredSelection) {
final Object selected = ((IStructuredSelection) selection)
.getFirstElement();
final ArrayList list = new ArrayList();
list.add(selected);
setResult(list);
}
super.okPressed();
}
COM: <s> the code container selection dialog code implementation of this </s>
|
funcom_train/4933271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String makeDroolsOperand(String subject) {
String droolsOperand = n3ValueToOperand(subject);
if( droolsOperand.startsWith("$")) {
final String alias = droolsAliasesMap.get(droolsOperand);
if ( alias != null ) {
droolsOperand = alias;
} else {
final String valueToN3Variable = getValueToN3Variable(subject);
if( valueToN3Variable != null ) {
droolsOperand = valueToN3Variable;
}
}
}
return droolsOperand;
}
COM: <s> make a drools operand taking in account </s>
|
funcom_train/46825897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TableTreeNode getTableNode (int tableNum) {
for (int i = 0; i < getChildCount(); i++) {
TableTreeNode node = (TableTreeNode)getChildAt (i);
Table table = (Table)node.getUserObject();
if (tableNum == table.getTableNum())
return node;
}
return null;
}
COM: <s> loop through the various tree nodes until you find the correct </s>
|
funcom_train/42761341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PlanAdaptation getPlanAdapter(String name) throws ConfigurationException {
if ((name == null) || (name.length() == 0)) {
return new NothingPlanAdaptation();
}
try {
Class c = Class.forName(name);
Constructor cons = c.getConstructor();
return (PlanAdaptation) cons.newInstance();
} catch (Exception e) {
e.printStackTrace();
throw new ConfigurationException("'" + name + "' is not a valid plan adaptation strategy.");
}
}
COM: <s> generates the plan adaptation strategy </s>
|
funcom_train/51651811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillRectangle (int x, int y, int width, int height) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (width == 0 || height == 0) return;
int flags = OS.PtEnter(0);
try {
int prevContext = setGC();
setGCClipping();
OS.PgDrawIRect(x, y, x + width - 1, y + height - 1, OS.Pg_DRAW_FILL);
unsetGC(prevContext);
} finally {
if (flags >= 0) OS.PtLeave(flags);
}
}
COM: <s> fills the interior of the rectangle specified by the arguments </s>
|
funcom_train/6298526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeRemoveDomain(Org.omg.CORBA.Object obj, Domain aDomain) {
synchronized (obj) {
java.lang.Object hashResult = theDomainLists.get(obj);
if (hashResult == null); // nothing do to
else {
ODMCacheEntry entry = (ODMCacheEntry) hashResult;
entry.group.remove(aDomain);
entry.domainArray = null; // invalidate internal cache
entry.timestamp = System.currentTimeMillis(); // refresh
}
}
} // writeRemoveDomain
COM: <s> more fine granular version of write </s>
|
funcom_train/28756899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBatchnum(String newVal) {
if ((newVal != null && this.batchnum != null && (newVal.compareTo(this.batchnum) == 0)) ||
(newVal == null && this.batchnum == null && batchnum_is_initialized)) {
return;
}
this.batchnum = newVal;
batchnum_is_modified = true;
batchnum_is_initialized = true;
}
COM: <s> setter method for batchnum </s>
|
funcom_train/50485307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setupContents(Object context, Entity adm, boolean create) {
if (adm.getChildCount()==0 || create)
getContentPane().add(createEditPanel(context, adm, create));
else
for (int i=0; i<adm.getChildCount(); i++)
addClient(createPanel(context, adm.getChild(i)));
}
COM: <s> set up appropriate panels based on admin entity information </s>
|
funcom_train/2639900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeAt(int index) {
_size--;
// If auto-compaction is enabled, see if we need to compact
if ( _autoCompactionFactor != 0 ) {
_autoCompactRemovesRemaining--;
if ( !_autoCompactTemporaryDisable && _autoCompactRemovesRemaining <= 0 ) {
// Do the compact
// NOTE: this will cause the next compaction interval to be calculated
compact();
}
}
}
COM: <s> delete the record at tt index tt </s>
|
funcom_train/14266821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getSupportsBrowseHost() throws BadPacketException {
parseResults();
switch (_supportsBrowseHost) {
case UNDEFINED:
throw new BadPacketException();
case TRUE:
return true;
case FALSE:
return false;
default:
Assert.that(false, "Bad value for supportsBrowseHost: "
+ _supportsBrowseHost);
return false;
}
}
COM: <s> returns true iff the client supports browse host feature </s>
|
funcom_train/51625667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doMakeFast() {
WorkbenchWindow window = (WorkbenchWindow) getPage()
.getWorkbenchWindow();
FastViewBar fastViewBar = window.getFastViewBar();
if (fastViewBar == null) {
return;
}
Shell shell = window.getShell();
RectangleAnimation animation = new RectangleAnimation(shell,
getParentBounds(), fastViewBar.getLocationOfNextIcon());
animation.schedule();
getPage().addFastView(getViewReference());
}
COM: <s> make this view pane a fast view </s>
|
funcom_train/20747905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int indexOf(Object o) {
if (!(o instanceof ISIMetaData)) return -1;
String uniqueId = ((ISIMetaData)o).getReference().getLocator();
if (uniqueIds.containsKey(uniqueId) &&
!deletedItems.contains(uniqueIds.get(uniqueId)))
return toExternalIndex(uniqueIds.get(uniqueId));
else
return -1;
}
COM: <s> whether or not the given item is in this collection </s>
|
funcom_train/19061126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSignature(File signature) {
if (signature != null && signature.exists() && signature.isFile()) {
e.addAttribute(Identity.SIGNATURE_FILE, signature.getPath());
} else {
e.getAttributes().remove(Identity.SIGNATURE_FILE);
}
e.notifyObservers();
}
COM: <s> sets the signature to be attached to outgoing mails </s>
|
funcom_train/40712692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void enableProxyFields() {
boolean check = checkUpdateCB.isSelected();
boolean use = useProxyCB.isSelected();
useProxyCB.setEnabled(check);
hostLB.setEnabled(check && use);
portLB.setEnabled(check && use);
proxyHostTF.setEnabled(check && use);
proxyPortTF.setEnabled(check && use);
}
COM: <s> enable disable proxy related fields </s>
|
funcom_train/9162121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resultReceived(String queryString) {
for ( Query query : ModelDocument.getInstance().getQueriesWithQL(queryString)) {
Set<QueryWidget> widgets = WidgetStore.getInstance().getWidgets(query);
for ( QueryWidget widget : widgets ) {
widget.updateResult();
}
}
setChanged();
notifyObservers();
}
COM: <s> updates the results representation from the result of the query </s>
|
funcom_train/3102325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Button createButton(final Composite parent, final String label, final SelectionListener listener) {
Assertion.valid(parent);
Assertion.nonEmpty(label);
Assertion.valid(listener);
final Button button= new Button(parent, SWT.PUSH);
button.setText(label);
button.addSelectionListener(listener);
final GridData data= new GridData();
data.horizontalAlignment= GridData.FILL;
data.grabExcessHorizontalSpace= true;
data.verticalAlignment= GridData.BEGINNING;
data.widthHint= LayoutUtilities.getWidthHint(button);
button.setLayoutData(data);
return button;
}
COM: <s> creates a button for the list control </s>
|
funcom_train/16770487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeHeader() throws IOException {
//Header fields (in same order than spec, for comparison purposes)
FLVHeader flvHeader = new FLVHeader();
flvHeader.setSignature("FLV".getBytes());
flvHeader.setVersion((byte) 0x01);
flvHeader.setFlagReserved01((byte) 0x0);
flvHeader.setFlagAudio(true);
flvHeader.setFlagReserved02((byte) 0x0);
flvHeader.setFlagVideo(true);
// create a buffer
IoBuffer out = IoBuffer.allocate(15);
flvHeader.write(out);
//Dump header to output channel
channel.write(out.buf());
out.clear();
out.free();
}
COM: <s> writes the header bytes </s>
|
funcom_train/13652416 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startProgress(String progressDetails, String uniqueId) {
ProgressRequest request = new ProgressRequest(progressDetails, uniqueId);
synchronized (this.progressList) {
this.progressList.add(request);
}
this.jLabelProgressDetails.setText(progressDetails);
this.jProgressBar.setIndeterminate(true);
}
COM: <s> adds a new progress to display to the progress bar </s>
|
funcom_train/29968126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getWindowsDrive(File file) {
String result = null;
if (isWindows()) {
try {
String drive = file.getAbsolutePath().substring(0, 3);
result = ShellFolder.getShellFolder(new File(drive))
.getDisplayName();
} catch (FileNotFoundException e) {
// TODO: log.warn("Exception on getting Windows drive", e);
}
}
return result;
}
COM: <s> gets the name of the drive of this file or directory </s>
|
funcom_train/8221547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTabbedPane getAmfTabbedPane() {
if (amfTabbedPane == null) {
amfTabbedPane = new JTabbedPane();
amfTabbedPane.addTab("Info", null, getInfoScrollPane(), null);
amfTabbedPane.addTab("Data", null, getDataPane(), null);
}
return amfTabbedPane;
}
COM: <s> gets the amf tabbed pane </s>
|
funcom_train/13398823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueChanged(ListSelectionEvent lse) {
if (lse.getSource() == this.stepChooser.getList()) {
JList list = this.stepChooser.getList();
Rewrite r = (Rewrite) list.getSelectedValue();
if (r != null) {
firePropertyChange("PreviewRewrite", null, r);
}
}
}
COM: <s> this method implements the list selection listener interface </s>
|
funcom_train/33564642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void requireInClan(boolean inClan) throws UnsupportedFeatureException, IllegalStateException {
requireW3();
if(inClan) {
// The user must be in a clan
if(myClan == null)
throw new UnloggedException("You are not in a clan");
} else {
// The user must not be in a clan
if(myClan != null)
throw new UnloggedException("You are already in a clan");
}
}
COM: <s> require the user be on w3 and in or out of a clan </s>
|
funcom_train/40689473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetEquals() {
Multimap<String, Integer> multimap = create();
multimap.put("foo", 1);
multimap.put("foo", 3);
assertEquals(ImmutableList.of(1, 3), multimap.get("foo"));
}
COM: <s> confirm that get returns a collection equal to a list </s>
|
funcom_train/45692142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNoteNumberPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SongEventKeyboardNote_noteNumber_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SongEventKeyboardNote_noteNumber_feature", "_UI_SongEventKeyboardNote_type"),
EsxPackage.Literals.SONG_EVENT_KEYBOARD_NOTE__NOTE_NUMBER,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the note number feature </s>
|
funcom_train/3598094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAttribute() {
List results = new ArrayList();
try {
results=engine.search(nom, "($w word):$w@orth='the'");
assertTrue(results.size()==2); // note first result is a list of vars
NOMElement r1 = (NOMElement)((List)results.get(1)).get(0);
assertTrue(r1.getID().equals("w_1"));
} catch (Throwable ex) {
ex.printStackTrace();
fail("Word count failed: " + results.size());
}
}
COM: <s> check attributes are correctly retrieved </s>
|
funcom_train/49626148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected InputStream getCached(final VirtualFile f) {
SoftReference<VFSCacheHandle> reference = this.cache.get(f.getId());
if ((reference != null) && (reference.get() != null)) {
VFSCacheHandle handle = reference.get();
if (handle == null) {
this.cache.remove(f.getId());
return null;
}
return handle.getInputStream();
}
return null;
}
COM: <s> checks whether the cache contains the given virtual file </s>
|
funcom_train/9931054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printQualifiedName(Writer out, Attribute a) throws IOException {
String prefix = a.getNamespace().getPrefix();
if ((prefix != null) && (!prefix.equals(""))) {
out.write(prefix);
out.write(':');
out.write(a.getName());
} else {
out.write(a.getName());
}
}
COM: <s> prints the qualified name </s>
|
funcom_train/45737677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draw(Graphics g, int x, int y, int w, int h) {
g.setColor(color);
g.fillRect(x, y, w, h);
g.setColor(Color.black);
g.drawRect(x, y, w, h);
g.setFont(font);
FontMetrics fm = g.getFontMetrics(font);
g.drawString(""+processId, x+w/2-fm.stringWidth(""+processId)/2, y+h/2+fm.getHeight()/2);
}
COM: <s> draws this process as a colored box with a process id inside </s>
|
funcom_train/31741321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doRaw() {
String cmd = "";
for (int i = 1;i<command.length;i++) cmd = cmd.concat(command[i]+" ");
if(userLevel()>449) {
send(cmd+"\n");
return;
}
send("PRIVMSG "+nick+" :FUCK OFF WITH YOUR HACK ATTEMPTS\n");
}
COM: <s> sends a raw command to the server </s>
|
funcom_train/3177370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(Gedcom gedcom) {
/* we need to search for all existing _SOSA properties to delete them */
for (Entity entity : gedcom.getEntities(Gedcom.INDI)) {
Indi indi = (Indi)entity;
/* we delete all _SOSA properties of INDI */
for (Property prop : indi.getProperties(getTag()))
indi.delProperty(prop);
}
}
COM: <s> removes all index properties from all individuals </s>
|
funcom_train/20977948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image getPreview(int w, int h) throws Exception {
if (preloaded == null) {
preloaded = getImage(style.getParser().getDirectory());
if (preloaded != null) {
preloaded = preloaded.getScaledInstance(w, h, 0);
}
}
return preloaded;
}
COM: <s> gets the preview attribute of the gtk image object </s>
|
funcom_train/46112796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isTextUnitWithSameType(String type) {
Event e = peekTempEvent();
if (e != null && e.getEventType() == EventType.TEXT_UNIT) {
ITextUnit tu = e.getTextUnit();
if (tu != null && tu.getType() != null && tu.getType().equals(type)) {
return true;
}
}
return false;
}
COM: <s> is the current text unit of the specified type </s>
|
funcom_train/13997068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb = new StringBuffer();
sb.append("[" + getName() + "] ");
Enumeration elementList = fieldTable.elements();
while (elementList.hasMoreElements()) {
sb.append(((TagField) elementList.nextElement()).toString() + " ");
}
return sb.toString();
}
COM: <s> returns a string representation of this object </s>
|
funcom_train/24098661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public VixVmHandle openVm(String vmxPath) throws VixException {
VixHandle jobHandle = getVix().VixVM_Open(this, vmxPath, null, null);
VixHandle result = VixUtils.getResultHandleFromJob(jobHandle, true);
return new VixVmHandle(result.longValue());
}
COM: <s> gets a handle for the given vm </s>
|
funcom_train/40613680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mapAndAddFilter(Expression on) {
on.mapColumns(this, 0);
addFilterCondition(on, true);
on.createIndexConditions(session, this);
if (nestedJoin != null) {
on.mapColumns(nestedJoin, 0);
on.createIndexConditions(session, nestedJoin);
}
if (join != null) {
join.mapAndAddFilter(on);
}
}
COM: <s> map the columns and add the join condition </s>
|
funcom_train/29718546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void copy(final ConcreteBreakdownElement _concreteBreakdownElement) {
this.concreteName = _concreteBreakdownElement.getConcreteName();
this.breakdownElement = _concreteBreakdownElement.getBreakdownElement();
this.superConcreteActivities.addAll(_concreteBreakdownElement
.getSuperConcreteActivities());
this.project = _concreteBreakdownElement.getProject();
this.instanciationOrder = _concreteBreakdownElement.instanciationOrder;
this.displayOrder = _concreteBreakdownElement.displayOrder;
}
COM: <s> copy the values of the specified concrete breakdown element into the </s>
|
funcom_train/32057504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsCellSelected() {
System.out.println("testIsCellSelected");
JGraph jp = new JGraph();
DefaultGraphSelectionModel dg = new DefaultGraphSelectionModel(jp);
Object obj = new Object();
Object obj1 = new Object();
dg.addSelectionCell(obj);
dg.addSelectionCell(obj1);
assertEquals(dg.isCellSelected(obj),true);
}
COM: <s> this function tests is cell selected function of default graph cell class </s>
|
funcom_train/26345306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getReply() throws IOException {
gThread.start = System.currentTimeMillis();
while (gThread.ret == 0) {
try {
sleep(50);
} catch (InterruptedException e) {
}
}
getReplyMsg = gThread.line;
getReplyMultiLine = gThread.lines;
int ret = gThread.ret;
Utilities.print("ret = " + ret + "\n");
gThread.ret = 0;
gThread.start = 0;
return ret;
}
COM: <s> checks if the reply thread has some new lines </s>
|
funcom_train/20155612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processChannelTell(int channel, String name, String titles, String message, ChatType chatType) {
/** The entire message. */
String messageString = chatType.logFormat(userName, name, titles, message, channel);
System.out.println(messageString);
}
COM: <s> handle notification of an incoming channel chat </s>
|
funcom_train/34342569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOtraEncuesta() {
if (otraEncuesta == null) {//GEN-END:|119-getter|0|119-preInit
// write pre-init user code here
otraEncuesta = new Command("OtraEncuesta", Command.OK, 0);//GEN-LINE:|119-getter|1|119-postInit
// write post-init user code here
}//GEN-BEGIN:|119-getter|2|
return otraEncuesta;
}
COM: <s> returns an initiliazed instance of otra encuesta component </s>
|
funcom_train/40614039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean get(String key, boolean defaultValue) {
String s = get(key, "" + defaultValue);
try {
return Boolean.valueOf(s).booleanValue();
} catch (NumberFormatException e) {
throw DbException.get(ErrorCode.DATA_CONVERSION_ERROR_1, e, "key:" + key + " value:" + s);
}
}
COM: <s> get the setting for the given key </s>
|
funcom_train/51342271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void closeTx(long tx, long revisionTime, boolean aborted) {
if (log.isInfoEnabled())
log.info("tx=" + tx + ", revisionTime=" + revisionTime
+ ", aborted=" + aborted + ", elapsed="
+ (revisionTime - tx));
}
COM: <s> report completion of a transaction </s>
|
funcom_train/32380396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDeleteResourcesForFailureCase1() {
System.out.println("testDeleteResourcesForFailureCase1");
long[] resourceId = null;
ResourceManager resManager = new ResourceManager();
int expResult = IdentityMgmtConstants.ACTION_FAILED;
int result = resManager.deleteResources(resourceId);
assertEquals(expResult, result);
}
COM: <s> test of delete resources method of class com </s>
|
funcom_train/26152085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IVMInstall getVMInstall(String vmInstallName) {
if (vmInstallName != null) {
IVMInstall[] vmInstalls = getVMInstalls();
for (int i = 0; i < vmInstalls.length; i++) {
if (vmInstallName.equals(vmInstalls[i].getName())) {
return vmInstalls[i];
}
}
}
// if vmInstallName not found just return default
return JavaRuntime.getDefaultVMInstall();
}
COM: <s> a convenience method for returning a reference to the vm install for a </s>
|
funcom_train/23382634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(final List<? extends T> items) {
this.list.clear();
int idx = 0;
for (final T i : items) {
final Entry entry = new Entry(idx++, i);
this.list.add(entry);
}
Collections.sort(list);
if (positions == null || positions.length < items.size()) {
positions = new int[items.size()];
}
int pos = 0;
for (final Entry e : this.list) {
positions[e.idx] = pos++;
}
}
COM: <s> initializes the index for the given list of items </s>
|
funcom_train/1746473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean loadDataIntoCcsdd(){
boolean result=true;
log.setModuleStep("loadDataIntoCcsdd");
try {
CallableStatement cs = pParser.getConnection().prepareCall(
"{call LOADING.FILL_TREE}" );
cs.execute();
cs.close();
} catch (SQLException ex) {
log.log(Log.ERROR,"SQLException:" + ex.getMessage());
result= false;
}
return result;
}
COM: <s> method to insert data from t ccsdd init table into main ccsdd tables </s>
|
funcom_train/7470590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testOtherRealmsNoAuth() throws Exception {
startServer(47501);
fetchPage("/basic.jsp", 200);
fetchPage("/basic.jsp?case=1", 401);
fetchPage("/basic.jsp?case=2", 401);
}
COM: <s> tests that authentication happens for a defined realm and not for </s>
|
funcom_train/1805289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleSpreadsheetSelection() {
int selected = spreadsheetListBox.getSelectedIndex();
if (spreadsheetEntries != null && selected >= 0) {
SpreadsheetEntry entry = spreadsheetEntries.get(selected);
ajaxLinkField.setText(
entry.getHtmlLink().getHref());
worksheetsFeedUrlField.setText(
entry.getWorksheetFeedUrl().toExternalForm());
}
}
COM: <s> shows the feed urls as you select spreadsheets </s>
|
funcom_train/51271659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void finishedDraining(Gatekeeper oldGk) throws MXQueryException{
if (lastControlElementType == Query.CTL_CHANGE_DDCHANGE){
applyIChange(oldGk, newVersion);
}
else if (lastControlElementType == Query.CTL_CHANGE_SDCHANGE || lastControlElementType == Query.CTL_CHANGE_QDCHANGE || lastControlElementType == Query.CTL_CHANGE_GDCHANGE ){
//TODO: Benchmark related
//bf.setLastOld();
merger.endParallelism();
} else {
q.executionState = Query.EXECUTION_STATE_STOPPED;
}
}
COM: <s> this method is called by the gatekeeper that has just finished its draining </s>
|
funcom_train/31363473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getNames() {
Vector rVector = new Vector ();
rVector.add ("PersonID");
rVector.add ("LabFeeNo");
rVector.add ("DateScanned");
rVector.add ("DateExpires");
rVector.add ("DateUsed");
rVector.add ("AccountType");
return rVector;
}
COM: <s> returns a vector of field names for all the lab fee columns </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.