__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/41208784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readHeader() throws IOException {
int size = input.readShort();
majorVersion = input.readShort();
minorVersion = input.readShort();
metaData = new String[input.readShort()];
for(int iter = 0 ; iter < metaData.length ; iter++) {
metaData[iter] = input.readUTF();
}
}
COM: <s> reads the header of the resource file </s>
|
funcom_train/18756211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insert(String string, int index) {
// Strings do not have a getPreferredSize, so the only
// way to determine the height is to forcibly insert
// it, then ask the resulting JMenuItem what it's
// preferedSize is.
JMenuItem tempItem = super.add(string);
super.remove(tempItem);
insert((Component)tempItem,index);
}
COM: <s> override jmenu insert string int automatically restuctures </s>
|
funcom_train/8228927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSystemParam(String paramName) {
try {
String query = "SELECT value FROM systemParams WHERE param = '" + paramName + "';";
PreparedStatement stat = conn.prepareStatement(query);
ResultSet rs = stat.executeQuery();
if (rs.next()) return rs.getInt("value");
} catch (SQLException e) {
e.printStackTrace();
}
return 0;
}
COM: <s> get maximum system load from the database </s>
|
funcom_train/15825525 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void examineOldFiles(Map lastBuildFiles) {
for (Iterator iter = lastBuildFiles.values().iterator(); iter.hasNext();) {
File currentLastBuildFile = (File) iter.next();
addRevision((File) currentLastBuildFile.getFromHistoryByDate(nowDate), "deleted");
}
}
COM: <s> now examine old files </s>
|
funcom_train/36153588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addAll(int index, final Collection<? extends E> c){
boolean changed = false;
// Create an ArraySet to be inserted
ArraySet<E> set = new ArraySet<E>(c);
// Try to add each single element of the set if it contains any elements
if(set.size() > 0){
for (E e2 : set) {
try {
add(index, e2);
changed = true;
index++;
}
catch(UnsuccessfulOperationException e){ /* ignored */ }
}
}
return changed;
}
COM: <s> inserts each element of the specified collection to the end of </s>
|
funcom_train/19255853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UndoableEdit insertString(int where, String str) throws BadLocationException {
if (where < 0 || where > s.length() + 1)
throw new BadLocationException("Out of bounds", where);
if (where > s.length())
s.append(str);
else
s.insert(where, str);
return null;
}
COM: <s> inserts a string into the content at the specified position </s>
|
funcom_train/21982726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JBarcode createEAN13(){
JBarcode jbc = new JBarcode(EAN13Encoder.getInstance(), WidthCodedPainter.getInstance(), EAN13TextPainter.getInstance());
jbc.setBarHeight(17);
try {
jbc.setXDimension(0.264583333);
} catch (InvalidAtributeException e) {}
jbc.setShowText(true);
jbc.setCheckDigit(true);
jbc.setShowCheckDigit(true);
return jbc;
}
COM: <s> creates a new jbarcode instance to ean 13 barcode type </s>
|
funcom_train/134715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRightTrim(int right_trim_start) {
Rectangle2D.Double coordbox = trace_glyph.getCoordBox();
if (right_trim_glyph != null) {
trace_glyph.removeChild(right_trim_glyph);
}
right_trim_glyph = new FillRectGlyph();
right_trim_glyph.setBackgroundColor(trim_color);
right_trim_glyph.setCoords(right_trim_start, coordbox.y,
coordbox.x + coordbox.width - right_trim_start,
coordbox.height);
trace_glyph.addChild(right_trim_glyph);
}
COM: <s> highlights the right 3 end of the trace </s>
|
funcom_train/17540407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void internalSetupAcceptors(String urls, IAcceptListener acceptListener, ServiceURN serviceURN) throws Exception {
for (String url : urls.split(",")) {
URI acceptorURI = new URI(url);
addAcceptor(AcceptorFactory.createAcceptor(acceptorURI, acceptListener), serviceURN);
}
}
COM: <s> configure the acceptors for a particular service </s>
|
funcom_train/23845604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertParticleFunction(int index, ParticleFunction function)
{
if(function != null)
{
int num_functions = particleFunctions.size();
if(index > num_functions)
particleFunctions.add(function);
else
particleFunctions.add(index, function);
if(activeFunctions.length < num_functions)
activeFunctions = new ParticleFunction[num_functions];
}
COM: <s> insert a particle function at a specific place in the list </s>
|
funcom_train/34011743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void registerPropertyValue(PropertyValue propertyValue) throws OnRegisterPropertyValueException{
try {
LOGGER.info("Persisting property value.");
this.getPropertyValueDAO().persist(propertyValue);
LOGGER.info("Property value persisted.");
} catch (GenericDAOException e) {
throw new OnRegisterPropertyValueException("An error occured persisting property value.", e);
}
}
COM: <s> register a property value instance </s>
|
funcom_train/12640324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String scanText() throws IOException {
int ch = scanChar();
if(ch == -1) {
return null;
}
StringBuffer sb = new StringBuffer();
while(true) {
if(ch <= ' ') {
lastch = ch;
break;
}
sb.append((char)ch);
ch = scanChar();
}
return sb.toString();
}
COM: <s> scan a textual sequence of characters </s>
|
funcom_train/22076903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void modify(IdentifiantComponent ident, List identifiants) {
IdentifiantComponent identifiant = ident;
for (Iterator it = identifiants.iterator(); it.hasNext();) {
IdentifiantComponent ic = (IdentifiantComponent) it.next();
if (identifiant.getId().equals(ic.getId())) {
fr.norsys.mapper.console.utils.BeanUtils.copyFilledProperties(
ic, identifiant);
getVariable(ic);
identifiant=ic;
break;
}
}
}
COM: <s> service to modify an identifiant component in the list in session </s>
|
funcom_train/37721389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void maybeManageBounds(JInternalFrame iframe, PropertiesFilter props) {
if (props.isPropertyEnabled("manage-size"))
Util.manageWindowSize(props.getCategory(), iframe);
if (props.isPropertyEnabled("manage-location"))
Util.manageWindowLocation(props.getCategory(), iframe);
}
COM: <s> will manage the bounds of the internal frame depending on properties </s>
|
funcom_train/22950759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double computeDistanceFromCentroid(int row) {
double dfc;
double t;
double d = 0;
double[] v = getRowV(row);
for (int j = 0; j < dim; j++) {
t = C[cluster[row]][j] - v[j];
d += t * t;
}
//euclid distance from the centre of the cluster
dfc = Math.sqrt(d);
return dfc;
}
COM: <s> computes the distance of the row from the centroid </s>
|
funcom_train/46281478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getFromValueList(String[] list) {
StringBuilder strBuilder = new StringBuilder();
if ( (list != null) && ( list.length > 0) ) {
for ( int index = 0; index < list.length; index++) {
if ( index != 0) {
strBuilder.append(";");
}
strBuilder.append( list[index] );
}
}
return strBuilder.toString();
}
COM: <s> returns a string of values separated by semicolon </s>
|
funcom_train/13866700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TypeParameterFlowInfo getFlowInfo(JGenericType type, int index) {
JTypeParameter typeParameter = type.getTypeParameters()[index];
TypeParameterFlowInfo info = typeParameterToFlowInfo.get(typeParameter);
if (info == null) {
info = new TypeParameterFlowInfo(type, index);
typeParameterToFlowInfo.put(typeParameter, info);
worklist.add(info);
}
return info;
}
COM: <s> return the parameter flow info for a type parameter specified by class and </s>
|
funcom_train/3079826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAncillaryService(Service service) {
if (ancillaryServices != null) {
ancillaryServices.remove(service);
if (instancePeer != null) {
instancePeer.getServiceRegistry().remove(service, getAncillaryServiceAlias());
}
if (ancillaryServices.size() == 0) {
ancillaryServices = null;
}
}
}
COM: <s> removes an ancillary service from this code component peer code </s>
|
funcom_train/16882793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void decreaseKey(V value, K newKey) {
Integer tmp = valueIndexMap.get(value);//myData.indexOf(element);
if (tmp == null) {
throw new NoSuchElementException();
}
if (valueKeyMap.get(value).compareTo(newKey) < 0) {
throw new IllegalArgumentException("The key replaced is less than the new one");
}
valueKeyMap.put(value, newKey);
siftUp(tmp);
}
COM: <s> decreases key of the given element </s>
|
funcom_train/9818626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getGeneric(String name) {
Bindings bindings = getBindings(false);
if (bindings != null)
return ((Integer) bindings.getArgument(name)).intValue();
throw new UnboundException("Attempt to retrieve unbound generic value for: " +
name + " in " + this + ".");
}
COM: <s> this retrieves a generic binding value </s>
|
funcom_train/34890542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int computeRecordPosition(int depth, int coordX, int coordY){
return (coordX - this.map.boundWest)/ this.map.rectangleSizesX[depth]
+ this.zoomLevelsLine[depth] * ((coordY - this.map.boundSouth) / this.map.rectangleSizesY[depth]);
}
COM: <s> given the coordinates computes the position in the master record of the the </s>
|
funcom_train/31904840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean match(Element e, String pseudoE) {
Node n = e;
while ((n = n.getPreviousSibling()) != null &&
n.getNodeType() != Node.ELEMENT_NODE);
if (n != null) {
return ((ExtendedSelector)getSelector()).match((Element)n,
null) &&
((ExtendedSelector)getSiblingSelector()).match(e, pseudoE);
}
return false;
}
COM: <s> tests whether this selector matches the given element </s>
|
funcom_train/37820526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ByteArrayOutputStream saveSystem() {
ByteArrayOutputStream out = new ByteArrayOutputStream();
try {
ObjectOutputStream objOut = new ObjectOutputStream(out);
objOut.writeBoolean(false);
objOut.writeObject(synDiaSystem);
objOut.close();
connector.setSaveStatus(SaveStatus.NO_CHANGES);
} catch (IOException e) {
JAlgoGUIConnector.getInstance().showErrorMessage(
Messages.getString("ebnf", "SynDia.Error.SaveError"));
}
return out;
}
COM: <s> saves the actual syntax diagram system into a file </s>
|
funcom_train/41981579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cancelAllTimelines() {
synchronized (LOCK) {
for (Timeline timeline : this.runningTimelines) {
TimelineState oldState = timeline.getState();
while (timeline.getState() != TimelineState.IDLE)
timeline.popState();
timeline.pushState(TimelineState.CANCELLED);
this.callbackCallTimelineStateChanged(timeline, oldState);
timeline.popState();
this.callbackCallTimelineStateChanged(timeline,
TimelineState.CANCELLED);
}
this.runningTimelines.clear();
this.runningScenarios.clear();
this.waitingTimelines.clear();
this.waitingTimelinesMap.clear();
}
}
COM: <s> stops tracking of all timelines </s>
|
funcom_train/40682577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DocumentListEntry createNewSubFolder(String title, String folderResourceId) throws IOException, ServiceException, DocumentListException {
DocumentListEntry newEntry = new FolderEntry();
newEntry.setTitle(new PlainTextConstruct(title));
URL url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + "/" + folderResourceId + URL_FOLDERS);
return service.insert(url, newEntry);
}
COM: <s> creates the new sub folder </s>
|
funcom_train/19434043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void confirmPlayerRegister() {
model.registerPlayer( nameRegisterField.getText(), passRegisterField.getText(),
passConfirmRegisterField.getText() );
nameRegisterField.setText("");
passRegisterField.setText("");
passConfirmRegisterField.setText("");
}
COM: <s> confirm a player register </s>
|
funcom_train/20245079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setColorText() {
if (customColorText != null) {
CSS.setProperty(buttonContent, CSS.A.COLOR,
enabled ? customColorText : customColorDisabled);
} else {
CSS.setProperty(buttonContent, CSS.A.COLOR,
enabled ? colorText : colorDisabled);
}
}
COM: <s> sets the color on the text </s>
|
funcom_train/35340559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BigInteger getSerialNumber() {
String text = this.getTextFromChildElement
(Constants._TAG_X509SERIALNUMBER, Constants.SignatureSpecNS);
if (log.isLoggable(java.util.logging.Level.FINE))
log.log(java.util.logging.Level.FINE, "X509SerialNumber text: " + text);
return new BigInteger(text);
}
COM: <s> method get serial number </s>
|
funcom_train/8135478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSinkState(BluetoothDevice device) {
if (DBG) log("getSinkState(" + device + ")");
try {
return mService.getSinkState(device);
} catch (RemoteException e) {
Log.e(TAG, "", e);
return BluetoothA2dp.STATE_DISCONNECTED;
}
}
COM: <s> get the state of an a2 dp sink </s>
|
funcom_train/20433898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printWinPaths() {
for (int i = 0; i < CONNECT_NUMBER; i++) {
System.out.print("( " + winPathRow[i] + ", " + winPathCol[i] + ")");
if (i == CONNECT_NUMBER - 1)
System.out.println();
else
System.out.print(", ");
}
}
COM: <s> prints the winning path </s>
|
funcom_train/34565823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setState(WizardState s) {
state = s;
state.getBtnStates(prevBtn, nextBtn, finishBtn, cancBtn, stopBtn);
setPage(state.getPage());
repaint();
/*
if(state != null){
page.removeHyperlinkListener(state);
}
page.addHyperlinkListener(state = s);*/
}
COM: <s> sets the state of the wizard </s>
|
funcom_train/50219878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected URL getResource(ResourceBundle res, String key) {
String name = Utility.getResourceString(res, key);
if (name != null) {
//get all resources relative to code base
return this.getClass().getClassLoader().getResource(name);
}
return null;
}
COM: <s> get the url derived from the key into the resource bundle </s>
|
funcom_train/3766012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFrameworks(List newFrameworks) {
List actualFrameworks = this.pbProject.getFrameworks();
if (actualFrameworks.size() != newFrameworks.size()) {
this.saveRequired = true;
} else {
if (!actualFrameworks.containsAll(newFrameworks)) {
this.saveRequired = true;
}
}
if (this.saveRequired) {
this.pbProject.setFrameworks(newFrameworks);
}
try {
this._saveChanges();
} catch (Throwable throwable) {
this.handleException(throwable);
}
}
COM: <s> method add frameworks </s>
|
funcom_train/27721311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean verifyInt(JTextField input) {
int val = 0;
if (input.getText().length() > 0) {
try {
val = Integer.valueOf(input.getText()).intValue();
} catch (Exception ex) {
return false;
}
}
return ((val > 0) && (val < 100000));
}
COM: <s> verify if the input text field contains an int value </s>
|
funcom_train/29023095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LineAttributes getLineAttributes() {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
float[] dashes = null;
if (data.lineDashes != null) {
dashes = new float[data.lineDashes.length];
System.arraycopy(data.lineDashes, 0, dashes, 0, dashes.length);
}
return new LineAttributes(data.lineWidth, data.lineCap, data.lineJoin, data.lineStyle, dashes, data.lineDashesOffset, data.lineMiterLimit);
}
COM: <s> returns the receivers line attributes </s>
|
funcom_train/5315790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void on_command_insert_button_released(GtkEvent event) {
this.hc.store(this.queryField.getText(), this.commandField.getText());
Debug.printMessage("Query: " + this.queryField.getText(),
DebugType.HC_GTK_GUI);
this.hc.query(this.query);
// Entry entry1 = (Entry) this.libglade.getWidget("entry2");
// entry1.setText(entry.getText());
}
COM: <s> store a query in the human commander db </s>
|
funcom_train/18507353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireRowDeleted(DataSetEvent e) {
if (dataSetListeners != null) {
Vector listeners = dataSetListeners;
int count = listeners.size();
for (int i = 0; i < count; i++) {
((DataSetListener) listeners.elementAt(i)).rowDeleted(e);
}
}
}
COM: <s> fires the row removed event for all of the listeners </s>
|
funcom_train/46336364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testOpb_read_only() {
System.out.println("opb_read_only");
String s = "y";
OpbField instance = new OpbField();
assertFalse(instance.isReadOnly());
instance.opb_read_only(s);
assertTrue(instance.isReadOnly());
}
COM: <s> test of opb read only method of class opb field </s>
|
funcom_train/28339332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HITTypeResults getHITTypeResults(HITDataInput success) {
HITTypeResults r = null;
try {
r = this.getHITTypeResults(success, null);
} catch (IOException e) {
// There shouldn't be any IO exception here
log.error("IOException thrown. Did the HIT results get printed somehow?");
}
return r;
}
COM: <s> gets the results for specified hit types </s>
|
funcom_train/10598086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copyToFile(String filename) throws IOException {
InputStream is = getInputStream();
try {
OutputStream os = new FileOutputStream(filename);
try {
IOUtils.copy(is, os);
} finally {
os.close();
}
} finally {
is.close();
}
}
COM: <s> convenience method to copy a part to a file </s>
|
funcom_train/3395775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean definesSerializableFields() {
if (!isSerializable() || isExternalizable()) {
return false;
} else {
if (serializedForm == null) {
serializedForm = new SerializedForm(env, tsym, this);
}
//### Clone this?
return serializedForm.definesSerializableFields();
}
}
COM: <s> return true if serializable fields are explicitly defined with </s>
|
funcom_train/18458673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleAttributeProperties() {
int index = attributesList.getSelectedIndex();
if(index == -1) {
return;
}
String attributeType = attributesList.getSelectedValue().toString();
try {
Class<?> c = Class.forName("gnagck.block.attributes."+attributeType);
BlockAttribute attribute = block.getAttribute(c);
attribute.doEdit(this);
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
COM: <s> launches an editor for the properties of the selected attribute </s>
|
funcom_train/24318670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createGroup(String groupName, String description) throws Exception {
if (caseInsensitiveOutput) {
groupName = MiscUtilities.getCaseInsensitive(groupName, true);
}
if (doesGroupExist(groupName)) {
throw new Exception("Group already exists");
}
GroupDO group = GroupDO.createVirgin();
group.setGroupid(groupName);
group.setDescription(description);
group.save();
}
COM: <s> creates a new user group </s>
|
funcom_train/29613742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String substitute(String mainText, String regEx, boolean matchCase, String subText){
String newString = mainText;
Pattern pattern=getPattern(regEx, matchCase);
if ((pattern != null)&&(subText!=null)) {
Substitution sub = new StringSubstitution(subText);
newString = Util.substitute(matcher, pattern, sub, mainText);
}
return newString;
}
COM: <s> method to do string substitution using reg ex </s>
|
funcom_train/39109321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return " Name: "
+ name
+ '\n'
+ " Local: "
+ local
+ '\n'
+ " Type: "
+ type
+ '\n'
+ " Mandatory: "
+ mandatory
+ '\n'
+ " Deprecated: "
+ deprecated
+ '\n'
+ " Single instance: "
+ recordless
+ '\n'
+ " Prototype: "
+ prototype
+ '\n'
+ " Alias: "
+ aliased
+ '\n'
+ " Indexed by: "
+ indexType()
+ '\n'
+ " Label: "
+ label
+ '\n'
+ " Topic: "
+ topic
+ '\n'
+ " Help: "
+ help
+ '\n';
}
COM: <s> returns field details as a string </s>
|
funcom_train/41101563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IReconfigurableComponent findComponent(byte componentId) {
for (int i = 0; i < components.size(); i++) {
IReconfigurableComponent component = (IReconfigurableComponent) components.elementAt(i);
if (componentId == component.getComponentID()) {
return component;
}
}
return null;
}
COM: <s> get the component for a given id </s>
|
funcom_train/869885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void appendChild(Node child) throws XBRLException {
if (isNewFragment()) {
if (child.getNodeType() != Element.ELEMENT_NODE) throw new XBRLException("The first child to be inserted must be an element node");
getInsertionPoint().appendChild(child);
isNewFragment = false;
} else {
getInsertionPoint().appendChild(child);
}
if (child.getNodeType() == Element.ELEMENT_NODE) setInsertionPoint((Element) child);
}
COM: <s> append a node to the data </s>
|
funcom_train/50311198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initializeDefaultPreferences(IPreferenceStore aStore) {
super.initializeDefaultPreferences(aStore);
aStore.setDefault(IPreferencesConstants.EDITOR_SHOW_SEGMENTS, false);
aStore.setDefault(IPreferencesConstants.VELOCITY_COUNTER_NAME,
"velocityCount");
aStore.setDefault(IPreferencesConstants.VELOCITY_USER_DIRECTIVES,
"");
VelocityColorProvider.initializeDefaults(aStore);
}
COM: <s> sets default preference values </s>
|
funcom_train/26563360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() {
File toDir = null;
if (_libdir == null) {
toDir = new File(_prefix, LIB);
} else {
toDir = _libdir;
}
File fromDir = new File(_from, LIB);
copyTree(fromDir, toDir, _perm);
}
COM: <s> install the contents of the b lib b direcotry of the builds output </s>
|
funcom_train/44324143 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String newRandomString(int maxLen, String charBase) {
int length;
String result = null;
do {
length = fRandom.nextInt(maxLen);
if (length < 3)
continue;
result = newRandomFixedString(length, charBase);
break;
} while (true);
return result;
}
COM: <s> this method returns a new random string with the specified i maximal </s>
|
funcom_train/37213599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeFromResource() throws IOException {
InputStream inStream = getResourceInputStream();
File userConf = MyGridConfiguration.getUserDir("conf");
File propertiesOutput = new File(userConf,FETACLIENT_PROPERTIES);
OutputStream outStream = new FileOutputStream(propertiesOutput);
int len = 0;
byte [] buffer = new byte[255];
while ((len = inStream.read(buffer))!=-1) {
outStream.write(buffer,0,len);
}
outStream.close();
inStream.close();
}
COM: <s> copies the bundled properties from the jar file to the users taverna </s>
|
funcom_train/14233203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parse(WC3Packet packet) {
WC3Packet tobeProcessed;
while ((tobeProcessed = packet.popWC3Packet()) != null) {
byte[] bytes = tobeProcessed.getData();
try{
if (bytes[0] == WC3Packet.BNET_BYTE) {
bnetPackets(tobeProcessed);
} else if (bytes[0] == WC3Packet.GAME_BYTE) {
gamePackets(tobeProcessed);
}
}catch (ArrayIndexOutOfBoundsException e1){
//do nothing, these happen?
}
}
}
COM: <s> splits apart larger wc3 packets into their atomic packets </s>
|
funcom_train/9343555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void hit(int drum, int vel, int i) {
int l = 10; // length of all drum notes - doesn't usually matter as long as it's > 0
generateEvent(track, ShortMessage.NOTE_ON, channel,
drum, velocity, pos+i);
generateEvent(track, ShortMessage.NOTE_OFF, channel,
drum,0,pos+i+l);
}
COM: <s> hit a drum at tick i relative to the current bar </s>
|
funcom_train/10615762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEngineGetCertPathEncodings() {
try {
Iterator it =
new X509CertFactoryImpl().engineGetCertPathEncodings();
Object encoding = it.next();
assertNotNull("Default encodings should not be null", encoding);
it.remove();
fail("UnsupportedOperationException should be thrown");
} catch (UnsupportedOperationException e) {
// pass
}
}
COM: <s> engine get cert path encodings method testing </s>
|
funcom_train/39568037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resetNeighborhood() {
//config.log.println("Reset Neighborhood called.\n");
neighbors.resetNeighborhood();
MyLogicalAddress = new HC_LogicalAddress(MaxAddress(), true);
//Report events LACHANGED and NEIGHBORHOODCHANGED to notification handler.
if (n_handler != null) {
NODE_LOGICALADDRESSCHANGED ne = new NODE_LOGICALADDRESSCHANGED(Adapter.getCurrentTime(), null);
n_handler.eventOccurred(ne);
NODE_NEIGHBORHOODCHANGED nee = new NODE_NEIGHBORHOODCHANGED(Adapter.getCurrentTime(), null);
n_handler.eventOccurred(nee);
}
}
COM: <s> resets all neighbors </s>
|
funcom_train/32328560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
try {
setBundle(ResourceBundle.getBundle(
ResourceConstants.RESOURCES_BASE_NAME));
Settings.remove(SETTINGS_KEY);
} catch (final MissingResourceException ex) {
ExceptionHandlers.getGeneralHandler().handle(ex);
} catch (final ResourceException ex) {
ExceptionHandlers.getGeneralHandler().handle(ex);
}
}
COM: <s> resets the locale </s>
|
funcom_train/10799677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getClassName() {
if (_meta.isOpenJPAIdentity())
return null;
// convert from SomeClass$ID to ID
String className = Strings.getClassName(_meta.getObjectIdType());
if (isInnerClass())
className = className.substring(className.lastIndexOf('$') + 1);
return className;
}
COM: <s> returns the short class name for the object id class </s>
|
funcom_train/44718257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFormSectionData(PersistentFormSection formSection) {
formSection.setDescription(m_description);
formSection.setAdminName(m_adminName);
initializeComponentFactories();
addComponentsToFormSection(formSection);
m_processListener =
PersistentProcessListener.create("Test Listener", "com.arsdigita.formbuilder.TestProcessListener");
m_processListener.save();
formSection.addProcessListener(m_processListener);
}
COM: <s> set all data of the test persistent form section </s>
|
funcom_train/36925724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(final CCHtmlURL theToCompare) {
CCHtmlURL urlToCompare = (CCHtmlURL) theToCompare;
if (urlToCompare.equals(this)) {
return 0;
}
if (_myParentUrlPart.equals(urlToCompare._myParentUrlPart)) {
return _myUrl.compareTo(urlToCompare._myUrl);
} else {
return _myParentUrlPart.compareTo(urlToCompare._myParentUrlPart);
}
}
COM: <s> compares two urls </s>
|
funcom_train/16818529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(Object bean) throws MarshalException {
if(bean == null)
write(NULL_REF);
else {
MarshallerMechanismFactory mmFc = OrbAccessor.getMarshallerMechanismFactory();
if(bean instanceof Exception)
write(MARSHALABLE_EXCEPTION);
else
write(MARSHALABLE);
if(bean instanceof arcademis.server.RemoteObject) {
Stub s = ((arcademis.server.RemoteObject) bean).getStub();
write(s.getClass().getName());
s.marshal(this);
} else {
write(bean.getClass().getName());
MarshallerMechanism mechanism = mmFc.createMarshall(bean);
mechanism.marshall(this, bean);
}
}
}
COM: <s> writes an object into the byte stream </s>
|
funcom_train/11735824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetChildrenNoEscaping() throws Exception {
StringBuilder select = new StringBuilder();
select.append("select * from [nt:base] AS selector where ISCHILDNODE(selector, ["
+ n1.getPath() + "]) ");
checkResult(executeSQL2Query(select.toString()), 0);
}
COM: <s> not escaping the spaced path will not get you anything </s>
|
funcom_train/23949354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createWindow(){
window = new JFrame("T-Bag viewer");
window.setLayout( new BorderLayout() );
window.setSize( 500, 500 );
window.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE );
tbag.core.JFrameUtils.setIcon(window, "tbag.png");
}
COM: <s> creates the window </s>
|
funcom_train/8368865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getSmoothedProbability(String text, int beginIndex) {
if (beginIndex > text.length() + n)
return 0.;
double prob = 0.;
for (int i = 0; i <= n; i++)
prob += lambda[i] * getRawProbability(text, beginIndex + n - i, i);
return prob;
}
COM: <s> retrieves the smoothed probability of the given n gram </s>
|
funcom_train/14368507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cache constructCache(Map properties) {
int size = 100;
try {
size = Integer.parseInt((String) properties.get("size"));
} catch(Exception e) {
// ignored
}
Cache cache = new LRUCacheImpl(size);
mLogger.debug("new cache constructed. size="+size);
return cache;
}
COM: <s> construct a new instance of a roller lrucache </s>
|
funcom_train/24059661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateAlignment() {
Rectangle bound = getBounds();
StyleBarAlignment alignment;
if (getOrientation() == JToolBar.HORIZONTAL) {
alignment = bound.y == 0 ? StyleBarAlignment.TOP : StyleBarAlignment.BOTTOM;
} else {
alignment = bound.x == 0 ? StyleBarAlignment.LEFT : StyleBarAlignment.RIGHT;
}
if (!alignment.equals(_alignment)) {
_alignment = alignment;
membersUpdateAlignment();
_preferences.setPreference(PREFERENCE_ALIGNMENT, _alignment.name());
}
}
COM: <s> update the saved alignment values but dont reposition anything </s>
|
funcom_train/31143904 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void transactionalClose () {
try {
TransactionWrapper tx = (TransactionWrapper) currentTransaction ();
if ( tx.reallyCommit () && shouldClose ) {
super.close ();
}
} catch ( Exception e ) {
Log.exception ( "unable to commit transaction.", e );
throw new RuntimeException ( "unable to commit transaction. " + e.toString () );
}
}
COM: <s> attempts to commit the underlying transaction </s>
|
funcom_train/24468763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean is008Source(final String source) {
boolean check = false;
// check if length = 1
if (isExactLength(source, 1)) {
final char mod = source.charAt(0);
// check validity
if ('d' == mod || ' ' == mod || '|' == mod || 'c' == mod || 'u' == mod) {
check = true;
}
}
return check;
}
COM: <s> checks in marc field 008 if the cataloging source is valid </s>
|
funcom_train/22815284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getStartTag(TransferType type) {
switch (type) {
case Def:
return "<def" + getType() + " name=\"" + this.name + "\" label=\""
+ this.label + "\"> ";
default:
return "<one" + getType() + " name=\"" + this.name + "\"> ";
}
}
COM: <s> get the opening xml tag for the element </s>
|
funcom_train/44709255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAll(EventListenerList l) {
if ( l.listenerList.length == 0 )
return;
Object[] tmp = new Object[listenerList.length + l.listenerList.length];
System.arraycopy(listenerList, 0, tmp, 0, listenerList.length);
System.arraycopy(l.listenerList, 0,
tmp, listenerList.length, l.listenerList.length);
listenerList = tmp;
}
COM: <s> append all the event listeners from code l code </s>
|
funcom_train/25033475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getExplanation(int frame,int transform) {
final SingleVOITransforms useTransform = getTransformsForFrame(frame);
final SingleVOITransform singleTransform = (SingleVOITransform)(useTransform.get(transform));
//System.err.println("VOITransform.getCenter(): from frame "+frame+" has singleTransform="+singleTransform);
return singleTransform == null ? "" : singleTransform.explanation;
}
COM: <s> p get the explanation of a particular transform available for a particular frame </s>
|
funcom_train/41462968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private NamingNode find(Text[] path, int start, int n) {
//end of tree reached
if (start == n) {
return this;
}
for (NamingNode child : childs) {
if (child.name.equals(path[start])) {
return child.find(path, start + 1, n);
}
}
//not found
return null;
}
COM: <s> gets the node with specified path </s>
|
funcom_train/45696526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void manage(Object item, int index, int padding, boolean expand, boolean fill) {
LinearCell box = new LinearCell();
box.padding = padding;
box.expand = expand;
box.fill = fill;
this.addCell(box, item, index);
}
COM: <s> insert the given item with the given box properties </s>
|
funcom_train/38865669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDriver(String jdbcDriver) {
if (jdbcDriver.equalsIgnoreCase(GWE_ALIAS)) {
driver = GWE;
}
else if (jdbcDriver.equalsIgnoreCase(MM_ALIAS)) {
driver = MM;
}
else if (jdbcDriver.equals("")) {
driver = DEFAULT_DRIVER;
}
else {
driver = jdbcDriver;
}
}
COM: <s> set the jdbc driver </s>
|
funcom_train/21655708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtEliminar() {
if (btEliminar == null) {
btEliminar = new JButton();
btEliminar.setBounds(new Rectangle(425, 140, 100, 25));
btEliminar.setText("Eliminar");
btEliminar.setMnemonic('e');
btEliminar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
eliminarCargo();
}
});
}
return btEliminar;
}
COM: <s> this method initializes bt eliminar </s>
|
funcom_train/42385872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUnregisteredKey() {
try {
String s = ExampleInvalidProcessor5.EXAMPLE.getFieldName();
fail("ExampleInvalidProcessor5.EXAMPLE is an unregistered key.");
} catch (UnregisteredKeyException e) {
System.err.println(e.getMessage());
// Expected; KeyManager.addKeys was never called for this class.
}
}
COM: <s> tests that example invalid processor5s keys raise illegal state exception </s>
|
funcom_train/9925368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ParameterKey getParameter_Key(String jobName,String paramkey_name) {
ParameterKey key = new ParameterKey(paramkey_name);
AutoGeneratorJob job = this.getAutoGeneratorJob(getActualComponent(),jobName);
key = (ParameterKey)job.getKeyList().getByName(paramkey_name);
return key;
}
COM: <s> returns the parameter key object with name paramkey name </s>
|
funcom_train/36129672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doLoadResourceBundle(final String name, final ClassLoader classLoader) {
ResourceBundle bundle = ResourceBundle.getBundle(name, currentLocale, classLoader);
for (String key : bundle.keySet()) {
processProperty(key, bundle);
}
bundleNames.put(name, classLoader);
ResourceBundle.clearCache();
}
COM: <s> does actual loading of resource bundles </s>
|
funcom_train/3711277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildWavelengthArray (double[] values, Units original_units, Units units) {
DiscreteWavelength wave = new DiscreteWavelength (values.length);
wave.setValues (values);
wave.setOriginalUnits (original_units);
wave.setUnits (units);
this.wave = wave;
evenly_sampled = AbstractSpectrum.IsEvenlySampled(this);
if (notify) {
setChanged();
notifyObservers();
}
}
COM: <s> this method builds a new wavelength array </s>
|
funcom_train/14206742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ToolWindowContainer getToolWindowContainer(ToolWindowType type) {
if (dockedContainer == null)
initContainers();
switch (type) {
case FLOATING:
case FLOATING_FREE:
return floatingContainer;
case FLOATING_LIVE:
return floatingLiveContainer;
case DOCKED:
return dockedContainer;
case SLIDING:
return slidingContainer;
}
throw new IllegalArgumentException("Type not recognized.");
}
COM: <s> returns the tool window container binded to the specified code type code </s>
|
funcom_train/22285410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void select(boolean sel) {
ListWidget list = getListWidget();
if (list != null) {
if (sel != selected) {
synchronized (list) {
if (sel && list.exclusive) {
list.clearSelection();
}
selected = sel;
repaint();
}
list.postEvent(new Event(list, sel ? Event.LIST_SELECT : Event.LIST_DESELECT, this));
}
}
}
COM: <s> select or unselect this item </s>
|
funcom_train/17922659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCheckIfFileExists() {
System.out.println("checkIfFileExists");
String file = "d:/A/armin.txt";
boolean expResult = true;
boolean result = FileHandling.checkIfFileExists(file);
System.out.println("Source: " + file);
System.out.println("Exists: " + result);
assertEquals(expResult, result);
}
COM: <s> test of check if file exists method of class eu </s>
|
funcom_train/39998189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu getRunMenu() {
if (runMenu == null) {
runMenu = new JMenu();
runMenu.setText("Run");
runMenu.add(getMakeMenuItem());
// runMenu.add(getRunMenuItem());
}
return runMenu;
}
COM: <s> this method initializes run menu </s>
|
funcom_train/13720123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Acceleration getAcceleration() throws InterruptedException, IOException {
isActive(true);
try{
byte[] response = getSetting(Acceleration.COMMANDCODE);
int val;
Acceleration acceleration = Acceleration
.getAcceleration(val = MathUtilities.hex2int(response));
if(acceleration == null)
logger.log(Level.SEVERE, "Unable to getAcceleration - Bad Response: "
+ val);
return acceleration;
}catch(InterruptedException e){
logger.log(Level.SEVERE, "Unable to getAcceleration", e);
throw e;
}catch(IOException e){
logger.log(Level.SEVERE, "Unable to getAcceleration", e);
throw e;
}
}
COM: <s> this command requests the current acceleration setting from the hardware </s>
|
funcom_train/12186437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Attributes createAttributesWithBaseURI(Attributes atts, URL base) {
AttributesImpl result = new AttributesImpl(atts);
result.addAttribute(NamespaceSupport.XMLNS,
"base", "xml:base", "String", base.toExternalForm());
return result;
}
COM: <s> create a new attributes from the specified attributes and with an </s>
|
funcom_train/50344420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispose(){
setTrain(null);
setDestination(null, null);
setLocation(null, null);
CarRoads.instance().removePropertyChangeListener(this);
CarOwners.instance().removePropertyChangeListener(this);
CarColors.instance().removePropertyChangeListener(this);
}
COM: <s> remove rolling stock </s>
|
funcom_train/40669383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sort(JField[] fields) {
Arrays.sort(fields, new Comparator<JField>() {
public int compare(JField f1, JField f2) {
String name1 = f1.getName();
String name2 = f2.getName();
return name1.compareTo(name2);
}
});
}
COM: <s> convenience method to sort fields in a consistent way </s>
|
funcom_train/32894122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String handleEvent() throws WiwaException {
// Handle the event.
Component handlerComponent = getHandlerComponent();
handlerComponent.handleEvent(getEventName(), getArguments());
// Return the URL of the 'next' component.
return ComponentManager.getComponentUrl(getNextComponent());
}
COM: <s> the url to go forward the user to after handling the event </s>
|
funcom_train/2677378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void readKeyValues(Map<String, Object> result, Deserializer deserializer) {
while (hasMoreProperties()) {
String name = readPropertyName();
log.debug("property: {}", name);
Object property = deserializer.deserialize(this, Object.class);
log.debug("val: {}", property);
result.put(name, property);
if (hasMoreProperties()) {
skipPropertySeparator();
}
}
skipEndObject();
}
COM: <s> read key value pairs into map object </s>
|
funcom_train/7634995 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onClick(View v) {
for (View b : mButtons) {
if (b == v) {
// prepare a launch intent and send it
Intent intent = (Intent)b.getTag();
intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY);
getContext().startActivity(intent);
}
}
dismiss();
}
COM: <s> handler for user clicks </s>
|
funcom_train/12561564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String layerID() {
int i;
String res = getClass().getName();
if (res != null && (i = res.lastIndexOf('.')) > -1) {
res = res.substring(i+1);
}
return res + "@" +
Integer.toHexString(hashCode());
}
COM: <s> a string identifier used by subclasses for debug purposes </s>
|
funcom_train/38524531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void popupMenuDeleteData(int rowIndex, int columnIndex) {
//
// Display the dialog
//
DeleteDataDialog deleteDataDialog = new DeleteDataDialog(parent.getShell());
if (deleteDataDialog.open() != Window.OK)
return;
int delSize = deleteDataDialog.getResult();
if (delSize == 0) {
//
// Cancel button pressed - do nothing
//
return;
}
//
// Delete data from the table
delete(rowIndex, columnIndex-1, delSize);
//
// Update the status panel
//
updateStatusPanel();
}
COM: <s> deletes data from the table invoked from popup menu </s>
|
funcom_train/13596613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnReplace() {
if (btnReplace == null) {
btnReplace = new JButton();
btnReplace.setText(Messages.getString("GeneralUI.ButtonReplace")); // Generated
// //$NON-NLS-1$
btnReplace.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
replaceWordData();
}
});
}
return btnReplace;
}
COM: <s> this method initializes get btn replace </s>
|
funcom_train/16783810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getID(String name) {
int id = ID_NOT_AVAILABLE;
Collection<RecipeListItem> recipeItems = recipeMap.values();
for (RecipeListItem item : recipeItems) {
if (item.name.equalsIgnoreCase(name)) {
id = item.ID;
break;
}
}
return id;
}
COM: <s> returns the id for the recipe with given name </s>
|
funcom_train/9792618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendWYSIWYGDocumentHasChangedInsert(String textTyped,int offset,int length, String textInWindow){
try{
MessageWYSIWYGDocumentSyncFromClientInsert mwysfc = new MessageWYSIWYGDocumentSyncFromClientInsert(email,username,textTyped,offset,length, textInWindow);
sendMessage(mwysfc);
}catch (Exception e){
// EMUI.println(getUsername(),"ERROR SENDING WYSIWYG REMOVE");
}
}
COM: <s> sends offset and length of chat text inserted in wysiwg chat window interface </s>
|
funcom_train/19540404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getParsedParam(int index, MapToolVariableResolver res, Token tokenInContext) throws ParserException {
Object retval = params[index];
// No parsing is done if the param isn't a String (e.g. it's already a BigDecimal)
if (params[index] instanceof String) {
Result result = parseExpression(res, tokenInContext, (String) params[index]);
retval = result.getValue();
}
return retval;
}
COM: <s> returns a param parsing it as an expression if it is a string </s>
|
funcom_train/20647379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueChanged(TreeSelectionEvent evt) {
SelectedTreePath = evt.getNewLeadSelectionPath();
if (SelectedTreePath == null) {
SelectedNode = null;
return;
}
CheckNode cn = (CheckNode)SelectedTreePath.getLastPathComponent();
if (cn.isRoot()) {
setSelectionPath(null);
SelectedNode = null;
return;
}
SelectedNode = (CheckNode)SelectedTreePath.getLastPathComponent();
}
COM: <s> tree selection listener sets selected node </s>
|
funcom_train/5897137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected CaptchaEngine newCaptchaEngine() throws UiException {
final String PROP = "org.zkoss.zul.captcha.engine.class";
final String klass = Library.getProperty(PROP);
if (klass == null)
throw new UiException("Library property, "+PROP+", required");
final Object v;
try {
v = Classes.newInstanceByThread(klass);
} catch (Exception ex) {
throw UiException.Aide.wrap(ex);
}
if (!(v instanceof CaptchaEngine))
throw new UiException(CaptchaEngine.class + " must be implemented by "+v);
return (CaptchaEngine)v;
}
COM: <s> instantiates the default captcha engine </s>
|
funcom_train/19107113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getAttribute(int pPos, String pAttributeName) {
Node node = mListe.item(pPos);
NamedNodeMap attributes = node.getAttributes();
return node == null
|| attributes == null
|| attributes.getNamedItem(pAttributeName) == null ? null : attributes.getNamedItem(pAttributeName).getNodeValue();
}
COM: <s> gets the attribute </s>
|
funcom_train/12924275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ButtonShape setState(final Set<ButtonState> states) {
for (final ButtonState buttonState : states) {
switch (buttonState) {
case UP:
state |= Coder.BIT0;
break;
case OVER:
state |= Coder.BIT1;
break;
case DOWN:
state |= Coder.BIT2;
break;
case ACTIVE:
state |= Coder.BIT3;
break;
default:
throw new IllegalArgumentException();
}
}
return this;
}
COM: <s> set the list of states that the shape is displayed for </s>
|
funcom_train/48614943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteItemAcl(GenericItem item) {
// Delete Item Acl
IrAcl itemAcl = getAcl(item);
if (itemAcl != null) {
securityService.deleteAcl(itemAcl);
}
for (ItemFile itemFile : item.getItemFiles()) {
// Delete Item file Acl
IrAcl fileAcl = securityService.getAcl(itemFile);
if (fileAcl != null) {
securityService.deleteAcl(fileAcl);
}
}
}
COM: <s> delete item acl </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.