__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/20270276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Result getResult() {
PassConfig.State state = getPassConfig().getIntermediateState();
return new Result(getErrors(), getWarnings(), debugLog.toString(),
state.variableMap, state.propertyMap,
state.anonymousFunctionNameMap, state.stringMap, functionInformationMap,
sourceMap, externExports, state.cssNames, state.idGeneratorMap);
}
COM: <s> returns the result of the compilation </s>
|
funcom_train/45831116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copyArea(int srcX, int srcY, int width, int height, int destX, int destY) {
callClient("copyArea", srcX, srcY, width, height, destX, destY);
}
COM: <s> copies a rectangular area of the receiver at the source </s>
|
funcom_train/44706939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setName(final String name) {
super.setName(name);
final ContentBundle bundle = getContentBundle();
if (bundle != null) {
if (s_log.isDebugEnabled()) {
s_log.debug(this + " is inside a bundle; setting the " +
"bundle's name to " + name + " as well");
}
bundle.setName(name);
bundle.save();
}
}
COM: <s> sets the name of the content page </s>
|
funcom_train/16511814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processFileEnd (String content ) throws JFinancialException {
try {
this.fileEnd = new CSB43RECFileEnd(content);
} catch (Exception e) {
// Error with the format or length
//System.out.println("processFileEnd --> " + e.getMessage());
throw new JFinancialException (JFinancialExceptionConstants.RECORD_VALIDATION_ERROR, e);
}
}
COM: <s> reads the file end data and setup the proper class fields </s>
|
funcom_train/32921802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void searchFor(final String word, final StringItem stringItem, final StringItem statusItem) {
if (!word.equals("")) {
//System.out.println("set search word=" + word);
this.searchWord = word;
this.refreshItem = stringItem;
this.searchStatusItem = statusItem;
synchronized(this) {
notifyAll();//wake up the search thread
}
}
}
COM: <s> search for a given word </s>
|
funcom_train/43244998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetResultDescription() {
System.out.println("setResultDescription");
String resultDescription = "";
RefDataResponseObject instance = new RefDataResponseObject();
instance.setResultDescription(resultDescription);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set result description method of class org </s>
|
funcom_train/34135121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDocument( ExchangerDocument document) {
// System.out.println( "Designer.setDocument( "+document+")");
boolean firstTime = false;
if ( this.document != null) {
this.document.removeListener( this);
} else {
firstTime = true;
}
this.document = document;
if ( document != null) {
document.addListener( this);
}
if ( !firstTime) {
hasLatest = true;
}
}
COM: <s> sets the document for the designer </s>
|
funcom_train/6346588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void discard(Socket s) throws IOException{
BufferedReader in = new BufferedReader(new InputStreamReader(
s.getInputStream()));
log("Starting discard on "+s);
String line = in.readLine();
while(line != null){
log(line);
line = in.readLine();
}
log("Discard finished.");
}
COM: <s> reads input from the socket and does not write anything back </s>
|
funcom_train/35624763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(ToStringStyle style) {
return new ToStringBuilder(this, style)
.append("bill_rate", getBillRate())
.append("billing_person", getBillingPerson())
.append("first_name", getFirstName())
.append("last_name", getLastName())
.toString();
}
COM: <s> you can use the following styles </s>
|
funcom_train/9919013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
if (!initialized) {
System.err.println("This shader is not properly initialized. Call the setup() method first");
}
// TODO:
// set the texture uniforms to the currently values texture units for all the
// textures.
// gl.glUniform1iARB(loc, unit);
gl.glUseProgramObjectARB(programObject);
}
COM: <s> starts the execution of the shader program </s>
|
funcom_train/2800732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isStable(final boolean pThrowOnError) throws RaccoonException {
boolean isStable = true;
if (!isInitialised()) {
isStable = false;
if (pThrowOnError) {
throw new RaccoonException(ErrorCodes.COMPONENT_NOT_INITIALISED,
ErrorMsgs.MSG_COMPONENT_NOT_INITIALISED);
}
}
return isStable;
}
COM: <s> checks the state of the component </s>
|
funcom_train/15513100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void dispatchEvent( EventObject event ) {
for(Component c : toBeDisabled) {
c.setEnabled( false );
}
for(Component c : toBeEnabled) {
c.setEnabled( true );
}
for(JTextComponent tc : toBeCleared) {
tc.setText("");
}
for(Resetable resetable : toBeReseted) {
resetable.reset();
}
for(AbstractButton button : toBeSelected) {
button.setSelected( true );
}
}
COM: <s> executes the respective operations on the registered componts </s>
|
funcom_train/20044822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _createMark() {
boolean res;
try {
mark = oObj.createMark() ;
res = mark >= 0;
} catch (com.sun.star.io.IOException e) {
log.println("Couldn't create mark");
e.printStackTrace(log);
res = false;
}
tRes.tested("createMark()", res);
}
COM: <s> test creates mark and stores it </s>
|
funcom_train/18195502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAuthor(User author) throws ReferencesOverflowException {
if (author == null) {
throw new NullPointerException(
"A TestElement's author may not be set to null.");
}
if (this.author != null) {
this.author.decrementReferences();
}
author.incrementReferences();
this.author = author;
}
COM: <s> assigns a new author to the code test element code and changes the </s>
|
funcom_train/10794294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Index findIndex(Column[] cols) {
if (cols == null || cols.length == 0)
return null;
Table table = cols[0].getTable();
Index[] idxs = table.getIndexes();
for (int i = 0; i < idxs.length; i++)
if (idxs[i].columnsMatch(cols))
return idxs[i];
return null;
}
COM: <s> return the index with the given columns </s>
|
funcom_train/51335087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void selectNewItem(ManagerItem newEntry, Table table) {
for (int i = 0; i < table.getItemCount(); i++) {
ManagerItem item = (ManagerItem) table.getItem(i).getData();
if (item.getName().equals(newEntry.getName())) {
table.deselectAll();
table.select(i);
System.out.println("notifying listeners for selection of: "
+ item.getName());
notifyListenersSelectionEvent(item, table);
}
}
}
COM: <s> this method marks the newly created item by selecting the inserted item </s>
|
funcom_train/48624346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String findMimeType(String extension) {
for(TopMediaType topMediaType: topMediaTypes)
{
for(SubType subType: topMediaType.getSubTypes())
{
for( SubTypeExtension subTypeExtension : subType.getExtensions())
{
if( extension.equalsIgnoreCase(subTypeExtension.getName()))
{
return topMediaType.getName() + MIME_TYPE_SEPERATOR + subType.getName();
}
}
}
}
return null;
}
COM: <s> return the string mime type value </s>
|
funcom_train/3080778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireVisiblePaneChanged() {
ChangeEvent e = new ChangeEvent(this);
EventListener[] listeners = listenerList.getListeners(ChangeListener.class);
for (int index = 0; index < listeners.length; ++index) {
((ChangeListener) listeners[index]).stateChanged(e);
}
}
COM: <s> notifies code change listener code s that the visible pane has changed </s>
|
funcom_train/48815981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPropertyListener(PropertyListener listener) {
if (listener == null)
throw new NullArgumentException("listener");
if (listener instanceof BoundPropertyListener) {
addPropertyListener((BoundPropertyListener)listener);
}
else {
// only add the listener if it is not in the list already
if (! unboundListeners.contains(listener))
unboundListeners.add(listener);
}
}
COM: <s> add a property listener </s>
|
funcom_train/18954516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ArrayList getAllRules(){
ArrayList ret = new ArrayList();
ArrayList tmp = MCRRuleStore.getInstance().retrieveAllIDs();
for (int i=0; i<tmp.size(); i++){
ret.add(getRule((String) tmp.get(i)));
}
return ret;
}
COM: <s> returns an arraylist with all ruleids </s>
|
funcom_train/21357911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Analyzer processAnalyzer(XmlPullParser xpp, int index) throws XmlPullParserException, IOException {
Collection<CvParam> analyzerCvParamList = new ArrayList<CvParam>();
Collection<UserParam> analyzerUserParamList = new ArrayList<UserParam>();
this.processParams(xpp, analyzerCvParamList, analyzerUserParamList, "analyzer");
return new AnalyzerImpl(analyzerCvParamList, analyzerUserParamList, index);
}
COM: <s> handles the contents of an analyzer list </s>
|
funcom_train/49604250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Road getUnconnected() {
double closest = Double.MAX_VALUE;
Road closestRoad = null;
for (Road road : roads) {
if (! road.isConnected()) {
Point p = road.getStart().getPoint(); //TODO: Needs to check end to?
double dist = p.distance(getClosestJunction(p));
if (dist < closest) {
closestRoad = road;
closest = dist;
}
}
}
return closestRoad;
}
COM: <s> returns the unconnected road that is closest to the connected road network </s>
|
funcom_train/32061787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetFittingSizeOneElement() {
System.out.println("testGetFittingSizeOneElement");
IntPoint2D constartsize = newIP(100, 100);
IntPoint2D elementsize = newIP(100, 100);
IntPoint2D resultsize = getFittingSizeAllDirectionsWithParams(
constartsize,
asList(elementsize),
newIP(5, 5),
0);
assertTrue(constartsize.contains(resultsize));
}
COM: <s> test of get fitting size method of class flow technique </s>
|
funcom_train/22404600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeFieldAccessors() {
JField[] jFields = serializableFields;
int fieldCount = jFields.length;
for (int fieldIndex = 0; fieldIndex < fieldCount; ++fieldIndex) {
JField serializableField = jFields[fieldIndex];
if (!needsAccessorMethods(serializableField)) {
continue;
}
writeFieldGet(serializableField);
writeFieldSet(serializableField);
}
}
COM: <s> this method will generate a native jsni accessor method for every field </s>
|
funcom_train/18136019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTask(Task task) throws DuplicatedTaskIdException {
String taskId = task.getId();
if (tasks.containsKey(taskId)) {
throw new DuplicatedTaskIdException("Workflow '" + getId()
+ "' already contains a task with id '" + taskId + "'");
}
tasks.put(taskId, task);
task.addPropertyChangeListener(propertyChangeEventForwarder);
propertyChangeSupport.firePropertyChange(TASKS_FIELD, null, task);
}
COM: <s> method for adding a task </s>
|
funcom_train/28753982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAreatosetscanner(String newVal) {
if ((newVal != null && this.areatosetscanner != null && (newVal.compareTo(this.areatosetscanner) == 0)) ||
(newVal == null && this.areatosetscanner == null && areatosetscanner_is_initialized)) {
return;
}
this.areatosetscanner = newVal;
areatosetscanner_is_modified = true;
areatosetscanner_is_initialized = true;
}
COM: <s> setter method for areatosetscanner </s>
|
funcom_train/47728855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void footer(PdfContentByte canvas) {
/* Footer */
canvas.beginText();
canvas.setFontAndSize(fontRegular, 6);
canvas.showTextAligned(Element.ALIGN_RIGHT, RESOURCE.getString("pdf.footer"), 555, 42, 0);
canvas.showTextAligned(Element.ALIGN_RIGHT, RESOURCE.getString("pdf.copyright"), 555, 34, 0);
canvas.endText();
}
COM: <s> draws the footer with copyright text </s>
|
funcom_train/32766225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object invoke( final Object proxy, final Method method, final Object[] args ) {
method.setAccessible( true ); // allow access to private, protected, default access methods
final Invoker invoker = new Invoker( method, args );
EVENT_PROCESSOR.post( invoker );
return null;
}
COM: <s> implement invocation handler interface to invoke the specified method with the supplied arguments </s>
|
funcom_train/36202618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getCurrentMethodName() {
String methodName = "";
StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
for (int i = 2; i < stackTrace.length; i++) {
if (!stackTrace[i].getMethodName().equals("log")
&& (!stackTrace[i].getClassName().equals(
"de.d3web.we.logging.Logging"))) {
methodName = stackTrace[i].getMethodName();
break;
}
}
return methodName;
}
COM: <s> returns the name of the current method via stack trace </s>
|
funcom_train/25065015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void determinePopupNeed() {
// Determine length of short text (without trailing elipses)
String shortTextOnly = _shortText;
if (shortTextOnly.endsWith(ELLIPSIS))
shortTextOnly = shortTextOnly.substring(0, shortTextOnly.lastIndexOf(ELLIPSIS) - 1);
_needPopup = _fullText.length() > shortTextOnly.length();
}
COM: <s> do this once so need popup is fast during hovers </s>
|
funcom_train/2977127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JTable getSelectedTable() {
if (tabbed) {
if (jtp.getSelectedComponent() == jspDl) {
return jtaDownloads;
}
else if (jtp.getSelectedComponent() == jspUl) {
return jtaUploads;
}
}
else {
if (jtaDownloads.getSelectedRowCount() > 0) {
return jtaDownloads;
}
else if (jtaUploads.getSelectedRowCount() > 0) {
return jtaUploads;
}
}
return null;
}
COM: <s> return the active table </s>
|
funcom_train/39399243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HashResult calculateMessageHash(String[] domains) {
if (domains == null || domains.length == 0) {
return new HashResult(null,null);
}
// sort array alphabetically -> leads to a real "set"-treatment (order of
// appearance doesn't matter)
Arrays.sort(domains);
// hash it
HashEngine hashEngine = new HashMD5();
for (int i = 0; i < domains.length; i++) {
hashEngine.updateASCII(domains[i]);
}
String hash = hashEngine.digout();
return new HashResult(domains,hash);
}
COM: <s> calculate a message hash out of the provided domains </s>
|
funcom_train/8009802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createPopup() {
_hsPopup=new HtmlStyle(getName(),"#","",getPage());
_hsPopup.setStyle("position:absolute;top:"+_y+"px;left:"+_x+"px;width:"+_width+"px;visibility:hidden;z-index:0;");
_hlPopup=new HtmlLayer(getName(),_hsPopup,getPage());
_hscPopup=new HtmlScript(getDisplayPopupScript(),"JavaScript1.2",getPage());
}
COM: <s> a method to initialize the popup </s>
|
funcom_train/31842643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEqualsAndHashcode(){
assertEquals(true,proj1.equals(proj1));
assertEquals(false, proj1.equals(proj2));
assertEquals(true, proj1.hashCode()==proj1.hashCode());
assertEquals(false, proj1.hashCode()==proj2.hashCode());
}
COM: <s> project test test equals and hashcode </s>
|
funcom_train/2599412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Matrix mtimes(Matrix m2) {
if (m2 instanceof DenseDoubleMatrix2D) {
final DenseDoubleMatrix2D result = new BlockDenseDoubleMatrix2D((int) getRowCount(),
(int) m2.getColumnCount(), layout.blockStripe, BlockOrder.ROWMAJOR);
Mtimes.DENSEDOUBLEMATRIX2D.calc(this, (DenseDoubleMatrix2D) m2, result);
return result;
} else {
return super.mtimes(m2);
}
}
COM: <s> shortcut to create a block matrix for target </s>
|
funcom_train/12345082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printNode(Node node, String indent) {
// describe current node:
Node parend = node;
System.out.println(indent + "- " + ((Element) parend).getTagName());
// traverse children:
for (Node n = node.getFirstChild(); n != null; n = node.getNextSibling()) {
printNode(n, indent + '\t');
}
}
COM: <s> prints a node that is given as an input </s>
|
funcom_train/7635056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeGpsStatusListener(GpsStatus.Listener listener) {
try {
GpsStatusListenerTransport transport = mGpsStatusListeners.remove(listener);
if (transport != null) {
mService.removeGpsStatusListener(transport);
}
} catch (RemoteException e) {
Log.e(TAG, "RemoteException in unregisterGpsStatusListener: ", e);
}
}
COM: <s> removes a gps status listener </s>
|
funcom_train/46455091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAxes(DrawableAxes _axes) {
axes = _axes;
if(axes==null) {
axes = new CustomAxes(this);
setPreferredGutters(0, 0, 0, 0);
setClipAtGutter(false);
axes.setVisible(false);
}else{
setClipAtGutter(true);
}
}
COM: <s> sets the axes </s>
|
funcom_train/37072824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isGermplasmRegularFieldName(String fieldName) {
if (fieldName.equals("is_obsolete")) {
return false;
}
if (fieldName.equals("replaced_by")) {
return false;
}
return true;
// we could have expressed this as:
// return (!(fieldName.equals("is_obsolete") || fieldName.equals("replaced_by")));
// but the form above seems a little easier to read, so I
// switched it over for clarity's sake.
}
COM: <s> returns true if the field name is one of the field names that </s>
|
funcom_train/42475620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void register(EnzymeDTO enzymeUnderDevelopment) {
if (enzymeUnderDevelopment == null) throw new NullPointerException("Parameter 'enzymeUnderDevelopment' must not be null.");
final Integer uowId = new Integer(UOW_ID);
final EnzymeDTO enzymeCopy = new EnzymeDTO(enzymeUnderDevelopment);
enzymesUnderDevelopment.put(uowId, enzymeCopy);
enzymeUnderDevelopment.setUowId(uowId);
UOW_ID++;
LOGGER.info("EC " + enzymeUnderDevelopment.getEc() + " has been registered in the UoW.");
}
COM: <s> creates and stores a copy of the given </s>
|
funcom_train/16435186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SSInvoice getCrediting(List<SSInvoice> iInvoices) {
if (iCrediting == null && iCreditingNr != null) {
for (SSInvoice iCurrent : iInvoices) {
if (iCreditingNr.equals(iCurrent.getNumber())) {
iCrediting = iCurrent;
}
}
}
return iCrediting;
}
COM: <s> get the sales this sales is crediting </s>
|
funcom_train/44431773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addGenChannels(PersistChanGrpMgr aGroup, int count, int taskRuns) {
int i;
for (i = 0; i < count; i++) {
Channel achannel;
achannel = aGroup.addChannel(RssUrlTestData.generate());
aGroup.notifyChannelsAndItems(achannel);
}
runPersistChanGrpTask(aGroup, taskRuns);
}
COM: <s> helper to add a certain number of channels to a group </s>
|
funcom_train/2610475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isWindowActive(DockableWindow win) {
if (win == null)
return false;
if (win.isDocked()) {
return (tabbedPane.indexOfComponent(win)
== tabbedPane.getSelectedIndex());
}
else {
// *** !!! doesn't work !!!
return win.hasFocus();
}
}
COM: <s> doesnt work for undocked windows o </s>
|
funcom_train/50323163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element cloneElement(boolean deep) {
Element result = new Element(tagName_);
if (attrNames_ != null)
for (Enumeration i = attrNames_.elements(); i.hasMoreElements();) {
String name = (String) i.nextElement();
result.setAttribute(name, (String) attributes_.get(name));
}
if (deep)
for (Node n = firstChild_; n != null; n = n.getNextSibling())
result.appendChild((Node) n.clone());
return result;
}
COM: <s> create a clone of this node </s>
|
funcom_train/4715448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public View getView(int positionP, View convertViewP, ViewGroup parentP) {
LinearLayout view = null;
if (convertViewP != null) {
view = (LinearLayout) convertViewP;
} else {
view = (LinearLayout) inflater.inflate(R.layout.task_template, parentP, false);
}
bindView(view, tasks.get(positionP));
return view;
}
COM: <s> return the view used for the item at position index p </s>
|
funcom_train/2724272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startSwedishParliamentContentLoading() {
try {
final Map<String, String> documentStatusContainerMap = importService
.getDocumentContentMap();
final List<String> avaibleDocumentStatus = importService
.getAvaibleDocumentContent();
for (final String id : avaibleDocumentStatus) {
if (!documentStatusContainerMap.containsKey(id)) {
sendMessage(documentContentWorkdestination,
id);
}
}
} catch (final Exception e) {
LOGGER.warn("error loading document content", e);
}
}
COM: <s> start swedish parliament content loading </s>
|
funcom_train/46159056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getIntegerAttribute(String attributeName, int defaultValue) {
if (wrappedStyle != null) {
StyleAttribute integerAttribute = wrappedStyle.getStyleAttribute(attributeName);
if (integerAttribute instanceof IntegerValue) {
return ((IntegerValue) integerAttribute).getInteger();
}
}
return defaultValue;
}
COM: <s> get the specified integer style attribute from the style if it exists </s>
|
funcom_train/23278714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Event getEvent(String name) {
List objects = getHibernateTemplate().findByNamedQueryAndNamedParam("event.getByName","name",name);
if(objects==null || objects.size()==0)throw new ARISException("Event with name '" + name + "' does not exist");
return (Event)objects.get(0);
}
COM: <s> gets the event with the given name </s>
|
funcom_train/25099168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMinPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_EAInteger_min_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_EAInteger_min_feature", "_UI_EAInteger_type"),
DatatypesPackage.Literals.EA_INTEGER__MIN,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the min feature </s>
|
funcom_train/44712558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void specialize(String subtypeName) {
validate();
if (subtypeName == null) {
throw new PersistenceException("Null value passed to specialize.");
}
ObjectType subtype =
MetadataRoot.getMetadataRoot().getObjectType(subtypeName);
if (subtype == null) {
throw new PersistenceException(
"No such type: " + subtypeName
);
}
specialize(subtype);
}
COM: <s> specializes this persistent object by turning it into a subtype of this </s>
|
funcom_train/3786767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int lookupIdxByRspot(CSDexpr dbE)
{ /* lookupIdxByRspot */
if(epList==null)
return(-1);
for(int i=0;i<nEPlist;i++)
if(epList[i]==dbE)
return(i);
return(-1);
} /* lookupIdxByRspot */
COM: <s> lookup idx by rspot lookup index of rspot object in expr list </s>
|
funcom_train/36861876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getWildernessLevel() {
return RSInterface.getInterface(381).getChild(1).isValid() ? Integer.parseInt(RSInterface.getInterface(381).getChild(1).getText().replace("Level: ", "").trim()) : 0;
}
COM: <s> gets the current wilderness level </s>
|
funcom_train/32057521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetSelectedChildCount() {
System.out.println("testSetSelectedChildCount");
JGraph jp = new JGraph();
DefaultGraphSelectionModel dg = new DefaultGraphSelectionModel(jp);
Object obj = new Object();
dg.setSelectedChildCount(obj,1);
}
COM: <s> this function tests set selected child count function of default graph cell class </s>
|
funcom_train/23776877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AircraftTypeBO getAircraftType(AircraftBO aircraft) {
try {
return getLogbookService().getAircraftTypeById(aircraft.getTypeId());
} catch (ServiceException se) {
return new AircraftTypeBO("Cessna", "150M", "C-150M", 1);
}
}
COM: <s> used to get the type of aircraft </s>
|
funcom_train/19309608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void registerBase14DingbatsFamily() throws FontException {
final RegisteredFontFamily rff = this.getRegisteredFontFamily(
"Base14-ZapfDingbats");
if (rff.getFontDescriptions().size() > 0) {
return;
}
registerBase14Description("Base14-ZapfDingbats", "Base14-ZapfDingbats",
org.axsl.font.Font.Style.NORMAL,
org.axsl.font.Font.Weight.NORMAL);
}
COM: <s> default registration for the base14 zapf dingbats family </s>
|
funcom_train/43616173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fillInConstraintClass() {
startClass(constraint);
addIndConstraintClassMembers();
addIndConstraintInitialiser();
addIndConstraintStaticInitialiser();
addIndConstraintFinalizeMethod();
addIndConstraintHelperMethods();
addIndConstraintGetTrueMethod();
addIndConstraintOrMethod();
addIndConstraintMergeMethod();
addIndConstraintGetDisjunctArrayMethod();
addIndConstraintPropagateBindingsMethods();
if(!abc.main.Debug.v().noNegativeBindings)
addIndConstraintDoNegativeBindingsMethods();
}
COM: <s> general ideas for the constraint class are as follows </s>
|
funcom_train/3079900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Map getLocalCookieMap() {
if (localCookieMap == null) {
localCookieMap = new TreeMap();
if (clientCookies != null) {
for (int index = 0; index < clientCookies.length; ++index) {
localCookieMap.put(clientCookies[index].getName(), clientCookies[index]);
}
}
}
return localCookieMap;
}
COM: <s> creates a new local cookie set copying the client cookies array into it </s>
|
funcom_train/9236960 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void launchApp(final String urlString) {
URI uri;
try {
uri = new URI(urlString);
if (uri.getScheme() == null) {
uri = new URI("http://" + urlString);
}
} catch (URISyntaxException ex) {
Logger.userError(ErrorLevel.LOW, "Invalid URL: " + ex.getMessage());
return;
}
launchApp(uri);
}
COM: <s> launches an application for a given url </s>
|
funcom_train/4096328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isValidFileType(String fileName) {
for (int i = 0; i < invalidFileTypes.length; i++) {
if (fileName.endsWith(invalidFileTypes[i])) {
if (debug) {
log.debug("File [" + fileName
+ "] will just be moved as it is not a valid type");
}
return false;
}
}
return true;
}
COM: <s> checks to see if the file is a valid type </s>
|
funcom_train/47138741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int update(final Booking booking) {
Object[] params = new Object[] { booking.getDate(), new Double(booking.getBalance()),
booking.getDescription(), booking.getTag(), booking.getCreated(), booking.getLastChanged(),
new Long(booking.getId()) };
return update(params);
}
COM: <s> update booking in database </s>
|
funcom_train/41208503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void applyRTL(boolean rtl) {
setRTL(rtl);
int c = getComponentCount();
for(int iter = 0 ; iter < c ; iter++) {
Component current = getComponentAt(iter);
if(current instanceof Container) {
((Container)current).applyRTL(rtl);
} else {
current.setRTL(rtl);
}
}
}
COM: <s> invokes apply set rtl recursively on all the children components of this container </s>
|
funcom_train/19178949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getTablesInQuery() {
Iterator tables;
String tableNames;
tables = mapOfCurrentTables.keySet().iterator();
tableNames = "";
while (tables.hasNext()) {
tableNames += "," + tables.next();
}
if (tableNames.length() > 0) {
tableNames = tableNames.substring(1); // Remove first comma
}
return tableNames;
}
COM: <s> gets the names of the tables that are referenced during the query </s>
|
funcom_train/21016582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void exitOperation() {
StackTraceElement stack[] = (new Throwable()).getStackTrace();
String operationName = "";
for (int i = 0; i < stack.length; i++) {
StackTraceElement frame = stack[i];
String classname = frame.getClassName();
if (classname.equals(getClass().getName())) {
operationName = frame.getMethodName();
} else {
break;
}
}
for (IProgressListener listener : _listeners) {
listener.endTask(operationName);
}
}
COM: <s> indicates exiting an operation </s>
|
funcom_train/40614392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setQueryTimeout(int seconds) throws SQLException {
try {
debugCodeCall("setQueryTimeout", seconds);
checkClosed();
if (seconds < 0) {
throw DbException.getInvalidValueException("seconds", seconds);
}
conn.setQueryTimeout(seconds);
} catch (Exception e) {
throw logAndConvert(e);
}
}
COM: <s> sets the current query timeout in seconds </s>
|
funcom_train/7681364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setLoginInfo(LoginInfo loginInfo) throws ImException {
try {
ImpsAddress address = new ImpsUserAddress(loginInfo.getUserName());
mLoginUser = new Contact(address, address.getScreenName());
mLoginInfo = loginInfo;
} catch (IllegalArgumentException e) {
throw new ImException(ImErrorInfo.INVALID_USERNAME,
"Invalid username");
}
}
COM: <s> sets the login information </s>
|
funcom_train/17849246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PluginInfo getInfo() {
if(mPluginInfo == null) {
mPluginInfo = new PluginInfo(WebPlugin.class, mLocalizer.msg("name", "WebPlugin"),
mLocalizer.msg("desc","Searches on the Web for a Program"),
"Bodo Tasche");
}
return mPluginInfo;
}
COM: <s> returns the plugin info </s>
|
funcom_train/35683361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadOperations() {
mOperationsTable.removeAll();
for (CixsOperation operation : mMappingModel.getCixsOperations()) {
TableItem ti = new TableItem(mOperationsTable, SWT.NONE);
ti.setText(operation.getAsStringArray());
ti.setImage(mTableImage);
}
}
COM: <s> creates items in an swt table from a cixs operation object </s>
|
funcom_train/33606704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetLoopsAt() {
System.out.println("getLoopsAt");
assertEquals("v1",0,instance.getLoopsAt(1));
assertEquals("v6",2,instance.getLoopsAt(6));
assertEquals("v-1",1,instance.getLoopsAt(-1));
}
COM: <s> test of get loops at method of class scio </s>
|
funcom_train/44020177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
initializeBattle();
while (!isAborted && roundNum < getNumRounds()) {
try {
preloadRound();
initializeRound();
runRound();
finalizeRound();
cleanupRound();
} catch (Exception e) {
e.printStackTrace();
logError("Exception running a battle round: ", e);
isAborted = true;
}
roundNum++;
}
finalizeBattle();
cleanup();
} catch (Throwable e) {
logError("Exception running a battle: ", e);
}
}
COM: <s> when an object implementing interface </s>
|
funcom_train/21954891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int selectPreviousUnreadMessage() {
int[] rowsSelected = messageTable.getSelectedRows();
int selectedRow = 0;
if (rowsSelected.length > 0)
selectedRow = rowsSelected[0];
else
selectedRow = messageTable.getRowCount();
int previousSelectable = getPreviousSelectableMessage(selectedRow, null, true);
return selectMessage(previousSelectable);
}
COM: <s> this selects the previous unread message </s>
|
funcom_train/44842351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void editingStopped(ChangeEvent e) {
if (getEditingColumn() == _model.getIdentifyingColumn()) {
// Id column is currently being edited. As the table is not updated
// yet, there is no value available from the model. Therefore get
// the value from the editor.
_value = (String)getCellEditor().getCellEditorValue();
}
else {
_value = getIdentifierForSelectedRow();
}
super.editingStopped(e);
}
COM: <s> sets the the edited value </s>
|
funcom_train/3936287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isIndexAvailable() {
File lIndexContainer = getIndexContainer();
if (!lIndexContainer.exists()) {
return false;
}
String[] lContent = lIndexContainer.list();
if (lContent.length == 0) {
return false;
}
for (int i = 0; i < lContent.length; i++) {
if ("segments".equals(lContent[i])) return true; //$NON-NLS-1$
}
return false;
}
COM: <s> convenience method checks whether theres yet an index with the specified index dir </s>
|
funcom_train/3034699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private GdbiIndi toNextPrevSib(boolean next) {
GdbiFam[] families = getFamilies(false);
if (families != null) {
for (int i = 0; i < families.length; i++) {
GdbiIndi sib =
(next ? toNextSib(families[i]) : toPrevSib(families[i]));
if (sib != null)
return sib;
}
}
return null;
}
COM: <s> look for all families with this as a child </s>
|
funcom_train/9082720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void wrapAndClose(List<String> lines, int width, StringBuilder line) {
wrap(lines, width, line);
if (line.length() > 0) {
lines.add(ConsoleUtils.ensureWidth(width, line.toString()));
line.delete(0, line.length());
}
}
COM: <s> wrap a line as in </s>
|
funcom_train/17490063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void incrementalExpansion(UndirectedWeightedListGraph G, int k) {
int n = G.getNumVertices();
// inductively add all of the singletons as well as their cofaces
for (int u = 0; u < n; u++) {
this.addCofaces(G, k, new Simplex(new int[]{u}), G.getLowerNeighbors(u), this.converter.getInitialFiltrationValue());
}
}
COM: <s> this function performs the incremental expansion of the complex </s>
|
funcom_train/13551618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setP0_(int value) {
if ((portDir & 0x01)!=0) { // output port ?
if (((portDataOut & value)^value)!=0) remember|=0x01;
}
if (value!=0) portDataOut|=value;
else portDataOut&=~0x01;
}
COM: <s> set the value of output port 0 by internal operation </s>
|
funcom_train/25759477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Event getLastEvent(){
if(this.getEvents()==null || this.getBeginEvent()==null){
return null;
}else{
Event lastEvent=this.getBeginEvent();
for (Event e : this.getEvents()){
if(lastEvent.getRised().after(e.getRised())){
lastEvent=e;
}
}
return lastEvent;
}
}
COM: <s> returns last event by knonw date </s>
|
funcom_train/32057010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testActionPerformed() {
System.out.println("testActionPerformed");
//ActionEvent e = new ActionEvent();
GPConfiguration c = new GPConfiguration();
GPGraphpad gp = new GPGraphpad();
FileLibraryOpen fo = new FileLibraryOpen(gp);
ActionEvent e = new ActionEvent(new Object(),ActionEvent.ACTION_PERFORMED,"command");
fo.actionPerformed(e);
}
COM: <s> tests action performed method of class file library open </s>
|
funcom_train/28750289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOrdertype(Long newVal) {
if ((newVal != null && this.ordertype != null && (newVal.compareTo(this.ordertype) == 0)) ||
(newVal == null && this.ordertype == null && ordertype_is_initialized)) {
return;
}
this.ordertype = newVal;
ordertype_is_modified = true;
ordertype_is_initialized = true;
}
COM: <s> setter method for ordertype </s>
|
funcom_train/16604516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Shape transform(Transform transform) {
checkPoints();
Polygon resultPolygon = new Polygon();
float result[] = new float[points.length];
transform.transform(points, 0, result, 0, points.length / 2);
resultPolygon.points = result;
resultPolygon.findCenter();
return resultPolygon;
}
COM: <s> apply a transformation and return a new shape </s>
|
funcom_train/23747081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String SaltGen(int length) {
String salt = null;
Random random = new Random();
StringBuilder strbld = new StringBuilder();
for (int i = 0; i < length; i++) {
strbld.append(Integer.toHexString(random.nextInt()));
}
salt = strbld.toString();
return salt;
}
COM: <s> creates random salt for password for salt to help encrypt server </s>
|
funcom_train/28350482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCorrectorSupplies( final List<CorrectorSupply> supplies ) {
_correctorSupplies.clear();
if ( supplies == null ) return;
_correctorSupplies.addAll( supplies );
for ( CorrectorSupply supply : supplies ) {
if ( supply.isCorrectorSupply() ) { // by default, enable only pure correctors (i.e. exclude Bend magnets)
supply.setEnabled( true );
}
}
}
COM: <s> set the correctors to use in the simulation </s>
|
funcom_train/18835928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() throws IOException {
try {
acquireAllWriteLocks();
try {
raf.close();
} finally {
releaseAllWriteLocks();
}
} catch (InterruptedException e) {
throw new InterruptedIOException(e.toString());
}
if (decoder != null) {
// clean up the decoder.
decoder.close();
}
if (dispatch != null) {
// Free up the dispatch thread.
dispatch.close();
}
}
COM: <s> close the underlying file descriptor and free up the resources </s>
|
funcom_train/47537278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int lookupObject(T feature) {
if (feat2index.contains(feature)) {
if(canGrow&&!stopCounts) {
int index = feat2index.get(feature);
counts.put(index, counts.get(index)+1);
totalElements++;
return index;
} else {
return feat2index.get(feature);
}
} else if (canGrow) {
int index = index2feat.size();
feat2index.put(feature, index);
index2feat.add(feature);
if(!stopCounts){
counts.put(index, 1);
totalElements++;
}
return feat2index.get(feature);
}
return -1;
}
COM: <s> returns the index associated with a feature </s>
|
funcom_train/17925215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getUserAttributesNames(String useridStr,String lang)
{
int userid=Integer.parseInt(useridStr);
List names=new ArrayList();
List values=new ArrayList();
boolean sets=false;
if(lang==null){
lang="en";
}
userPresenter.getUserAttributes(userid,names,values,sets,lang);
return names;
}
COM: <s> a help function </s>
|
funcom_train/46623988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNullArgs() {
try {
fu.normalize(null);
fail("successfully normalized a null-file");
} catch (NullPointerException npe) {
// Expected exception caught
}
File f = fu.resolveFile(null, "a");
assertEquals(f, new File("a"));
}
COM: <s> test handling of null arguments </s>
|
funcom_train/5373593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void replaceTextRange(int start, int length, String text) {
checkWidget();
int contentLength = getCharCount();
int end = start + length;
Event event = new Event();
if (start > end || start < 0 || end > contentLength) {
SWT.error(SWT.ERROR_INVALID_RANGE);
}
if (text == null) {
SWT.error(SWT.ERROR_NULL_ARGUMENT);
}
event.start = start;
event.end = end;
event.text = text;
modifyContent(event, false);
}
COM: <s> replaces the given text range with new text </s>
|
funcom_train/3672629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMemoryCapacitySliderMaximum(int max_mem) {
if ( max_mem <= 0L ) {
throw new IllegalArgumentException("max_mem must be greater than 0");
}
int mem_cap = (int) (cache.getMemoryCapacity() / (1024L * 1024L));
if ( max_mem < mem_cap ) {
max_mem = mem_cap;
}
memoryCapacitySlider.setMaximum((int) max_mem);
}
COM: <s> set memory capacity slider range to proper values </s>
|
funcom_train/47281905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resetNodeAndNeighbours(SourceTableRecord selectedNode, List<SourceTableRecord> resetNodes) {
resetNodes.add(selectedNode);
for (PotentialMatchRecord p: getOutboundEdges(selectedNode)) {
p.setMatchStatus(MatchType.UNMATCH);
}
for (SourceTableRecord s: getAdjacentNodes(selectedNode)) {
if (!resetNodes.contains(s)) {
resetNodeAndNeighbours(s, resetNodes);
}
}
}
COM: <s> helper method for </s>
|
funcom_train/22047350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
mLog.log(Level.DEBUG, "starting parser thread");
synchronized (mLock) {
if (mThread == null) {
mThread = new Thread(this, this.getClass().getName());
// allow to exit cleanly if the VM goes down
mThread.setDaemon(true);
}
mThread.start();
mLog.log(Level.DEBUG, "started thread");
mLock.notify();
}
}
COM: <s> start the parsing thread </s>
|
funcom_train/4557938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPaymentSettingInputInvalid() {
repEng.newStep("345", "Payment Settings-Input invalid PayPal Password for PayPal");
//1. Goto Users Settings:Payment Settings page
//2. Select Payment Options as PayPal
//3. Input valid Email
//4. Input invalid PayPal Password
// PayPal Password should be marked as red border.
}
COM: <s> 345 payment settings input invalid pay pal password for pay pal </s>
|
funcom_train/18378714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fixLayout(WidgetEditor subject) {
// Point newSize = subject.getWidgetPeer().getControl().computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
// Rectangle oldBounds = subject.getBounds();
// Rectangle newBounds = new Rectangle (oldBounds.x, oldBounds.y, newSize.x, newSize.y);
// subject.setBounds(newBounds);
// subject.getRootEditor().layout();
}
COM: <s> method fix layout </s>
|
funcom_train/18871566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int readFile(int id, String outputfile) {
NameValuePair[] data = { new NameValuePair("ID", Integer.toString(id))};
//lecture du fichier sur le serveur.
WgetResponseFile wrf = serveur.readFile("http://www.space-track.org/perl/dl.pl",data);
if(wrf.getStatusCode() < 0 )
{
return SpaceTrackApi.FAIL;
}
String filename = wrf.getFileName();
if (ToolsGUzip.uncompress(filename,outputfile)!=0)
return SpaceTrackApi.FAIL;
return SpaceTrackApi.OK;
}
COM: <s> request a predefined file existing in spacetrak web site </s>
|
funcom_train/50858473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRequestObject(String name, Object o) {
if(parameters.containsKey(name) && (o == null)) {
parameters.remove(name);
}
if((o != null) && (name != null)) {
parameters.put(name, o);
}
}
COM: <s> sets request objects </s>
|
funcom_train/49836129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Tuple combineTuples(Tuple left, Tuple right) {
List<Comparable> v = new ArrayList<Comparable>();
v.addAll(left.getValues());
v.addAll(right.getValues());
return new Tuple(new IntermediateTupleIdentifier(tupleCounter++), v);
} // combineTuples()
COM: <s> given two tuples combine them into a single one </s>
|
funcom_train/41775181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerPlugin(String pluginManifest) {
Document document = XMLParser.parse(pluginManifest);
Element rootElement = document.getDocumentElement();
NodeList extensionNodeList = rootElement.getElementsByTagName("extension");
if (extensionNodeList != null && extensionNodeList.getLength() > 0) {
for (int i = 0; i < extensionNodeList.getLength(); i++) {
registerExtension((Element)extensionNodeList.item(i));
}
}
}
COM: <s> this is called by the bootstrap only </s>
|
funcom_train/49321088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void _fireActionEvent() {
ActionEvent e = new ActionEvent(this, 0, "");
Object[] listeners = listenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == ActionListener.class) {
((ActionListener) listeners[i + 1]).actionPerformed(e);
}
}
}
COM: <s> notify any listeners of a change </s>
|
funcom_train/34627937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getListControl(Composite parent) {
List list = super.getListControl(parent);
list.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
List listWidget = (List) event.widget;
editButton.setEnabled(listWidget.getSelectionIndex() >= 0);
}});
return list;
}
COM: <s> add an additional selection listener to the list component </s>
|
funcom_train/37147693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void beginToSave(OutputStreamWriter out) throws IOException {
resources = myHrManager.getResources();
bFixedSize = csvOptions.bFixedSize;
if (csvOptions.bFixedSize)
getMaxSize();
writeTasks(out);
out.write("\n\n\n");
writeResources(out);
out.write("\n");
}
COM: <s> start saving the csv document </s>
|
funcom_train/3764040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testloadPlugins_InterrestedInSearch() {
try {
assertNotNull("InterrestedInSearch plugins list must to be initialized",
PluginManager.getInterestedInSearch());
assertTrue(PluginManager.getInterestedInSearch().length != 0);
} catch (RpException e) {
e.printStackTrace();
fail();
}
}
COM: <s> test the get interrested in search method of the plugin manager </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.