__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/22285642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getTabWidth(int pageIndex) {
// use string width of the value of the key
String title = getKey(getPage(pageIndex).title, false);
// here we go!
int result = 0;
if (title != null) {
FontMetrics fm1 = getFontMetrics(tabFont);
FontMetrics fm2 = getFontMetrics(selectFont);
int strw;
if (pageIndex == current) {
strw = fm2.stringWidth(title);
} else {
strw = fm1.stringWidth(title);
}
result = strw + 14;
}
return result;
}
COM: <s> get the minimum width of the tab that </s>
|
funcom_train/46189507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTrackBackIpAddressOnBlacklist() {
blog.getPluginProperties().setProperty(IpAddressListener.WHITELIST_KEY, "");
blog.getPluginProperties().setProperty(IpAddressListener.BLACKLIST_KEY, "127.0.0.1");
listener.trackBackAdded(trackBackEvent);
assertTrue(trackBack.isPending());
assertEquals(1, trackBack.getSpamScore());
}
COM: <s> tests a track back from an ip address that is on the blacklist </s>
|
funcom_train/2487440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ArrayList getEntityEjbs() {
ArrayList refs = new ArrayList();
for (int i = 0; i < getChildCount(); i++) {
JagBean child = (JagBean) getChildAt(i);
if (child instanceof Entity) {
refs.add(child);
}
}
return refs;
}
COM: <s> return all entity ejbs </s>
|
funcom_train/47140204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCaption (String sCaption) {
synchronized (getPeerLock()) {
if (m_jmiPeer != null) {
m_jmiPeer.setText (sCaption);
}
if (m_jmMenuPeer != null) {
m_jmMenuPeer.setText (sCaption);
m_jmMenuPeer.getItem (0).setText (sCaption);
}
}
super.setCaption (sCaption);
}
COM: <s> set the caption of this menu sheet item </s>
|
funcom_train/4533400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void holdAll() {
if (interlocutors.size() < 1) {
Log.debug("hold", "No interlocutors");
return;
}
for (InterlocutorUI interlocutor : interlocutors) {
boolean mic = interlocutor.onHoldMic(), cam = interlocutor.onHoldCam();
for (UserActionListener ual : actionHandlers) {
ual.handleHold(interlocutor, !mic, cam);
}
}
}
COM: <s> hold all current calls </s>
|
funcom_train/33649688 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setExecutor(Executor executor) {
Validate.parameterNotNullInstanceOf("executor", executor, Serializable.class, Cloneable.class);
Executor oldExecutor = this.executor;
this.executor = executor;
if (asynchronousWrapper != null) {
asynchronousWrapper.setExecutor(executor);
}
propertyChangeSupport.firePropertyChange(PROP_EXECUTOR, oldExecutor, executor);
}
COM: <s> set the value of executor </s>
|
funcom_train/41101447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void send(Message m) {
SendMessageCommand smc = new SendMessageCommand();
try {
RequestSender myRequestSender = RequestSender.lookup("NetworkFramework");
smc.setMessage(m);
ReplyEnvelope reply = myRequestSender.send(smc);
reply.checkForRuntimeException();
} catch (Exception ex) {
ex.printStackTrace();
}
}
COM: <s> sends a given message to all destination addresses that it contains </s>
|
funcom_train/50339789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean deleteIcon() {
if (log.isDebugEnabled()) log.debug("deleteSensor Action: iconMap.size()= "+_iconMap.size());
if (_iconMap.size()<4) {
return false;
}
String name = MultiSensorItemPanel.POSITION[_iconMap.size()-4];
_iconMap.remove(name);
return true;
}
COM: <s> action item for make add icon button panel </s>
|
funcom_train/31668016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int read(byte[] b, int off, int len) throws IOException {
int mycount = 0;
int current = 0;
// limit bandwidth ?
if (bandwidth > 0) {
for (int i=off; i < off+len; i++) {
current = read();
if (current == -1) {
return mycount;
} else {
b[i]=(byte)current;
count++;
mycount++;
}
}
return mycount;
} else {
return in.read(b, off, len);
}
}
COM: <s> reads a block of bytes from the stream </s>
|
funcom_train/1674580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isForceCleanFile(long file) {
if (forceCleanFiles != null) {
for (int i = 0; i < forceCleanFiles.length; i += 2) {
long from = forceCleanFiles[i];
long to = forceCleanFiles[i + 1];
if (file >= from && file <= to) {
return true;
}
}
}
return false;
}
COM: <s> returns whether the given file is in the force clean files set </s>
|
funcom_train/47137975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(Serializable serializable) {
if (!serializable.getClass().getName().equals(containedObjectsClassName)) {
return false;
}
Enumeration elements = vector.elements();
while (elements.hasMoreElements()) {
Serializable containedSerializable = (Serializable) elements.nextElement();
if (containedSerializable.getIdValue() == serializable.getIdValue()) {
return true;
}
}
return false;
}
COM: <s> checks if an object with the same id is in the vector </s>
|
funcom_train/3443687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createOtherTabs() {
tabs.add("Excentric", createExcentricLabelControPanel());
tabs.add("Fisheyes", createFisheyesControlPanel());
if (getVisualization().getRulerTable() != null) {
tabs.add("Rulers", createRulersControlPanel());
}
}
COM: <s> creates other tables required by the visualization </s>
|
funcom_train/6226916 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(ColoredFont other) {
font = new FontUIResource(other.font);
isPlainFont = other.isPlainFont;
isBoldFont = other.isBoldFont;
if(other.sbReference != null) {
sbReference.setBrightness(other.sbReference.getBrightness());
sbReference.setLocked(other.sbReference.isLocked());
sbReference.setReference(other.sbReference.getReference());
sbReference.setSaturation(other.sbReference.getSaturation());
sbReference.setColor(other.sbReference.getColor());
}
}
COM: <s> sets up this colored font to be identical to argument </s>
|
funcom_train/5372031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector searchSeq(String seqname, DBSearch dbs) throws ClassNotFoundException, IOException {
Vector rc = new Vector();
Vector v = (Vector)seqs.get(seqname);
if (v == null)
return null;
int n = v.size();
Record rec;
Integer it;
Object o;
for (int i=0;i<n;i++) {
it = (Integer)v.elementAt(i);
rec = getRecord(it.intValue());
o = rec.getObject();
if (dbs.matches(o))
rc.addElement(o);
}
return rc;
}
COM: <s> search a sequence using a dbsearch interface </s>
|
funcom_train/42554703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isFolderMovingOut(){
boolean result = false;
result = !this.contains(new Point (
getX()+myFolderMoving.getX()+myFolderMoving.getWidth()*1/4,
getY()+myFolderMoving.getY()+myFolderMoving.getHeight()*1/4));
return result;
}
COM: <s> determines if the file moving is exiting the file list </s>
|
funcom_train/32166352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String generateLabel(XYDataset dataset, int series) {
if (dataset == null) {
throw new IllegalArgumentException("Null 'dataset' argument.");
}
// TODO
String label = MessageFormat.format(
this.formatPattern, createItemArray(dataset, series)
);
return label;
}
COM: <s> generates a label for the specified series </s>
|
funcom_train/49890821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireRequestSent(final AbstractBody request) {
assertUnlocked();
BOSHMessageEvent event = null;
for (BOSHClientRequestListener listener : requestListeners) {
if (event == null) {
event = BOSHMessageEvent.createRequestSentEvent(this, request);
}
try {
listener.requestSent(event);
} catch (Exception ex) {
LOG.log(Level.WARNING, UNHANDLED, ex);
}
}
}
COM: <s> notifies all request listeners that the specified request is being </s>
|
funcom_train/14070972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVersionString(String sversion) {
sversion = sversion.replace('.',' ');
String[] s = sversion.split(" ");
version = (byte)((Integer.parseInt(s[0]) & 0x0F) << 4 |
(Integer.parseInt(s[1])));
}
COM: <s> set the version via a formatted string major </s>
|
funcom_train/19183329 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel() {
if (jPanel == null) {
jPanel = new JPanel();
jPanel.setLayout(new BorderLayout());
jPanel.setPreferredSize(new java.awt.Dimension(0,30));
jPanel.add(getJPanel1(), java.awt.BorderLayout.WEST);
jPanel.add(getJPanel2(), java.awt.BorderLayout.EAST);
}
return jPanel;
}
COM: <s> this method initializes j panel </s>
|
funcom_train/1238141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public QName getParameterName(String operationName, int n) {
MetaInfo value = (MetaInfo) table.get(operationName);
if ((value == null) || (value.names == null)
|| (value.names.length <= n + 1)) {
return null;
}
return value.names[n + 1];
}
COM: <s> used to return the name of the n th parameter of the specified </s>
|
funcom_train/18846624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String createEndEventMissingException(String tscToken, String eventID) {
PropertyMap propertyMap = new PropertyMap();
DiagnosticsListCreator edg;
edg = new DiagnosticsListCreator();
String severityType = DiagnosticsCodes.getErrorDiagnosticsCode();
String exceptionID = "80282";
propertyMap.addPropertyValuePair("eventID", eventID);
String serExMsg = edg.constructErrorDocOneItemParam(tscToken,
componentID,
severityType,
subSystemCode,
exceptionID,
propertyMap);
return serExMsg;
}
COM: <s> create diagnostics message </s>
|
funcom_train/4969431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private static class StationVariant implements WeightProvider {
/**
* @param number
* @param weight
*/
private StationVariant(int number, float weight) {
this.weight = weight;
this.number = number;
}
private float weight;
private int number;
@Override
public float provideWeight() {
return weight;
}
/**
* @return the number
*/
public int getNumber() {
return number;
}
}
COM: <s> a station variant </s>
|
funcom_train/44431520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unwantedItem(ItemIF item, ChannelIF channel) {
final int size = observers.size();
for (int i = 0; i < size; i++) {
final CleanerObserverIF observer = (CleanerObserverIF) observers.get(i);
try {
observer.unwantedItem(item, channel);
} catch (Exception e) {
// Do not care about exceptions from sub-observers.
}
}
}
COM: <s> invoked when cleanup engine finds unwanted item </s>
|
funcom_train/42111072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean highest(Object[] state, Block block) {
Integer highBlock = BlocksWorldState.getHighestBlock(state);
Integer[] intState = BlocksWorldState.getIntState(state);
int blockIndex = block.getName().charAt(0) - 'a';
int blockHeight = 1;
while (intState[blockIndex] > 0) {
blockIndex = intState[blockIndex] - 1;
blockHeight++;
}
if (blockHeight == highBlock)
return true;
return false;
}
COM: <s> method for determining if a block is the highest </s>
|
funcom_train/46395957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doInEDT() {
for (ReputationFloat repFloat : fctx.panelManager.getRegisteredReputationFloats()) {
for (UserProfile up : repFloat.repPanel.userProfiles) {
if (up.site.equals(site)) {
SummaryEntry se = new SummaryEntry();
se.userId = up.id;
se.userName = up.name;
se.userRep = up.reputation;
se.avatarUrl = up.avatarUrl;
se.site = site;
result.add(se);
}
}
}
}
COM: <s> perform this operation in the edt </s>
|
funcom_train/37422418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Position findPositionByName(String pName) throws ClassNotFoundException, SQLException {
Vector tVect = findPositionByQuery("select * from position where name = '" + Utility.Replace(pName) + "' order by name");
if (tVect.size() > 0)
return (Position) tVect.firstElement();
else
return null;
}
COM: <s> finds a position in the database using its name </s>
|
funcom_train/10865787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBasics() throws IOException {
check("अाॅअाॅ", "ऑऑ");
check("अाॆअाॆ", "ऒऒ");
check("अाेअाे", "ओओ");
check("अाैअाै", "औऔ");
check("अाअा", "आआ");
check("अाैर", "और");
// khanda-ta
check("ত্", "ৎ");
}
COM: <s> test some basic normalization </s>
|
funcom_train/1485530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DirContext getContext(String url) throws NamingException {
Hashtable env = new Hashtable();
env.put(Context.PROVIDER_URL,url);
env.put(Context.INITIAL_CONTEXT_FACTORY,initialContextFactory);
env.put(Context.SECURITY_AUTHENTICATION,authenticationType);
env.put(Context.SECURITY_PRINCIPAL,securityPrincipal);
env.put(Context.SECURITY_CREDENTIALS,securityCredentials);
DirContext ctx = new InitialDirContext(env);
return ctx;
}
COM: <s> get ldap context </s>
|
funcom_train/8077141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int rangeUpper(String range) {
int hyphenIndex;
if ((hyphenIndex = range.indexOf('-')) >= 0) {
return Math.max(rangeUpper(range.substring(0, hyphenIndex)),
rangeUpper(range.substring(hyphenIndex + 1)));
}
return rangeSingle(range);
}
COM: <s> translates a range into its upper index </s>
|
funcom_train/9829902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setAllToFile(String fileName) {
// Writer stream = new BufferedWriter(new FileWriter(fileName));
Writer thisWriter = JHDLPrintWriter.getBufferedWriter(fileName); // Let JHDLPrintWriter take care of the file handling
for(int x=0;x<NUMBER_OF_PRINTWRITER_IDENTIFIERS;x++)
redirect(x, thisWriter);
return true;
}
COM: <s> sets all code jhdlprint writer code instances in this code jhdloutput code object </s>
|
funcom_train/29774252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPasswordCharArray(final char[] password) {
if (this.password != null) {
// We clean the old password, if there is one.
cleanPassword();
}
if (password == null) {
this.password = null;
} else {
this.password = new char[password.length];
System.arraycopy(password, 0, this.password, 0, password.length);
}
}
COM: <s> sets the password to be used for encryption as a char </s>
|
funcom_train/39189395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPosByFieldId( long ColId) {
int f_size = Fields.size();
for ( int f_pos = 0; f_pos < f_size; f_pos ++ ) {
Field f_this = (Field) Fields.get( f_pos);
if ( f_this.getACCS_Id() == ColId)
return( f_pos);
}
return -1;
}
COM: <s> gets the position of the column whose field id matches col id </s>
|
funcom_train/3102516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleEditorChanged(final IEditorPart part) {
ITextEditor editor= null;
if (part instanceof ITextEditor) {
editor= (ITextEditor) part;
}
fTogglePresentation.setEditor(editor);
fTogglePresentation.update();
fPreviousAnnotation.setEditor(editor);
fNextAnnotation.setEditor(editor);
fToggleInsertModeAction.setAction(getAction(editor, ITextEditorActionConstants.TOGGLE_INSERT_MODE));
fGotoMatchingPeer.setAction(getAction(editor, ISourceEditorActionConstants.PEER));
}
COM: <s> handles the editor changed event </s>
|
funcom_train/1749431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void requestExecuted(String p_SuccOrFail, String p_StartTime, String p_EndTime, String p_Duration, String p_ErrorDescription) {
startTime = p_StartTime;
duration = p_Duration;
endTime = p_EndTime;
succorFail = p_SuccOrFail;
errorDescription = p_ErrorDescription;
}
COM: <s> full the attributes of an executed request </s>
|
funcom_train/32051721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isProfileScenario(final Method method) {
// TODO handle invalid method.
final boolean isPublic = Modifier.isPublic(method.getModifiers());
final boolean isVoid = method.getReturnType() == void.class;
final boolean isNoArgs = method.getGenericParameterTypes().length == 0;
boolean isAnnotated = method.isAnnotationPresent(Profile.class);
return isAnnotated && isNoArgs && isPublic && isVoid;
}
COM: <s> verify if a method is a respect a contract of </s>
|
funcom_train/1169264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JDialog getDlg(JFrame frame) {
final JDialog dlg = this.dlg.createDialog(frame, ForgeProps.getLocalized(TITLE));
close.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
dlg.setVisible(false);
}
});
return dlg;
}
COM: <s> p getter for the field code dlg code </s>
|
funcom_train/5462937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testsf2352674() throws ExtractorException, IOException, ModelException {
RDFContainer container = getStatements(OPEN_DOCUMENT_WRITER_MULTI_SPACE_DOC);
checkStatement(NIE.plainTextContent, OPEN_DOCUMENT_WRITER_MULTI_SPACE_DOC_FULLTEXT, container);
validate(container);
container.dispose();
}
COM: <s> tests the content extraction in a multi space file </s>
|
funcom_train/50273651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void waitForIdleCircuits(int minExpectedIdleCircuits) {
// wait until server info and established circuits are available
while (!directory.isDirectoryReady() || getCircuitsStatus().getCircuitsEstablished() < minExpectedIdleCircuits) {
try {
Thread.sleep(100);
} catch (Exception e) { /* ignore it */ }
}
}
COM: <s> wait until tor has at least min expected idle circuits idle circuits </s>
|
funcom_train/18008015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setPageSize(Rectangle pageSize) {
if (!parseFormat(pageSize, false)) {
pageWidth = (int) (pageSize.width() * TWIPSFACTOR);
pageHeight = (int) (pageSize.height() * TWIPSFACTOR);
landscape = pageWidth > pageHeight;
}
return true;
}
COM: <s> sets the page size </s>
|
funcom_train/3399094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Long getSerialVersionUID() {
Element serial = DOMUtil.getElement(dom,XJC_NS,"serializable");
if(serial==null) return null;
String v = DOMUtil.getAttribute(serial,"uid");
if(v==null) v="1";
return new Long(v);
}
COM: <s> gets the serial version uid if its turned on </s>
|
funcom_train/49329440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processQueue() {
if (!SwingUtilities.isEventDispatchThread()) {
throw new BugException("processQueue called from non-EDT");
}
List<FunctionEvaluationData> evaluations = new ArrayList<FunctionEvaluationData>();
evaluationQueue.drainTo(evaluations);
if (!evaluations.isEmpty()) {
functionEvaluated(evaluations);
}
List<OptimizationStepData> steps = new ArrayList<OptimizationStepData>();
stepQueue.drainTo(steps);
if (!steps.isEmpty()) {
optimizationStepTaken(steps);
}
}
COM: <s> process the queue and call the listeners </s>
|
funcom_train/8073812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
int hv = 0;
if (key != -999)
return key;
for (int i=0;i<attributes.length;i++) {
if (missing[i]) {
hv += (i*13);
} else {
hv += (i * 5 * (attributes[i]+1));
}
}
if (key == -999) {
key = hv;
}
return hv;
}
COM: <s> calculates a hash code </s>
|
funcom_train/2579831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Range getDataRange(ValueAxis axis) {
Range result = null;
if (this.subplots != null) {
Iterator iterator = this.subplots.iterator();
while (iterator.hasNext()) {
XYPlot subplot = (XYPlot) iterator.next();
result = Range.combine(result, subplot.getDataRange(axis));
}
}
return result;
}
COM: <s> returns a range representing the extent of the data values in this plot </s>
|
funcom_train/45547054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IoState unwindImpl(final IoState preState) {
IoState exitState = IoState.DONE;
int currentIndex = stack.size() - 1;
while (currentIndex > 0) {
current.discard();
stack.remove(currentIndex--);
current = stack.get(currentIndex);
exitState = current.unwind(preState);
if (exitState != IoState.DONE)
break;
}
return exitState;
}
COM: <s> unwinds the execution stack </s>
|
funcom_train/5689283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startDiscovery() throws Exception {
if ( m_bMediaBusy ) {
m_log.debug("IrLAPContext", "media is busy now, ignoring");
} else {
m_log.debug("IrLAPContext",
"\tSend-Discovery-Request:" + m_nMyAddress);
_slotCount = 0;
m_framer.sendXID(m_nMyAddress, 0xFFFFFFFF,
true, _slotCount, DISCOVERY_INFO);
startSlotTimer();
setMediaBusy(true);
nextState(IrLAPStateQuery.getInstance());
}
}
COM: <s> discover other ir da hosts </s>
|
funcom_train/38535163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long get(int offset) {
if (offset < 0)
throw new IndexOutOfBoundsException("invalid value offset");
// any value beyond total size has not been set yet
if (offset >= size) return 0;
// convert to an actual offset in arrays
int actualOffset = basePointer + offset;
// return value at requested position
return dataStack[actualOffset];
}
COM: <s> retrieves a value in list </s>
|
funcom_train/47193496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextArea getChatText() {
if (ChatText == null) {
ChatText = new JTextArea(7, 10);
ChatText.setBounds(new Rectangle(60, 21, 226, 121));
ChatText.setEditable(false);
ChatText.setLineWrap(true);
ChatText.setText("Welcome to Project Theta");
ChatText.setWrapStyleWord(true);
}
return ChatText;
}
COM: <s> this method initializes chat text </s>
|
funcom_train/49892191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Double getDouble(String key) throws JSONException {
Object o = get(key);
if (o == null)
return null;
try {
return o instanceof Number ?
((Number)o).doubleValue() :
Double.valueOf((String)o).doubleValue();
} catch (Exception e) {
throw new JSONException("JSONObject[" + quote(key) +
"] is not a number.");
}
}
COM: <s> get the double value associated with a key </s>
|
funcom_train/34126265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addBlock(Block b) {
if (this.isOccupied(b.getCoordinate().getX())
|| b.getCoordinate().getY() != this.rowIndex) {
throw new IllegalArgumentException("A block may not be added at that coordinate: "
+ b.getCoordinate());
}
blocks[b.getCoordinate().getX()] = b;
}
COM: <s> adds a block to the row </s>
|
funcom_train/26036378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unwind() throws IndexOutOfBoundsException {
if (index > 0) {
// just point to previous stack entry
environment = trail.get(--index);
trail.set(index, null); // free the old space for GC
} else {
throw new IndexOutOfBoundsException("Underflow of BindingEnvironment");
}
}
COM: <s> forget the current environment and return the previously </s>
|
funcom_train/46714786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeCalendarSyncSettings(Hashtable values) {
/*
htCalendarValues.put(PARAM_GOOGLE_CALENDAR_SINCE, new String(daysBeforeValue.getText()));
htCalendarValues.put(PARAM_GOOGLE_CALENDAR_UNTIL, new String(daysAfterValue.getText()));
mainWindow.writeYahooCalendarInterval(htCalendarValues);
*/
}
COM: <s> saves the specified configuration parameters </s>
|
funcom_train/19541730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AssetChunk nextChunk(int size) throws IOException {
if (currentPosition + size > length) {
size = (int)(length - currentPosition);
}
byte[] data = new byte[size];
FileInputStream in = new FileInputStream(assetFile);
in.skip(currentPosition);
in.read(data, 0, size);
in.close();
currentPosition += size;
return new AssetChunk(id, data);
}
COM: <s> get the next chunk of data </s>
|
funcom_train/13200390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadResource(String path) {
if( logger.isTraceEnabled() )
logger.trace( "Resource: " + path );
File fp = new File( path );
if( !fp.exists() && !ignoreMissingResources ) {
throw new JclException( "File/Path does not exist" );
}
loadResource( fp, "" );
}
COM: <s> reads local resources from jar files class folders jar library </s>
|
funcom_train/13274663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected View getStepsView() {
// Create view lazily only once it's needed
if (this.stepsView == null) {
this.stepsView = this.viewFactory.createImportedTextureWizardStepsView(this.texture, this.textureName,
this.preferences, this);
}
return this.stepsView;
}
COM: <s> returns the unique wizard view used for all steps </s>
|
funcom_train/31078597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyModel(ActionEvent event) {
if((model == null) || (event == null)){return;}
final AppControllerEventListener mod = model;
final ActionEvent evt = event;
if(!blocking) {
pool.newThread(new Runnable() {
public void run(){mod.actionPerformed(evt);}
}).start();
} else {
mod.actionPerformed(evt);
}
}
COM: <s> sends notification to update the model </s>
|
funcom_train/14625619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void attachViewListenersDialogSSL() {
m_dialogSSL.addDialogSSLButtonAcceptListener(getDialogSSLButtonAcceptListener());
m_dialogSSL.addDialogSSLButtonAcceptPermanentlyListener(getDialogSSLButtonAcceptPermanentlyListener());
m_dialogSSL.addDialogSSLButtonCancelListener(getDialogSSLButtonCancelListener());
}
COM: <s> attaches the listeners for the ssl dialog </s>
|
funcom_train/49608814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertFacilityType(String username,EntityManager em,FacilityType vo) throws Throwable {
try {
JPAMethods.persist(em, username, DefaultFieldsCallabacks.getInstance(), vo);
}
catch (Throwable ex) {
Logger.error(null, ex.getMessage(), ex);
throw ex;
}
finally {
em.flush();
}
}
COM: <s> insert a facility type </s>
|
funcom_train/18655252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JasenMap getJasenMap(JasenMapStore store, Properties properties) throws JasenException {
JasenMap map = (JasenMap)maps.get(store.getStoreKey());
if(map == null) {
synchronized (mutex) {
map = (JasenMap)maps.get(store.getStoreKey());
if(map == null) {
map = store.load(properties);
maps.put(store.getStoreKey(), map);
}
mutex.notifyAll();
}
}
return map;
}
COM: <s> gets the map associated with the given store </s>
|
funcom_train/25226691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkExistingFile(){
File fileExt= new File(SETTINGS_FILE_PATH);
if (fileExt.exists()){
try {
FileInputStream intExt = new FileInputStream(fileExt);
DataInputStream dis=new DataInputStream(intExt);
savedLogin=dis.readUTF();
savedPassword=dis.readUTF();
} catch (FileNotFoundException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
else{
savedPassword=""; //$NON-NLS-1$
savedLogin=""; //$NON-NLS-1$
}
}
COM: <s> check existing file </s>
|
funcom_train/25049161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isMenuItemAllowed(MenuItem menuItem) {
if(menuItem instanceof Leaf) {
return targetFilter.isAllowed(((Leaf) menuItem).getPageClass());
} else if(menuItem instanceof Submenu){
Submenu submenu = (Submenu) menuItem;
for(MenuItem item : submenu.getMenuItems()) {
if(isMenuItemAllowed(item)) {
return true;
}
}
}
return false;
}
COM: <s> returns true if the menu item is allowed for the current user </s>
|
funcom_train/4295481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Button getRunButton() {
if (runButton == null) {
runButton = new Button();
runButton.setBounds(new java.awt.Rectangle(604,105,138,23));
runButton.setLabel("Run Report");
runButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
System.out.println("actionPerformed() on run button"); // TODO Auto-generated Event stub actionPerformed()
run();
}
});
}
return runButton;
}
COM: <s> this method initializes run button </s>
|
funcom_train/12162462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void verifyStyleManySet(String actual) {
assertEquals("Markup should match",
"<font color=\"red\" size=\"7\">" +
"<b>" +
"<i>" +
"<u>" +
"<strike/>" +
"</u>" +
"</i>" +
"</b>" +
"</font>",
actual);
}
COM: <s> helper method which may be overridden by specialisations of this protocol </s>
|
funcom_train/22571291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setNewProfile(ICompetenceProfile profile) {
if(profile != null) {
// Register
profile.setRegistered(RegistrationType.REGISTERED);
try {
profile.persist();
}
catch(RestException ex) {
ex.printStackTrace();
}
((CompetenceProfileEditorInput)fEditor.getEditorInput()).setCompetenceProfile(profile);
fEditor.reinit();
}
}
COM: <s> set a new profile and update the parent editor </s>
|
funcom_train/42871625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(byte b[], int off, int len) throws IOException {
// if there's something in the buffer, just write it.
if (bitsfree != 8) {
out.write((buffer << bitsfree) & 0xFF);
bitsfree = 8;
}
out.write(b, off, len);
}
COM: <s> write an array of bytes assume they want this byte aligned </s>
|
funcom_train/22498005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void cursor() {
final JRootPane rootPane = getRootPane();
if (rootPane != null) {
final Component gp = rootPane.getGlassPane();
if (!gp.isVisible()) {
gp.setCursor(waitCursor);
gp.setVisible(true);
}
else {
gp.setVisible(false);
}
}
}
COM: <s> display a wait cursor for lengthy operations </s>
|
funcom_train/24049788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLabelBoundary(int argIndex) {
if (label == null)
return;
// determine the current location for the point (if any)
int loc = Location.NONE;
if (label != null)
loc = label.getLocation(argIndex);
// flip the loc
int newLoc;
switch (loc) {
case Location.BOUNDARY:
newLoc = Location.INTERIOR;
break;
case Location.INTERIOR:
newLoc = Location.BOUNDARY;
break;
default:
newLoc = Location.BOUNDARY;
break;
}
label.setLocation(argIndex, newLoc);
}
COM: <s> updates the label of a node to boundary obeying the mod 2 </s>
|
funcom_train/34499733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Set getSelection(StructuredSelection selectionTree) {
HashSet list = new HashSet(selectionTree.size());
Iterator selit = selectionTree.iterator();
while (selit.hasNext()) {
Object object = ((TableTreeObject)selit.next()).getUserObject();
if ((object instanceof EGEntity) || (object instanceof IDefined_type) ||
(object instanceof AbstractEGRelation) || (object instanceof EGSchema) ||
(object instanceof EGConstraint)) {
list.add(object);
}
}
return list;
}
COM: <s> filtering what to add to editor selection real selection </s>
|
funcom_train/8811982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void show(String title, String header) {
// Lazy building.
if (window == null) {
init();
}
titleLabel.setText(header);
// Open the window.
window.setHeading(title);
window.setHeight(100 + (FIELD_HEIGHT * (fields.size())));
window.show();
}
COM: <s> initialize the window and open it </s>
|
funcom_train/25917217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean write(String title, String body) {
String storageState = Environment.getExternalStorageState();
if (storageState.contains("mounted")) {
File f = Environment.getExternalStorageDirectory();
File j = new File(f, title + ".txt");
try {
out = new FileOutputStream(j);
} catch (FileNotFoundException e) {
return false;
}
try {
out.write(body.getBytes());
} catch (IOException e) {
return false;
}
return true;
}
return false;
}
COM: <s> create and write a file on external storage sd card </s>
|
funcom_train/44850291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createSubscription(Long inQuestionID, Long inMemberID, boolean inLocal) throws VException, SQLException {
DomainObject lObject = getSubscriptionHome().create();
lObject.set(SubscriptionHome.KEY_QUESTIONID, inQuestionID);
lObject.set(SubscriptionHome.KEY_MEMBERID, inMemberID);
lObject.set(SubscriptionHome.KEY_LOCAL, new Integer(inLocal ? 1 : 0));
lObject.insert(true);
}
COM: <s> creates a subscription </s>
|
funcom_train/14025895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startActivityTask() {
_resultMessage.setText("");
_currentTask = ActivityManager.getInstance().createNewActivityTask(_factory, _activityName);
_progress.setActivityTask(_currentTask);
displayProgress();
ActivityObserver.getInstance().addActivityUpdateListener(this);
}
COM: <s> a manual programmatic hook into the action performed by the refresh button </s>
|
funcom_train/12557981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkSpace(int Space) {
if (bytes.length >= CurrentSize + Space)
return;
int NewSize = bytes.length;
while (NewSize < CurrentSize + Space)
NewSize = NewSize + Delta;
byte[] NewData = new byte[NewSize];
for (int i = 0; i < CurrentSize; i++)
NewData[i] = bytes[i];
bytes = NewData;
}
COM: <s> checks if the buffer is large enough to place the </s>
|
funcom_train/3373015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics g, Shape allocation) {
Container host = getContainer();
if (host != null && htmlPane != null &&
htmlPane.isEditable() != ((JTextComponent)host).isEditable()) {
editable = ((JTextComponent)host).isEditable();
htmlPane.setEditable(editable);
}
super.paint(g, allocation);
}
COM: <s> also determines if the frame view should be editable </s>
|
funcom_train/32069931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeRequestEvent(RequestEvent requestEvent) {
boolean removedOK = getRequestEvents().remove(requestEvent);
if (removedOK) {
requestEvent.setRequestEventType(null);
} else {
if (logger.isWarnEnabled()) {
logger.warn("remove returned false");
}
}
return removedOK;
}
COM: <s> remove the passed request event from the request event type collection and unset </s>
|
funcom_train/124948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void flushBase64() throws java.io.IOException {
if (position > 0) {
if (encode) {
out.write(encode3to4(b4, buffer, position));
position = 0;
} // end if: encoding
else {
throw new java.io.IOException(
"Base64 input not properly padded.");
} // end else: decoding
} // end if: buffer partially full
} // end flush
COM: <s> method added by phil </s>
|
funcom_train/4598560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void contextDestroyed(ServletContextEvent event) {
log.info("Finalizing memory database plug in");
if (database != null) {
try {
database.close();
} catch (Exception e) {
log.error("Closing memory database", e);
}
}
context.removeAttribute(DATABASE_KEY);
context.removeAttribute(PROTOCOLS_KEY);
database = null;
context = null;
}
COM: <s> p gracefully shut down this database releasing any resources that </s>
|
funcom_train/32219208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processOrigData( Object _origData )
{ Graph origData = (Graph)_origData;
HamiltPartialPathPiece piece;
piece = new HamiltPartialPathPiece( origData );
piece.performKernelOnSelf();
origData.hamiltPath = piece.nodesInPath;
origData.hasHamiltPath = piece.isAHamiltonianPath;
}
COM: <s> for the hamiltonian path problem turning the original graph into a </s>
|
funcom_train/10348778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getCancelButton() {
if (cancelButton == null) {
cancelButton = new JButton();
cancelButton.setText("Cancel");
final PreferenceDialog thisWindow = this;
cancelButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
thisWindow.dispose();
}
});
}
return cancelButton;
}
COM: <s> this method initializes cancel button </s>
|
funcom_train/45473295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JMethodSignature getMethod(final String name, final int startIndex) {
for (int i = startIndex; i < _methods.size(); i++) {
JMethodSignature jMethod = (JMethodSignature) _methods.elementAt(i);
if (jMethod.getName().equals(name)) { return jMethod; }
}
return null;
}
COM: <s> returns the jmethod signature with the given name and occuring at or </s>
|
funcom_train/3457442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void callback(PlaybackEvent evt) {
if (evt.getId() == PlaybackEvent.STARTED) {
logger.finer("JavaMp3Player: STARTED Playback Event Received");
notifyPlayerControllers("STARTED");
} else if (evt.getId() == PlaybackEvent.STOPPED) {
logger.finer("JavaMp3Player: STOPPED Playback Event Received");
notifyPlayerControllers("TERMINATED");
} else {
}
}
COM: <s> callback from private internal class </s>
|
funcom_train/42383591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void makeHeritable(String key) {
@SuppressWarnings("unchecked")
List<String> heritableKeys = (List<String>)data.get(A_HERITABLE_KEYS);
if (heritableKeys == null) {
heritableKeys = new ArrayList<String>();
data.put(A_HERITABLE_KEYS, heritableKeys);
}
heritableKeys.add(key);
}
COM: <s> make the given key heritable meaning its value will be </s>
|
funcom_train/30280984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void launchThreadsXOnFinish(Collection threadsX) {
if (LOG.isTraceEnabled()) {
LOG.trace("Entering launchThreadsXOnFinish ...");
}
synchronized (processX.getMutex()) {
for (Iterator threadsIt = threadsX.iterator(); threadsIt.hasNext();) {
BPThreadX curThreadX = (BPThreadX) threadsIt.next();
launchThreadsOnFinish(curThreadX);
}
}
}
COM: <s> schedule threads to run on this thread finish as outgoing threads </s>
|
funcom_train/42642981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPredicatePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_IRelation_predicate_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_IRelation_predicate_feature", "_UI_IRelation_type"),
DigitalHPSPackage.Literals.IRELATION__PREDICATE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the predicate feature </s>
|
funcom_train/36014325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeJtocAnnos(Scanner in, PrintWriter out){
if(this.unit.getInnerTestAnnotation() == null)
return;
this.printLinesTo(in, out, this.unit.getInnerTestAnnotation().getBeginLine()-1);
logger.debug("before remove the 1st anno, lineNum : " + lineNum);
this.removeLinesTo(in, this.unit.getInnerTestAnnotation().getEndLine());
}
COM: <s> called by method process in order to remove the inner test annotation </s>
|
funcom_train/15626759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateActions() {
aEventAddNew.setEnabled(doAddNewEvent(false));
aEventEditData.setEnabled(doEditEvent(ScriptTask.EVENT_EDIT_PATH, false));
aEventEdit.setEnabled(doEditEvent(ScriptTask.EVENT_OPEN, false));
aEventRemove.setEnabled(doEditEvent(ScriptTask.EVENT_REMOVE, false));
}
COM: <s> updates the enabled state of all actions </s>
|
funcom_train/19816824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setContent(MOWidget w){
if( w == null){
removeWidget();
return;
}
this.widget = w;
removeAll();
GridBagConstraints widgetConstraints = new GridBagConstraints();
widgetConstraints.anchor = GridBagConstraints.SOUTH;
widgetConstraints.fill = GridBagConstraints.BOTH;
widgetConstraints.gridx = 0;
widgetConstraints.gridy = 1;
widgetConstraints.weighty = 0.9;
widgetConstraints.insets = new Insets(0, 10, 0, 10);
w.setContainer(this);
this.add(widget, widgetConstraints);
}
COM: <s> public method used to set a widget at this location </s>
|
funcom_train/39570192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getUniqueCount() {
Vector v = new Vector();
for (int i=-ccwSize(); i<=cwSize(); i++) {
if (! v.contains(get(i).getNodeId())) {
v.add(get(i).getNodeId());
}
}
return v.size();
}
COM: <s> returns the number of unique nodes in the leafset </s>
|
funcom_train/10815958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(WritableComparable a, WritableComparable b) {
// The incoming key will be in a NullableTuple. But the comparison
// function needs a tuple, so pull the tuple out.
return compare((Tuple)((NullableTuple)a).getValueAsPigType(), (Tuple)((NullableTuple)b).getValueAsPigType());
}
COM: <s> compare two tuples </s>
|
funcom_train/34128685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parse() {
boolean isError = false;
ExchangerDocument doc = null;
try {
doc = new ExchangerDocument( properties.getURL());
doc.load();
} catch (Exception e) {}
if ( doc.isError() && doc.isXML()) {
properties.setState( DocumentProperties.STATE_ERROR);
} else if ( doc.isXML()) {
properties.setState( DocumentProperties.STATE_WELLFORMED);
} else {
properties.setState( DocumentProperties.STATE_UNKNOWN);
}
SwingUtilities.invokeLater( new Runnable() {
public void run() {
model.nodeChanged( DocumentNode.this);
}
});
}
COM: <s> parses the document for the node </s>
|
funcom_train/18962497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getSaveFile() {
File saveFile = null;
int returnVal = filerSave.showSaveDialog(this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
saveFile = filerSave.getSelectedFile();
TasselPrefs.putSaveDir(filerSave.getCurrentDirectory().getPath());
}
return saveFile;
}
COM: <s> provides a save filer that remembers the last location something was saved to </s>
|
funcom_train/19142804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addService(JmDNS jmdns, String type, String name) {
// for now, only record the new job server if we aren't
// working with one yet.
// TODO: add support for working
// with multiple servers at once.
if (serviceInfo == null) {
recordServiceInfo(jmdns.getServiceInfo(type, name));
jobServerFound();
}
}
COM: <s> rendezvous callback for when a server is discovered </s>
|
funcom_train/7751504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItem1() {
if (jMenuItem1 == null) {
jMenuItem1 = new JMenuItem();
jMenuItem1.setText("About");
jMenuItem1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
JFrame frame = new ViewTextFile("About", "README");
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
});
}
return jMenuItem1;
}
COM: <s> this method initializes j menu item1 </s>
|
funcom_train/37206324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(new BorderLayout());
jContentPane.add(getSplashscreen(), BorderLayout.NORTH);
jContentPane.add(new JPanel(),BorderLayout.CENTER);
jContentPane.add(getDetailsPane(), BorderLayout.SOUTH);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/29614246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getTextField() {
if (textField == null) {//GEN-END:|27-getter|0|27-preInit
// write pre-init user code here
textField = new TextField("Descri\u00E7\u00E3o produto", null, 32, TextField.ANY);//GEN-LINE:|27-getter|1|27-postInit
// write post-init user code here
}//GEN-BEGIN:|27-getter|2|
return textField;
}
COM: <s> returns an initiliazed instance of text field component </s>
|
funcom_train/36360220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBackCommand4() {
if (backCommand4 == null) {//GEN-END:|86-getter|0|86-preInit
// write pre-init user code here
backCommand4 = new Command("Back", Command.BACK, 0);//GEN-LINE:|86-getter|1|86-postInit
// write post-init user code here
}//GEN-BEGIN:|86-getter|2|
return backCommand4;
}
COM: <s> returns an initiliazed instance of back command4 component </s>
|
funcom_train/1242147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeModelSpaceBlock() throws IOException {
writeStartBlock("20", "1F", false, "0", "*MODEL_SPACE");
writeEndBlock("21", "1F", false, "0", "*MODEL_SPACE");
}
COM: <s> writes the static model space block </s>
|
funcom_train/17901693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResultSet getTableData(String table, Vector<?> columns) {
try {
return getResultSet(table, columns);
}
catch (DataSourceException e) {
outputExceptionError("Error retrieving table data", e);
appendProgressErrorText(outputBuffer);
return null;
}
catch (SQLException e) {
outputExceptionError("Error retrieving table data", e);
return null;
}
}
COM: <s> retrieves the records for the specified table as a </s>
|
funcom_train/36441401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLast(E element) {
numElts++;
DNode<E> oldLast = trailer.getPrev();
DNode<E> newNode = new DNode<E>(oldLast, trailer, element);
oldLast.setNext(newNode);
trailer.setPrev(newNode);
}
COM: <s> insert the given element at the end of the list returning </s>
|
funcom_train/43398084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setModelProperty(String propertyName, Object newValue) {
for (Model model: registeredModels) {
try {
Method method = model.getClass()
.getMethod("set"+propertyName, new Class[] { newValue.getClass() });
method.invoke(model, newValue);
} catch (Exception e) { }
}
}
COM: <s> this is a convenience method that subclasses can call upon </s>
|
funcom_train/31658070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRowOrderInVariableBindingSetImpl() {
VariableBinding[] tuple1 = { vb1, vb2 };
VariableBinding[] tuple2 = { vb1, vb3 };
List<VariableBinding> vbi = Arrays.asList(tuple1);
vbsi1.addVariableBindings(vbi);
vbi = Arrays.asList(tuple2);
vbsi1.addVariableBindings(vbi);
vbi = Arrays.asList(tuple2);
vbsi2.addVariableBindings(vbi);
vbi = Arrays.asList(tuple1);
vbsi2.addVariableBindings(vbi);
assertTrue(vbsi1.equals(vbsi2));
}
COM: <s> test row order in variable binding set impl </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.