__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/35192947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean createStreams() {
boolean haveStreams = true;
try {
reader = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
writer = new ObjectOutputStream(clientSocket.getOutputStream());
} catch (IOException e) {
serverUI.prtMessage("Can't create streams to client!");
log.error("Can't create sterams to client!");
haveStreams = false;
}
return haveStreams;
}
COM: <s> creates input and output streams to the client that has just connected </s>
|
funcom_train/44585261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addToBuildSpec(String builderID) throws CoreException {
IProjectDescription description = this.project.getDescription();
int javaCommandIndex = getJavaCommandIndex(description.getBuildSpec());
if (javaCommandIndex == -1) {
// Add a Java command to the build spec
ICommand command = description.newCommand();
command.setBuilderName(builderID);
setJavaCommand(description, command);
}
}
COM: <s> adds a builder to the build spec for the given project </s>
|
funcom_train/1210310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void deleteRec(File aFile) throws PackagerException {
if (aFile.isDirectory()) {
String[] children = aFile.list();
for (int i = 0; i < children.length; i++)
deleteRec(new File(aFile, children[i]));
}
printDebug("Deleting: " + aFile.getAbsolutePath());
if (!aFile.delete()) {
throw new PackagerException("exception.file.delete",
new String[] { aFile.toString() });
}
}
COM: <s> deletes recursively files and folders </s>
|
funcom_train/36180033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPSS(PSSAdvertisement pssAdvert) {
logger.debug("***PSS DISCOVERY EVENT**** New PSS ("
+ pssAdvert.getPssName() + ") found");
m_currentPSSs.put(pssAdvert.getPeerGroupID(), pssAdvert);
receivedNewPSSAd(pssAdvert);
}
COM: <s> adds a pss advert to the list of know current psss </s>
|
funcom_train/43568523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JButton getBtnContinue() {
JButton btnContinue;
btnContinue = new JButton();
btnContinue.setIcon(new ImageIcon(getClass().getResource("/resource/icon/16/131.png")));
btnContinue.setToolTipText(Constant.messages.getString("brk.toolbar.button.cont"));
btnContinue.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
setContinue(true);
}
});
// Default to disabled
btnContinue.setEnabled(false);
btnContinueList.add(btnContinue);
return btnContinue;
}
COM: <s> this method initializes btn continue </s>
|
funcom_train/21014492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point2D getMiddlePoint() {
Point2D p1 = n1.getPosition();
Point2D p2 = n2.getPosition();
double x1 = p1.getX();
double y1 = p1.getY();
double x2 = p2.getX();
double y2 = p2.getY();
double k1 = this.middlePosition;
double k2 = 1-this.middlePosition;
return new Point2D(x1*k1+x2*k2, y1*k1+y2*k2);
}
COM: <s> computes the position of the middle of the edge depending on the </s>
|
funcom_train/3945931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateMaxtimeallowedType_MaxLength(String maxtimeallowedType, DiagnosticChain diagnostics, Map context) {
int length = maxtimeallowedType.length();
boolean result = length <= 13;
if (!result && diagnostics != null)
reportMaxLengthViolation(AdlcpRootv1p2Package.eINSTANCE.getMaxtimeallowedType(), maxtimeallowedType, length, 13, diagnostics, context);
return result;
}
COM: <s> validates the max length constraint of em maxtimeallowed type em </s>
|
funcom_train/5306123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLabel(String label) {
String existing = this.label;
if (existing != null) {
if (!existing.equals(label)) {
this.label = label;
notifyListeners(new AxisChangeEvent(this));
}
}
else {
if (label != null) {
this.label = label;
notifyListeners(new AxisChangeEvent(this));
}
}
}
COM: <s> sets the label for the axis and sends an </s>
|
funcom_train/24233989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void send(DataPacket p)throws IOException{
synchronized(sendLock){
if(storeStatistics){
dgSendInterval.end();
dgSendTime.begin();
}
endpoint.doSend(p);
if(storeStatistics){
dgSendTime.end();
dgSendInterval.begin();
throughput.end();
throughput.begin();
}
//store data for potential retransmit
int l=p.getLength();
byte[]data=new byte[l];
System.arraycopy(p.getData(), 0, data, 0, l);
sendBuffer.put(p.getPacketSequenceNumber(), data);
unacknowledged.incrementAndGet();
}
statistics.incNumberOfSentDataPackets();
}
COM: <s> sends the given data packet storing the relevant information </s>
|
funcom_train/50169711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSelectedText() {
KeyboardFocusManager currentFocusManager
= KeyboardFocusManager.getCurrentKeyboardFocusManager();
Component focusObject = currentFocusManager.getPermanentFocusOwner();
if ((focusObject == null) ||
(focusObject instanceof JTextComponent == false)) {
return null;
} //end if ()
JTextComponent focusField = (JTextComponent) focusObject;
return (focusField.getSelectedText());
}
COM: <s> returns the selected text in the field that has focus </s>
|
funcom_train/10981700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStrutsExamples() throws Exception {
WebClient webClient = new WebClient();
URL url = new URL("http://localhost:"
+ port + "/struts-examples-" + version);
HtmlPage page = (HtmlPage) webClient.getPage(url);
assertEquals("Struts Examples", page.getTitleText());
}
COM: <s> verify that the struts examples app has started </s>
|
funcom_train/25289712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(NioImageBuffer image) {
if (isLiveOrCompiled()) {
if(!this.getCapability(ALLOW_IMAGE_WRITE)) {
throw new CapabilityNotSetException(
Ding3dI18N.getString("ImageComponent2D1"));
}
}
((ImageComponent2DRetained)this.retained).set(image);
}
COM: <s> sets this image component to the specified nio image buffer </s>
|
funcom_train/5861780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public boolean removeBy(Comparable val, boolean atMostOne) {
final List l = new LinkedList();
boolean found = false;
for (int j = 0; j < _ary.length; ++j)
if ((atMostOne && found) || val.compareTo(_ary[j]) != 0)
l.add(_ary[j]);
else
found = true;
if (found)
_ary = (Object[])l.toArray((Object[])
Array.newInstance(_ary.getClass().getComponentType(), l.size()));
return found;
}
COM: <s> removes the object s that matches the specified condition </s>
|
funcom_train/32751178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void openFile( final File file ) {
try {
URL url = file.toURI().toURL();
openDocument( url );
}
catch( MalformedURLException exception ) {
Logger.getLogger("global").log( Level.WARNING, "Error opening file: " + file, exception );
System.err.println( exception );
displayError( exception );
}
}
COM: <s> support method for opening a new document given a file </s>
|
funcom_train/26530221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EVTask(String rootName) {
this.name = rootName;
this.fullName = "";
planTime = cumPlanValue = actualTime = valueEarned =
topDownPlanTime = bottomUpPlanTime = actualNodeTime = 0;
planDate = dateCompleted = null;
listener = null;
planTimeEditable = dateCompletedEditable = planTimeUndefined = false;
planTimeNull = true;
data = null;
}
COM: <s> creates an evtask suitable for the root of an evtask list </s>
|
funcom_train/31143950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireObjectAddedEvent( Object obj ) {
List listeners = new LinkedList ();
// notify Class based listeners.
listeners.addAll ( getRefreshListenersByClass
( (Class) WrapperFactory.singleton ().wrap (obj.getClass ()) ) );
SortedSet sortedListeners = new TreeSet ();
sortedListeners.addAll ( listeners );
fireObjectAddedEvent ( obj, sortedListeners );
}
COM: <s> notifies all interested listeners that the collection of objects that </s>
|
funcom_train/20307582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void push() {
if (trail.size() > index) {
trail.set(index, environment);
} else {
trail.add(environment);
}
index++;
Node[] newenv = new Node[ environment.length ];
System.arraycopy(environment, 0, newenv, 0, environment.length);
environment = newenv;
}
COM: <s> save the current environment on an internal stack </s>
|
funcom_train/29698517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Mounted getMainWeapon() {
double fBestBV = -1;
Mounted mBest = null;
for (Mounted m : getWeaponList()) {
if (m.isDestroyed()) continue;
double fValue = m.getType().getBV(this);
if (fValue > fBestBV) {
fBestBV = fValue;
mBest = m;
}
}
return mBest;
}
COM: <s> this is only used for the main weapon vehicle critical result </s>
|
funcom_train/39552109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEncryption(byte userPassword[], byte ownerPassword[], int permissions, boolean strength128Bits) throws DocumentException {
if (stamper.isAppend())
throw new DocumentException("Append mode does not support encryption.");
if (stamper.isContentWritten())
throw new DocumentException("Content was already written to the output.");
stamper.setEncryption(userPassword, ownerPassword, permissions, strength128Bits);
}
COM: <s> sets the encryption options for this document </s>
|
funcom_train/46980162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object getStereotype(String name) {
Object mStereotype = ModelFacade.lookupIn(model,name);
if(mStereotype == null || !ModelFacade.isAStereotype(mStereotype)) {
mStereotype = UmlFactory.getFactory().getExtensionMechanisms().buildStereotype(name,model);
}
return mStereotype;
}
COM: <s> get the stereotype with a specific name </s>
|
funcom_train/18209387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputSource resolveEntity(String publicID, String systemID) {
// checks whether public ID matches current DTD identifier
if (publicID
.equals("-//Text Flex//DTD Jar Ajar Extractor, v." + LibJarAjar.JAJ_VER)) {
return new InputSource(
ExternalEntityResolver.class.getResourceAsStream("/docs/jarajar.dtd"));
}
return null;
}
COM: <s> resolves the entity based on the given public and system ids </s>
|
funcom_train/1554443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GeoCasCell lookupCasRowReference(String label) {
if (!label.startsWith(ExpressionNode.CAS_ROW_REFERENCE_PREFIX)) return null;
// $5 for 5th row
int rowRef = -1;
try {
rowRef = Integer.parseInt(label.substring(1));
} catch (Exception e) {
System.err.println("Invalid CAS row reference: " + label);
}
// we start to count at 0 internally but at 1 in the user interface
return getCasCell(rowRef-1);
}
COM: <s> returns geo cas cell referenced by given row label </s>
|
funcom_train/29831900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void installComponent(File jarFile) throws IOException {
File target = new File(componentDirectory + File.separator + jarFile.getName());
System.out.println(target);
InputStream in = new FileInputStream(jarFile);
OutputStream out = new FileOutputStream(target);
byte[] buf = new byte[1024];
int len;
while ((len = in.read(buf)) > 0){
out.write(buf, 0, len);
}
in.close();
out.close();
loadAvailableComponentClasses();
}
COM: <s> installs a component by copying its </s>
|
funcom_train/29784822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HtmlElement getSelect() {
Element parentElement = thisElement;
while(parentElement.getParentNode() != null) {
if(parentElement.getNodeName().equalsIgnoreCase("SELECT")) {
//parentElement is the select we're looking for
return new Select(parentElement, selenium);
}
parentElement = (Element) parentElement.getParentNode();
}
return null;
}
COM: <s> returns the select for this option by climbing upward on the dom </s>
|
funcom_train/46314056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JSONObject getAlbumInfo() throws JSONException, CmsException {
final JSONObject info = new JSONObject();
info.put("album", getXmlContent().getFile().getStructureId().toString());
info.put("locale", getCmsObject().getRequestContext().getLocale());
return info;
}
COM: <s> returns the needed info for communicating back </s>
|
funcom_train/3473259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void record(Recordable[] recordables) {
int[] addedIndices = new int[recordables.length];
for (int i = 0; i < recordables.length; i++) {
list.add(recordables[i]);
addedIndices[i] = size() - 1;
recordables[i].addStructureElementListener(this);
}
fireRecordChange(new RecordChangeEvent(
RecordChangeEvent.RECORDABLES_ADDED, recordables, addedIndices));
}
COM: <s> records all elements contained in the array </s>
|
funcom_train/2885013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillInFromThrowable(Throwable fault) {
assert fault != null;
classname = fault.getClass().getName();
message = fault.getMessage();
localizedMessage = fault.getLocalizedMessage();
stack = fault.getStackTrace();
//maybe recurse down
if (fault.getCause() != null) {
cause = new ThrowableTraceInfo(fault.getCause());
}
}
COM: <s> fill in our state from a fault </s>
|
funcom_train/46062316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StatusDescription transformTo(String longDescKey, String shortDescKey, String[] paramsNew) {
String[] theParams = paramsNew != null ? paramsNew : params;
StatusDescription retVal = new StatusDescription(theLevel, shortDescKey, longDescKey, theParams, transPckg);
retVal.isForUnit = this.isForUnit;
retVal.resolveIssueViewIdentifier = this.resolveIssueViewIdentifier;
return retVal;
}
COM: <s> status description may change their meaning </s>
|
funcom_train/607635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Atr open() throws CardException{
Atr atr = new Atr();
try {
sessionPcsc.connectCard(PCSC.SCARD_SHARE_SHARED);
byte [] atrBytes = sessionPcsc.getCardAtr();
atr.setCardAtr(atrBytes);
} catch (JaccalPCSCException e) {
// TODO Auto-generated catch block
throw new CardException(e);
}
inUse = true;
return atr;
}
COM: <s> initializes the session for update access </s>
|
funcom_train/10509476 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void verifySettings() {
if (targetdir == null) {
setError("The targetdir attribute is required.");
}
if (map == null) {
if (mapperElement == null) {
map = new IdentityMapper();
} else {
map = mapperElement.getImplementation();
if (map == null) {
setError("Could not set <mapper> element.");
}
}
}
}
COM: <s> checks to make sure all settings are kosher </s>
|
funcom_train/19096714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int size() {
if ( baseList == null ) {
return size;
}
Node nextNode;
do {
nextNode = baseList.get( baseIndex++ );
if ( filter.match(nextNode) ) {
add( nextNode );
}
} while ( nextNode != null );
baseList = null;
return size;
}
COM: <s> returns the number of elements in this list </s>
|
funcom_train/16770668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long create_visual_sample_entry_atom(MP4DataStream bitstream) throws IOException {
log.trace("Visual entry atom contains wxh");
bitstream.skipBytes(24);
width = (int) bitstream.readBytes(2);
log.trace("Width: {}", width);
height = (int) bitstream.readBytes(2);
log.trace("Height: {}", height);
bitstream.skipBytes(50);
readed += 78;
MP4Atom child = MP4Atom.createAtom(bitstream);
this.children.add(child);
readed += child.getSize();
return readed;
}
COM: <s> loads mp4 visual sample entry atom atom from the input bitstream </s>
|
funcom_train/43496063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initialize() {
Iterator<FieldEditor> i = fieldEditors.iterator();
while (i.hasNext()) {
FieldEditor pe = i.next();
pe.setPage(this);
pe.setPropertyChangeListener(this);
pe.setPreferenceStore(getPreferenceStore());
pe.load();
}
}
COM: <s> initializes all field editors </s>
|
funcom_train/1416466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void ensureCapacity (int index) {
if (lineInfo == null)
lineInfo = new LineInfo[index + 1];
else
if (lineInfo.length <= index) {
LineInfo[] lineInfoN = new LineInfo[(index + 1) * 2];
System.arraycopy (lineInfo, 0, lineInfoN, 0,
lineInfo.length);
lineInfo = lineInfoN;
}
}
COM: <s> ensures that the code line info code array can contain the </s>
|
funcom_train/2675174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateHandshakeReply(ByteBuffer data, int start, int length) {
if (handshake == null || length != handshake.length) {
return false;
}
byte[] reply = new byte [length];
int old = data.position();
data.position(start);
data.get(reply);
data.position(old);
return Arrays.equals(reply, handshake);
}
COM: <s> check if the handshake reply received from a client contains valid data </s>
|
funcom_train/16768874 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addMapping(String hostName, String contextPath, String globalName) {
log.info("Add mapping global: {} host: {} context: {}", new Object[] { globalName, hostName, contextPath });
final String key = getKey(hostName, contextPath);
log.debug("Add mapping: {} => {}", key, globalName);
return (mapping.putIfAbsent(key, globalName) == null);
}
COM: <s> map key host context path and global scope name </s>
|
funcom_train/5263197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getAddRemovePanel() {
if (addRemovePanel == null) {
addRemovePanel = new JPanel();
addRemovePanel.setLayout(new GridBagLayout());
addRemovePanel.add(getAddButton(), new GridBagConstraints());
addRemovePanel.add(getRemoveButton(), new GridBagConstraints());
}
return addRemovePanel;
}
COM: <s> this method initializes add remove panel </s>
|
funcom_train/48562259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fetchQuestionAnswer(Long interviewId) {
LoadingIndicator.loadingStarted("Trwa wczytywanie");
rpcService.getQuestionAnswer(interviewId, new AsyncCallback<List<QuestionAnswerDetails>>() {
public void onFailure(Throwable caught) {
LoadingIndicator.loadingFinished();
}
public void onSuccess(List<QuestionAnswerDetails> result) {
display.setData(result);
LoadingIndicator.loadingFinished();
}
});
}
COM: <s> load question answer from database and add them to flex table </s>
|
funcom_train/7972069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void challenge() throws IncorrectTypeException {
_challengeEvent.notifyObservers();
if (!_layout.getProperties().contains(Properties.RESPONSE_PAGE))
throw new BallotBoxViewException(
"Response Page does not exist", null);
drawPage(_layout.getProperties().getInteger(
Properties.RESPONSE_PAGE));
}
COM: <s> this method is called when the voter indicates he would like to challenge </s>
|
funcom_train/6203494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean uninstallDictionary(String lang) {
if (lang == null || lang.equals(""))
return false;
String base = getDirectory() + File.separator + lang;
File affFile = new File(base + OConsts.SC_AFFIX_EXTENSION);
if (!affFile.delete())
return false;
File dicFile = new File(base + OConsts.SC_DICTIONARY_EXTENSION);
if (!dicFile.delete())
return false;
return true;
}
COM: <s> uninstall delete a given dictionary from the dictionary directory </s>
|
funcom_train/24537296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void invalidateImage() {
synchronized (imageAccessorSemaphore) {
if (fImageDataCollector != null) {
if (fImageValid == INVALID_COLLECTING && fImageDataCollector.isCollectingData())
fImageDataCollector.abort(); // We're currently do a valid collection, so abort it.
fImageValid = INVALID; // Mark it as invalid.
}
}
}
COM: <s> invalidate the image </s>
|
funcom_train/29950754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Control nextControl() {
if ( m_controls.size() == 0 ) {
return null;
} else {
if ( m_currentControlIndex < m_controls.size() - 1 ) {
m_currentControlIndex++;
} else {
m_currentControlIndex = 0;
}
return currentControl();
}
}
COM: <s> return next control of group </s>
|
funcom_train/544725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHistoryLength(int length) {
synchronized (this) {
TrendData[] newData = new TrendData[length];
int i;
for (i = 0; i < historyLength && i < length; i++)
newData[i] = data[i];
for (; i < length; i++) {
newData[i] = null;
}
data = newData;
historyLength = length;
}
}
COM: <s> sets the horizontal axis length in pixel </s>
|
funcom_train/4509825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LockOutFlag getDisabledStatus(String username) {
try {
// Retrieve the disabled status, translate it into a LockOutFlag, and return it.
return checkUserDisabled(getUserByUsername(username));
}
catch (UserNotFoundException e) {
// Not a valid user? We will leave it up to the user provider to handle rejecting this user.
Log.warn(e);
return null;
}
}
COM: <s> the clearspace lock out provider will retrieve lockout information from clearspaces user properties </s>
|
funcom_train/22018345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeDialog() throws IOException, JspException {
if (isForwarded()) {
return;
}
switch (getAction()) {
case ACTION_CANCEL:
case ACTION_OK:
break;
case ACTION_DEFAULT:
default:
// ACTION: show dialog (default)
setParamAction(DIALOG_OK);
JspWriter out = getJsp().getJspContext().getOut();
out.print(defaultActionHtml());
}
}
COM: <s> writes the dialog html code only if the code </s>
|
funcom_train/2891237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addElement(Object object) {
if (object instanceof Point) {
super.addElement(object);
Point point = (Point) object;
min_x = Math.min(min_x, point.x);
min_y = Math.min(min_y, point.y);
max_x = Math.max(max_x, point.x);
max_y = Math.max(max_y, point.y);
} else {
if (Debug.mode) {
Debug.stream.println("Object is not instance of Point");
}
}
}
COM: <s> adds an point </s>
|
funcom_train/39893669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addToken(Object tokenId) {
Set<Object> set = (Set<Object>) getValue();
if (set == null) {
set = new LinkedHashSet<Object>();
}
if (set.contains(tokenId)) {
return;
}
HashSet<Object> newSet = new LinkedHashSet<Object>(set);
newSet.add(tokenId);
setValue(newSet);
}
COM: <s> adds a token if that token does not already exist </s>
|
funcom_train/31466677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JPanel createButtonsPanel() {
JPanel p = new JPanel(new FlowLayout());
p.add(okButton = buttonFactory.createJButton("OKButton"));
p.add(buttonFactory.createJButton("CancelButton"));
p.add(clearButton = buttonFactory.createJButton("ClearButton"));
okButton.setEnabled(false);
clearButton.setEnabled(false);
return p;
}
COM: <s> creates the buttons panel </s>
|
funcom_train/36761649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createTransactionsTable() {
try {
Statement stmt = this.conn.createStatement();
stmt.executeUpdate("CREATE TABLE transactions "
+ "(id BIGINT GENERATED ALWAYS AS IDENTITY, "
+ "owner INT, amount DOUBLE, source BIGINT, sourceType VARCHAR(20), target BIGINT, targetType VARCHAR(20), comment VARCHAR(255), time BIGINT)");
conn.commit();
System.out.println("Created table transactions");
} catch (SQLException sqle) {
System.err.println("Creation of transactions table FAILED");
System.err.println(sqle);
}
}
COM: <s> creates the transactions table </s>
|
funcom_train/16520295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getFinalTime() {
long finaltime = VertexTiming.UNAVAILABLE;
for (ComponentInstance o : orderManager.getArchitectureComponents()) {
long nextFinalTime = getFinalTime(o);
// Returns TimingVertexProperty.UNAVAILABLE if at least one
// vertex has no final time. Otherwise returns the highest final
// time
if (nextFinalTime == VertexTiming.UNAVAILABLE) {
return VertexTiming.UNAVAILABLE;
} else
finaltime = Math.max(finaltime, nextFinalTime);
}
return finaltime;
}
COM: <s> gives the total implementation time if possible </s>
|
funcom_train/25967828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean toFile(String filename) {
String toWrite = this.toString();
try {
BufferedWriter out = new BufferedWriter(new FileWriter(filename));
out.write (toWrite);
out.newLine();
out.flush();
out.close();
}
catch (IOException e) {
return false;
}
return true;
}
COM: <s> write the contents of this meta data object to file </s>
|
funcom_train/3173539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PropertyBean getFocus() {
Component focus = FocusManager.getCurrentManager().getFocusOwner();
while (focus!=null&&!(focus instanceof PropertyBean))
focus = focus.getParent();
if (focus==null)
return null;
return SwingUtilities.isDescendingFrom(focus, this) ? (PropertyBean)focus : null;
}
COM: <s> find currently focussed property bean </s>
|
funcom_train/28753394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCdnartstandardvolume(Long newVal) {
if ((newVal != null && this.cdnartstandardvolume != null && (newVal.compareTo(this.cdnartstandardvolume) == 0)) ||
(newVal == null && this.cdnartstandardvolume == null && cdnartstandardvolume_is_initialized)) {
return;
}
this.cdnartstandardvolume = newVal;
cdnartstandardvolume_is_modified = true;
cdnartstandardvolume_is_initialized = true;
}
COM: <s> setter method for cdnartstandardvolume </s>
|
funcom_train/43915859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeTo(OutputStream out) throws IOException, ServiceException {
//GR: shall we add a palette parameter to GetLegendGraphic too?
final BufferedImage legendGraphic = getLegendGraphic();
RenderedImage forcedIndexed8Bitmask = ImageUtils.forceIndexed8Bitmask(legendGraphic, null);
ImageWorker imageWorker = new ImageWorker(forcedIndexed8Bitmask);
imageWorker.writeGIF(out, "LZW", 0.75f);
}
COM: <s> encodes on the fly the image generated on </s>
|
funcom_train/45543569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void buildpathChanged(BuildpathDelta delta) {
fClassPathList.setElements(Arrays.asList(delta.getNewEntries()));
try {
fOutputLocationField.setText(fJavaProject.getOutputLocation().makeRelative().toString());
} catch (JSCModelException e) {
JSCPlugin.log(e);
}
}
COM: <s> update code f class path list code </s>
|
funcom_train/3445962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean compareValues(Column c) {
for (int i = 0; i < size(); i++) {
if (isValueUndefined(i)) {
if (!c.isValueUndefined(i)) {
return false;
}
}
else {
if (!equalObj(getValueAt(i), c.getValueAt(i))) {
return false;
}
}
}
return true;
}
COM: <s> compare the values of this column and the specified column </s>
|
funcom_train/8231811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand3() {
if (okCommand3 == null) {//GEN-END:|61-getter|0|61-preInit
// write pre-init user code here
okCommand3 = new Command("Busqueda Avanzada", Command.OK, 0);//GEN-LINE:|61-getter|1|61-postInit
// write post-init user code here
}//GEN-BEGIN:|61-getter|2|
return okCommand3;
}
COM: <s> returns an initiliazed instance of ok command3 component </s>
|
funcom_train/45114575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String regEnumVal(String keyName, int instance) throws Exception {
Map<?, ?> result = runRemoteScript(commandCreate("RegEnumVal", false, quote(keyName), instance));
if (result.get(STDERR) != null) {
if (!result.get(STDERR).toString().isEmpty()) {
throw new Exception(result.get(STDERR).toString());
}
}
return result.get(STDOUT).toString();
}
COM: <s> reads the name of a value according to its instance </s>
|
funcom_train/42702370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ImageMetadata read(String fileName) {
this.fileName = fileName;
try {
FileInputStream fis;
fis = new FileInputStream(fileName);
ImageMetadata result = read(fis, fileName);
fis.close();
return result;
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
COM: <s> reads mini7 image metadata from the file denoted by the file name </s>
|
funcom_train/4631990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StockItemTO getData(){
StockItemTO stockItemTO = new StockItemTO(getDate(), getOrderId(),getItemEntity().getData(),getQuantity());
stockItemTO.setId(getId());
return stockItemTO;
}
COM: <s> returns a stock item to transfer object </s>
|
funcom_train/17438206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doExecute(HttpMethod httpMethod, ResponseReader responseReader) {
HttpClient client = new HttpClient();
try {
client.executeMethod(httpMethod);
responseReader.read(httpMethod);
} catch (Exception e) {
throw new RuntimeException(e);
} finally {
if(httpMethod != null) httpMethod.releaseConnection();
}
}
COM: <s> executing http method </s>
|
funcom_train/13595437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private HttpURLConnection initConnection() throws MalformedURLException, IOException, ProtocolException {
if (log.isDebugEnabled()) {
log.debug("Initialize the HttpURLConnection Object");
}
URL url = new URL(endPoint);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setDoInput(true);
connection.setDoOutput(true);
connection.setAllowUserInteraction(true);
connection.setDefaultUseCaches(false);
return connection;
}
COM: <s> initialize a connection </s>
|
funcom_train/35714795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getInclusiveTopIndexStartOffset() {
StyledText textWidget= fTextViewer.getTextWidget();
if (textWidget != null && !textWidget.isDisposed()) {
int top= JFaceTextUtil.getPartialTopIndex(fTextViewer);
try {
IDocument document= fTextViewer.getDocument();
return document.getLineOffset(top);
} catch (BadLocationException x) {
}
}
return -1;
}
COM: <s> returns the document offset of the upper left corner of the </s>
|
funcom_train/9101249 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Object o1, Object o2) {
if (null != o1 && null != o2 && o1 instanceof SearchResult && o2 instanceof SearchResult) {
return ((SearchResult) o1).getCollectionName().compareToIgnoreCase(((SearchResult) o2).getCollectionName());
} else {
return -1;
}
} // compare
COM: <s> compares colelction names for sorting alphabetically </s>
|
funcom_train/12294079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetLongValue() {
System.out.println("getLongValue");
long expResult = 1L;
long result = d.getLongValue();
assertEquals(expResult, result);
DWordData instance = new DWordData(-1);
assertEquals(instance.getLongValue(), 4294967295L);
}
COM: <s> test of get long value method of class dword data </s>
|
funcom_train/33972077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor fetchAllFeeds() {
return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_TITLE,
KEY_URI, KEY_TYPE, KEY_EXTRA}, null, null, null, null, null);
}
COM: <s> return a cursor over the list of all notes in the database </s>
|
funcom_train/18747015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ProductState addState(ProductState newState) {
// see if isomorphic graph is already in the GTS
ProductState result = this.stateSet.put(newState);
// new states are first considered open
if (result == null) {
// openStates.put(newState);
fireAddState(newState);
}
return result;
}
COM: <s> adds a product state to the gts </s>
|
funcom_train/18728631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRescaleObject() {
testGroup.scale(new Point(0, 0), 2.f, 2.f);
final Rectangle testBounds = testGroup.getBounds();
//assertEquals(new Rectangle(58, 53, 1436, 1119), testBounds); // FIXME: was: x=57,y=53,width=1437,height=1119
}
COM: <s> test of scale method of class net </s>
|
funcom_train/36134870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(OvalDefinitionsDocument doc, final String id) {
final XmlObject[] result = doc.getOvalDefinitions().selectPath("count(//./*[@id = '" + id + "'])");
final int count = Integer.parseInt(result[0].getDomNode().getFirstChild().getNodeValue());
return count > 0;
}
COM: <s> returns true if the main document contains the specified id </s>
|
funcom_train/19035853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateFolders(PostFolderCollection folders) {
if(isConnected()) {
try {
synchronized(this) {
this.getOutputStream().writeInt(ServerMessageCode.UPDATEFOLDERS.getIndex());
folders.sendData(this.getOutputStream());
this.getOutputStream().flush();
}
} catch (IOException e) {
this.messageFailed(e);
}
}
}
COM: <s> updates information about the folders </s>
|
funcom_train/10533530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getService(BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector) {
if (InvocationInterceptor.class.equals(serviceClass)) {
return new InvocationInterceptor();
}
else if (EventInterceptor.class.equals(serviceClass)) {
return new EventInterceptor();
}
else if (SampleInterceptor.class.equals(serviceClass)) {
return new SampleInterceptor();
}
return null;
}
COM: <s> return the requested service if the service is of unknown type return null </s>
|
funcom_train/22438032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed( ActionEvent e ) {
// Perform superclass action first
super.actionPerformed( e );
// If either New or Edit button was selected, tell the dialog about it.
if( e.getSource() == this.editbutton || e.getSource() == this.newbutton ) {
this.dialog.edit();
}
}
COM: <s> called when either new delete or edit jbuttons are selected </s>
|
funcom_train/20931543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCard(Bid b, Card c, Hand h) throws ImpossibleActionException {
cat.debug("> addCard(): b="+b+" c="+c+" h="+h);
checkCard(b,c,h); // throws ImpossibleActionException
cards.add(c);
h.playCard(c); // throws Impossible Action Exception
cat.debug("< addCard()");
}
COM: <s> this checks that the card can be played </s>
|
funcom_train/28754563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOd260280ratioclient(Long newVal) {
if ((newVal != null && this.od260280ratioclient != null && (newVal.compareTo(this.od260280ratioclient) == 0)) ||
(newVal == null && this.od260280ratioclient == null && od260280ratioclient_is_initialized)) {
return;
}
this.od260280ratioclient = newVal;
od260280ratioclient_is_modified = true;
od260280ratioclient_is_initialized = true;
}
COM: <s> setter method for od260280ratioclient </s>
|
funcom_train/25222366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVmh_ndt(int vmh_ndt) {
int oldVmh_ndt = this.vmh_ndt;
if ( oldVmh_ndt != vmh_ndt ) {
this.vmh_ndt = vmh_ndt;
firePropertyChange(PROP_VMH_NDT, oldVmh_ndt, this.vmh_ndt);
setRunPrepared(false);
}
}
COM: <s> set the value of vmh ndt </s>
|
funcom_train/42916852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getPlayCommand() {
if (playCommand == null) {//GEN-END:|28-getter|0|28-preInit
// write pre-init user code here
playCommand = new Command("Jouer", Command.OK, 0);//GEN-LINE:|28-getter|1|28-postInit
//write the post-init user code here
}//GEN-BEGIN:|28-getter|2|
return playCommand;
}
COM: <s> returns an initiliazed instance of play command component </s>
|
funcom_train/50393353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected InputStream getConfig1(){
EngineConfigurationDocument config=EngineConfigurationDocument.Factory.newInstance();
config.addNewEngineConfiguration();
config.getEngineConfiguration().addNewProperties();
setCore(config.getEngineConfiguration());
addProcessing(config.getEngineConfiguration());
addProperties(config.getEngineConfiguration().getProperties());
addProperty(ConfigurationSource.DB_CLUSTER_CONFIG, "src/test/resources/cluster/cluster1.xml",
config.getEngineConfiguration().getProperties());
return config.newInputStream();
}
COM: <s> provide configuration for the xnjs 1 instance </s>
|
funcom_train/42452115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void blame(final Map<IVersionNode, List<IDifference>> diffs) {
final List<IVersionNode>[] rawIds = new List[diffs.size()];
final IVersionNode[] vs = new IVersionNode[diffs.size()];
calculateRawOrigins(diffs, vs, rawIds);
mergeRaws(rawIds);
blamed = true;
}
COM: <s> performs the blame algorithm by searching the origin of the lines </s>
|
funcom_train/18632586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Transfer deleteTransfer(){
int index = dataTable.getSelectionModel().getAnchorSelectionIndex();
Transfer toDelete = (Transfer)transferList.get(index);
if(toDelete != null){
transferList.remove(index);
fireTableDataChanged();
System.out.println("DELETED TRANSFER DELETED TRANSFER DELETED TRANSFER");
return toDelete;
}else return null;
}
COM: <s> this method deletes the transfer at the currently selected index </s>
|
funcom_train/47135575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCriteriaIdentifierPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ExitCriteria_criteriaIdentifier_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ExitCriteria_criteriaIdentifier_feature", "_UI_ExitCriteria_type"),
TradingPackage.Literals.EXIT_CRITERIA__CRITERIA_IDENTIFIER,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the criteria identifier feature </s>
|
funcom_train/51378385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void destroy() {
try {
if (!providerAlreadyInstalled) {
Security.removeProvider(theProvider.getName());
}
keyMap.clear();
ivMap.clear();
modeMap.clear();
keyMap = null;
ivMap = null;
modeMap = null;
} catch (SecurityException e) {
e.printStackTrace();
System.err.println(e.getMessage());
}
}
COM: <s> unregisters the cryptographic handler </s>
|
funcom_train/50207735 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void digest(FlowModelBind flowModelBind) {
digestStartFlowlets(flowModelBind);
digestJavaTaskFlowlets(flowModelBind);
digestScriptTaskFlowlets(flowModelBind);
digestDecisionFlowlets(flowModelBind);
digestJoinFlowlets(flowModelBind);
digestCallFlowlets(flowModelBind);
digestJumpFlowlets(flowModelBind);
digestTemplateFlowlets(flowModelBind);
digestEndFlowlets(flowModelBind);
digestTransitions(flowModelBind);
digestBooleanTransitions(flowModelBind);
}
COM: <s> digests all child elements of the root element </s>
|
funcom_train/44432417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ChannelGuideEntry lookupFeedStats(FeedStats fs) {
IterateAllCGEs iter = new IterateAllCGEs();
while (iter.hasNext()) {
ChannelGuideEntry cgeTemp;
FeedStats tempStats;
cgeTemp = iter.next();
tempStats = cgeTemp.getStats();
if (tempStats == fs)
return cgeTemp;
}
return null;
}
COM: <s> lookup feed stats given a feed stats object locate the corresponding </s>
|
funcom_train/5855196 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refreshData() {
try {
if (dataSource!=null) {
if (dataSource.getActive()) {
if (useFieldName) {
setText( dataSource.actualQuery.getColumn(dbFieldname) );
}
else {
setText( dataSource.actualQuery.getColumn(dbFieldNr) );
}
}
else {
setText("");
}
}
}
catch(SQLException e) {
setText( e.getMessage() );
}
oldText = getText();
}
COM: <s> refresh data method comment </s>
|
funcom_train/33264209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBounds(int x, int y, int width, int height, boolean invalidateParent) {
if (width != this.width || height != this.height) {
picture = null;
}
super.setBounds(x,y,width,height,invalidateParent);
}
COM: <s> set bounds reshapes the component to the specified bounding box </s>
|
funcom_train/5793454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFailFast(boolean failFast) throws AssertionFailedError {
if (m_failFast == false && failFast == true
&& m_unanticipated.size() > 0) {
fail("failFast is being changed from false to true and unanticipated "
+ "exceptions have been received:\n" + listUnanticipated());
}
m_failFast = failFast;
}
COM: <s> set the fail fast value for this anticipator </s>
|
funcom_train/16830258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFromString(String wordTagString) {
int where = wordTagString.lastIndexOf(divider);
if (where >= 0) {
setWord(wordTagString.substring(0, where).intern());
setTag(wordTagString.substring(where + 1).intern());
} else {
setWord(wordTagString.intern());
setTag(null);
}
}
COM: <s> sets a word tag from decoding </s>
|
funcom_train/4979508 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(NodePosition npos) {
if (!parentNodeId.equals(npos.parentNodeId))
return false;
else {
if (npos.fixNodeId == null) {
if (fixNodeId == null)
return true;
else
return false;
} else if (npos.fixNodeId.equals(fixNodeId)) {
return npos.relativeInsertPosition == relativeInsertPosition;
} else {
return false;
}
}
}
COM: <s> compares two node positions in order to check if they are identical </s>
|
funcom_train/28702629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private LearnerSco getFromCourseEnrollment(String identifier) {
for (Iterator iter = userEnrollment.getLearnerScos().iterator(); iter
.hasNext();) {
LearnerSco item = (LearnerSco) iter.next();
if (identifier.equals(item.getCourseItem().getIdentifier())) {
return item;
}
}
throw new PlayerException(
"Found SCO '"
+ identifier
+ "' that doesn't have a correspondent into the set of database SCOItems for course '"
+ course.getName() + "'");
}
COM: <s> this gets an identifier from the xml manifest and iterates through the </s>
|
funcom_train/5409230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void schedule(Object taskId, Callable<V> task, boolean recurs, long intervalMillis, long delayMillis) {
TaskRunner<V> runner = new TaskRunner<V>(taskId, task, recurs, intervalMillis);
runner.mSchedule = mThreadPool.schedule(runner, delayMillis, TimeUnit.MILLISECONDS);
mRunnerMap.put(taskId, runner);
}
COM: <s> schedules a task </s>
|
funcom_train/16903211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DeepState peek(String keyAtDepth) {
String[] ar = keyAtDepth.split("@");
String key = ar[0];
int depth = Integer.parseInt(ar[1]);
return DeepState.lookBehind(new ViewDepth(new ViewDepthElem(depth, key)), next).get(0);
}
COM: <s> call when debugging find next cmd </s>
|
funcom_train/45026313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startMethodTest(IDDTTestCase test, String methodName) {
final int count = 1;
synchronized (this) {
fRunMethodTests += count;
}
for (Iterator e = cloneListeners().listIterator(); e.hasNext();) {
TestListener listener = (TestListener) e.next();
if (DDTTestListener.class.isInstance(listener)) {
((DDTTestListener) listener).startMethodTest(test, methodName);
}
}
}
COM: <s> notify about start of method test </s>
|
funcom_train/18593915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void install() {
ClassLoader loader = getContextClassLoader();
// Everything else loaded on the same thread as this
// launch should be loaded by this custom loader.
if (loader instanceof AppClassLoader
&& !((AppClassLoader)loader).isInstalled()) {
((AppClassLoader)loader).install();
}
}
COM: <s> install the class loader context for the code being launched </s>
|
funcom_train/27747005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTopLeft(Control c) {
checkWidget();
if (c != null && c.getParent() != this) {
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
if (this.topLeft != null && !this.topLeft.isDisposed()) {
this.topLeft.setBounds(OFFSCREEN, OFFSCREEN, 0, 0);
}
this.topLeft = c;
layout();
}
COM: <s> set the control that appears in the top left corner of the pane </s>
|
funcom_train/20987888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createContents() {
shell = new Shell();
shell.setSize(500, 375);
shell.setText("SWT Application");
final Button showDialogButton = new Button(shell, SWT.NONE);
showDialogButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(final SelectionEvent e) {
ProjectSourceFolderSelectionDialog dialog=new ProjectSourceFolderSelectionDialog(new Shell());
dialog.open();
}
});
showDialogButton.setText("Show Dialog");
showDialogButton.setBounds(96, 108, 44, 23);
//
}
COM: <s> create contents of the window </s>
|
funcom_train/49262873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void append(final ViewPart view, final ViewLocation location) {
PartTabFolder tabFolder = retrieveTabFolder(centerPlace, true, view, location);
boolean permanent = WorkbenchData.getInstance().isPermanent(view);
Composite container = tabFolder.add(view, !permanent);
view.setComposite(container);
getShell().layout(true, true);
}
COM: <s> appends a child view locating it and creating its content </s>
|
funcom_train/38817520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addButton(StationInfo si) {
if (si != null) {
if (!model_.hasURL(si.url)) {
model_.addButton(si);
} else {
StationInfo si2 = model_.getStationInfo(si.url);
showWarning(locale.getString(Constants.STR_Station_in_playlist)
+ si2.name, currDisplayable_);
}
}
}
COM: <s> insert new station information into nine buttons playlist </s>
|
funcom_train/20269683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void traverse(Node root) {
try {
inputId = NodeUtil.getInputId(root);
sourceName = "";
curNode = root;
pushScope(root);
traverseBranch(root, null);
popScope();
} catch (Exception unexpectedException) {
throwUnexpectedException(unexpectedException);
}
}
COM: <s> traverses a parse tree recursively </s>
|
funcom_train/1200707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initDecorations() {
for (int x = 0; x < 7; x++) {
days[x].setContentAreaFilled(decorationBackgroundVisible);
days[x].setBorderPainted(decorationBordersVisible);
weeks[x].setContentAreaFilled(decorationBackgroundVisible);
weeks[x].setBorderPainted(decorationBordersVisible);
}
}
COM: <s> initializes both day names and weeks of the year </s>
|
funcom_train/10190176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNum()
{ String address=(new Parser(m_strValue)).skipString().skipString().getString();
int i=address.indexOf("/");
if (i<0) return 0;
int j=address.indexOf("/",i);
if (j<0) return 0;
return Integer.parseInt(address.substring(j));
}
COM: <s> gets the number of addresses </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.