__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/49608789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteContributors(String username,EntityManager em,List<Contributor> vos) throws Throwable {
try {
for(Contributor vo: vos) {
vo.setDeleted(Consts.FLAG_Y);
JPAMethods.merge(em, username, DefaultFieldsCallabacks.getInstance(), vo);
}
}
catch (Throwable ex) {
Logger.error(null, ex.getMessage(), ex);
throw ex;
}
}
COM: <s> delete logically a contributor </s>
|
funcom_train/4675601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onModuleLoad() {
LoginBox.getInstance().setSuccessfulLoginAction(new ISuceesfulLoginAction() {
public void execute(String aLoginName) {
//Window.confirm("Welcome " + aLoginName);
loadData();
}
});
LoginBox.getInstance().show();
}
COM: <s> populates the main panel with the custom compenents </s>
|
funcom_train/33064376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IRunnableWithProgress getRunnableFinish() {
final IPath path = page.getFilePath();
final String packg = page.getPackageName();
final String template = page.getTemplate();
final Map<String, String> params = page.getParameters();
return new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException {
try {
doFinish(path, packg, template, params, monitor);
} catch (CoreException e) {
throw new InvocationTargetException(e);
} finally {
monitor.done();
}
}
};
}
COM: <s> do finish by runnable progress </s>
|
funcom_train/39314353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetRightColor() {
System.out.println("testSetRightColor");
Color c = new Color( 40, 40, 40 );
m.setRightColor( c );
assertTrue(" color has updated ", c.getRGB() == m.right_color.getRGB() );
System.out.println("done testSetRightColor");
}
COM: <s> test of set right color method of class main canvas </s>
|
funcom_train/37872198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean hasArgumentList() {
if (CompletionProposal.METHOD_NAME_REFERENCE == fProposal.getKind())
return false;
IPreferenceStore preferenceStore = DLTKUIPlugin.getDefault()
.getPreferenceStore();
boolean noOverwrite = preferenceStore
.getBoolean(PreferenceConstants.CODEASSIST_INSERT_COMPLETION)
^ isToggleEating();
String completion = fProposal.getCompletion();
return !isInScriptdoc()
&& completion.length() > 0
&& (noOverwrite || completion.charAt(completion.length() - 1) == ')');
}
COM: <s> returns code true code if the argument list should be inserted by the </s>
|
funcom_train/13827646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showSelectionPropsDialog() {
PhotoInfo photo = getSelected();
// Try to find the frame in which this component is in
Frame frame = null;
Container c = getTopLevelAncestor();
if ( c instanceof Frame ) {
frame = (Frame) c;
}
if ( photo != null ) {
if (propertyDlg == null ) {
propertyDlg = new PhotoInfoDlg( frame, true, photo );
} else {
propertyDlg.setPhoto( photo );
}
propertyDlg.showDialog();
}
}
COM: <s> show the photo info editor dialog for the selected photo </s>
|
funcom_train/46327608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean delete(Long failedActionID) {
if (failedActionID == null) {
throw new IllegalArgumentException("null");
}
// Set the whereArgs to null here.
return database.delete(DATABASE_TABLE, KEY_FAILEDACTIONID + "=" + failedActionID, null) > 0;
}
COM: <s> delete a failed action parameter record for failed action </s>
|
funcom_train/8813025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void get(AsyncCallback<List<E>> callback) {
// If the countries list is available, returns the list immediately.
if (hasBeenSet) {
callback.onSuccess(list);
}
// Else put the callback in queue to be called later.
else {
queueEntities.add(new EntitiesAsyncCallback<E>(callback));
}
}
COM: <s> gets the whole collection </s>
|
funcom_train/10890632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getURI(HttpHost host, HttpRequest req) {
if (isRelativeRequest(req)) {
return canonicalizeUri(String.format("%s%s", host.toString(), req.getRequestLine().getUri()));
}
return canonicalizeUri(req.getRequestLine().getUri());
}
COM: <s> for a given </s>
|
funcom_train/11644809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReplaceToIdentical() {
values.put("animal", "$${${thing}}");
values.put("thing", "animal");
doTestReplace("The ${animal} jumps.", "The ${animal} jumps.", true);
}
COM: <s> tests replace creates output same as input </s>
|
funcom_train/8490316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeLogicOps() {
_logicOps = new HashMap<String, LogicOperator>();
_logicOps.put(ANDSTR, new ANDOperator());
_logicOps.put(ORSTR, new OROperator());
_logicOps.put(NOTSTR, new NOTOperator());
}
COM: <s> initializes logic operators </s>
|
funcom_train/10299339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showPopup() {
if (currentPopup != null &&
SwingUtilities.getAncestorOfClass(JWindow.class, invoker) ==
currentPopup.getWindow()) {
setInvoker(currentPopup.getInvoker());
}
Rectangle popupBounds = computePopupBounds(getSize());
jheditor.setPreferredSize(new Dimension(popupBounds.width,
popupBounds.height));
window.setBounds(popupBounds.x, popupBounds.y,
popupBounds.width, popupBounds.height);
window.pack();
window.show();
currentPopup = this;
}
COM: <s> show the window </s>
|
funcom_train/31309321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPreferences(String compName, String status) {
if(status.equals("0")||status.equals("1")) {
Vector names = getPreferencesNames(compName);
Enumeration e = names.elements();
while(e.hasMoreElements()) {
comps.put(compName+"_"+(String)e.nextElement(), status);
}
saveProperties();
}
}
COM: <s> sets all preferences for the component </s>
|
funcom_train/4509582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removePublisher(JID jid) {
// Get the current affiliation of the specified JID
NodeAffiliate affiliate = getAffiliate(jid);
if (affiliate.getSubscriptions().isEmpty()) {
removeAffiliation(jid, NodeAffiliate.Affiliation.publisher);
removeSubscriptions(jid);
}
else {
// The user has subscriptions so change affiliation to NONE
addNoneAffiliation(jid);
}
}
COM: <s> removes the publisher affiliation of the specified entity jid </s>
|
funcom_train/22529525 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProperty(String userId, int runId, String propId, String ownerId, String value) throws Exception {
long start = System.currentTimeMillis();
getEngine(userId, runId).setProperty(propId, ownerId, value);
logger.debug("setProperty() took " + (System.currentTimeMillis() - start) + " ms");
}
COM: <s> sets the property of the specified owner to the given value </s>
|
funcom_train/22405459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createMapping(String serializedWidgetTypeName, Class widgetCompositeClass) {
if (null == serializedWidgetTypeName)
throw new IllegalArgumentException("serializedWidgetTypeName must not be null");
if (null == widgetCompositeClass)
throw new IllegalArgumentException("widgetCompositeClass must not be null");
compositeClassBySerializedWidgetTypeName.put(serializedWidgetTypeName, widgetCompositeClass);
}
COM: <s> creates a mapping for the specified serialized widget class to the </s>
|
funcom_train/23271297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValueAxisLowerMargin(double margin) {
CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
if (plot != null) {
double old = plot.getRangeAxis().getLowerMargin();
plot.getRangeAxis().setLowerMargin(margin);
firePropertyChange("valueAxisLowerMargin", old, margin);
}
}
COM: <s> sets the lower margin for the value axis and fires a </s>
|
funcom_train/9685619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showJavaVersionWarning(IdeWindowContext context) {
String message =
"You should check the Java Version Supported from the Project Options.\n"
+ "That could remove some of the current parsing errors.";
new JWarningDialog(context, "jvm.mode.warning", message,
JWarningDialog.INFORMATION_MESSAGE, "").display();
}
COM: <s> might not show the warning if disabled from refactor it options </s>
|
funcom_train/23998466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addChild( SceneNode node ) {
if ( children.contains( node ) ) {
Log.warning( "SceneNode: child node '" + node.getName() + "' already exists in '" + name + "'" );
return;
}
children.add( node );
node.parents.add( this );
}
COM: <s> add given node to neighbor nodes </s>
|
funcom_train/43581121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueChanged(TreeSelectionEvent e) {
DefaultMutableTreeNode node = (DefaultMutableTreeNode)
tree.getLastSelectedPathComponent();
if (node == null) return;
Object nodeInfo = node.getUserObject();
if (node.isLeaf()) {
BookInfo book = (BookInfo)nodeInfo;
displayURL(book.bookURL);
} else {
//displayURL();
}
}
COM: <s> required by tree selection listener interface </s>
|
funcom_train/25374528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toStringNoWeight() {
StringBuffer text = new StringBuffer();
for (int i = 0; i < m_AttValues.length; i++) {
if (i > 0) text.append(",");
text.append(toString(i));
}
return text.toString();
}
COM: <s> returns the description of one instance without weight </s>
|
funcom_train/36949321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void collectAllSubfolders(IFolder folder, ArrayList collection) throws RubyModelException {
try {
IResource[] members= folder.members();
for (int i = 0, max = members.length; i < max; i++) {
IResource r= members[i];
if (r.getType() == IResource.FOLDER) {
collection.add(r);
collectAllSubfolders((IFolder)r, collection);
}
}
} catch (CoreException e) {
throw new RubyModelException(e);
}
}
COM: <s> recursively adds all subfolders of code folder code to the given collection </s>
|
funcom_train/25986865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean needsDefinitionCheck(Node node) {
switch (node.getNodeType()) {
case CLASSVARASGNNODE:
case CLASSVARDECLNODE:
case CONSTDECLNODE:
case DASGNNODE:
case GLOBALASGNNODE:
case LOCALASGNNODE:
case MULTIPLEASGNNODE:
case OPASGNNODE:
case OPELEMENTASGNNODE:
case DVARNODE:
case FALSENODE:
case TRUENODE:
case LOCALVARNODE:
case MATCH2NODE:
case MATCH3NODE:
case NILNODE:
case SELFNODE:
// all these types are immediately considered "defined"
return false;
default:
return true;
}
}
COM: <s> check whether the given node is considered always defined or whether it </s>
|
funcom_train/19456003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream getInputStream() throws IOException {
switch (threadFormat) {
case UNCOMPRESSED:
return getRawInputStream();
case DYNAMIC_LZW1:
return new NufxLzw1InputStream(new LittleEndianByteInputStream(getRawInputStream()));
case DYNAMIC_LZW2:
return new NufxLzw2InputStream(new LittleEndianByteInputStream(getRawInputStream()));
default:
throw new IOException("The thread format " + threadFormat + " does not have an InputStream associated with it!");
}
}
COM: <s> get the appropriate input data stream for this thread to decompress the contents </s>
|
funcom_train/9203285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double distance(Interval interval) {
// make sure they arent overlapping
if (!this.overlaps(interval)) {
// the distance is calculated by taking the max of one - the min of the other
// the interval whose max will be used is determined by the interval with the max
// less than the other's min
if (this.max < interval.min) {
return interval.min - this.max;
} else {
return this.min - interval.max;
}
}
// if they are overlapping then return 0
return 0;
}
COM: <s> returns the distance between the two </s>
|
funcom_train/7998010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element getRootElement(){
this.writeXMLEntry("red", Integer.toString(red), xmldoc);
this.writeXMLEntry("green", Integer.toString(green), xmldoc);
this.writeXMLEntry("blue", Integer.toString(blue), xmldoc);
xmldoc.appendChild(root);
return root;
}
COM: <s> finalise and return the xml tree of this vehicle colour </s>
|
funcom_train/18896272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object object) {
// Compare types.
int comparison = super.compareTo(object);
// If we have not got matching types return the value
if (comparison != 0) {
return comparison;
}
// Compare the dates lexiocally
return getLexicalForm().compareTo(((SPGMonthImpl) object).getLexicalForm());
}
COM: <s> compares this g month representation to another object to see if they are </s>
|
funcom_train/39872979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean onEvaluateFullscreenMode() {
Configuration config = getResources().getConfiguration();
if (config.orientation != Configuration.ORIENTATION_LANDSCAPE) {
return false;
}
if (mInputEditorInfo != null
&& (mInputEditorInfo.imeOptions & EditorInfo.IME_FLAG_NO_FULLSCREEN) != 0) {
return false;
}
return true;
}
COM: <s> override this to control when the input method should run in </s>
|
funcom_train/16980958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object obj){
float r = score - ((Result)obj).getScore();
if(r < 0.0)
return 1;
else if(r > 0.0)
return -1;
else
// Break tie with string compare
return url.compareTo(((Result)obj).getUrl());
}
COM: <s> comparing two results </s>
|
funcom_train/25694585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getArgValue(String mark, int index) {
String arg=args.get(index);
if ((null!=arg) && arg.startsWith(mark)) {
return arg.substring(mark.length());
} else {
throw new RuntimeException("incorrect index or mark");
}
}
COM: <s> return the value of the argument </s>
|
funcom_train/20624430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void DFS() {
for (int i = 0; i < adj_graph.length; i++) {
int[] tmp = adj_graph[i];
if (!visited(tmp[0])) {
visitDFS(tmp[0]);
} // end of if ()
} // end of for ()
}
COM: <s> dfs is the driver for the first pass depth first search that </s>
|
funcom_train/10563387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isMultiYardIndexLayout() {
Object value = config.get(SolrYard.MULTI_YARD_INDEX_LAYOUT);
if (value != null) {
if (value instanceof Boolean) {
return (Boolean) value;
} else {
return Boolean.parseBoolean(value.toString());
}
} else {
return false;
}
}
COM: <s> getter for the multi yard index layout state </s>
|
funcom_train/7623099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void onContentChanged() {
if (mAutoRequery && mCursor != null && !mCursor.isClosed()) {
if (Config.LOGV) Log.v("Cursor", "Auto requerying " + mCursor + " due to update");
mDataValid = mCursor.requery();
}
}
COM: <s> called when the </s>
|
funcom_train/38491921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addListener(NetSNMPAction listener) {
int i, n = listeners.length ;
NetSNMPAction newListeners[] = new NetSNMPAction[n+1] ;
for( i = 0 ; i < n ; i++ ) {
newListeners[i] = listeners[i] ;
}
newListeners[i] = listener ;
listeners = newListeners ;
}
COM: <s> adds a listener that responds to pdus from the remote agents </s>
|
funcom_train/21848097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isMouseOverCycleButton(MouseEvent e) {
int line = (int) ((float) e.getY() / (float) lineHeight);
if (e.getX() >= getXPosOfGlyph(line) + glyphWidth
&& e.getX() <= getXPosOfGlyph(line) + glyphWidth + glyphButtonWidth)
return true;
else
return false;
}
COM: <s> check whether the mouse is over the cycling button or not </s>
|
funcom_train/34580726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCancelCommand () {
if (cancelCommand == null) {//GEN-END:|121-getter|0|121-preInit
// write pre-init user code here
cancelCommand = new Command (lang.getProperty("command.cancel"), Command.CANCEL, 0);//GEN-LINE:|121-getter|1|121-postInit
// write post-init user code here
}//GEN-BEGIN:|121-getter|2|
return cancelCommand;
}
COM: <s> returns an initiliazed instance of cancel command component </s>
|
funcom_train/7655475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void engineReset() {
messageLength = 0;
buffer[BYTES_OFFSET] = 0;
buffer[HASH_OFFSET ] = H0;
buffer[HASH_OFFSET +1] = H1;
buffer[HASH_OFFSET +2] = H2;
buffer[HASH_OFFSET +3] = H3;
buffer[HASH_OFFSET +4] = H4;
}
COM: <s> resets the engine </s>
|
funcom_train/4929502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(boolean sorted, int... indexes) {
if (indexes.length == 0)
return;
if (!sorted)
Arrays.sort(indexes);
int prevIndex = indexes[0];
for(int i = 1; i < indexes.length; ++i) {
int index = indexes[i];
for (int j = prevIndex + 1; j < index; ++j) {
elements[j - i] = elements[j];
names[j - i] = names[j];
}
}
length -= indexes.length;
}
COM: <s> removes elements at the specified indexes </s>
|
funcom_train/19145467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void rememberThread(Collection threadBeans) {
Iterator iter = threadBeans.iterator();
while (iter.hasNext()) {
int currentThreadID = ((ThreadBean)iter.next()).getThreadID();
if (shouldProcessThread(currentThreadID)) {
m_threadList.add(new Integer(currentThreadID));
} else {
iter.remove();
}
}
}
COM: <s> also remove the redundant thread in this thread beans </s>
|
funcom_train/41759063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCancel() {
if (cancel == null) {//GEN-END:|23-getter|0|23-preInit
// write pre-init user code here
cancel = new Command("Exit", Command.BACK, 0);//GEN-LINE:|23-getter|1|23-postInit
// write post-init user code here
}//GEN-BEGIN:|23-getter|2|
return cancel;
}
COM: <s> returns an initiliazed instance of cancel component </s>
|
funcom_train/13479563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addValue(String name, int pics) {
String [] t_names = this.names;
int [] t_pics = this.pics;
int index = (this.names == null) ? 0 : names.length;
this.pics = new int [index+1];
this.names = new String [index+1];
if (index > 0) {
System.arraycopy(t_pics,0,this.pics,0,index);
System.arraycopy(t_names,0,this.names,0,index);
}
this.names[index] = Textbox.getString(Textbox.AlienTypeText, name);
this.pics[index] = pics;
return index;
}
COM: <s> adds a new possible value to this attribute </s>
|
funcom_train/4363148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDefault(Rule rule) {
// set up rule
if (wrappedRules.getDigester() != null) {
rule.setDigester(wrappedRules.getDigester());
}
if (wrappedRules.getNamespaceURI() != null) {
rule.setNamespaceURI(wrappedRules.getNamespaceURI());
}
defaultRules.add(rule);
allRules.add(rule);
}
COM: <s> adds a rule to be fired when wrapped implementation returns no matches </s>
|
funcom_train/9875480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addPValueGraphImage(DefaultMutableTreeNode root, AlgorithmData result){
LinkedHashMap overenriched=result.getMappings("over-enriched");
PValueGraphViewer pvg=new PValueGraphViewer("P Value graph","Genesets", "p-Values", overenriched);
root.add(new DefaultMutableTreeNode(new LeafInfo("Geneset p-value graph", pvg)));
}
COM: <s> creates p value graph and adds it to the result tree </s>
|
funcom_train/50168678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSaveChanges(boolean saveChanges) {
if (enableSaveChanges == false) {
return;
} //end if ()
this.saveChanges = saveChanges;
if (saveChanges == true) {
if (isNewRecord == true) {
isNewRecord = false;
} //end if ()
} //end if ()
}
COM: <s> determines if changes need to be saved </s>
|
funcom_train/46019310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected T findUnique(final String queryString, final Object... values) {
List<T> list = this.find(queryString, values);
int size = list.size();
T t;
if (size == 0) {
t = null;
} else if (size != 1) {
throw new IncorrectResultSizeDataAccessException(1, size);
} else {
t = list.get(0);
}
return t;
}
COM: <s> find a single row </s>
|
funcom_train/28118639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeClient(KeelClient currentClient) {
log.debug("Removing client " + currentClient.getId());
try {
if (currentClient instanceof KeelJmsClient) {
KeelJmsClient badJmsClient = (KeelJmsClient) currentClient;
badJmsClient.close();
}
} catch (Exception ee) {
log.error("Error closing client:", ee);
}
myClients.remove(currentClient);
}
COM: <s> removes a specified keel client from the list of available </s>
|
funcom_train/28978429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List findRowsByGroup(final Object group, final int groupColumn) {
final List list = getColumn(groupColumn);
final List result = new Vector();
for (int i = 0; i < list.size(); i++) {
final Object o = list.get(i);
if (o.equals(group)) {
final Position p = new Position();
p.column = groupColumn;
p.row = i;
result.add(p);
}
}
return result;
}
COM: <s> looks the row positions for the given group up </s>
|
funcom_train/43619225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void sortedChanged(RowSorterEvent e) {
sorterChanged = true;
if (!ignoreSortChange) {
prepareForChange(e);
processChange(null);
// PENDING Jw: this is fix of 1161-swingx - not updated after setting
// rowFilter
// potentially costly? but how to distinguish a mere sort from a
// filterchanged? (only the latter requires a revalidate)
list.revalidate();
list.repaint();
}
}
COM: <s> called after notification from row sorter </s>
|
funcom_train/39045350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getWelcomeMenuItem() {
JMenuItem welcomeMenuItem = getItem("WELCOME", helperMenu);
if (welcomeMenuItem == null) {
welcomeMenuItem = new JMenuItem(Language.MENU_HELPER_ITEM_WELCOME);
welcomeMenuItem.setName("WELCOME");
welcomeMenuItem.setIcon(new ImageIcon(Resource.getInstance().loadImage(ImageResourcePath.MENU_HELP_ICON)));
welcomeMenuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
SystemHelper.browse("http://blueboxalife.trancer-studio.net/welcome");
}
});
}
return welcomeMenuItem;
}
COM: <s> this method initializes welcome menu item </s>
|
funcom_train/29079872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Column overColumn(int x) {
int pos = getInsets().left;
int count = mModel.getColumnCount();
for (int i = 0; i < count; i++) {
Column col = mModel.getColumnAtIndex(i);
if (col.isVisible()) {
pos += col.getWidth() + (mDrawColumnDividers ? 1 : 0);
if (x < pos) {
return col;
}
}
}
return null;
}
COM: <s> determines if the specified x coordinate is over a column </s>
|
funcom_train/15521450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAllQuotaConditions(String[] ids) throws BusinessException {
org.hibernate.Transaction transaction = super
.begin(QuotaConditionFactory.getInstance());
try {
for (int i = 0; i < ids.length; i++) {
Quota.Condition quotaCondition = (Quota.Condition) QuotaConditionFactory
.getInstance().findByKey(ids[i]);
QuotaConditionFactory.getInstance().remove(quotaCondition);
}
super.commit(transaction);
} catch (DAOException daoe) {
super.rollback(transaction);
throw new BusinessException(daoe);
}
}
COM: <s> removes a bunch of code quota </s>
|
funcom_train/31363084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HTNode getNodeUnderTheMouse(MouseEvent event) {
int x = event.getX();
int y = event.getY();
HTDrawNode node = draw.findNode(new HTCoordS(x, y));
if (node != null) {
return node.getHTModelNode().getNode();
} else {
return null;
}
}
COM: <s> returns the node containing the mouse event </s>
|
funcom_train/1733713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize() throws DatabaseException, MalformedURLException, IOException, ParseException{
RssChannel[] rss = DBManager.getDefaultDBManager().getRssChannels().toArray(new RssChannel[0]);
for(int i = 0 ; i < rss.length; i++){
RSSFetchService.getService().addRSS(new URL(rss[i].getUrl()));
}
}
COM: <s> start to feed the data from rss channel </s>
|
funcom_train/17848751 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void changeFile() {
JFileChooser chooser = new JFileChooser(new File(mFile.getText()));
if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
mFile.setText(chooser.getSelectedFile().getAbsolutePath());
}
}
COM: <s> call the file chooser for the executable </s>
|
funcom_train/39288589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addRefFunctionalExceptionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Operation_refFunctionalException_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Operation_refFunctionalException_feature", "_UI_Operation_type"),
SdlPackage.eINSTANCE.getOperation_RefFunctionalException(),
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the ref functional exception feature </s>
|
funcom_train/18216728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Date getDeadline(final CaseState c) {
if (!c.containsField(deadlineField)) {
return null;
}
try {
final String deadlineString = (String) c.get(deadlineField);
if (deadlineString == null) {
return null;
}
Calendar cal = Calendar.getInstance();
cal.setTime(TimeUtils.DAY_FORMAT.parse(deadlineString));
cal.add(Calendar.DATE, 1);
return cal.getTime();
} catch (final Exception e) {
Log.warn(this, e);
return null;
}
}
COM: <s> returns the deadline of the </s>
|
funcom_train/4963037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void displayEfficiencyGraphs() {
JFrame efficiencyGraphs = new JFrame("Efficiency Graphs - ModelJUnit");
efficiencyGraphs.setMinimumSize(new Dimension(760,500));
efficiencyGraphs.add(mEfficiencyGraphs, BorderLayout.CENTER);
efficiencyGraphs.add(mEfficiencyGraphs.getProgress(), BorderLayout.PAGE_END);
efficiencyGraphs.setVisible(true);
mEfficiencyGraphs.runClass();
}
COM: <s> display the efficiency graph window </s>
|
funcom_train/1207956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isUserProjectManager(Integer userId, Project project) {
try {
if (project == null) {
return false;
}
ProjectUsers pu = projectUsersDao.findByProjectIdAndUserId(project.getId(), userId);
return pu.getIsManager();
} catch (RuntimeException re) {
}
return false;
}
COM: <s> helper method finds given user is a project manager </s>
|
funcom_train/6439733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void browserProjectClosed(Browser browser, Project project) {
// stop ccm
CMPrjSetting setting = CMManager.removePrjSetting(project);
if (setting.isActive()) {
JBCcmRuntimeThread runtime = new JBCcmRuntimeThread(
browser, (JBProject) project, setting,
JBCcmRuntimeThread.SRC_NONE, JBCcmRuntimeThread.OP_CM_STOP);
runtime.start();
}
}
COM: <s> callback method for the event of closing a project </s>
|
funcom_train/21620769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String status(String id, DebugState state, String reason) {
StringBuffer buf = xml();
Node response = newResponse("status", id);
response.addAttribute("status", DebugState.map(state));
response.addAttribute("reason", reason);
response.render(buf);
return buf.toString();
}
COM: <s> send a status response </s>
|
funcom_train/8045897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
if (out.isClosed()) throw new IllegalStateException("already closed");
// Verify that a root element has been written and not yet ended.
if (state == State.IN_PROLOG) badState("close");
// End all the unended elements.
while (currentElementMetadata != null) {
end();
}
if ( addFinalNewline ) { out.writeln(); }
out.close();
}
COM: <s> terminates all unterminated elements closes the writer that is being </s>
|
funcom_train/18229754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setLookupsNoFire(Lookup[] lookups) {
if (lookups.length == 1) {
this.lookups = lookups[0];
assert this.lookups != null : "Cannot assign null delegate";
} else {
if (lookups.length == 0) {
this.lookups = EMPTY_ARR;
} else {
this.lookups = lookups.clone();
}
}
}
COM: <s> called from set lookups and constructor </s>
|
funcom_train/44200142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void retireQueue(WorkQueue wq) {
// try {
retiredQueues.add(wq.getClassKey());
decrementQueuedCount(wq.getCount());
wq.setRetired(true);
wq.setActive(this, false);
// } catch (InterruptedException e) {
// e.printStackTrace();
// System.err.println("unable to retire queue "+wq);
// // propagate interrupt up
// throw new RuntimeException(e);
// }
}
COM: <s> put the given queue on the retired queues queue </s>
|
funcom_train/3815082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void newCardPanel() {
cardPanel.removeAll();
buttonMap = new HashMap<Card, JToggleButton>();
// add the check-boxes
for (Card card : cards) {
cardPanel.add(createCardButton(card));
}
validate();
repaint();
}
COM: <s> updates the card panel </s>
|
funcom_train/3491688 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double max() {
if (size() == 0) {
throw new IllegalStateException("cannot find maximum of an empty list");
}
double max = _data[_pos - 1];
for (int i = _pos - 1; i-- > 0;) {
if (_data[i] > max) {
max = _data[i];
}
}
return max;
}
COM: <s> finds the maximum value in the list </s>
|
funcom_train/25308850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addStandardResponseInfo(MethodInfo info) {
super.addStandardResponseInfo(info);
ResponseInfo responseInfo503 = new ResponseInfo(
"Request cannot be fulfilled because the the resource is not compatible the application");
responseInfo503.getStatuses().add(Status.SERVER_ERROR_SERVICE_UNAVAILABLE);
info.getResponses().add(responseInfo503);
}
COM: <s> configure the information to add a standard sitools2 response </s>
|
funcom_train/16678429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private float getValue(Joystick j, AxisType type) {
float f = 0;
switch (type) {
case POV:
f = j.getPOV( );
break;
case R:
f = j.getR( );
break;
case U:
f = j.getU( );
break;
case X:
f = j.getX( );
break;
case Y:
f = j.getY( );
break;
case Z:
f = j.getZ( );
break;
}
BigDecimal dec = new BigDecimal(f, mathContext);
float round = dec.floatValue( );
return round;
}
COM: <s> gets the value from the joystick for the given axis type </s>
|
funcom_train/12071500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public void testGetNodeFrom() throws Exception {
// System.out.println("getNodeFrom");
//
// List tokens = new Vector();
// tokens.add("(");
// tokens.add("1");
// tokens.add("2");
// tokens.add("3");
// tokens.add(")");
// tokens.add("rest");
//
// List tokens2 = new Vector();
// tokens2.add("(");
// tokens2.add("1");
// tokens2.add("2");
// tokens2.add("3");
// tokens2.add(")");
//
//
// SpinalNode expResult = new SpinalNode(tokens2, null);
// SpinalNode result = SpinalNode.getNodeFrom(tokens);
// assertEquals(expResult, result);
//
// }
COM: <s> test of get node from method of class edu </s>
|
funcom_train/23298198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SchemaProcessingTests rule() {
if (foundRules.isEmpty()) {
Matcher ruleMatcher = Pattern.compile("^// start (\\w+)\\n\\1\\s*:(.*);\\n// end \\1", Pattern.DOTALL | Pattern.MULTILINE).matcher(parserOutput);
while (ruleMatcher.find())
foundRules.add(new FoundRule(ruleMatcher));
}
return this;
}
COM: <s> helper function for writing literate tests </s>
|
funcom_train/28686738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getSetDataMessage() {
Date date = new Date(System.currentTimeMillis());
String writeData = new String(formatter.format(date) + Integer.toString(this.getModuleId()));
writeData = this.ipicoUtil.getPreparedDataStringForWrite(writeData);
//String writeData = new String("ffffffffffffffff");
return writeData;
}
COM: <s> function to prepare the data string to be written to a tag </s>
|
funcom_train/15949656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMultipartyCollaborations(Enumeration values) throws ModelVetoException {
Vector lElems = new Vector();
while( values.hasMoreElements() )
{
/* 1. fire Vetoable events */
Object lTemp = values.nextElement();
lElems.add(lTemp);
fireAssociationAddedVetoable(SpecificationPackageInfo.ASSOCIATIONINFO_MultipartyCollaborations, (MultiPartyCollaboration)lTemp);
}/*while*/
/* 4 Add or change value */
values = lElems.elements();
while( values.hasMoreElements() )
{
addMultipartyCollaborations((MultiPartyCollaboration)values.nextElement());
}/*while*/
}
COM: <s> add the value of multiparty collaborations </s>
|
funcom_train/825920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String usedIn(AttributeType element) {
String usedIn = null;
if (element.getUsedInTasks()) {
usedIn = USED_IN_TASKS;
}
if (element.getUsedInTimeSlots()) {
if (usedIn == null) {
usedIn = "";
} else {
usedIn += ", ";
}
usedIn += USED_IN_TIMESLOTS;
}
return usedIn;
}
COM: <s> returns a string inidicating whenever it is used in tasks timeslots or </s>
|
funcom_train/20116598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private XmlDoc parseTemplate(String xmlFile) {
try {
InputOutput io = appContext.createInputOutput(xmlFile);
return new IncludableParser().parse(io);
} catch (UnknownIOSourceException e) {
throw new MailException(MailException.MAIL_SENDER_CANNOT_GET_TEMPLATE, e.getMessage());
} catch (ParserException e) {
throw new MailException(MailException.MAIL_SENDER_CANNOT_PARSE_TEMPLATE, e.getMessage());
}
}
COM: <s> real parser of fisical file </s>
|
funcom_train/13888441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasTopic(String topic, PartialOrder domain) {
if (topic == null) {
return false;
} else {
FeatureStructure fs = getFs();
if (fs != null) {
String thisTopic = (String) fs.getAtomicPathValue(S_ACT_TOPIC_PATH);
if (thisTopic != null) {
if (domain != null) {
return domain.reach(topic, thisTopic);
} else {
return topic.equals(thisTopic);
}
}
}
return false;
}
}
COM: <s> returns true iff the data source is of given topic </s>
|
funcom_train/38215420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeConfiguration(int code){
switch (code){
case ConfigManager.publicFilesChanged:
readPublic(myPublic);
break;
case ConfigManager.mimeTypesChanged:
readMimeTypes(myMimeTypes);
break;
case ConfigManager.protectedResourcesChanged:
// AuthentificationManagers job, just send the events and hope its listening
break;
case ConfigManager.authentificationChanged:
// SecurityManagers job, just send the events and hope its listening
break;
}
for (int i=0;i<myConfigurables.size();i++){
//spawn new threads in case one of the Configurables hangs
(new ConfigChangeResponder((Configurable) myConfigurables.get(i),code)).start();
}
}
COM: <s> updates the configuration </s>
|
funcom_train/35678373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetQualClassName() {
CodeGenHelper helper = new CodeGenHelper();
assertEquals("className", helper.getQualClassName(null, "className"));
assertEquals("package.className", helper.getQualClassName("package", "className"));
}
COM: <s> get fully qualified class name </s>
|
funcom_train/3902667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addObjectivesGlobalToSystemPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DocumentRoot_objectivesGlobalToSystem_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DocumentRoot_objectivesGlobalToSystem_feature", "_UI_DocumentRoot_type"),
AdlseqV1p3Package.Literals.DOCUMENT_ROOT__OBJECTIVES_GLOBAL_TO_SYSTEM,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the objectives global to system feature </s>
|
funcom_train/22345321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void shutDownLocal() {
try {
// get base storage
TyBase T = info.getBase();
// When a valid join manager
if (T.joinManager != null) {
// kill service
((JoinManager)T.joinManager).terminate();
// done
return;
} // endif
} catch (Exception e) {} // unhandled
} // end-method
COM: <s> local shut down </s>
|
funcom_train/12103638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addTree(Resource resource) {
Point point = resource.getPosition();
Point3D cellCenter = new Point3D(topLeftCellCenter).add(new Point3D(point.x*treeCellWidth, 0, point.y*treeCellDepth));
Tree tree = new Tree(resource, cellCenter, this);
treeGrid.setNode(point.y, point.x, tree);
}
COM: <s> adds a new tree to represent the specified resource </s>
|
funcom_train/31346338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAttribute(String name, String value) {
if (size >= attribs.length) {
Attribute nAttribs[] = new Attribute[attribs.length + 10];
System.arraycopy(attribs, 0, nAttribs, 0, attribs.length);
attribs = nAttribs;
}
if (attribs[size] == null)
attribs[size] = new Attribute(name, value);
else {
attribs[size].name = name;
attribs[size].value = value;
}
size++;
}
COM: <s> adds a new attribute </s>
|
funcom_train/5570500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getNEW() {
if (NEW == null) {
NEW = new JButton();
NEW.setBounds(new java.awt.Rectangle(31,42,98,29));
NEW.setName("new table");
NEW.setText("new table");
NEW.setToolTipText("non implemente");
NEW.setActionCommand("newtable");
NEW.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
}
});
}
return NEW;
}
COM: <s> this method initializes j button </s>
|
funcom_train/29369073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkTokens(Sentence sentence) {
for(Token tok: sentence) {
Dictionary d = manager.getDictionary(tok.getLocale());
//language not available?
if(d == null) {
tok.setErrorProbability(0);
}
else {
if(d.contains(tok.getContent())) tok.setErrorProbability(0);
else {
tok.setErrorProbability(1);
ProjectProperties.getInstance().getLogger().log(Level.INFO, "Marked word " + tok.getContent() + " as incorrect!");
}
}
}
}
COM: <s> will check the given sentence and assign an error probability to every word </s>
|
funcom_train/3112425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuBar getCustomMenuBar() {
if (jMenuBar == null) {
jMenuBar = new JMenuBar();
jMenuBar.add(getJMenu());
jMenuBar.add(getJMenu1());
jMenuBar.add(Box.createHorizontalGlue());
jMenuBar.add(getJMenu2());
}
return jMenuBar;
}
COM: <s> this method initializes j custom menu bar </s>
|
funcom_train/5865996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getParamsHtml() {
final StringBuffer sb = new StringBuffer(256);
for (Iterator iter = _params.entrySet().iterator(); iter.hasNext();) {
Map.Entry me = (Map.Entry) iter.next();
sb.append("<param");
HTMLs.appendAttribute(sb, "name", Objects.toString(me.getKey()));
HTMLs.appendAttribute(sb, "value", Objects.toString(me.getValue()));
sb.append("/>");
}
return sb.toString();
}
COM: <s> used only internally for component development </s>
|
funcom_train/17205141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Address allocateScalar(RVMClass klass, boolean needsIdentityHash, int identityHashValue) {
numObjects++;
BootImageWriter.logAllocation(klass, klass.getInstanceSize());
return ObjectModel.allocateScalar(this, klass, needsIdentityHash, identityHashValue);
}
COM: <s> allocate a scalar object </s>
|
funcom_train/30172713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String addDownload(DownloadInfo di){
if(this.provider != null && this.configurationState == false && this.provider.getNodeState() == ProviderClass.ACTIVE){
if(this.provider.addDownload(di)){
return "Download added in queue";
}
else{
return "Error: download already in queue";
}
}
return "This Node is Off-Line";
}
COM: <s> start a download </s>
|
funcom_train/10048381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String newPost(List params, String originatingIp) throws BlogRPCHandlerException {
BlogDAO dao = BlogDAO.getInstance();
String content = "" + params.get(4);
boolean publish = ("0".equalsIgnoreCase("" + params.get(5))) ? false : true;
long id = dao.postEntry(getTitle(content),
StringUtils.unMarkupParagraphs(getBody(content)),
false,
originatingIp,
publish
);
return BlogRPCHandler.buildIdMessage(id);
}
COM: <s> post new blog entry parameters should be </s>
|
funcom_train/1344091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void requestGlobalServerOptions() {
if ( mainFrame.getMainMenuBar().getGameState() == GameStates.PLAYING )
globalServerOptionsManager.showOptionsDialog();
else
try {
serverStub.sendMessage( Server.Commands.REQUESTING_SERVER_OPTIONS.ordinal() + GENERAL_SEPARATOR_STRING );
}
catch ( final IOException ie ) {
}
}
COM: <s> requests the global server options </s>
|
funcom_train/35541578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUsage() {
CobolDataItem dataItem = new CobolDataItem("COBOL-NAME");
dataItem.setUsage(Usage.DOUBLEFLOAT);
emitAnnotationAndCheck(dataItem,
"<cb:cobolElement cobolName=\"COBOL-NAME\""
+ " levelNumber=\"1\"" + " type=\"DOUBLE_FLOAT_ITEM\""
+ " usage=\"COMP-2\"/>");
}
COM: <s> test an elementary item with usage </s>
|
funcom_train/24121708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void read(InputStream in) throws IOException {
// size and type already read
// Read color in r-g-b-zero mode
this.color = WMFConstants.readLittleEndianColorRef(in);
// The start coordinates
this.y = WMFConstants.readLittleEndianShort(in);
this.x = WMFConstants.readLittleEndianShort(in);
}
COM: <s> reads the floodfill record from a stream </s>
|
funcom_train/2624572 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateBoundsFromPath() {
updatingBoundsFromPath = true;
if (path == null) {
resetBounds();
}
else {
final Rectangle2D b = getPathBoundsWithStroke();
setBounds(b.getX(), b.getY(), b.getWidth(), b.getHeight());
}
updatingBoundsFromPath = false;
}
COM: <s> recomputes the bounds taking stroke into account </s>
|
funcom_train/19321923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ObjectName getObservedObject() {
if (observedObjects.isEmpty()) {
return null;
}
else {
Iterator i = observedObjects.entrySet().iterator();
if (i.hasNext()) {
Map.Entry entry = (Map.Entry) i.next();
return (ObjectName) entry.getKey();
}
}
return null;
}
COM: <s> returns the object name of the first object in the set of observed </s>
|
funcom_train/43245255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetNOKOneStreetAddr1() {
System.out.println("setNOKOneStreetAddr1");
String nOKOneStreetAddr1 = "";
EmergencyContactObject instance = new EmergencyContactObject();
instance.setNOKOneStreetAddr1(nOKOneStreetAddr1);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set nokone street addr1 method of class org </s>
|
funcom_train/3786740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean rmvSPFlistsAndTable()
{ /* rmvSPFlistsAndTable */
/* Clear spot lists */
if(dbSample!=null)
dbSample.rmvSPFlistsAndTable();
/* Clear Table of Sample Paired-spots File (SPF) DB features */
tspf= null;
spfFieldNames= null;
spfRowData= null;
return(true);
} /* rmvSPFlistsAndTable */
COM: <s> rmv spflists and table remove the ssf and spf spot lists and tables </s>
|
funcom_train/7732681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int pushAction(String action){
int res;
// generate actionUrl, e.g, for "start": "http://pink.mashart.org/runs/start"
String actionUrl = actionUrlPrefix + action;
StringBuffer msg = new StringBuffer();
msg.append("id=").append(user);
res = push(actionUrl, msg.toString());
return res;
}
COM: <s> send an action string to the server </s>
|
funcom_train/6270578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValueAt(Object aValue, int row, int column) {
Vector rowVector = (Vector)dataVector.elementAt(row);
rowVector.setElementAt(aValue, column);
// generate notification
fireTableChanged(new TableModelEvent(this, row, row, column));
}
COM: <s> sets the object value for the cell at i column i and </s>
|
funcom_train/6494171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Class createClass( String filename ) {
Class c = null;
byte[] b = loadClassData( filename );
if ( b != null && b.length > 0 ) {
c = defineClass( null, b, 0, b.length );
if ( c == null ) {
return null;
}
_classes.put( c.getName(), c );
}
return c;
}
COM: <s> loads class bytes from the given filename and defines a class from the </s>
|
funcom_train/7628765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onRefresh(boolean fileChanged, int[] fileList) {
if (fileChanged) {
// A future optimization would be to inspect fileList and
// only reload those files that we care about. For now,
// just re-fetch all SIM records that we cache.
fetchSimRecords();
}
}
COM: <s> called by stk service when refresh is received </s>
|
funcom_train/33704028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAccountsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_Model_accounts_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_Model_accounts_feature", "_UI_Model_type"),
BankabeulePackage.Literals.MODEL__ACCOUNTS, true, false, true,
null, null, null));
}
COM: <s> this adds a property descriptor for the accounts feature </s>
|
funcom_train/12183293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void appendSelected(CombinatorEnum combinator) {
int index = getSelectedIndex();
Subject subject = (Subject) getSelectedObject();
SelectorSequence sequence =
(SelectorSequence) getObjectControl().getValue();
CombinedSelector combined = subject.append(combinator, sequence);
removeFromList(index);
addToList(combined, index);
setSelectedIndex(index);
getObjectControl().setValue(null);
}
COM: <s> appends the entered data to the selected entry from the list </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.