__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
|---|---|---|
funcom_train/41329237
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void mouseClicked( MouseEvent e ){
//Debug.out("mouseClicked");
Point p = ScalingDelegate.getMouseEventLocation(e.getPoint());
int onmask = InputEvent.SHIFT_DOWN_MASK;
if ((e.getModifiersEx() & onmask) == onmask) {
// the shift key is held down, check for multi-select
Element el = checkElementSelected(p);
if ( el != null ) {
selectionState.shift_click_element(el);
}
} else {
Element el = checkElementSelected(p);
if ( el != null ){
selectionState.click_element(el);
} else {
selectionState.click_space();
}
}
return;
}
COM: <s> have to handle the following conditions and then generate event into the </s>
|
funcom_train/22387367
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean isOrdered(Nile2Iter it) {
if(c.equals(it.c)) {
return offs <= it.offs;
} else {
if(c.findCell("d.nile", 1, it.c)) return true;
if(!c.findCell("d.nile", -1, it.c))
throw new ZZError("IsOrdered: not on same stream!");
return false;
}
}
COM: <s> returns true if this lt it </s>
|
funcom_train/3786519
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void createNewDbLMtable(String lmsFile)
{ /* createNewDbLMtable */
this.lmsFile= lmsFile;
SimpleTable st= new SimpleTable("landmark table", lmsFile,
lmsFields, 0, lmsFields.length);
tlm= new Table(st); /* handles casting problems */
editRsampleLMSFlag= true;
} /* createNewDbLMtable */
COM: <s> create new db lmtable create a new tlm table </s>
|
funcom_train/50053814
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void save(File saveFile) {
XStream xStream = new XStream(new DomDriver());
xStream.autodetectAnnotations(true);
GameDto gameDto = new GameDto();
gameDto.setCameraManager(CameraManager.getInstance());
gameDto.setGameModel(model);
try {
FileWriter writer = new FileWriter(saveFile);
xStream.toXML(gameDto, writer);
writer.close();
} catch (IOException e) {
System.err.println("Error saving file " + saveFile);
}
}
COM: <s> saves the current state of the game to the given file </s>
|
funcom_train/3925178
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public FieldValue CreateFieldValue( Field f, int fieldType, int tokenOffset, TokenEnumerator v, Scene scene, Node parentNode ) {
return( CreateFieldValue( f, VRML97.getFieldTypeString( fieldType ), tokenOffset, v, scene, parentNode ));
}
COM: <s> create the field value of the node </s>
|
funcom_train/11943033
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void previous() {
index--;
message = this.view.getMessages().get(index);
LinkedHashMap<Integer, CommonMessageFormat> messages =
new LinkedHashMap<Integer, CommonMessageFormat>();
messages.put(index, message);
view.setSelectedMessages(messages);
}
COM: <s> gets the next message from the view if there is one </s>
|
funcom_train/32081057
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean loadFont (String path) {
checkDevice();
if (path == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
int length = path.length ();
char[] buffer = new char [length + 1];
path.getChars (0, length, buffer, 0);
int str = OS.gcnew_String(buffer);
int uri = OS.gcnew_Uri(str, OS.UriKind_RelativeOrAbsolute);
int list = OS.Fonts_GetTypefaces(uri);
int count = OS.TypefaceCollection_Count(list);
OS.GCHandle_Free(list);
OS.GCHandle_Free(uri);
OS.GCHandle_Free(str);
return count != 0;
}
COM: <s> loads the font specified by a file </s>
|
funcom_train/17399141
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected Quaternion setWorldRotation(Quaternion rot) {
Quaternion localRotation = getLocalRotation();
if (parent != null) {
tmp_inverseWorldRotation.set(parent.getWorldRotation()).inverseLocal().mult(rot, localRotation);
} else {
localRotation.set(rot);
}
return localRotation;
}
COM: <s> computes the local rotation from the parameter rot and sets it as new </s>
|
funcom_train/20334031
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean equals(Object obj) {
if (obj instanceof OutdoorSpace) {
OutdoorSpace cmp=(OutdoorSpace)obj;
if (getInstanceName()!=cmp.getInstanceName() &&
(getInstanceName()==null || !getInstanceName().equals(cmp.getInstanceName()))
) return false;
return true;
}
return false;
}
COM: <s> test the equality of this code outdoor space code </s>
|
funcom_train/24186687
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void generateObfuscatedDomains(String var){
if(mergeBack)
obfuscatedMergedDomains.put(var, randomDomain(problem.getDomain(var)));
else {
//Domains are generated after, when a dfs msg is received
obfuscatedUniqueDomains.put(var, new HashMap<String, V[]>()); //initiate the map to avoid nullPointerException
}
}
COM: <s> in merge back mode generates an obfuscated domain for the input variable </s>
|
funcom_train/19255856
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public UndoableEdit remove(int where, int nitems) throws BadLocationException {
if (where < 0 || where > s.length() || where + nitems > s.length())
throw new BadLocationException("Out of bounds", where);
s.replace(where, where + nitems, "");
return null;
}
COM: <s> removes nitems chars from the content at the specified position </s>
|
funcom_train/18827481
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void reset() {
for (Iterator it = stageKeys.listIterator(); it.hasNext(); ) {
((Stage) stages.get(it.next())).reset();
}
if (wired == Direction.REVERSED) { // reverse it back
Collections.reverse(stageKeys);
}
wired = null;
blockSize = 0;
}
COM: <s> resets the chain for re initialisation and use with other characteristics </s>
|
funcom_train/1600819
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void run(){
GUI gui = (GUI)registeredObject;
// String in = (String)JOptionPane.showInputDialog(gui.frame, "Remove Pane","Are you sure you want to remove this pane?",JOptionPane.PLAIN_MESSAGE,null,null,in);
gui.removePane(gui.getTopPane());
// gui.addPane();
}
COM: <s> removes the pane from the menu </s>
|
funcom_train/11727798
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Value getJcrValue(Session s, String valueProp, String typeProp, String defaultValue) throws RepositoryException {
ValueFactory vf = s.getValueFactory();
String val = getProperty(valueProp, defaultValue);
int type = PropertyType.valueFromName(getProperty(typeProp, PropertyType.TYPENAME_STRING));
return vf.createValue(val, type);
}
COM: <s> create a jcr value based on the configuration </s>
|
funcom_train/13646832
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void deletePartner( Partner partner ){
try{
PreparedStatement statement
= this.connection.prepareStatement( "DELETE FROM partner WHERE id=?");
statement.setEscapeProcessing( true );
statement.setInt( 1, partner.getDBId() );
statement.execute();
statement.close();
} catch( SQLException e ){
this.logger.severe( e.getMessage() );
}
}
COM: <s> inserts a new partner into the database </s>
|
funcom_train/17639853
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void actionPerformed (ActionEvent e) {
try {
// lock the object in read mode
irc.sentence.jvnLockRead();
// invoke the method
String s = ((Sentence)(irc.sentence.jvnGetObjectState())).read();
// display the read value
irc.data.setText(s);
irc.text.append(s+"\n");
} catch (JvnException je) {
System.out.println("IRC problem : " + je.getMessage());
}
}
COM: <s> management of user events </s>
|
funcom_train/12160282
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private ValidationStatus validateListItems() {
ValidationStatus status = OK_STATUS;
String[] items = list.getItems();
for (int i = 0; i < items.length && status.isOK(); i++) {
status = listValidator.validate(items[i]);
}
return status;
}
COM: <s> validates the items in the list </s>
|
funcom_train/44595539
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected int retrieveExtraDimension(int start, int end) {
this.scanner.resetTo(start, end);
int dimensions = 0;
try {
int token;
while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) {
switch(token) {
case TerminalTokens.TokenNameLBRACKET:
case TerminalTokens.TokenNameCOMMENT_BLOCK:
case TerminalTokens.TokenNameCOMMENT_JAVADOC:
case TerminalTokens.TokenNameCOMMENT_LINE:
break;
case TerminalTokens.TokenNameRBRACKET://166
dimensions++;
break;
default:
return dimensions;
}
}
} catch(InvalidInputException e) {
// ignore
}
return dimensions;
}
COM: <s> this method is used to retrieve the array dimension declared after the </s>
|
funcom_train/31887218
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testTempoParsing() {
System.out.println("testTempoParsing");
String bpmString = "361bpm";
int bpmExpect = 361;
// Test the parsing of a tempo string.
int bpm1 = MetaEvent.parseTempo(bpmString);
System.out.println("parseTempo(" + bpmString + ") gives " + bpm1);
assertEquals(bpmExpect, bpm1);
}
COM: <s> test of tempo string parsing of class com </s>
|
funcom_train/14414997
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean checkParms(String p_cimom) {
if (c_isDebuggingMethodCalls) {
System.out.println("...DTableSel.checkParms(1)");
}
StringTokenizer sT = new StringTokenizer(p_cimom,",");
if ( sT.countTokens() != 4 ) {
System.out.println(">>> ERROR: " + ERR_4);
return false;
}
return true;
}
COM: <s> check roughly whether cimom access info is complete </s>
|
funcom_train/19357334
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void popState() throws SAXException {
int size = m_states.size();
if (size == 0)
throw new RDFParserException("Internal exception: state stack is empty.", m_documentLocator);
if (size == 1)
m_state = null;
else
m_state = (State) m_states.get(size - 2);
m_states.remove(size - 1);
}
COM: <s> pops a state from the stack </s>
|
funcom_train/20489322
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void removeIdea(Idea i) {
Component c = spiderNodes.get(i.getId());
if(i.getParent() != null) {
spiderNodes.get(i.getParent().getId()).removeEdge((SpiderNode)c);
}
spiderNodes.remove(i.getId());
remove(c);
validate();
try {
backend.removeIdea(i, backend.getAddress());
}
catch(RemoteException e) {
backend.log.severe("Cannot resolve local host");
}
}
COM: <s> removes the specified ideas visualisation from the map </s>
|
funcom_train/47312022
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void backupAndRecomputePath() {
// back up for 200 ms
nextPathLocation.setTo(getTransform().getVelocity());
if (!isFlying()) {
nextPathLocation.y = 0;
}
nextPathLocation.multiply(-1);
getTransform().setVelocity(nextPathLocation, 200);
// wait until computing the path again
currentPath = null;
timeUntilPathRecalc = (long) (MoreMath.random() * 1000);
}
COM: <s> when a collision occurs back up for 200 ms and then </s>
|
funcom_train/4925314
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private String doRequest(String uri) throws Exception {
HttpGet request = new HttpGet("http://localhost:7878" + uri);
HttpResponse response = this.client.execute(request);
assertEquals("Should be successful", 200, response.getStatusLine()
.getStatusCode());
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
response.getEntity().writeTo(buffer);
return new String(buffer.toByteArray());
}
COM: <s> does the request to test the running </s>
|
funcom_train/28351854
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setFont(Font fnt) {
cavInd_Spinner.setFont(fnt);
((JSpinner.DefaultEditor) cavInd_Spinner.getEditor()).getTextField().setFont(fnt);
cav_Label.setFont(fnt);
cavIndex_Label.setFont(fnt);
fieldLogGraphPanelBorder.setTitleFont(fnt);
pwrGraphPanelBorder.setTitleFont(fnt);
analysisPanelBorder.setTitleFont(fnt);
analyze_Button.setFont(fnt);
}
COM: <s> sets the fonts everywhere inside the panel </s>
|
funcom_train/9428380
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void clear() {
id = null;
title = null;
editUri = null;
htmlUri = null;
summary = null;
content = null;
contentType = null;
contentSource = null;
author = null;
email = null;
category = null;
categoryScheme = null;
publicationDate = null;
updateDate = null;
deleted = false;
batchInfo = null;
}
COM: <s> clears all the values in this entry </s>
|
funcom_train/40535427
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testServletMapping3WithQueryString() {
makeAsyncCall(GWT.getModuleBaseURL() + "test/long?a=b&c=d",
new AsyncCallback() {
public void onFailure(Throwable caught) {
fail(caught.toString());
}
public void onSuccess(Object result) {
finishTest();
assertEquals(new Integer(3), result);
}
});
}
COM: <s> should call the implementation that returns 3 with a query string </s>
|
funcom_train/5395737
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testProcess() {
System.out.println("process");
File file = null;
GZipProcess instance = null;
File expResult = null;
File result = instance.process(file);
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 process method of class org </s>
|
funcom_train/36186193
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Service getService(long bundleId) {
for (Service s : this.services) {
if (s.bundleId == bundleId && localServices.contains(s)) {
log.debug("Found service \"" + s.id + "\", bundle ID " + bundleId);
return s;
}
}
log.debug("PSS service with bundle ID \"" + bundleId + "\" not found on local peer.");
return null;
}
COM: <s> get the service that is installed in osgi with given osgi bundle id </s>
|
funcom_train/18739041
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected int computeHashCode() {
final int prime = 31;
int result = getCondition().hashCode();
result = prime * result + getSubProofs().hashCode();
if (getPatternMap() != null) {
result = prime * result + getPatternMap().hashCode();
}
return result;
}
COM: <s> computes a value for the hash code </s>
|
funcom_train/17970862
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected Row buildButtonsRow() {
Row row = new Row();
row.setStyleName("WindowPane.Row.Button");
close = new Button(MessageResources.instance().getString(
BaseConstants.GENERAL_CLOSE));
close.setStyleName("Button.Base");
close.addActionListener(new ActionListener() {
private static final long serialVersionUID = -6314096638077283444L;
@Override
public void actionPerformed(ActionEvent arg0) {
userClose();
}
});
row.add(close);
if (actionListener != null) {
close.addActionListener(actionListener);
}
close.setId(BaseConstants.ACTION_CLOSE);
close.setActionCommand(BaseConstants.ACTION_CLOSE);
return row;
}
COM: <s> build the buttons bottom row </s>
|
funcom_train/1800063
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Number numericValue() {
String type = getType();
if (Type.INTEGER.equals(type)) {
return Long.parseLong(getValue());
} else {
// type is currency, float, percent, time, us_currency, an unknown type,
// or not set
return Double.parseDouble(getValue());
}
}
COM: <s> gets a numeric representation of this metrics value </s>
|
funcom_train/27747389
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean getEnabled () {
checkWidget ();
int barHandle;
if ((style & SWT.HORIZONTAL) != 0) {
barHandle = OS.GTK_SCROLLED_WINDOW_HSCROLLBAR (parent.scrolledHandle);
} else {
barHandle = OS.GTK_SCROLLED_WINDOW_VSCROLLBAR (parent.scrolledHandle);
}
if (barHandle != 0) return OS.GTK_WIDGET_SENSITIVE (barHandle);
return true;
}
COM: <s> returns code true code if the receiver is enabled and </s>
|
funcom_train/21357569
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private String toHexString(final byte[] b) {
final StringBuffer sb = new StringBuffer(b.length << 1);
for (byte aB : b) {
// look up high nibble char
sb.append(hexChar[(aB & 0xf0) >>> 4])
// look up low nibble char
.append(hexChar[aB & 0x0f]);
}
return sb.toString();
}
COM: <s> private method that converts an array of bytes to a string </s>
|
funcom_train/42068099
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void addTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SampleLoop_type_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SampleLoop_type_feature", "_UI_SampleLoop_type"),
WavPackage.Literals.SAMPLE_LOOP__TYPE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the type feature </s>
|
funcom_train/31669069
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void addComponents() {
indVar1Box = createIndVariableBox("x");
indVar2Box = createIndVariableBox("y");
oneToOne = createOneToOneButton();
colorBox = createColorBox("Curve");
JPanel topPanel = new JPanel();
JPanel bottomPanel = new JPanel();
topPanel.add(indVar1Box);
topPanel.add(indVar2Box);
bottomPanel.add(oneToOne);
bottomPanel.add(colorBox);
setLayout(new GridLayout(2,1));
add(topPanel);
add(bottomPanel);
}
COM: <s> this method adds the components to the panel and </s>
|
funcom_train/43846925
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setWord(Word word) throws Exception {
if (this.isRecording())
throw new Exception("The word is being recorded");
this.word = word;
defaultColor = word.getSoundFile() == null ? this.defaultColor
: Color.GREEN;
setBackground(defaultColor);
this.wordLabel.setText(word.getWord());
this.languageLabel.setText("(" + word.getLanguage() + ")");
}
COM: <s> sets the record panel to a new word </s>
|
funcom_train/49329839
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void addFile(String absolutePath) {
// remove the old
mruFileList.remove(absolutePath);
// add to the top
mruFileList.add(0, absolutePath);
while (mruFileList.size() > MAX_SIZE) {
mruFileList.remove(mruFileList.size() - 1);
}
firePropertyChange(MRU_FILE_LIST_PROPERTY, null, mruFileList);
store();
}
COM: <s> add a file to the mru list and fire change events </s>
|
funcom_train/8169268
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void processChildren(LinkedList<? extends Node> children) {
astTree.append('[');
if (children != null) {
Iterator<? extends Node> iterator = children.iterator();
while (iterator.hasNext()) {
Node node = iterator.next();
node.apply(this);
if (iterator.hasNext())
astTree.append(ELEMENT_DIVIDER);
}
}
astTree.append(']');
}
COM: <s> process a list of children and add their representation in the ast tree </s>
|
funcom_train/50848679
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean isValidEmail(String email ){
if (email==null) return false ;
else
return ( ( email.indexOf("@") < M ) ||
( email.lastIndexOf(".") - email.indexOf("@") < 2 ) ||
( email.length()-email.lastIndexOf(".") < 3 ) ? false:true );
}
COM: <s> email address validation method </s>
|
funcom_train/50608145
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public CommandResult proxyCommand(Command cmd) {
Namespace NS = Namespace.getRoot();
Nameable nameable = NS.getFromPath(cmd.getObject());
if (!(nameable instanceof CMDExecutor))
throw new CommandException("the object does not implement CMDExecutor:"+
nameable.getName()+", class "+
nameable.getClass()+".");
CMDExecutor worker = (CMDExecutor)nameable;
return worker.runCommand(cmd);
}
COM: <s> routes a command to the specified target executor </s>
|
funcom_train/10790425
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setColumns(Column[] cols) {
Column[] cur = getColumns();
for (int i = 0; i < cur.length; i++)
removeColumn(cur[i]);
if (cols != null)
for (int i = 0; i < cols.length; i++)
addColumn(cols[i]);
}
COM: <s> set the columns the constraint spans </s>
|
funcom_train/22347828
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected boolean isNo(String what) {
// When at least 2 characters & match
if ((what.length() > 1) &&
(what.substring(0,2).equalsIgnoreCase(TyMsg.getText(55)))) {
// is standalone
return true;
} // endif
// not standalone
return false;
} // end-method
COM: <s> look for a no argument </s>
|
funcom_train/49050848
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void removeAltToVisualLongDescLang(String inPrimaryURI) {
String longDescLang = getAltToVisualLongDescLang(inPrimaryURI);
if (longDescLang != null) {
EquivalentType equiv = getEquivalentFor(inPrimaryURI);
JAXBPath.deleteJaxbObject ("/Content/AlternativesToVisual/LongDescriptionLang", equiv);
}
}
COM: <s> remove the long desc lang element from the alt to visual metadata </s>
|
funcom_train/41021288
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void publishMessageForUser(MWMessage.MessageID msgID, int userId) {
MWMessage msg = new MWMessage(msgID);
msg.setReceiverID(userId);
for (Integer id : listeners.keySet()) {
listeners.get(id).sendMessage(msg);
}
}
COM: <s> send message to a specific user </s>
|
funcom_train/6519696
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void realize() {
if (last == null)
throw new NoSuchElementException();
Entry previous = null;
int idx = hash(last.key);
Entry e = (Entry)buckets[idx];
while (e != null) {
if (LinkedHashMultiMap.equals(last.key, e.key))
break;
previous = e;
e = (Entry)e.next;
}
last.access(previous, idx);
}
COM: <s> simulate access to the last returned element i </s>
|
funcom_train/34445375
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private FireWork createFireWork(int x, int y) {
String path = game.getProperties().getPathImagesWorld() + "firework/";
BufferedImage[] imgsFireWork = new BufferedImage[3];
for (int i = 0; i < imgsFireWork.length; i++) {
imgsFireWork[i] = game.getImage(path + "0" + (i + 1) + ".gif");
}
return new FireWork(imgsFireWork, x, y);
}
COM: <s> creates fire works with a specified postion </s>
|
funcom_train/30194386
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean containsVariable(JxplElement elem, String name){
if(isVariable(elem) && name.equals(variableName(elem))) return true;
if(environment.isAtom(elem)) return false;
JxplList list = (JxplList)elem;
Vector e = list.getElements();
for(int i=0; i<e.size(); i++){
if(containsVariable((JxplElement)e.get(i),name)) return true;
}
return false;
}
COM: <s> returns true if the jxpl element elem contains a variable </s>
|
funcom_train/49006138
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void writeContent( String content, MimeType contentType ) throws IOException {
byte[] bytes = content.getBytes( "UTF-8" );
sendHeader( HTTPHeader.Content_Length, "" + bytes.length );
sendHeader( HTTPHeader.Content_Type, contentType.mimeType + "; charset=UTF-8" );
println();
flush();
out.write( bytes );
close();
}
COM: <s> write utf 8 encoded content </s>
|
funcom_train/171580
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void replaceMethod(Method old, Method new_) {
if(new_ == null)
throw new ClassGenException("Replacement method must not be null");
int i = method_vec.indexOf(old);
if(i < 0)
method_vec.add(new_);
else
method_vec.set(i, new_);
}
COM: <s> replace given method with new one </s>
|
funcom_train/6334245
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String getMimeType( String fileName ) {
String ext = getExtension( fileName );
String type = null;
if( ext != null ) {
type = getMimeTypeFromExtension( ext );
} else {
return DEFAULT_MIME_TYPE;
}
if( type == null ) {
return DEFAULT_MIME_TYPE;
} else {
return type;
}
}
COM: <s> returns the mime type associated with the given file name </s>
|
funcom_train/3392410
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private boolean hasPrintedPackageIndex(String pkgname) {
String[] list = (String[])printedPackageHeaders.toArray(new String[] {});
for (int i = 0; i < list.length; i++) {
if (pkgname.startsWith(list[i])) {
return true;
}
}
return false;
}
COM: <s> return true if the given package name has been printed </s>
|
funcom_train/2882827
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void bind(AWSException cause) {
add(REQUEST_ID, cause.getRequestId());
List<? extends AWSError> errors = cause.getErrors();
if (errors != null) {
ArrayList<String> elist = new ArrayList<String>(errors.size());
for (AWSError error : errors) {
elist.add(error.toString());
}
add(ERRORS, elist);
}
}
COM: <s> add post processing of the exception </s>
|
funcom_train/28636577
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void writeObjectArray(Output out, Object[] array) {
//out.writeS
if (log.isDebugEnabled()) {
log.debug("write object array");
}
out.writeStartArray(array.length);
for (int i = 0; i < array.length; i++) {
if (i > 0) {
out.markElementSeparator();
}
//log.info(i);
serialize(out, array[i]);
}
out.markEndArray();
}
COM: <s> writes an object array out to the output </s>
|
funcom_train/2586433
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setChosenDateButtonColor(final Color chosenDateButtonColor) {
if (chosenDateButtonColor == null) {
throw new NullPointerException("UIColor must not be null.");
}
final Color oldValue = this.chosenDateButtonColor;
this.chosenDateButtonColor = chosenDateButtonColor;
refreshButtons();
firePropertyChange("chosenDateButtonColor", oldValue,
chosenDateButtonColor);
}
COM: <s> redefines the color for the currently selected date </s>
|
funcom_train/37506811
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void joinListen(PushletClientListener aListener, String aMode, String aSubject) throws PushletException {
stopListen();
String listenURL = pushletURL
+ "?" + P_EVENT + "=" + E_JOIN_LISTEN
+ "&" + P_FORMAT + "=" + FORMAT_XML
+ "&" + P_MODE + "=" + aMode
+ "&" + P_SUBJECT + "=" + aSubject;
// Start listener thread (sync call).
startDataEventListener(aListener, listenURL);
}
COM: <s> immediate listener joins subscribes and listens in one action </s>
|
funcom_train/35976089
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void startElement(String name, AttributeList attrs) throws SAXParseException {
if (helperImpl.project.getDataTypeDefinitions().get(name) != null) {
new DataTypeHandler(helperImpl, this, target).init(name, attrs);
} else {
new TaskHandler(helperImpl, this, target, null, target).init(name, attrs);
}
}
COM: <s> handles the start of an element within a target </s>
|
funcom_train/12762237
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected String createParaString() {
StringBuilder tagName = new StringBuilder(fTag.getName());
for (int i = 0; i < tagName.length(); i++) {
char c = tagName.charAt(i);
if (c == '.') {
tagName.setCharAt(i, '(');
tagName.append(')');
}
}
return tagName.toString();
}
COM: <s> creates the string using parenthesis for the tag name </s>
|
funcom_train/24525011
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void text(final String text) {
WorkerContext ctx = getLocalWC();
if (null != ctx.getCurrentTag()) {
if (text.length() > 0) {
Pipeline<?> wp = rootpPipe;
ProcessObject po = new ProcessObject();
try {
while (null != (wp = wp.content(ctx, ctx.getCurrentTag(), text, po)))
;
} catch (PipelineException e) {
throw new RuntimeWorkerException(e);
}
}
}
}
COM: <s> this method passes encountered text to the pipeline via the </s>
|
funcom_train/48497942
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void removeHoliday (HolidayDTO holiday) {
// Get this holiday
TimeDTO[] times = (new TimeManagementDAO())
.selectHolidaysOfUserInPeriod(holiday.getUser(), holiday
.getStart(), holiday.getEnd());
// And remove these
TimeManagementDAO dao = new TimeManagementDAO ();
if (times != null && times.length > 0) {
for (int i=0; i<times.length;i++) {
dao.delete(times[i]);
}
}
}
COM: <s> delete an existing holiday object </s>
|
funcom_train/49200752
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void addCategorizedLinksPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Scene_categorizedLinks_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Scene_categorizedLinks_feature", "_UI_Scene_type"),
TransformedPackage.Literals.SCENE__CATEGORIZED_LINKS,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the categorized links feature </s>
|
funcom_train/50812257
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean logout (String uid, String password) {
if (!this.loggedUsers.contains(uid.intern())) return false;
if ( ((ClientInfo) this.users.get(uid)).getPassword().equals(password)) {
this.loggedUsers.remove (uid.intern());
messageConnectionPool.remove (uid);
sendLogoutNotification (uid);
updateAllCommandListeners();
return true;
}
return false;
}
COM: <s> logs out the user from the server </s>
|
funcom_train/1728834
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void addMedia(int fileID, boolean request) {
MP3File fileToAdd = fileHash.get(fileID);
if (fileToAdd != null) {
QueueItem newItem = new QueueItem(fileToAdd, request);
queue.addToQueue(newItem);
}
randomSongSelector.addRequestedSongID(fileID);
}
COM: <s> add a file to the queue specifying that it was a request </s>
|
funcom_train/22401928
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void callback(GraphElementFacade e) {
System.out.println("Inside GraphControl.Node");
//get the layout interaction, and carry out the interaction
LayoutInteraction li = getRootCluster().getLayoutEngine().getLayoutInteraction();
if(li != null) { //this is null if no interaction is specified for this layout
li.interact(LayoutInteraction.NODE, e, getGraphCanvas(), getRootCluster());
}
}
COM: <s> called when the node is picked with the left or middle mouse button </s>
|
funcom_train/7348808
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void start() {
requestFocus();
try {
tracker.waitForID(HANGCLASS);
} catch (InterruptedException e) {}
tracker.checkAll(true);
// Start a new game only if user has won or lost; otherwise
// retain the same game.
if (secretWordLen == wordLen || wrongLettersCount == maxTries) {
newGame();
}
}
COM: <s> start the applet </s>
|
funcom_train/11792774
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private Option createWorkingDirOption() {
Option workingDirOption = OptionBuilder.create("w");
workingDirOption.setDescription(Messages
.getString("Client.WorkingDirectoryOptionText"));
logger.debug("Working Directory option description: "
+ Messages.getString("Client.WorkingDirectoryOptionText"));
workingDirOption.setArgName("directory");
workingDirOption.setArgs(1);
workingDirOption.setLongOpt("directory");
return workingDirOption;
}
COM: <s> creates the cli code option code of the working directory option </s>
|
funcom_train/50872907
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testRemoveElement() {
OMApplication application = new OMApplication();
OMInteger integer = new OMInteger("1");
OMSymbol symbol = new OMSymbol("a","b");
application.addElement(integer);
application.addElement(symbol);
application.removeElement(integer);
assertTrue(application.getElementAt(0)==symbol);
}
COM: <s> test of remove element method of class omapplication </s>
|
funcom_train/4025721
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected File validJar(String pathToJar) {
if(pathToJar.indexOf(RESOURCE_JAR_PREFIX) != 0) {
return null;
}
File jarFile = toAbsolutePath(pathToJar.substring(RESOURCE_JAR_PREFIX.length()));
return jarFile.exists() && jarFile.isFile() ? jarFile : null;
}
COM: <s> validates a jar file </s>
|
funcom_train/3350870
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void dump(PrintWriter out) {
if (sdt != null) {
out.println("Tables:");
out.println(sdt);
for (AcpiTable table : sdt.getTables()) {
out.println(table);
}
out.println();
}
if (root != null) {
out.println("Namespace:");
root.dump(out);
}
}
COM: <s> dump the namespace </s>
|
funcom_train/31887037
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Track createTrack(int index) {
synchronized (this) {
// Create a new Track at the end of the sequence
Track track = createTrack();
// Add the same new Track at the given index
tracks.add(index, track);
// and remove the one from the end.
tracks.remove(tracks.size() - 1);
return track;
}
}
COM: <s> create a track at the specified index in the sequence </s>
|
funcom_train/42225968
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Command getBackCommand2() {
if (backCommand2 == null) {//GEN-END:|55-getter|0|55-preInit
// write pre-init user code here
backCommand2 = new Command("Voltar", Command.BACK, 0);//GEN-LINE:|55-getter|1|55-postInit
// write post-init user code here
}//GEN-BEGIN:|55-getter|2|
return backCommand2;
}
COM: <s> returns an initiliazed instance of back command2 component </s>
|
funcom_train/12316747
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private boolean isXHTML(String pluginId, URL url) {
if (xhtmlDescriber == null) {
xhtmlDescriber = new XHTMLContentDescriber();
}
InputStream in = null;
try {
in = url.openStream();
return (xhtmlDescriber.describe(in, null) == IContentDescriber.VALID);
} catch (Exception e) {
// if anything goes wrong, treat it as not xhtml
} finally {
if (in != null) {
try {
in.close();
} catch (IOException e) {
// nothing we can do
}
}
}
return false;
}
COM: <s> returns whether or not the given content should be treated as xhtml </s>
|
funcom_train/15718284
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void okPressed() {
Data.setProperty("jgoodiesTheme",mColorScheme.getSelectedItem().getClass().getName());
Data.setProperty("jgoodiesShadow",String.valueOf(mShadow.isSelected()));
setVisible(false);
}
COM: <s> ok was pressed </s>
|
funcom_train/29622254
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private JMenuItem getMiPartnerEdition() {
if (miPartnerEdition == null) {
miPartnerEdition = new JMenuItem();
miPartnerEdition.setText(AppTextsDAO.get("MENU_CONSULT_PARTNER"));
miPartnerEdition.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
FindPartenaireFrame fpf = new FindPartenaireFrame();
getJDesktop().addAndShow(fpf);
}
});
}
return miPartnerEdition;
}
COM: <s> this method initializes mi partner edition </s>
|
funcom_train/17209484
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private JButton getSearchButton() {
if (searchButton == null) {
searchButton = new JButton("Search...");
searchButton.setBorderPainted(true);
searchButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
setStatus("Searching...");
shelf = control.searchOn((String) searchFilterComboBox
.getSelectedItem(), searchField.getText());
searchResults.setResults(shelf);
draw();
}
});
}
return searchButton;
}
COM: <s> this method initializes search button </s>
|
funcom_train/15493626
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void pushRole(String roleName) throws SecurityException {
ThreadPermissionSession session = getSession();
Role role = RoleManager.getInstance().getRole(roleName);
if (role.canAccessRole(session.getPrincipals()) == false) {
throw new SecurityException(
"The session does not have the rights to these permissions");
}
session.addRole(role);
}
COM: <s> this method pushes the role onto the thread session </s>
|
funcom_train/36999733
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Entry getEntry (String name, Object args[]){
Class params[] = new Class[args.length];
for (int i=0; i<args.length; i++) {
Class c = args[i] == null ? null : args[i].getClass();
if(c == PhpArray.class) return noCache;
params[i] = c;
}
return new Entry(name, params);
}
COM: <s> get a cache entry from a name args pair </s>
|
funcom_train/12273638
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String toString() {
StringBuffer str = new StringBuffer();
str.append("[PID="); str.append(getProcessId()); str.append(",Offset=");
str.append(getOffset());
str.append(",Len=");
str.append(getLength());
str.append("]");
return str.toString();
}
COM: <s> return the lock details as a string </s>
|
funcom_train/51572393
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testClassProperty() throws Exception {
buildTgt.addTask(task);
task.setProperty(JavaTask.CLASS, SYSOUT_SYSERR_CLASS);
List<String> osCmd = task.buildCommandLine();
assertEquals(SYSOUT_SYSERR_CLASS, osCmd.get(1));
}
COM: <s> test that the value of the </s>
|
funcom_train/49608970
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void getUser() throws Throwable {
EntityManager em = null;
try {
String uname = request.getParameter("username");
em = EntityManagerProvider.getInstance().getEntityManager();
User user = BusinessObjectsFacade.getInstance().getUsersBO().getUser(username, em, uname);
ExtUtils.sendValueObject(user, this);
}
catch (Throwable ex) {
ExtUtils.sendErrorResponse(ex.getMessage(), response);
throw ex;
}
finally {
if (em!=null)
EntityManagerProvider.getInstance().releaseEntityManager(em);
}
}
COM: <s> return a user objects encoded in json format </s>
|
funcom_train/22883573
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setCurrentWorkspace(Workspace workspace) {
if (workspace != null) {
propertyChangeSupport.firePropertyChange(CURRENT_WORKSPACE,
currentWorkspace==null?null:currentWorkspace.getWorkspace (), workspace);
WorkspaceModel newCurrentWorkspace = new WorkspaceModel(workspace);
currentWorkspace = newCurrentWorkspace;
final Action runningAction = workspaceService
.getRunningAction(currentWorkspace.getWorkspace()
.getId());
if (runningAction!=null) {
notifyRunningAction (runningAction, actionService.getTask (runningAction));
}
}
}
COM: <s> imposta il workspace corrente </s>
|
funcom_train/48525156
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void store(Id id, Serializable metadata, Serializable obj, Continuation c) {
if (id == null || obj == null) {
c.receiveResult(new Boolean(false));
return;
}
currentSize += getSize(obj);
this.storage.put(id, obj);
this.metadata.put(id, metadata);
idSet.addId(id);
c.receiveResult(new Boolean(true));
}
COM: <s> stores the object under the key code id code </s>
|
funcom_train/24541562
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void startComponentListening(Control control) {
Shell ffHost = getEnvironment().getFreeFormHost();
while (control != null && control != ffHost) {
if (controlListening.contains(control))
break; // This control has already started listening, no need to go higher.
control.addControlListener(controlListener);
control.addDisposeListener(disposeListener);
controlListening.add(control);
control = control.getParent();
}
}
COM: <s> start the component listening for move </s>
|
funcom_train/48189954
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void save(PosFloatRate entity) {
LogUtil.log("saving PosFloatRate instance", Level.INFO, null);
try {
entityManager.persist(entity);
LogUtil.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
LogUtil.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved pos float rate entity </s>
|
funcom_train/3394670
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void importNamed(DiagnosticPosition pos, Symbol tsym, Env<AttrContext> env) {
if (tsym.kind == TYP &&
chk.checkUniqueImport(pos, tsym, env.toplevel.namedImportScope))
env.toplevel.namedImportScope.enter(tsym, tsym.owner.members());
}
COM: <s> import given class </s>
|
funcom_train/19776415
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean turnLetter() {
dataManager.getTransaction().begin();
Data data = dataManager.getData();
Data newData = engine.turnLetter(dataManager.getData(), board);
if (newData != data)
dataManager.setData(newData);
dataManager.getTransaction().commit();
return newData != data;
}
COM: <s> returns true if and only a letter was turned </s>
|
funcom_train/4312133
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private JButton getNewNameJButton() {
if (newNameButton == null) {
newNameButton = new JButton();
newNameButton.setText("CHANGE NAME");
newNameButton.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
questionName = newNameTextField.getText();
model = (DefaultListModel)editor.getQuestionsList().getModel();
model.setElementAt(questionName, editor.getCurrentSelected());
}
});
}
return newNameButton;
}
COM: <s> this method initializes j button </s>
|
funcom_train/14274658
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public ImportDBFromVFSFileResponse importDatabaseFromVFSFile(VolumeReference volRef, String filename) throws ConduitHandlerException, NotConnectedException {
try {
return jHotSync.importDatabaseFromVFSFile(volRef, filename);
} catch (DLPFunctionCallException e) {
throw new ConduitHandlerException(e.toString(), e);
}
} // end-method
COM: <s> imports a handheld database from a file on a vfs filesystem </s>
|
funcom_train/44844162
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String toString() {
StringBuffer result = new StringBuffer(32);
if (_isNegativeYear) {
result.append('-');
}
result.append(_year);
result.append('-');
result.append(_months);
result.append('-');
result.append(_days);
result.append('T');
result.append(_hours);
result.append(':');
result.append(_minutes);
result.append(':');
result.append(_seconds);
if (_fractionalSeconds != null) {
result.append('.');
result.append(_fractionalSeconds);
}
if (_hoursTimezone != null) {
if (_iHoursTimezone == 0 && _iMinutesTimezone == 0) {
result.append("Z");
}
else {
if (_isNegativeTimezone) {
result.append('-');
}
else {
result.append('+');
}
result.append(_hoursTimezone);
result.append(':');
result.append(_minutesTimezone);
}
}
return result.toString();
}
COM: <s> returns the xsd date time string representation of this object </s>
|
funcom_train/3618321
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void redraw(MeetingData meeting){
disposition = meeting.getDisposition();
nbParticipants = disposition.getDisposition().size();
for(int i=0;i<nbParticipants;i++){
lc.addContact((String)disposition.getDisposition().get(""+i+""));
}
repaint();
}
COM: <s> redraws the panel with a new disposition </s>
|
funcom_train/5422664
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void saveToFile( String fileName ) {
String vCard = getVCard();
try {
PrintWriter out = new PrintWriter( new FileOutputStream( fileName ) );
out.println( vCard );
out.close();
}
catch( FileNotFoundException ex ) {
System.out.println( ex.getMessage() );
}
}
COM: <s> this function saves a vcard to disk </s>
|
funcom_train/50775066
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setFileName(String fileName) {
this.fileName = fileName.replace('\\', '/');
File file = new File(fileName);
rootPath = file.getParent();
if (rootPath != null && !rootPath.endsWith(File.separator))
rootPath = rootPath + File.separator;
if (rootPath != null) {
rootPath = rootPath.replace('\\', '/');
}
}
COM: <s> returns filename of configuration file </s>
|
funcom_train/50390594
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected boolean isAccessible(){
try{
getClient().getCurrentTime();
if(logger.isDebugEnabled())logger.debug("Service at "+epr.getAddress().getStringValue());
return true;
}catch(Exception e){
if(logger.isDebugEnabled())logger.debug("No access at "+epr.getAddress().getStringValue());
return false;
}
}
COM: <s> checks whether the given service is accessible by calling get current time </s>
|
funcom_train/2054026
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void protocolSend(String value, Map<String, String> args) {
try {
this.protocol.outputStream.write((value + this.sendTerminator).getBytes());
this.protocol.outputStream.flush();
} catch (IOException e) {
throw new GatewayConnectionException("Gateway connection send error: " + e.getMessage(), e);
}
}
COM: <s> write to server output stream catch io exception indicates a connection </s>
|
funcom_train/27946904
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void formBond(int targetNode, int bondOrder) {
for (int f = 0; f < degree; f++) {
if (nodeTable[f] == targetNode) {
bondTable[f] = bondOrder % 4;
bondOrderSum = getBondCount();
return;
}
}
nodeTable[degree] = targetNode;
bondTable[degree] = bondOrder;
degree++;
bondOrderSum += bondOrder;
}
COM: <s> forms a bond between this node and target node with order </s>
|
funcom_train/40103787
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public EncryptedInteger multiply(BigInteger other) throws BigIntegerClassNotValid {
EncryptedInteger tmp_int = new EncryptedInteger(this);
BigInteger c = cipherval;
try {
if (this.biCons != null)
c = (BigInteger) this.biCons.newInstance(cipherval);
} catch (Exception e) {
throw new BigIntegerClassNotValid("Could not construct");
}
BigInteger tmp = c.modPow(other, pub.getNSquared());
tmp_int.setCipherVal(tmp);
return tmp_int;
}
COM: <s> multiplies the encrypted integer by a constant </s>
|
funcom_train/39270813
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void invertStyle(SVGElement element, String attrName) {
StyleAttribute styleAttr = element.getStyleAbsolute(attrName);
if (styleAttr != null) {
String str = styleAttr.getStringValue();
if ((str.length() > 1) && (str.charAt(0) == '#')) {
style(element, attrName, invertColor(str), AnimationElement.AT_CSS);
svgPanel.repaint();
}
}
}
COM: <s> invert the color of the fill or stroke attribute of a style </s>
|
funcom_train/22232399
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setScope(Group scope, int index) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_SCOPE_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("AlternateAppearance7"));
if (isLive())
((AlternateAppearanceRetained)this.retained).setScope(scope, index);
else
((AlternateAppearanceRetained)this.retained).initScope(scope, index);
}
COM: <s> replaces the node at the specified index in this </s>
|
funcom_train/31096252
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public BeanDescriptor getBeanDescriptor() {
BeanDescriptor bd = createBeanDescriptor(beanClass, new Object[] {
"preferred", Boolean.TRUE, "isContainer", Boolean.FALSE, "shortDescription", "Aitken interpolation bean."
});
bd.setValue("hidden-state", Boolean.TRUE);
bd.setValue("helpSetName", "net/jbeans/math/numerical/resources/AitkenInterpolation/jhelpset.hs");
return bd;
}
COM: <s> returns a bean descriptor for thumb dial bean </s>
|
funcom_train/24916323
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void setGUID(final int[] value) {
if (assertGUID(value)) {
this.guidData = new int[GUID_LENGTH];
System.arraycopy(value, 0, this.guidData, 0, GUID_LENGTH);
} else {
throw new IllegalArgumentException(
"The given guidData doesn't match the GUID specification.");
}
}
COM: <s> this method saves a copy of the given code value code as the </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.