__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/28699606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
if ( package_log.isLoggable( Level.FINEST )) {
package_log.finest( "Paragraph reset()" );
}
layout_performed = false;
line_cache = null;
terminal_node = null;
// optima = null;
optimum = null;
line_list = null;
line_box_list = null;
}
COM: <s> resets the layout of the paragraph </s>
|
funcom_train/21056595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getMoreResultsButton() {
if (moreResultsButton == null) {
moreResultsButton = new JButton();
moreResultsButton.setText("Next Page");
moreResultsButton
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
getNextResults();
}
});
}
return moreResultsButton;
}
COM: <s> this method initializes more results button </s>
|
funcom_train/20630635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void classifyLocalClassifierSpace(ProgressReporter mon) {
Iterator it = local_space.getConcepts().values().iterator();
while (it.hasNext()) {
SemConcept con = (SemConcept) it.next();
if ( con.hasBeenProcessed() ) {
// nop
} else {
concepts.put( con.gid(), con );
//classify( con );
}
}
use_local = true;
classifyAll(mon);
local_space.setIsClassified( true );
use_local = false;
}
COM: <s> iterate over the hash of concepts in the local classifier space </s>
|
funcom_train/31358824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getFolders() {
Iterator it = elements.keySet().iterator();
Object obj;
Set set = new TreeSet();
String s;
// add root folder
set.add("/");
// process all folders in the root
while (it.hasNext()) {
s = (String)it.next();
obj = elements.get(s);
if (obj instanceof FolderComponentModel) {
// add current folder
set.add(s);
// add subfolders
((FolderComponentModel)obj).getFolders(set);
}
}
return set;
}
COM: <s> gets all of the available folders </s>
|
funcom_train/41377755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StateSet complement(StateSet set) {
if (set == null)
return null;
StateSet result = new StateSet();
result.bits = new long[set.bits.length];
int i;
int m = Math.min(bits.length, set.bits.length);
for (i = 0; i < m; i++) {
result.bits[i] = ~bits[i] & set.bits[i];
}
if (bits.length < set.bits.length)
System.arraycopy(set.bits, m, result.bits, m, result.bits.length
- m);
return result;
}
COM: <s> returns the set of elements that contained are in the specified set </s>
|
funcom_train/16796326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void appendLine(String data) {
if (vData==null)
setColumnHeadings("");
char[] chars = data.toCharArray();
vData.addElement(chars);
iRowCount++;
if (isShowing()) {
if (iColCount==1 && tc.fMetrics!=null) {
iColWidth[0] = Math.max(iColWidth[0], tc.fMetrics.charsWidth(chars,0,chars.length));
adjustHScroll();
}
updateDisplay();
unsavedLines = true;
}
}
COM: <s> adds a single line to the end of this text panel </s>
|
funcom_train/2966990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
// JComboBox cb = (JComboBox)e.getSource();
// int i = cb.getSelectedIndex();
// Object selectedObject = getItemAt(i);
// if (selectedObject == m_comboBoxItems.get(ADD_CUSTOM)){
// Color customColor = addCustomColor();
// selectedObject = customColor;
// }
// updateSelection((Color)selectedObject);
}
COM: <s> creates all the toggle buttons corresponding to each line width and puts </s>
|
funcom_train/3389121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vset addVar(int varNumber) {
if (x == fullX) {
return this;
}
// gen DA, kill DU
long bit = (1L << varNumber);
if (varNumber >= VBITS) {
int i = (varNumber / VBITS - 1) * 2;
if (i >= x.length) {
growX(i+1);
}
x[i] |= bit;
if (i+1 < x.length) {
x[i+1] &=~ bit;
}
} else {
vset |= bit;
uset &=~ bit;
}
return this;
}
COM: <s> note that a var is definitely assigned </s>
|
funcom_train/27823237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void preprocessEvent(ChangeEvent event) throws KAONException {
m_modelID=m_objectManager.getOIModelID(event.getOIModel().getLogicalURI());
if (m_modelID==-1)
throw new KAONException("OI-model with logical URI '"+event.getOIModel().getLogicalURI()+"' doesn't exist.");
}
COM: <s> preprocesses the event </s>
|
funcom_train/34344101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createControl(final Composite parent) {
setTitle(Messages.ParameterSelectionPage_ReportParameterSelection);
setDescription(Messages.ParameterSelectionPage_TemplateNeedsParameter);
setImageDescriptor(ResourceManager.getPluginImageDescriptor(ReportActivator.getDefault(),
"icons/create_report_wizard.gif")); //$NON-NLS-1$
this.container = new Composite(parent, SWT.NULL);
this.container.setLayout(this.stackLayout = new StackLayout());
buildTemplateUi();
setControl(this.container);
setPageComplete(true);
}
COM: <s> create contents of the wizard </s>
|
funcom_train/15811535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireCALLINGState() {
if (this.isReliable == true || this.nTransmit >= this.maxTransmit) {
/*
* Timer B was fired. Move to TERMINATED state.
*/
moveToTERMINATEDState();
return;
}
// Re-Transmit INVITE
this.nTransmit++;
// Update Timer
long intval = this.timerA;
for (int i = 0; i < this.nTransmit; i++) {
intval *= 2;
}
this.tStamp = System.currentTimeMillis() + intval;
}
COM: <s> the timer timer a in calling state is expired </s>
|
funcom_train/33842625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addFeature (Element featureElem) {
String name = featureElem.getName ();
String text = featureElem.getText().trim();
if ("yes".equals(text)) {
for (Feature ftr: Feature.values()) {
if (ftr.toString().equals (name)) {
docMD.addFeature(ftr);
break;
}
}
}
}
COM: <s> adds a feature to the document metadata </s>
|
funcom_train/32780043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void lifeCycle() {
// wait until it is time to fetch the next products
hold(demandInterval.sampleTimeSpan());
// determine the quantity of demanded products
long qty = demandQuantity.sample();
// create and activate a CustomerProcess to let him fetch the
// products
CustomerProcess cp = new CustomerProcess(getModel(),
"anonymous customer", entrepot, qty, traceIsOn());
cp.activate();
// debug out
if (currentlySendDebugNotes()) {
sendDebugNote("demands " + qty + " products from "
+ entrepot.getQuotedName());
}
}
COM: <s> the demand process is fetching in certain intervals a certain quantity of </s>
|
funcom_train/47865670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IQHandler getHandler(String namespace) {
IQHandler handler = namespace2Handlers.get(namespace);
if (handler == null) {
for (IQHandler handlerCandidate : iqHandlers) {
if (namespace.equalsIgnoreCase(handlerCandidate.getNamespace())) {
handler = handlerCandidate;
namespace2Handlers.put(namespace, handler);
break;
}
}
}
return handler;
}
COM: <s> returns an iqhandler with the given namespace </s>
|
funcom_train/17788105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void list(PrintStream out) {
out.println("-- HTTP Response --");
out.println("Response code: " + responseCode);
out.println("Response message: " + responseMessage);
String key, value;
for (Map.Entry<String,String> entry : headers.entrySet()) {
key = entry.getKey();
value = entry.getValue();
out.println(key + ": " + value);
}
out.flush();
}
COM: <s> prints this httpresponse out to the specified output stream </s>
|
funcom_train/18288234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeSelectedNames() {
int[] indices = tableViewer.getTable().getSelectionIndices();
List temp = new ArrayList(Arrays.asList(holders));
for (int i = indices.length; i > 0; i--) {
int index = indices[i - 1];
temp.remove(index);
}
setExcludedNames((StringHolder[]) temp.toArray(new StringHolder[temp.size()]));
}
COM: <s> remove the selected keep expressions from the viewer </s>
|
funcom_train/41163302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(ToQuestionGroup entity) {
EntityManagerHelper.log("saving ToQuestionGroup instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved to question group entity </s>
|
funcom_train/7494776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean appendPrefix(int tl, int td, StringBuffer sb) {
if (dr.scopeData != null) {
int ix = tl * 3 + td;
ScopeData sd = dr.scopeData[ix];
if (sd != null) {
String prefix = sd.prefix;
if (prefix != null) {
sb.append(prefix);
return sd.requiresDigitPrefix;
}
}
}
return false;
}
COM: <s> append the appropriate prefix to the string builder depending on whether and </s>
|
funcom_train/13321163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void convert() throws Exception {
BufferedImage image = ImageIO.read(getContentStream());
BufferedImage image2 = new BufferedImage(image.getWidth(), image.getHeight(), BufferedImage.TYPE_INT_RGB);
image2.getGraphics().drawImage(image, 0, 0, Color.WHITE, null);
ImageIO.write(image2, imageIOType, getResultStream());
}
COM: <s> do the conversion </s>
|
funcom_train/33939195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getCodeTypes() throws Exception{
List<CodeType> codeTypes = this.codeTypeManager.getAll();
JSONArray ja = new JSONArray();
for(CodeType codeType : codeTypes){
JSONObject jo = new JSONObject();
jo.put("id", codeType.getId());
jo.put("text", codeType.getTypename());
jo.put("leaf", true);
ja.add(jo);
}
Struts2Utils.renderJsonArray(ja);
}
COM: <s> extjs tree panel </s>
|
funcom_train/22234152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTextureBlendColor(Color4f textureBlendColor) {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_BLEND_COLOR_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("TextureAttributes2"));
if (isLive())
((TextureAttributesRetained)this.retained).setTextureBlendColor(textureBlendColor);
else
((TextureAttributesRetained)this.retained).initTextureBlendColor(textureBlendColor);
}
COM: <s> sets the texture constant color for this </s>
|
funcom_train/40766716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addErrorToBuffer(StringBuilder buf, String loggerMessage, String path, Exception e, FileSystemConnectorErrorMessages errorMessage) {
LOG.info(loggerMessage + path + "; " + e);
buf.append(String.format(bundle.getLocale(),
bundle.getString(errorMessage.name()),
path));
buf.append("\n");
}
COM: <s> add the error message to the buffer along with path information for </s>
|
funcom_train/28652590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ImageIcon loadIcon (String resourceName) {
URL url = null;
ImageIcon icon = null;
final String prefix = "resources/images/";
final String suffix = ".icon";
String iconName = getString (resourceName + suffix);
String path = prefix + iconName;
String descr = getString (resourceName + ".accessible_description");
url = getClass ().getResource (path);
if (url != null) icon = new ImageIcon (url, descr);
return icon;
}
COM: <s> creates an icon from an image contained in the images directory </s>
|
funcom_train/46455082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Interactive getInteractive() {
Interactive iad = null;
iad = super.getInteractive();
if(iad==null&&axes instanceof Interactive) {
// check for draggable axes
iad = ((Interactive) axes).findInteractive(this, mouseEvent.getX(), mouseEvent.getY());
}
return iad;
}
COM: <s> gets the interactive drawable that was accessed by the last mouse event </s>
|
funcom_train/46426244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getFreq(int pitchOffset) {
int p = this.pitch + pitchOffset;
if (p < 0) {
p = 0;
} else if (p >= NOTE_FREQ.length) {
p = NOTE_FREQ.length - 1;
}
int[] freqs = NOTE_FREQ[p][note];
return freqs[freqs.length > 1 && alt ? 1 : 0];
}
COM: <s> return frequency of this note after offset pitch </s>
|
funcom_train/6333045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ClassDirector createDirector(File sourceDir) {
InputStreamFactory ocdFactory = null;
InputStreamFactory sourceFactory = null;
if (useOcd) {
ocdFactory = new FileInputStreamFactory(sourceDir, "ocd");
}
if (useSource) {
sourceFactory = new FileInputStreamFactory(sourceDir, "java");
}
return createDirector(sourceFactory, ocdFactory);
}
COM: <s> creates a class direct for the class identified by the class string </s>
|
funcom_train/20743119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initDefaultProjectRoles() {
// initialize role Admin
initializeRole(RoleTO.ROLE_MANAGER, "Manager");
initializeRole(RoleTO.ROLE_DEVELOPER, "Developer");
initializeRole(RoleTO.ROLE_TESTER, "Tester");
initializeRole(RoleTO.ROLE_USER, "User");
}
COM: <s> initialize default project roles </s>
|
funcom_train/39540502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void bind() {
bindSearchLabel();
searchField.getDocument().addDocumentListener(getSearchFieldListener());
getActionContainerFactory().configureButton(matchCheck,
(AbstractActionExt) getActionMap().get(PatternModel.MATCH_CASE_ACTION_COMMAND),
null);
}
COM: <s> configure and bind components to from pattern model </s>
|
funcom_train/16081841 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void notifyVisit(DetailAST aAST) {
final ArrayList visitors = (ArrayList) mTokenToChecks.get(TokenTypes.getTokenName(aAST.getType()));
if (visitors != null) {
for (int i = 0; i < visitors.size(); i++) {
final Check check = (Check) visitors.get(i);
check.visitToken(aAST);
}
}
}
COM: <s> notify interested checks that visiting a node </s>
|
funcom_train/9236412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateExample() {
if (uri == null) {
setEnabled(false);
exampleLabel.setText("Example: ");
} else {
exampleLabel.setText("Example: " + URLHandler.getURLHander().
substituteParams(uri, commandPath.getText()));
}
}
COM: <s> updates the example label </s>
|
funcom_train/7852084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean remove(Object object) {
String attributeName; //the name is the key to object in the HashMap
if (object instanceof String){
attributeName = (String)object;
}
else {
attributeName = ((LDAPAttribute) object).getName();
}
if (attributeName == null){
return false;
}
return (this.map.remove( attributeName.toUpperCase() ) != null );
}
COM: <s> removes the specified object from this set if it is present </s>
|
funcom_train/35120843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double dim() {
double cr = 34.50;//cr=5ћ2/(4m0r02), m0 = 0,01044 МэВ (зс)2/фм2, ro = 1,2249 фм (1 зс = 10-21 с).
return cr * moment * moment * pow(nucleus.getA(), -5.0 / 3.0);
}
COM: <s> rotation energy functional calculates in units </s>
|
funcom_train/10913618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected LayoutManager getChildLM() {
if (curChildLM != null && !curChildLM.isFinished()) {
return curChildLM;
}
if (childLMiter.hasNext()) {
curChildLM = childLMiter.next();
curChildLM.initialize();
return curChildLM;
}
return null;
}
COM: <s> return currently active child layout manager or null if </s>
|
funcom_train/12839241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRemainingSubstringStartingAtTokenIndex(int tokenIndex) {
String returnValue = "";
int iterationCount = 0;
int tokenCount = getTokenCount();
for (int index = tokenIndex; index <= tokenCount; index++) {
if (iterationCount++ > 0) {
returnValue += mTokenDelimiter;
}
returnValue += getTokenAtIndex(index);
}
return returnValue;
}
COM: <s> gets the substring of the argument string that begins at a given token </s>
|
funcom_train/45833983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeUser(JID jabberID) {
LocalMUCUser user = users.remove(jabberID);
if (user != null) {
for (LocalMUCRole role : user.getRoles()) {
try {
role.getChatRoom().leaveRoom(role);
}
catch (Exception e) {
Log.error(e.getMessage(), e);
}
}
}
}
COM: <s> removes a user from all chat rooms </s>
|
funcom_train/21225438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMTIName(int direction) {
int value = mti.getValue();
/* MS ==> SC */
if (direction == TPDU.DIRECTION_MS_TO_SC) return MS_to_SC_Name[value];
/* SC ==> MS */
return SC_to_MS_Name[value];
}
COM: <s> this will return the name of the message type </s>
|
funcom_train/16476124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireElementNameChangedEvent(BenchmarkElement e) {
// System.out.println("Fire ElementNameChangedEvent: " + e.toString()); // DEBUG
final BenchmarkElementEvent event = new BenchmarkElementEvent (e);
fireEvent(
new EventHandler<BenchmarkElementEvent>(event) {
@Override
protected void dispatch(ElementEventListener listener, BenchmarkElementEvent event)
{
listener.elementNameChanged(event);
}
});
}
COM: <s> fire an event to note that the given element changed </s>
|
funcom_train/41866567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Boolean stationIntersectsCriticalPoints (String stationId, String trainId) {
Boolean intersectionFound = false;
// Get the critical points of the train.
HashMap<String, Integer> criticalPoints = m_TrainCriticalPoints.get(trainId);
// Check to see if the critical point list contains the provided stationID
if (criticalPoints.keySet ().contains (stationId)) {
intersectionFound = true;
}
return intersectionFound;
}
COM: <s> station intersects critical points returns true if the given station is on the </s>
|
funcom_train/23185307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testClassifyClassificationMeteorModelBoolean() {
MovieModel testModel = new MovieModel();
testModel.setCamera("cam1");
testModel.setUrl("url1");
testModel.setFeatureVector(generateFeatureVector(1.));
try {
classification.classify(testModel, classes, this);
} catch (Exception e) {
fail(e.getMessage());
}
// the classification should return meteor as class
// for a mean value of 0.5 for meteors
assertEquals(testModel.getMovieClass().getClassName(), "meteor");
}
COM: <s> testing if the classification is able to assign the right class </s>
|
funcom_train/24136417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onReplyWhoIsIdle(String nick, int idle, Date signon) {
fireStatusEvent(nick+" idle for "+idle+" seconds");
fireStatusEvent(nick+" on since "+signon);
User user = getUserFromWaitingList(nick);
user.setIdleTime(idle);
user.setSignonTime(signon);
}
COM: <s> respond to who is idle reply </s>
|
funcom_train/31100850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void scanPI() throws IOException, XNIException {
// target
fReportEntity = false;
String target = fEntityScanner.scanName();
if (target == null) {
reportFatalError("PITargetRequired", null);
}
// scan data
scanPIData(target, fString);
fReportEntity = true;
} // scanPI()
COM: <s> scans a processing instruction </s>
|
funcom_train/49149294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int updateServerLog(int j) {
for(int i=0;i<qm.QosManagerLogList.size();i++){
if (j==qm.QosManagerLogList.get(i).getid()){
ServerLog sl=new ServerLog();
int index = sampleModel.getSize();
sl.id=""+(index+1);
sl.name=qm.QosManagerLogList.get(i).getLogName();
sl.info=qm.QosManagerLogList.get(i).getLogSpecification();
sampleModel.addElement(sl);
j++;
}
}
return j;
}
COM: <s> update server tab </s>
|
funcom_train/3812391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RuleName resolve(RuleName ruleName) throws GrammarException {
JSGFRuleName jsgfRuleName = (JSGFRuleName) convert(ruleName);
try {
return (RuleName) convert(jsgfGrammar.resolve(jsgfRuleName));
} catch (JSGFGrammarException e) {
throw new GrammarException(e.getMessage());
}
}
COM: <s> resolve a simple or qualified rulename as a full rulename </s>
|
funcom_train/12184564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Video getVideo() throws ConverterException {
Video video = new Video();
setMediaParameters(video);
String limitParameter = getParameterValue(ParameterNames.MAX_VIDEO_SIZE);
if (limitParameter != null) {
video.setSizeLimit(Long.parseLong(limitParameter));
}
video.setVideoAudio(getVideoAudio());
video.setVideoVisual(getVideoVisual());
return video;
}
COM: <s> retrieving video model object from request </s>
|
funcom_train/44221804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showDefaultPage() {
BufferedImage bi = new BufferedImage(this.DEFAULT_WIDTH,
this.DEFAULT_HEIGHT,
BufferedImage.TYPE_INT_RGB);
Graphics g = bi.getGraphics();
g.setColor(Color.WHITE);
g.fillRect(0, 0, this.DEFAULT_WIDTH, this.DEFAULT_HEIGHT);
this.setIcon(new ImageIcon(bi));
}
COM: <s> show a default blank image as the current page </s>
|
funcom_train/36949053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLoadFactor(double newLoadFactor) throws IllegalArgumentException {
if(newLoadFactor <= 1.0 && newLoadFactor > 0.0)
fLoadFactor = newLoadFactor;
else
// TODO Fix so it binds the resource text for translations
throw new IllegalArgumentException(/*Util.bind(*/"cache.invalidLoadFactor"/*)*/); //$NON-NLS-1$
}
COM: <s> sets the load factor for the cache </s>
|
funcom_train/21483518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRefresh() throws Exception {
final String value = "value";
final CountingCacheEntryFactory factory = new CountingCacheEntryFactory(value);
selfPopulatingCache = new UpdatingSelfPopulatingCache(cache, factory);
// Refresh
try {
selfPopulatingCache.refresh();
fail();
} catch (CacheException e) {
//expected.
assertEquals("UpdatingSelfPopulatingCache objects should not be refreshed.", e.getMessage());
}
}
COM: <s> tests refreshing the entries </s>
|
funcom_train/45764672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _isValid() {
boolean res = true;
oObj.setValue(CalendarFieldIndex.MONTH, (short) 37);
res &= !oObj.isValid();
oObj.setValue(CalendarFieldIndex.MONTH, (short) 10);
res &= oObj.isValid();
tRes.tested("isValid()", res);
}
COM: <s> the test sets obviously wrong value then calls a method </s>
|
funcom_train/4539757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleCounterValue(String value,String element)throws SAXException{
try {
if(element.equals(ChessContentHandlerConstants.ELEMENT_START_COUNT)){
handleStartValue(value,ChessContentHandlerConstants.ELEMENT_X);
}else if (element.equals(ChessContentHandlerConstants.ELEMENT_FINAL_COUNT)){
handleStartValue(value,ChessContentHandlerConstants.ELEMENT_Y);
}
} catch (SAXException e) {
errorCode = COUNT_PARSE_ERROR;
throw new SAXException();
}
}
COM: <s> this method will handle the creation of the counter </s>
|
funcom_train/12776128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addToScope(ClassLoaderReference loader, Module m) {
if (m == null) {
throw new IllegalArgumentException("null m");
}
List<Module> s = MapUtil.findOrCreateList(moduleMap, loader);
if (DEBUG_LEVEL > 0) {
System.err.println(("AnalysisScope: add module " + m));
}
s.add(m);
}
COM: <s> add a module to the scope for a loader </s>
|
funcom_train/46619765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isJdkCompiler(String compilerImpl) {
return "modern".equals(compilerImpl)
|| "classic".equals(compilerImpl)
|| "javac1.1".equals(compilerImpl)
|| "javac1.2".equals(compilerImpl)
|| "javac1.3".equals(compilerImpl)
|| "javac1.4".equals(compilerImpl);
}
COM: <s> is the compiler implementation a jdk compiler </s>
|
funcom_train/4312511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getOpenItem() {
if (openItem == null) {
openItem = new JMenuItem();
openItem.setText("Open");
openItem.setHorizontalAlignment(SwingConstants.LEFT);
openItem.setHorizontalTextPosition(SwingConstants.LEFT);
openItem.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
openItem.setPreferredSize(new Dimension(199, 19));
openItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, Event.CTRL_MASK, false));
openItem.addActionListener(this);
}
return openItem;
}
COM: <s> this method initializes open item </s>
|
funcom_train/32964877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AccountMenuStructure findAccountMenuStructure( Account account, String placeholderPath ){
Query query = em.createQuery("SELECT am FROM AccountMenuStructure am WHERE am.account = :account and am.path = :p");
query.setParameter("account", account );
query.setParameter("p", placeholderPath);
java.util.List<AccountMenuStructure> msList = query.getResultList();
if (msList.size()==0) {
return null;
} else {
return msList.get(0);
}
}
COM: <s> find a menu structure entry or return a null if not found </s>
|
funcom_train/25804987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IAcmePort getPortByName(String compName, String portName) {
if (compName == null)
throw new IllegalArgumentException("component name is null");
if (portName == null)
throw new IllegalArgumentException("port name is null");
IAcmeComponent acmeComp = acmeSystem.getComponent(compName);
if (acmeComp == null)
throw new IllegalArgumentException("no component with name \'"
+ compName + "\'");
return acmeComp.getPort(portName);
}
COM: <s> get acme port by its name </s>
|
funcom_train/48535862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getTotalCC() {
int totalCC = -3;
if (this.totalCC == -2) {
totalCC = 0;
// Recursively get the subfolder's total CC
for (SFolder folder : subFolders) {
totalCC += folder.getTotalCC();
}
// Get the all the file's total CC
for (SFile file : allFiles) {
totalCC += file.getCyclo();
}
if (totalCC == 0){
totalCC = -1;
}
}
return totalCC;
}
COM: <s> gets the total cc recursively looks at all subfolder and files </s>
|
funcom_train/39998178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuBar getTeaJMenuBar() {
if (teaJMenuBar == null) {
teaJMenuBar = new JMenuBar();
teaJMenuBar.add(getFileMenu());
teaJMenuBar.add(getRunMenu());
teaJMenuBar.add(getAboutMenu());
}
return teaJMenuBar;
}
COM: <s> this method initializes tea jmenu bar </s>
|
funcom_train/42417209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isInside(Date dt) {
if (dt == null)
return false;
long tm1 = Long.MIN_VALUE;
long tm2 = Long.MAX_VALUE;
if (from != null)
tm1 = from.getTime() / 1000;
if (to != null)
tm2 = to.getTime() / 1000;
return (tm1 <= dt.getTime() / 1000 && tm2 >= dt.getTime() / 1000);
}
COM: <s> checks if the suplied date is anywhere inside this timespan </s>
|
funcom_train/34451297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addOutgoingPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_MActivityNode_outgoing_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_MActivityNode_outgoing_feature",
"_UI_MActivityNode_type"),
M3ActionsPackage.Literals.MACTIVITY_NODE__OUTGOING, true,
false, true, null, null, null));
}
COM: <s> this adds a property descriptor for the outgoing feature </s>
|
funcom_train/39024046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEquals() {
System.out.println("equals");
// false
UID instance1 = new UID();
UID instance2 = new UID();
boolean expResult = false;
boolean result = instance1.equals(instance2);
assertEquals(expResult, result);
// true
instance2.setID(instance1.getID());
expResult = true;
result = instance1.equals(instance2);
assertEquals(expResult, result);
}
COM: <s> test of equals method of class uid </s>
|
funcom_train/3704287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAttribute(String strField, String strVal) {
super.setAttribute(strField, strVal);
if (MiniGisConstants.FIELD_LAT.equals(strField)) {
lat = Double.parseDouble(strVal);
}
else if (MiniGisConstants.FIELD_LON.equals(strField)) {
lon = Double.parseDouble(strVal);
}
} // of method
COM: <s> overridden to also handle lat lon correctly </s>
|
funcom_train/3890586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateRoleGroupNode(EList roleGroup) {
setGrayChecked(roleGroup, false);
int count = countCheckedRoles(roleGroup);
if(count > 0) {
Object[] roles = roleGroup.toArray();
if(count == roles.length) {
setChecked(roleGroup, true);
}
else {
setGrayChecked(roleGroup, true);
}
}
}
COM: <s> update the parent role group check states </s>
|
funcom_train/43400002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void subtract(String word, Object factor) {
if (dict.containsKey(word)) {
Object newFactor = difference(dict.get(word), factor);
if (!isObjectZero(newFactor)) {
dict.put(word, newFactor);
}
else {
dict.remove(word);
}
}
else if (!isObjectZero(factor)) {
dict.put(word, factor);
}
}
COM: <s> subtract string code word code with factor code factor code to this </s>
|
funcom_train/50483945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean doesMatch_set(String stringVal) {
MatchResult result = doesMatch(stringVal);
if (result.errMsg != null) this.logger.testFailure(result.errMsg, new RuntimeException(getClass().getName()+" test failed"));
if (result.propValue != null) setPropertyValue(result.propValue);
return result.matched;
}
COM: <s> tests whether a string matches either the preset value or regexp </s>
|
funcom_train/3368810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Icon getSystemIcon(File f) {
if (f != null) {
ShellFolder sf = getShellFolder(f);
Image img = sf.getIcon(false);
if (img != null) {
return new ImageIcon(img, sf.getFolderType());
} else {
return UIManager.getIcon(f.isDirectory() ? "FileView.directoryIcon" : "FileView.fileIcon");
}
} else {
return null;
}
}
COM: <s> icon for a file directory or folder as it would be displayed in </s>
|
funcom_train/46696118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemove() {
System.out.println("remove");
ParameterInternal start = ParameterFactory.newInstance().create("Type", String.class);
start.add("Object");
PropertiesImplementation instance = new PropertiesImplementation();
instance.add(start);
instance.remove("Type");
assertNull(instance.get("Type"));
}
COM: <s> test of remove method of class properties implementation </s>
|
funcom_train/45750042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIsStaticPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Feature_isStatic_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Feature_isStatic_feature", "_UI_Feature_type"),
OntoUMLPackage.Literals.FEATURE__IS_STATIC,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the is static feature </s>
|
funcom_train/31120432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void dispatchNewMessage(RouteMessage msg) {
if (msg.getMessage().getType() == SubNetSearchMessage.SUBNETQUERY) {
if(subNetIsServed(((SubNetSearchMessage)msg.getMessage()).getSubNetIdentifier())) {
routeSubNetQueryMessage(msg);
}
} else {
super.dispatchNewMessage(msg);
}
}
COM: <s> calls one of the message handler functions depending on the type </s>
|
funcom_train/10482158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeTo(Object obj, String mimeType, OutputStream os) throws IOException {
// we only handle message instances here
if (obj instanceof Message) {
Message message = (Message) obj;
try {
message.writeTo(os);
} catch (MessagingException e) {
throw (IOException) new IOException(e.getMessage()).initCause(e);
}
}
}
COM: <s> write an rfc 822 message object out to an output stream </s>
|
funcom_train/14066616 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mountDevice(final boolean mount){
Thread mountDeviceThread = new Thread(){
@Override
public void run(){
try{
mountDeviceInThread(mount);
} catch(Exception e){}
}
};
mountDeviceThread.setPriority(Thread.NORM_PRIORITY);
mountDeviceThread.start();
mountDeviceThread = null;
}
COM: <s> mounts or unmounts the device </s>
|
funcom_train/4470108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showPopup(final Widget sender) {
if ( popup ==null) {
initPopup();
}
popup.setPopupPositionAndShow(new PopupPanel.PositionCallback() {
public void setPosition(int offsetWidth, int offsetHeight) {
int left = sender.getAbsoluteLeft() + sender.getOffsetWidth();
popup.setPopupPosition(left, sender.getAbsoluteTop());
}
});
}
COM: <s> display the popup </s>
|
funcom_train/42710553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addKeyColumn(String keyColumnName) {
controller.addColumn(keyColumnName);
int columnNumber = controller.findColumn(keyColumnName);
for (int r = controller.getRowCount() - 1; r >= 0; r--) {
controller.setValueAt(Integer.toString(r), r, columnNumber);
}
return columnNumber;
}
COM: <s> add a new column with given name </s>
|
funcom_train/11001845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void outputUncompressed(byte b, OutputStream res) throws IOException {
// Set the mask bit for us
nextMask += (1<<maskBitsSet);
maskBitsSet++;
// And add us to the buffer + dictionary
buffer[bufferLen] = b;
bufferLen++;
dict[(posOut&4095)] = b;
posOut++;
// If we're now at 8 codes, output
if(maskBitsSet == 8) {
output8Codes(res);
}
}
COM: <s> output the un compressed byte </s>
|
funcom_train/27821607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getItemIndexAtPoint(int x,int y) {
for (int i=0;i<getItemCount();i++) {
if (getTitlePanel(i).contains(x,y))
return i;
if (getItemComponent(i).contains(x,y))
return i;
}
return -1;
}
COM: <s> returns the index of the item where the point points to </s>
|
funcom_train/35185117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRange(Rectangle2D range) {
if (range != null) {
Rectangle2D copyRange = new Rectangle2D.Double();
copyRange.setRect(range);
range = copyRange;
}
synchronized (JPAZUtilities.getJPAZLock()) {
boolean isChange;
if (range == null)
isChange = (this.range != null);
else
isChange = !range.equals(this.range);
if (isChange) {
this.range = range;
setPosition(x, y);
}
}
}
COM: <s> sets the turtles range </s>
|
funcom_train/46327734 | /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("primary key null.");
}
// Set the whereArgs to null here.
return database.delete(DATABASE_TABLE, KEY_FAILEDACTIONID + "=" + failedActionID, null) > 0;
}
COM: <s> delete a failed action record </s>
|
funcom_train/42641189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getName() {
if (MedlineField_Type.featOkTst && ((MedlineField_Type)jcasType).casFeat_name == null)
jcasType.jcas.throwFeatMissing("name", "onto.typesys.MedlineField");
return jcasType.ll_cas.ll_getStringValue(addr, ((MedlineField_Type)jcasType).casFeatCode_name);}
COM: <s> getter for name gets the field name that represents the field </s>
|
funcom_train/40944243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open(Resource resource, String windowName) {
synchronized (openList) {
if (!openList.contains(resource)) {
openList.add(new OpenResource(resource, windowName, -1, -1,
BORDER_DEFAULT));
}
}
requestRepaint();
}
COM: <s> opens the given resource in named terminal window </s>
|
funcom_train/15678264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Ellipse2D transform(AffineTransform2D trans) {
Ellipse2D result = Ellipse2D.transformCentered(this, trans);
Point2D center = this.center().transform(trans);
result.xc = center.getX();
result.yc = center.getY();
result.direct = !(this.direct ^ trans.isDirect());
return result;
}
COM: <s> transforms this ellipse by an affine transform </s>
|
funcom_train/41730393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean before(Monomial other) {
short [] ovalues = other.getValues();
for (int i=0; i<values.length; i++) {
if (values[i]>ovalues[i]) {
return true;
} else if (ovalues[i]>values[i]) {
return false;
}
}
return false;
}
COM: <s> returns true if this monomial is before the other in their lexicographic </s>
|
funcom_train/33606753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDotProduct() {
System.out.println("dotProduct");
InnerProductSpaceElement p2 = null;
R2 instance = new R2();
double expResult = 0.0;
double result = instance.dotProduct(p2);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of dot product method of class r2 </s>
|
funcom_train/26220945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getTotalScore() throws Exception {
if (getRanks() == 0 && isUntrained() == true) {
throw new Exception("Skill cannot be used untrained");
}
return getRanks()+AbilityScore.scoreToModifier(getListener().getAbilityScore(getKeyAbility()))+getModifier()+calculateSynergy();
}
COM: <s> calculate and return the total skill score </s>
|
funcom_train/44010250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void timerInterrupt() {
// System.err.println("Interrupt happened @ " + Machine.timer().getTime());
// System.out.println(waitQueue.size());
for (ListIterator iter = waitQueue.listIterator(); iter.hasNext();) {
Pair pair = (Pair) iter.next();
if (pair.t <= Machine.timer().getTime()) {
pair.thread.ready();
iter.remove();
}
}
KThread.currentThread().yield();
}
COM: <s> the timer interrupt handler </s>
|
funcom_train/180950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute(Runnable block) throws Throwable {
try {
transaction = server.openTransactionThread(ownThread);
block.run();
} catch (Throwable e) {
exception = e;
}
server.closeTransactionThread(exception, transaction);
if (exception != null) {
// forward exception
ch.softenvironment.util.Tracer.getInstance().runtimeError("Block failed", exception);
throw exception;
}
}
COM: <s> execute the block in a safe atomar transaction thread </s>
|
funcom_train/21502438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addToIndexPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ArrayDimension_toIndex_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ArrayDimension_toIndex_feature", "_UI_ArrayDimension_type"),
TypeSystemPackage.Literals.ARRAY_DIMENSION__TO_INDEX,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the to index feature </s>
|
funcom_train/6206148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void generateForms(List forms, IProgressMonitor monitor) {
Iterator it = forms.iterator();
while (it.hasNext()) {
IGaijinForm form = (IGaijinForm) it.next();
GenFormSourceJob job = new GenFormSourceJob(form);
try {
job.createCompilationUnit(form.getGaijinProject(), monitor);
} catch (CoreException e) {
getErrors().add(e.getStatus());
}
if (monitor.isCanceled()) {
throw new OperationCanceledException();
}
}
}
COM: <s> generate the source for all forms in the list </s>
|
funcom_train/48558402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand2() {
if (okCommand2 == null) {//GEN-END:|209-getter|0|209-preInit
okCommand2 = new Command("OK", Command.OK, 3);//GEN-LINE:|209-getter|1|209-postInit
}//GEN-BEGIN:|209-getter|2|
return okCommand2;
}
COM: <s> returns an initiliazed instance of ok command2 component </s>
|
funcom_train/12560938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
while (true) {
long sleepTime;
synchronized(monitor) {
if (state > 0) {
sleepTime = state;
state = ACTIVATED;
} else {
// Terminate timer thread
state = DEAD;
return;
}
}
try {
Thread.sleep(sleepTime);
} catch (InterruptedException ie) {
// Consider interruption as wakeup
}
if (state == ACTIVATED){
doTask();
}
}
}
COM: <s> wait until postponed task can be done or cancelled </s>
|
funcom_train/31690315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getNameSpace(String sPropName) {
String ns = NamespaceType.OHRM.getURI();
int nIndex = sPropName.indexOf(":");
if (nIndex > 0) {
ns = sPropName.substring(0, nIndex);
} else if (
sPropName.equals(
VersionedPropertiesManager.TAG_CREATOR_DISPLAYNAME)) {
ns = NamespaceType.DAV.getURI();
}
return ns;
}
COM: <s> returns the namespace uri for the given property name </s>
|
funcom_train/47032998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getVariableText(IVariable variable) {
StringBuffer buffer= new StringBuffer();
IDebugModelPresentation modelPresentation = getModelPresentation();
buffer.append("<p><pre>"); //$NON-NLS-1$
String variableText= modelPresentation.getText(variable);
buffer.append(replaceHTMLChars(variableText));
buffer.append("</pre></p>"); //$NON-NLS-1$
if (buffer.length() > 0) {
return buffer.toString();
}
return null;
}
COM: <s> returns html text for the given variable </s>
|
funcom_train/20232700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void head(URL url, HttpResponse result) {
if (debug) System.out.println("[Checkweb: head] started");
String method = "HEAD";
this.sendRequest(url, method, result);
if (debug) System.out.println("[Checkweb: head] ended");
}
COM: <s> sends a head request to the specified url </s>
|
funcom_train/8583225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getCourseTo(MapNode node) {
double lonCorr = Math.cos(Math.PI / 360.0 * (lat + node.getLat()));
double latDist = node.getLat() - lat;
double lonDist = lonCorr * (node.getLon() - lon);
int course = (int) (180.0 / Math.PI * Math.atan2(lonDist, latDist));
if (course <= 0)
course += 360;
return course;
}
COM: <s> computes a simple approximation of the compass course from this position </s>
|
funcom_train/26485581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createImageField() {
String url =
new AskStringDialog(frame, I18N.get("DesignWin.image_url_title"),
I18N.get("DesignWin.image_url_label")).getString();
if (url != null) {
Section s = report.getFirstSectionByArea(SectionArea.REPORT_HEADER);
NewImageFieldCommand cmd =
new NewImageFieldCommand(findSectionWidgetFor(s), url);
commandHistory.perform(cmd);
}
}
COM: <s> opens a dialog that asks the user to select an image file </s>
|
funcom_train/5342314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleHeaderColumnPressed(Point p) {
JTableHeader th = TABLE.getTableHeader();
int col = th.columnAtPoint(p);
int c = TABLE.convertColumnIndexToModel(col);
if (c != -1) {
TABLE.setPressedColumnIndex(c);
// force the table to redraw the column header
th.repaint(th.getHeaderRect(col));
}
}
COM: <s> tell the table something is pressed </s>
|
funcom_train/12643957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getProperty(String name, ImageObserver observer) {
if (src != null) {
src.checkSecurity(null, false);
}
if (properties == null) {
addWatcher(observer, true);
if (properties == null) {
return null;
}
}
Object o = properties.get(name);
if (o == null) {
o = Image.UndefinedProperty;
}
return o;
}
COM: <s> return a property of the image by name </s>
|
funcom_train/10910960 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AbstractBorderElement merge(AbstractBorderElement e) {
AbstractBorderElement abe = this;
if (e instanceof SolidAndDoubleBorderElement) {
abe = mergeSolid((SolidAndDoubleBorderElement) e);
} else if (e instanceof DottedBorderElement) {
abe = e;
} else if (e instanceof DashedBorderElement) {
abe = e.merge(this);
}
return abe;
}
COM: <s> merges with e </s>
|
funcom_train/14364785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected DefaultElementPage createWizardPage() {
DefaultElementPage defaultElementPage = new DefaultElementPage(getPageId(), getPageTitle(), getPageDescription(), getElement());
defaultElementPage.setElementNameLabel(getElementLabelInPage());
return defaultElementPage;
}
COM: <s> create the default wizard page used by this wizard </s>
|
funcom_train/31888934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Method getProcess(String command){
// find in methods list method for command
String methodName = "process_"+command+"_Command";
for(int i=0;i < Processor.processes.length;i++) {
Method proc = Processor.processes[i];
if (proc.getName().equals(methodName)) return proc;// found
}
return null;// not found
}
COM: <s> to get reference to method for process the command </s>
|
funcom_train/44163902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseDragged(MouseEvent e) {
if (getMap() == null) {
return;
}
JComponent component = (JComponent)e.getSource();
drawBox(component, startPoint, oldPoint);
oldPoint = e.getPoint();
drawBox(component, startPoint, oldPoint);
performDragScrollIfActive(e);
gui.refresh();
}
COM: <s> invoked when the mouse has been dragged </s>
|
funcom_train/26669292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initKeySelection(DicomElement sq) {
if (sq == null || !sq.hasItems()) {
log.debug("Didn't find any selected images.");
return;
}
log.info("Found a selected image.");
int size = sq.countItems();
for (int i = 0; i < size; i++) {
DicomObject conDcm = sq.getDicomObject(i);
DicomElement imgs = conDcm.get(Tag.ReferencedSOPSequence);
initKeySelectionFromImages(imgs);
}
}
COM: <s> initializes the key selection from a sequence of selected images </s>
|
funcom_train/8367949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getNextSettings() {
if (nextSettings == null) {//GEN-END:|172-getter|0|172-preInit
// write pre-init user code here
nextSettings = new Command("OK", Command.OK, 0);//GEN-LINE:|172-getter|1|172-postInit
// write post-init user code here
}//GEN-BEGIN:|172-getter|2|
return nextSettings;
}
COM: <s> returns an initiliazed instance of next settings component </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.