__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/7524395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean canRelease(LockDecree decree) {
// clean expired locks
removeExpired(decree);
// we need to check only hold locks, because
// prepared locks cannot contain the lock
LockDecree lock = (LockDecree)heldLocks.get(decree.getKey());
return lock == null || lock.requester.equals(decree.requester);
}
COM: <s> returns code true code if the requested lock can be released by the </s>
|
funcom_train/40526333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private AnnotationHandler procedure(final AnnotationHandler... handlers) {
return new AnnotationHandler() {
public Expression handle(Annotation a, MessageQueue mq) {
Expression e = null;
for (AnnotationHandler handler : handlers) {
e = handler.handle(a, mq);
if (e == null) { return null; }
}
return e;
}
};
}
COM: <s> applies handlers to the same annotation in series failing if any fail </s>
|
funcom_train/43890007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean readLine() {
String buffer = "";
do {
try {
buffer = reader.readLine();
if (buffer == null) {
return readLine(""); //EOF
}
} catch (IOException e) {
return readLine("");
}
lineNumber++;
buffer = buffer.trim();
} while (buffer.length() == 0);
return readLine(buffer);
}
COM: <s> stores the next non null line from file buffer in the line buffer </s>
|
funcom_train/31871658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public class FrameWOAF extends FrameW {
public String getLongName () { return "Official URL frame"; }
public FrameWOAF (ID3V2Frame frm) {
super (frm);
}
public FrameWOAF (ID3V2Frame frm, DataSource ds)
throws SeekPastEndException {
super (frm, ds);
}
public String toString () {
return getLongName () + "\nURL : "
+ url;
}
}
COM: <s> oficial audio url frame </s>
|
funcom_train/514035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object newInstance(Class pvClass) {
interceptorHandler.fireBeforeNewInstance(pvClass);
Object lvProxyObject = null;
try {
lvProxyObject = proxy.newInstance(pvClass);
} catch (Exception e) {
interceptorHandler.fireOnError(e);
throw new InvocationException("Error in ProxyDecorator.newInstance with proxy: " + proxy
+ " (" + pvClass + ") " + e, e);
}
finally {
interceptorHandler.fireAfterNewInstance(pvClass, lvProxyObject);
}
return lvProxyObject;
}
COM: <s> intercept the method and delegate method to proxy </s>
|
funcom_train/43878663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void slideKnob1(Event event, boolean update) {
int x = DOM.eventGetClientX(event);
if (x > 0) {
int lineWidth = _knobsLine.getOffsetWidth();
int lineLeft = _knobsLine.getAbsoluteLeft();
double percent = (double)(x - lineLeft) / lineWidth * 1.0;
setCurrent1Value(Math.min(getCurrent2Value() - _stepSize, getTotalRange() * percent + _minValue), update);
}
}
COM: <s> slide the knob to a new location </s>
|
funcom_train/3473379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFilename(String filename) {
if (filename == null || filename == "") {
this.filename = getLanguage()
.getString("Recordables.MediaClipRecordable.DefaultFilename");
} else {
this.filename = filename;
this.setFile(new File(filename));
}
fireValuesChanged();
}
COM: <s> sets the name of the file this recordable represents </s>
|
funcom_train/5865056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getEncodedHoverURL() {
if (_hoverimg != null)
return Utils.getDynamicMediaURI(
this, _hoverimgver,
"h/" + _hoverimg.getName(), _hoverimg.getFormat());
final Desktop dt = getDesktop(); //it might not belong to any desktop
return dt != null && _hoversrc != null ?
dt.getExecution().encodeURL(_hoversrc): null;
}
COM: <s> returns the encoded url for the hover image or null if not </s>
|
funcom_train/39973265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CAMatrix setStateAt(int x, int y, int state) {
int idx = x + y * width;
if (idx >= 0 && idx < matrix.length) {
swap[idx] = matrix[idx] = state;
} else {
throw new ArrayIndexOutOfBoundsException("given coordinates: " + x
+ ";" + y + " are out of bounds");
}
return this;
}
COM: <s> sets the cell state at x y </s>
|
funcom_train/28343901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setChannelSource(String src) {
paramSrc = src;
if (src == Scenario.SYNC_MODE_DESIGN) {
scenario.setSynchronizationMode(Scenario.SYNC_MODE_DESIGN);
return true;
} else if (src == Scenario.SYNC_MODE_LIVE) {
scenario.setSynchronizationMode(Scenario.SYNC_MODE_LIVE);
return true;
} else if (src == Scenario.SYNC_MODE_RF_DESIGN) {
scenario.setSynchronizationMode(Scenario.SYNC_MODE_RF_DESIGN);
return true;
} else if (src == Scenario.SYNC_MODE_MONITOR_ONLINE) {
scenario.setSynchronizationMode(Scenario.SYNC_MODE_MONITOR_ONLINE);
return true;
}
return false;
}
COM: <s> setter for the data source flag </s>
|
funcom_train/29864594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getXML() {
return "<ClientRequest ClientID=\"" + clientID +
"\" Name=\"" + xmlEscape(name) +
"\" Type=\"" + xmlEscape(type) +
"\" Location=\"" + xmlEscape(location) +
"\" Owner=\"" + xmlEscape(owner) +
"\" Description=\"" + xmlEscape(description) + "\" />";
}
COM: <s> gets a xml string representation of the request </s>
|
funcom_train/11041141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUnqualified() {
Greeter proxy = getProxy("testUnqualified");
String request = "hello world";
String response = proxy.testUnqualified(request);
assertTrue("hello world".equals(response));
// Try the call again
response = proxy.testUnqualified(request);
assertTrue("hello world".equals(response));
}
COM: <s> test simple unqualified method </s>
|
funcom_train/31101657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void invalidSurrogate(int uuuuu) throws UTFDataFormatException {
StringBuffer str = new StringBuffer();
str.append("high surrogate bits in UTF-8 sequence must not exceed 0x10 but found 0x");
str.append(Integer.toHexString(uuuuu));
String message = str.toString();
throw new UTFDataFormatException(message);
} // invalidSurrogate(int)
COM: <s> throws an exception for invalid surrogate bits </s>
|
funcom_train/33606707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPlus_R2() {
System.out.println("plus");
R2 b = null;
R2 instance = new R2();
R2 expResult = null;
R2 result = instance.plus(b);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of plus method of class r2 </s>
|
funcom_train/17624330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveToStream(OutputStream out) throws IOException {
out.write(level);
for (int i = 0; i < maxX; i++) {
for (int j = 0; j < maxY; j++) {
out.write(bricks[i][j].getColor().getIndex());
}
}
}
COM: <s> method stores collection state to stream </s>
|
funcom_train/12294085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEquals() {
System.out.println("equals");
DWordData instance = new DWordData();
boolean expResult = false;
boolean result = instance.equals(d);
assertEquals(expResult, result);
expResult = true;
instance.setValue(1);
result = instance.equals(d);
assertEquals(expResult, result);
}
COM: <s> test of equals method of class dword data </s>
|
funcom_train/37829704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void reportProblems(Player admin) {
String message;
if (problems.isEmpty()) {
message = "No problematic corpses found!";
} else {
StringBuilder builder = new StringBuilder("Problems:");
for (Entry<String, List<String>> entry : problems.entrySet()) {
builder.append("\n");
builder.append(entry.getKey());
builder.append(":\n");
for (String problem : entry.getValue()) {
builder.append(problem);
builder.append("\n");
}
}
message = builder.toString();
}
admin.sendPrivateText(message);
}
COM: <s> send a problem report to the admin </s>
|
funcom_train/20045332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _gotoPreviousParagraph(){
//requiredMethod( "gotoNextParagraph()" );
oObj.gotoNextParagraph(false);
log.println( "test for gotoPreviousParagraph()" );
tRes.tested("gotoPreviousParagraph()", oObj.gotoPreviousParagraph(false) );
}
COM: <s> first moves the cursor to the next paragraph to be sure </s>
|
funcom_train/4615650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopAllBrowsers() {
synchronized(launchers) {
for (Iterator<Map.Entry<String, BrowserLauncher>> iterator = launchers.entrySet().iterator(); iterator.hasNext();)
{
Map.Entry<String, BrowserLauncher> entry = iterator.next();
entry.getValue().close();
iterator.remove();
}
}
}
COM: <s> kills all running browsers </s>
|
funcom_train/8436973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetPreparedQueryHits() {
System.out.println("getPreparedQueryHits");
Object query = instance.prepareQueryPattern(new Pattern("1 * know 2"));
int expResult = 1;
int result = instance.getPreparedQueryHits(query);
assertEquals(expResult, result);
}
COM: <s> test of get prepared query hits method of class nii </s>
|
funcom_train/35727569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSoundDataOffset() {
switch (KSFLUtilities.getShort(data, 0)) {
case 1:
return 6 + 6*KSFLUtilities.getShort(data, 2) + 8*KSFLUtilities.getShort(data, 4 + 6*KSFLUtilities.getShort(data, 2));
case 2:
return 6 + 8*KSFLUtilities.getShort(data, 4);
default:
return 2;
}
}
COM: <s> returns the offset where sound data begins </s>
|
funcom_train/5079136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void propertyChange(PropertyChangeEvent event) {
if (event.getSource() instanceof RangeModel) {
if (RangeModel.PROPERTY_VALUE.equals(event.getPropertyName())) {
if (!ignoreScroll) {
localRevalidate();
if (useGraphicsTranslate()) {
repaint();
fireMoved();
}
}
firePropertyChange(PROPERTY_VIEW_LOCATION, event.getOldValue(),
event.getNewValue());
}
}
}
COM: <s> listens for either of the </s>
|
funcom_train/13596706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean addPhonemeToDict(Phoneme phoneme) {
if (phonemes == null)
phonemes = new ArrayList();
if (phoneme != null && !phonemes.contains(phoneme)) {
phonemes.add(phoneme);
//added as bug fix for bug 1689775 Log file size unbounded
DefaultLogs.getDefaultSystemLog().info(
"Dictionary",
"Added Phoneme: " + "'" + phoneme.getName() + "'" + " with file name: "
+ phoneme.getAudioFileName() + " to dictionary");
return true;
}
return false;
}
COM: <s> add a phoneme to this dictionary note extractor is not notified </s>
|
funcom_train/37508053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireTableDataChanged() {
int size = m_listener.size();
TableModelEvent event = new TableModelEvent(
this);
for (int i=0; i<size; i++) {
TableModelListener l = (TableModelListener)m_listener.elementAt(i);
l.tableChanged(event);
}
}
COM: <s> informs all listener that the table data has been changed </s>
|
funcom_train/644402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsOnly(String string, char character) {
for (int i = 0; i < string.length(); i++) {
if (!(String.valueOf(string.charAt(i)).equals(String.valueOf(character)))) {
return false;
}
}
return true;
}
COM: <s> checks if the whole string consists of only the same character like </s>
|
funcom_train/7674025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean mergeStarts(int index, RegisterSpecSet specs) {
RegisterSpecSet start = getStarts0(index);
boolean changed = false;
if (start == null) {
setStarts(index, specs);
return true;
}
RegisterSpecSet newStart = start.mutableCopy();
newStart.intersect(specs, true);
if (start.equals(newStart)) {
return false;
}
newStart.setImmutable();
setStarts(index, newStart);
return true;
}
COM: <s> merges the given register set into the set for the block with the </s>
|
funcom_train/45501907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawOutroText() {
ProjectionHelper.setPrintScreenProjection( gl, viewportWidth, viewportHeight );
GLColor.white.draw( gl );
gl.glEnable( GL.GL_TEXTURE_2D );
int row = 1;
font.print( 100, this.getHeight() - (7) * fontSize, "dummy text");
gl.glDisable( GL.GL_TEXTURE_2D );
ProjectionHelper.resetProjection( gl );
}
COM: <s> prints some get text on the screen </s>
|
funcom_train/646793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sync() {
String filename = uiFile.getText();
if (filename == null || filename.trim().length() == 0)
setErrorMessage(Messages.getString("ExportDlg.DestinationRequired"));
else
setErrorMessage(null);
Button ok = getButton(IDialogConstants.OK_ID);
if (ok != null)
ok.setEnabled(filename != null && filename.trim().length() != 0);
}
COM: <s> toggle accessibility of ok button depending on whether all input is </s>
|
funcom_train/41594788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addHeadersPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_StrucDocTd_headers_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_StrucDocTd_headers_feature", "_UI_StrucDocTd_type"),
V3Package.eINSTANCE.getStrucDocTd_Headers(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the headers feature </s>
|
funcom_train/8534265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setFieldValue(String fieldName, Object value) {
List list = getFieldInfo(fieldName);
if (list == null)
return false;
boolean result = false;
int len = list.size();
for (int i = 0; !result && i < len; i++) {
FieldInfo info = (FieldInfo) list.get(i);
result = info.setValue(value);
}
return result;
}
COM: <s> sets the specified value of the field with the given name and returns </s>
|
funcom_train/12557434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getBoundingBox(int[] bbox) {
if (enableLogging) {
if (logStream != null) {
logStream.println("bbox = new int[4];");
logStream.println("pr.getBoundingBox(bbox);");
}
}
rdr.getBoundingBox(bbox);
}
COM: <s> returns a bounding box containing all pixels drawn during the </s>
|
funcom_train/15580961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assertFormElementNotPresent(String formElementName) {
assertFormPresent();
try {
Assert.assertTrue("Found form element with name [" + formElementName
+ "] when not expected.", !dialog.hasFormParameterNamed(formElementName));
} catch (UnableToSetFormException e) {
// assertFormControlNotPresent
}
}
COM: <s> assert that a form input element with a given name is not present </s>
|
funcom_train/25072362 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public byte getFormId() {
if (!isResultResponseMessage()) {
throw new IllegalStateException(
"This session is not a result response message.");
}
byte[] packet = (byte[]) packets.elementAt(0);
return packet[PACKET_CONTROL_HEADER_SIZE + 2];
}
COM: <s> returns the id of the form descriptor for the query that </s>
|
funcom_train/33067715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private EditPart getRootEditPart() {
@SuppressWarnings("unchecked")
List<Object> selected = getSelectedObjects();
EditPart rootEditPart = null;
if (selected.size() > 0) {
Object item = selected.get(0);
if (item instanceof EditPart) {
EditPart selectedEditPart = (EditPart) item;
while (!(selectedEditPart instanceof RootEditPart)) {
selectedEditPart = selectedEditPart.getParent();
}
rootEditPart = selectedEditPart;
}
}
return rootEditPart;
}
COM: <s> returns the parent edit part of the selected object </s>
|
funcom_train/7645265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void joinGroup(InetAddress groupAddr) throws IOException {
checkClosedAndBind(false);
if (!groupAddr.isMulticastAddress()) {
throw new IOException(Msg.getString("K0039")); //$NON-NLS-1$
}
SecurityManager security = System.getSecurityManager();
if (security != null) {
security.checkMulticast(groupAddr);
}
impl.join(groupAddr);
}
COM: <s> adds this socket to the specified multicast group </s>
|
funcom_train/3492850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
Vector v = instrumentAndTest();
//print all errors and failures
if ((v != null) && (v.size() > 0)) {
System.out.println("Errors/Failures In Test Cases:");
int vs = v.size();
for (int i = 0; i < vs; i++)
System.out.println(v.elementAt(i));
}
}
COM: <s> instruments and executes the system </s>
|
funcom_train/17296257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean canMoveV(int y) {
if (type == HORIZONTAL) {
return false;
}
for (ControlPoint avoid : avoiders) {
if (Math.abs(avoid.getLocationOnScreen().y - y) <= 1) {
return false;
}
}
if (y > annotation.getLocationOnScreen().y && y + DEFAULT_SIZE < annotation.getLocationOnScreen().y + annotation.getHeight() - Annotation.MARGINS) {
return true;
}
else {
return false;
}
}
COM: <s> verifies that a control point can be moved vertically </s>
|
funcom_train/48183950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj, TObjectIntHashMap varMap, TObjectIntHashMap varMap2) {
if (obj.getClass() != this.getClass()) { return false; }
ModalOp mo = (ModalOp) obj;
return _mode.equals(mo._mode, varMap, varMap2) &&
_arg.equals(mo._arg, varMap, varMap2);
}
COM: <s> returns whether this modal op equals the given object </s>
|
funcom_train/40312137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetColumnName_InvalidColumn2() {
try
{
ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry);
resMetaData.getColumnName(0);
fail("SQLException is expected.");
}
catch(SQLException e)
{
//ensure the SQLException is thrown by getColumnName method.
assertEquals("The sqlstate mismatches", "22003", e.getSQLState());
}
}
COM: <s> tests get column name with column index equals to 0 </s>
|
funcom_train/19233276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPropertyValue(Object pBean, String pName, Object pValue) {
if (pBean instanceof LWComponent) {
setProperty((LWComponent)pBean, pName, pValue);
} else
throw new IllegalArgumentException("VueLWCPropertyMapper: can't handle class " + pBean + " name=" + pName + " val=" + pValue);
}
COM: <s> set property value </s>
|
funcom_train/32307076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HClassMutator getMutator() {
if (proxyMutator==null) {
relink(isArray()
? (HClass) new HClassArraySyn(relinker,
((HClassArray)proxy).baseType,
((HClassArray)proxy).dims)
: (HClass) new HClassSyn(relinker, proxy.getName(), this));
proxy.hasBeenModified = false; // exact copy of proxy.
}
return (proxyMutator==null) ? null : this;
}
COM: <s> returns a mutator for this code hclass code or code null code </s>
|
funcom_train/26492320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void languageInsertDB(Node site, int sid) {
NodeList allLanguages = ((Element)site).getElementsByTagName("language");
for (int i = 0; i < allLanguages.getLength(); i++) {
insertThisLanguage(allLanguages.item(i), sid);
}
}
COM: <s> insert languages in the db </s>
|
funcom_train/32057895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetInternalFrame() {
System.out.println("testGetInternalFrame");
GPGraphpad pad = new GPGraphpad();
GPGraph graph = new GPGraph();
GraphUndoManager undo = new GraphUndoManager();
GPDocument newDoc = new GPDocument(pad, "test", null, graph, null, undo);
assertEquals("getInternalFrame failed",
newDoc.getInternalFrame() == null, true);
}
COM: <s> test of get internal frame method of class gpdocument </s>
|
funcom_train/4916209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Job dequeue0() {
// Check if contains any jobs
if (this.head == null) {
// No jobs
return null;
}
// Obtain job to return
Job returnJob = this.head;
// Check if only job
if (this.head == this.tail) {
// No further jobs
this.head = null;
this.tail = null;
} else {
// Further jobs
this.head = this.head.getNextJob();
}
// Clear next job as about to be executed
returnJob.setNextJob(null);
// Return the return job
return returnJob;
}
COM: <s> dequeues the next </s>
|
funcom_train/976817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public File getImageFile(String namePrefix) {
File file;
String[] t = { ".png", ".gif", ".jpg", ".bmp", ".jpeg" };
int i;
for (i = 0; i < t.length; i++) {
file = new File(namePrefix + t[i]);
if (file.exists())
return file;
}
return null;
}
COM: <s> finds the correct existing extension to an image filename </s>
|
funcom_train/31240032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean doTick() {
boolean ret = super.doTick();
if (isChanged()) {
titleText.setLocation(0, size.getHeight() - titleText.getFont().getHeight());
titleText.setSize(size.getWidth(), titleText.getFont().getHeight());
}
titleText.setBackgroundColor(isActive() ? Interface.getWindowActiveTitleBarColor() : Interface.getWindowInactiveTitleBarColor());
return ret;
}
COM: <s> make sure the titles at the top </s>
|
funcom_train/8436701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLongArgument(String name, boolean necessary) {
if(arguments.containsKey(name) || !name.matches("\\w+"))
throw new IllegalArgumentException("Argument " + name + " already exists or is not valid");
arguments.put(name, new DirectArgument(DirectArgument.ARG_LONG));
if(necessary)
necessaryArguments.add(name);
}
COM: <s> register a long integer argument specifiable by name n </s>
|
funcom_train/36851853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeUnsignedPacked(double value, int integerDigits, int fractionalDigits) throws IOException {
value *= Math.pow(10, fractionalDigits);
writeUnsignedPacked(Util.format(value, 0, '.', true), integerDigits + fractionalDigits);
}
COM: <s> writes a tt double tt in unsigned packed format </s>
|
funcom_train/3426366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setXPathVariableResolver(XPathVariableResolver resolver) {
// resolver cannot be null
if (resolver == null) {
String fmsg = XSLMessages.createXPATHMessage(
XPATHErrorResources.ER_NULL_XPATH_VARIABLE_RESOLVER,
new Object[] { CLASS_NAME } );
throw new NullPointerException( fmsg );
}
xPathVariableResolver = resolver;
}
COM: <s> p establish a default variable resolver </s>
|
funcom_train/50349915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testOpsModeUnique() {
InstanceManager.setProgrammerManager(
new DebugProgrammerManager());
Programmer p = InstanceManager.programmerManagerInstance()
.getAddressedProgrammer(true, 777);
Assert.assertTrue("same ops mode programmer",
InstanceManager.programmerManagerInstance()
.getAddressedProgrammer(true, 777)==p);
}
COM: <s> any identical ops mode request gets the same object </s>
|
funcom_train/36019033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAtomNetwork() throws Exception {
Kademlia kad1 = new Kademlia("Test-Perf4",Identifier.randomIdentifier(), 4000,null,null,"");
Identifier id = Identifier.randomIdentifier();
kad1.put(id, "Hvad er klokken?");
String result = (String) kad1.get(id);
kad1.close();
assertEquals("Hvad er klokken?", result);
}
COM: <s> tests put and get with only one node </s>
|
funcom_train/22034380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addKeyboardBehavior(final KeyboardBehaviorJ2D behavior) {
KeyListener kl = new KeyAdapter() {
public void keyPressed(KeyEvent e) {
behavior.processKeyEvent(e);
}
public void keyReleased(KeyEvent e) {
behavior.processKeyEvent(e);
}
};
addKeyListener(kl);
}
COM: <s> add a code keyboard behavior code for keyboard control of translation </s>
|
funcom_train/31906590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected short getButton(GraphicsNodeMouseEvent evt) {
short button = 1;
if ((evt.BUTTON1_MASK & evt.getModifiers()) != 0) {
button = 0;
} else if ((evt.BUTTON3_MASK & evt.getModifiers()) != 0) {
button = 2;
}
return button;
}
COM: <s> returns the mouse event button </s>
|
funcom_train/7269518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStatusMessage(Severity severity, String message) {
if (message == null) {
statusLabel.setText(" ");
statusLabel.setIcon(null);
} else {
statusLabel.setText(message);
if (severity == Severity.ERROR) {
statusLabel.setIcon(GUIMediator.getThemeImage("stop_small"));
} else if (severity == Severity.INFO) {
statusLabel.setIcon(GUIMediator.getThemeImage("annotate_small"));
} else {
statusLabel.setIcon(null);
}
}
}
COM: <s> displays message in the status area of the wizard page </s>
|
funcom_train/25065607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addItem(Object item) {
if (_fullList == null) {
_fullList = new ArrayList();
}
_fullList.add(item);
// Required to sort underlying collection, so that when the interval
// of items to be displayed gets into the table, it will include the
// item just added IN ITS PROPER PLACE.
Collections.sort(_fullList);
update();
}
COM: <s> add to list of available rows </s>
|
funcom_train/36992309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public File outputFile(String prompt, Frame parentFrame) {
if (parentFrame == null) parentFrame = new Frame();
FileDialog fd = new FileDialog(parentFrame, prompt, FileDialog.SAVE);
fd.show();
String directory = fd.getDirectory();
String filename = fd.getFile();
if (filename == null) return null;
return new File(directory, filename);
}
COM: <s> static version of output file usable by external classes </s>
|
funcom_train/48453614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDataFromURL(String URL,String type) {
String data="";
try {
stmtGetListEntriesFromURL.clearParameters();
stmtGetListEntriesFromURL.setString(1,URL);
ResultSet result = stmtGetListEntriesFromURL.executeQuery();
if (result.next()) {
data = ""+result.getString(type);
}
} catch(SQLException sqle) {
sqle.printStackTrace();
}
return data;
}
COM: <s> use to get any type of data from the database </s>
|
funcom_train/26630638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testParameterStringConversion() throws Exception {
AbstractByteCodeSnippetFactory myFactory
= new ByteCodeClassSnippetFactory(TestData.getSampleFile());
String testString=".somepackage/someClass";
String results=myFactory.cleanValues(testString);
assertTrue(results.equals("somepackage.someClass"));
}
COM: <s> test the breaking of the parameter string tag info into hashtable </s>
|
funcom_train/2326329 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FloatMatrix1D diagonal(FloatMatrix2D A) {
int min = Math.min(A.rows(), A.columns());
FloatMatrix1D diag = make1D(min);
for (int i = min; --i >= 0;) {
diag.setQuick(i, A.getQuick(i, i));
}
return diag;
}
COM: <s> constructs a new vector consisting of the diagonal elements of tt a tt </s>
|
funcom_train/17922516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int checkBackwardTandemRepeat(int index, int startPos, int endPos, int lenght) {
// check if there is already primitive tandem repeat
if (primitive[index] > 0 && lenght > primitive[index] && (lenght % primitive[index]) == 0) {
return -1;
} else {
return super.checkBackwardTandemRepeat(index, startPos, endPos, lenght);
}
}
COM: <s> checks if there is a tandem repeat at given position for current substring </s>
|
funcom_train/18319006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int countParallels() {
int parallelsNumber = 0;
for (Iterator i = anchors.iterator(); i.hasNext();) {
GAnchor anchor = (GAnchor) i.next();
if (GOrient.EAST.equals(anchor.getOrient())) {
parallelsNumber = Math.max(anchor.getOffset(), parallelsNumber);
}
}
return parallelsNumber;
}
COM: <s> returns number of anchors laying on east side of the state </s>
|
funcom_train/34339581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getSalir() {
if (Salir == null) {//GEN-END:|18-getter|0|18-preInit
// write pre-init user code here
Salir = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|18-getter|1|18-postInit
// write post-init user code here
}//GEN-BEGIN:|18-getter|2|
return Salir;
}
COM: <s> returns an initiliazed instance of salir component </s>
|
funcom_train/51358690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draw(Graphics2D g, int x, int y, int theta) {
AffineTransform original = g.getTransform();
g.rotate(Math.toRadians(theta), x + width/2, y + height/2);
g.drawImage(pic, x, y, null);
g.setTransform(original);
}
COM: <s> this draw an image rotated around its centre </s>
|
funcom_train/38390900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setMyChildren(vertex vertex1, vertex vertex2){
int count = 0;
int size = 2;
geometry_primitive[] geometry_primitiveArray = new geometry_primitive[size];
count = 0;
geometry_primitiveArray[count] = vertex1;
count = 1;
geometry_primitiveArray[count] = vertex2;
setChildren(this, geometry_primitiveArray);
}
COM: <s> creates a new instance of edge </s>
|
funcom_train/13811125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void testCompletedCall() throws Throwable {
try {
this.init();
SIPAgent caller = createAgent("Alice");
SIPAgent callee = createAgent("Bob");
setForwardingUser("Bob");
pause(1000);
caller.setProxy(appServer);
SipURI sales = callee.getSipURI();
sales.setUser("sales");
caller.call(sales.toString());
pause(4000);
assertThat(callee, has(recvdRequest("INVITE")));
callee.answer();
pause(2000);
assertThat(caller, is(connectedTo(callee)));
pause(2000);
caller.end();
pause(2000);
assertThat(callee, is(disconnected()));
}
catch (Throwable e) {
logger.error("test failed", e);
throw e;
}
}
COM: <s> test of a completed call from caller to callee </s>
|
funcom_train/16519761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addConstraints(String opId, Set<String> vertexSet) {
Set<ConstraintGroup> cgSet = getOpConstraintGroups(opId);
if (cgSet.isEmpty()) {
ConstraintGroup cg = new ConstraintGroup();
cg.addOperatorId(opId);
cg.addVertexPaths(vertexSet);
constraintgroups.add(cg);
} else {
((ConstraintGroup) cgSet.toArray()[0]).addVertexPaths(vertexSet);
}
}
COM: <s> adding a constraint group on several vertices and one core </s>
|
funcom_train/16906059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void skip(){
if(reverse) players.addFirst(players.removeLast());
else players.addLast(players.removeFirst());
getNetwork().getChannel(channelName).sendPrivmsg(players.getFirst().user.getNickname()+" was skipped");
nextPlayer();
}
COM: <s> skip the current player </s>
|
funcom_train/5600818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void ensureEmptyProperties() {
if (!properties.isEmpty()) {
err.println("Unknown properties:");
for (final Object key : properties.keySet()) {
err.print(" ");
err.println(key);
}
System.exit(BAD_CONTENT_EXIT_CODE);
}
}
COM: <s> ensures that there is no remaining entry in the set of </s>
|
funcom_train/16177253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMarksStyle(String style) {
if (style.equalsIgnoreCase("none")) {
_marks = 0;
} else if (style.equalsIgnoreCase("points")) {
_marks = 1;
} else if (style.equalsIgnoreCase("dots")) {
_marks = 2;
} else if (style.equalsIgnoreCase("various")) {
_marks = 3;
}
}
COM: <s> set the marks style to none points dots or various </s>
|
funcom_train/18737442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAtAspectJAnnotations() {
String argNames = buildArgNameRepresentation();
Annotation pcutAnnotation = AtAspectJAnnotationFactory.createPointcutAnnotation(getPointcutText(), argNames,
declarationSourceStart);
if (annotations == null) {
annotations = new Annotation[] { pcutAnnotation };
} else {
Annotation[] old = annotations;
annotations = new Annotation[old.length + 1];
System.arraycopy(old, 0, annotations, 0, old.length);
annotations[old.length] = pcutAnnotation;
}
generateSyntheticPointcutMethod = true;
}
COM: <s> called from the at aspect jvisitor to create the </s>
|
funcom_train/21981851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isIncluded( Throwable t ) {
String classname = t.getClass().getName();
for( int i = 0; i < includes.size(); ++i ) {
String current = (String)includes.elementAt( i );
//if the current package is within the full classname of the given
// exception then it is included
if ( classname.indexOf( current ) != -1 ) {
return true;
}
}
return false;
}
COM: <s> return true if this throwable is allowed to be core dumped </s>
|
funcom_train/17670409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DiskDirSimpleNode getFirstActiveArchive() {
for (int i = 0; i < stack.size(); i++) {
DiskDirSimpleNode actNode = stack.get(i);
if (actNode.isArchive && !actNode.closed && !actNode.deleted) {
return actNode;
}
}
return null;
}
COM: <s> diskdir handles archives inside archives badly tc </s>
|
funcom_train/51763732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExtractValues() throws Exception {
MultiMetric[] multiMetrics = getExtractor().extract(getParsedDoc(FILE_PATH));
assertEquals(2, multiMetrics.length);
testMetric(multiMetrics[0], "org.sourceforge.mavenplugins.historisation", "3");
testMetric(multiMetrics[1], "org.sourceforge.mavenplugins.historisation.extractor", "9");
}
COM: <s> tests the extraction the functions from the xml file </s>
|
funcom_train/19747923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String renderStartElement() {
StringBuffer start = new StringBuffer("<script type=\"text/javascript\"");
// there is no language attribute in XHTML
if ( !this.isXhtml() && scriptLanguage.booleanValue() ) {
start.append(" language=\"Javascript1.1\"");
}
if ( this.src != null ) {
start.append(" src=\"" + src + "\"");
}
start.append("> \n");
return start.toString();
}
COM: <s> constructs the beginning lt script gt element depending on xhtml </s>
|
funcom_train/34342083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getTexto3() {
if (texto3 == null) {//GEN-END:|31-getter|0|31-preInit
// write pre-init user code here
texto3 = new TextField("CAMPO 1", null, 5, TextField.NUMERIC);//GEN-LINE:|31-getter|1|31-postInit
// write post-init user code here
}//GEN-BEGIN:|31-getter|2|
return texto3;
}
COM: <s> returns an initiliazed instance of texto3 component </s>
|
funcom_train/2624880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pushTransform(final PAffineTransform transform) {
if (transform != null) {
final Rectangle2D newLocalClip = (Rectangle2D) getLocalClip().clone();
transform.inverseTransform(newLocalClip, newLocalClip);
transformStack.push(graphics.getTransform());
localClipStack.push(newLocalClip);
graphics.transform(transform);
}
}
COM: <s> pushed the provided transform onto the transform stack if it is not null </s>
|
funcom_train/23874041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OclExpressionAS buildOperationCallExp(String name, OclExpressionAS left, OclExpressionAS right) {
// Create source
DotSelectionExpAS source = factory.expressions.createDotSelectionExpAS();
source.setSource(left);
source.setName(name);
// Create acll
OperationCallExpAS res = factory.expressions.createOperationCallExpAS();
res.setSource(source);
res.setArguments(new Vector());
if (right != null)
res.getArguments().add(right);
left.setParent(res);
return res;
}
COM: <s> build operation call exp for aso </s>
|
funcom_train/35566917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getGraphUpdatables() {
Set nodes = m_updatableGraph.getNodeSet();
Set updatables = new HashSet();
Iterator it = nodes.iterator();
while (it.hasNext()) {
updatables.add(this.m_pairs.getKey(it.next()));
}
return updatables;
}
COM: <s> gets the set of updatable objects that correspond to nodes in </s>
|
funcom_train/3926343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add( int val ) {
ensureCapacity( 1 );
ilist[ listSize++ ] = val;
if ( unitSize == -1 ) {
if ( listSize == 1 ) {
iiList.add( 0 );
} else if ( ilist[ listSize - 2 ] == -1 ) {
iiList.add( listSize - 1 );
}
}
}
COM: <s> add a value to the int array </s>
|
funcom_train/1033980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object arg) {
if (arg == this) {
return true;
}
if (arg == null || (!(arg instanceof Type))) {
return false;
}
Type t = (Type) arg;
return ((name == t.name || (name != null && name.equals(name))) &&
(size == t.size) &&
(cvAttributes == t.cvAttributes));
}
COM: <s> equality test for types </s>
|
funcom_train/47107445 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemArmor09() {
JMenuItem menuItem = new JMenuItem();
menuItem.setText(Armor.A_09.getItemName());
menuItem.setEnabled(false);
menuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
controller.setPlrReadiedArmor(Armor.A_09);
}
});
return menuItem;
}
COM: <s> creates the tenth choice for the armor menu </s>
|
funcom_train/43875030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void take(final Execution execution, final Collection<SequenceFlow> outgoing) {
switch(outgoing.size()) {
case 0: break;
case 1: outgoing.iterator().next().fire(execution); break;
default:
for(final SequenceFlow transition : outgoing) {
executor.execute(new Runnable() {
public void run() {
notifyNewThread(execution);
transition.fire(execution.createChild());
}
});
}
}
}
COM: <s> takes the given execution over the outgoing transitions splitting them into </s>
|
funcom_train/45770394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCell(int row, int column, Format fmt, String cellContents) throws IOException {
if (cellContents.startsWith("=")) {
cellContents = parseFormula(cellContents);
Debug.log(Debug.TRACE,"Parsing Formula " + cellContents);
}
wb.addCell(row, column, fmt, cellContents);
}
COM: <s> add a cell to the current work sheet </s>
|
funcom_train/117204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeServer(NodeServer server) {
modelChangedEventDisabled = true;
try {
// server.disconnect();
} catch (Exception e) {}
removeChild(server);
try {
Preferences modelPrefs = getModelPrefNode();
modelPrefs.node(server.getName()).removeNode();
} catch (BackingStoreException e) {
System.out.println("Unable to save the model to disk: " + e.getMessage());
}
modelChangedEventDisabled = false;
emitModelChangeEvent(this);
}
COM: <s> disconnects and removes a new server to the model </s>
|
funcom_train/5865983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getDefaultFormat() {
final DateFormat df = DateFormat.getDateInstance(
DateFormat.DEFAULT, Locales.getCurrent());
if (df instanceof SimpleDateFormat) {
final String fmt = ((SimpleDateFormat)df).toPattern();
if (fmt != null && !"M/d/yy h:mm a".equals(fmt))
return fmt; //note: JVM use "M/d/yy h:mm a" if not found!
}
return "yyyy/MM/dd";
}
COM: <s> returns the default format which is used when contructing </s>
|
funcom_train/39527668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHasExpired() {
posts = new CachedPosts(null);
assertFalse(posts.hasExpired(1000));
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}
assertTrue(posts.hasExpired(1000));
assertFalse(posts.hasExpired(2000));
}
COM: <s> tests the timeout </s>
|
funcom_train/13410793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void highlight(Spatial s) {
if (s instanceof AbstractGizmoMesh)
return;
// We don't want to add another item in here.
if (surroundingBoxes.containsKey(s))
return;
ObjectSurroundingBox box = new ObjectSurroundingBox(this
.getWorldState().getRootNode(), null, s);
this.getWorldState().getRootNode().attachChild(box.getShape());
this.getWorldState().getRootNode().updateRenderState();
surroundingBoxes.put(s, box);
}
COM: <s> highlights a single spatial </s>
|
funcom_train/13751511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean permForOverwrite(File file){
if (!file.exists()) return true;
if (JOptionPane.showConfirmDialog(this, l.pr("File already exists. Overwrite?"), l.pr("Warning!"), JOptionPane.YES_NO_OPTION)
== JOptionPane.YES_OPTION) return true;
return false;
}
COM: <s> checks wether the given file exists and asks for permission to overwrite it </s>
|
funcom_train/2904661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doBroadcastAction(String host, int port, JXUser ud){
String action = ud.getAction();
if((action.compareTo("addUser()")==0) || (action.compareTo("initUser()")==0)){
manager.addUser(host, port, ud);
}
else if(action.compareTo("removeUser()")==0){
manager.removeUser(host, port, ud);
}
}
COM: <s> determine and execute user action associated with data </s>
|
funcom_train/14088685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSubject(String subject) throws IOException {
String chunkId = "0037";
removeEntry(chunkId, IMessage.PT_STRING8);
this.createDocument("__substg1.0_" + chunkId, INode.PT_STRING8, INode.createPtString(subject));
}
COM: <s> sets the subject content of the msg file </s>
|
funcom_train/8469838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processSpace(Properties properties) {
System.out.println("# Feature Column_Index");
for (Map.Entry<String, Integer> featureEntry :
termToFeatureIndex.entrySet())
System.out.printf("%s %d\n",
featureEntry.getKey(), featureEntry.getValue());
}
COM: <s> does nothing that modifies the space </s>
|
funcom_train/16177673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String createNewFile() {
ParameterWizard paramWizard = new ParameterWizard(this);
ParameterData paramData = new ParameterData(this.model);
paramData.reloadInputOutput();
paramWizard.setAParameterData(paramData);
// shows the wizard modally
paramWizard.display();
// set by the parameter wizard
String fileName = this.newlyCreatedParamFileName;
// null this so a confusing value isn't sitting around
newlyCreatedParamFileName = null;
return fileName;
}
COM: <s> create a new file with the parameter wizard </s>
|
funcom_train/28703019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createLearnerSCOs(Course course) {
for (Iterator iter = course.getCourseItems().iterator(); iter.hasNext();) {
Object element = iter.next();
if (element instanceof SCOItem) {
SCOItem item = (SCOItem) element;
LearnerSco learnerSCO = new LearnerSco(this, item).assignId();
learnerSCO.setLessonStatus(SCOItem.NOT_ATTEMPTED);
getLearnerScos().add(learnerSCO);
}
}
}
COM: <s> do not forget to call this as this creates the user scos associations </s>
|
funcom_train/33734388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSecret(String secret) {
if(secret == null) {
log.error("The secret cannot be null");
throw new IllegalArgumentException("The secret cannot be null");
}
if(secret.trim().length() == 0) {
log.error("The secret cannot be empty");
throw new IllegalArgumentException("The secret cannot be empty");
}
this.secret = secret;
}
COM: <s> setter for the secret key for the photo </s>
|
funcom_train/34570455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getDsIndex(String dsName) {
// Let's assume the table of dsNames is always small, so it is not
// necessary to use a hashmap for lookups
for (int i = 0; i < dsNames.length; i++) {
if (dsNames[i].equals(dsName)) {
return i;
}
}
return -1; // Datasource not found !
}
COM: <s> retrieve the table index number of a datasource by name </s>
|
funcom_train/39048292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleLogoutSuccess(MessageBuffer msg) {
logger.log(Level.FINER, "Logged out gracefully");
expectingDisconnect = true;
loggedIn = false;
try {
disconnectClientConnection();
} catch (IOException e) {
// ignore
if (logger.isLoggable(Level.FINE)) {
logger.logThrow(Level.FINE, e,
"Disconnecting after graceful logout " +
"throws");
}
}
}
COM: <s> process a logout success message </s>
|
funcom_train/8662893 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shiftIndex(int lessThan, int delta) {
int size = info.length;
for (int i = 2; i < size; i += 10){
int org = ByteArray.readU16bit(info, i + 8);
if (org >= lessThan)
ByteArray.write16bit(org + delta, info, i + 8);
}
}
COM: <s> for each code local variable table i </s>
|
funcom_train/10482482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String decode(String original) throws MessagingException {
StringBuffer result = new StringBuffer();
for (int i = 0; i < original.length(); i++) {
char ch = original.charAt(i);
if (ch == '&') {
i = decode(original, i, result);
}
else {
result.append(ch);
}
}
return result.toString();
}
COM: <s> decode a base 64 encoded string value </s>
|
funcom_train/40290462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(RevenueSource revs, Connection conn) throws DataException {
// check the dirty flag in the object. if it is dirty,
// run update or insert
if (revs.isDirty()) {
if (revs.isAlreadyThere()) {
update(revs, conn);
} else{
insert(revs, conn);
}
// set the dirty flag to false now that we've saved it
revs.setDirty(false);
}
}
COM: <s> save called privately and handed the connection </s>
|
funcom_train/49800137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /*public void testGetUserPrefs() {
System.out.println("getUserPrefs");
UserUtil instance = null;
DpUserPreference expResult = null;
DpUserPreference result = instance.getUserPrefs();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get user prefs method of class uk </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.