__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/50077149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void tearDown() throws Exception {
super.tearDown();
log.trace("resetting the datastore to original state");
Connection connection = this.connFactory.getConnection();
Statement statement = connection.createStatement();
statement.executeUpdate(
"update users set email_id = null where id > 30");
connection.commit();
statement.close();
connection.close();
}
COM: <s> in addition to destroying the remote cache instance it also initializes </s>
|
funcom_train/37518847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visitShiftExpression(/*@non_null@*/ JShiftExpression self ) {
int oper = self.oper();
JExpression left = self.left();
JExpression right = self.right();
left.accept(this);
if (oper == OPE_SL) {
print(" << ");
} else if (oper == OPE_SR) {
print(" >> ");
} else {
print(" >>> ");
}
right.accept(this);
}
COM: <s> prints a shift expression </s>
|
funcom_train/7794190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ITextRegion determineTextRegion(IStructuredDocument document, ITextRegionCollection regionCollection, int offset) {
ITextRegion textRegion;
// in case we are at the end of the document, asking for completion
if (offset == document.getLength()) {
textRegion = regionCollection.getLastRegion();
} else {
textRegion = regionCollection.getRegionAtCharacterOffset(offset);
}
return textRegion;
}
COM: <s> determines the text region from the text region collection and offset </s>
|
funcom_train/40457447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeItem(MenuItemBase item) {
// Unselect if the item is currently selected
if (selectedItem == item) {
selectItem(null);
}
if (removeItemElement(item)) {
setItemColSpan(item, 1);
items.remove(item);
item.setParentMenu(null);
RemoveEvent.<MenuItemBase>fire(this, item);
}
}
COM: <s> removes the specified menu item from the bar </s>
|
funcom_train/4745578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerImage(String location){
Cloud42BaseFunctions bf = new Cloud42BaseFunctions();
String id = null;
AwsCredentials cred = userManager.getCurrentCredentials();
if (cred!=null){
bf.setCredentials(cred);
id = bf.registerImage(location);
// reset list of images to force reload
if (id!=null) this.resetImageList();
}
if (id==null){
facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_ERROR, "msg_imageNotRegistered");
} else {
facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_INFO, "msg_imageRegistered",new Object[]{id});
}
}
COM: <s> register a new ami at given location </s>
|
funcom_train/863119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testJythonScript() throws Exception {
Request request = new Request();
request.setMethod("methodString");
request.setVersion("version 1.0");
request = new JythonScript().executeRequestTrigger(
request, "testdata_in/testTriggerScript.py");
System.out.println("Request V:"+request.getVersion());
assertEquals(request.getVersion(), "VERSION 2.0");
}
COM: <s> test jython script </s>
|
funcom_train/24050352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dissolve(SegmentString segString) {
OrientedCoordinateArray oca = new OrientedCoordinateArray(
segString.getCoordinates());
SegmentString existing = findMatching(oca, segString);
if (existing == null) {
add(oca, segString);
} else {
if (merger != null) {
boolean isSameOrientation = CoordinateArrays.equals(
existing.getCoordinates(), segString.getCoordinates());
merger.merge(existing, segString, isSameOrientation);
}
}
}
COM: <s> dissolve the given </s>
|
funcom_train/25211872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetUnicode01() throws Exception {
GlyphName g = GlyphName.getInstance();
assertNotNull(g);
// A;0041
assertEquals(UnicodeChar.get(Integer.parseInt("0041", 16)), g
.getUnicode("A"));
// zukatakana;30BA
assertEquals(UnicodeChar.get(Integer.parseInt("30BA", 16)), g
.getUnicode("zukatakana"));
assertNull(g.getUnicode("notdefined!"));
}
COM: <s> test method for </s>
|
funcom_train/16319514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAttributeDisplayed(String elementName, String attributeName) {
//System.out.println("is sttributte displayed");
Node nodo = SearchAttribute(elementName, attributeName);
boolean res=false;
if (nodo!=null){
res=true;
}
// in all bad cases, ie if the xsd does not give the answer, returns true
return res;
}
COM: <s> says whether the attribute attribute name of element element name should be displayed </s>
|
funcom_train/15810322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEventChargingFunctionAddress(String ecfAddress) throws ParseException {
if (ecfAddress == null)
throw new NullPointerException(
"JAIN-SIP Exception, "
+ "P-Charging-Function-Addresses, setEventChargingFunctionAddress(), the ecfAddress parameter is null.");
this.parameters.set(ParameterNamesIms.ECF, ecfAddress);
}
COM: <s> p add another event charging function ecf address to this header p </s>
|
funcom_train/2677308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean writeComplex(Output out, Object complex) {
if (log.isDebugEnabled()) {
log.debug("writeComplex");
}
if (writeListType(out, complex)) {
return true;
} else if (writeArrayType(out, complex)) {
return true;
} else if (writeXMLType(out, complex)) {
return true;
} else if (writeCustomType(out, complex)) {
return true;
} else if (writeObjectType(out, complex)) {
return true;
} else {
return false;
}
}
COM: <s> writes a complex type object out </s>
|
funcom_train/39533546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeName(String oldName, String newName){
SVGHandle handle=getHandle(oldName);
if(newName!=null && ! newName.equals("")){
//checks if the name is correct
//if another handle has the same name,
//a number is concatenated at the end of the name
int count=countName(newName), nb=0;
while(count>0){
count=countName(newName+" ("+new Integer(nb+1)+")");
nb++;
}
if(nb>0){
newName=newName+" ("+new Integer(nb)+")";
}
handle.setName(newName);
}
handleChanged();
}
COM: <s> modifies the name of the handle with the new provided name </s>
|
funcom_train/38536508 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CspBooleanExpr xor(CspBooleanExpr expr) {
if (expr instanceof GenericBooleanExpr)
return new GenericBooleanExpr(null, this, BoolOperation.XOR, (BooleanExpr) expr, false);
else
return new BooleanExpr(null, this, BoolOperation.XOR, (BooleanExpr) expr, false);
}
COM: <s> creates a boolean expression resulting from xoring a boolean expression </s>
|
funcom_train/31291785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String extractBuiltinType(final URI uri) {
final String schemeSpecificPart = uri.getSchemeSpecificPart();
final String[] path = schemeSpecificPart.split("/");
String type = path[1];
final int pos = type.indexOf('?');
if (pos >= 0) {
type = type.substring(0, pos);
}
return type.toLowerCase();
}
COM: <s> extracts the builtin type from the uri </s>
|
funcom_train/35761532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deleteSelected() {
Set<CheckBox> keys = checkBoxes.keySet();
for (Iterator<CheckBox> iter = keys.iterator(); iter.hasNext();) {
CheckBox chBox = iter.next();
if(chBox.getValue()) {
chBox.getParent().removeFromParent();
fds.remove(checkBoxes.get(chBox));
iter.remove();
}
}
for (FDHolderPanelListener l : listeners) {
l.fdRemoved(fds);
}
}
COM: <s> removes the check boxes and the widgets associated with them </s>
|
funcom_train/18089597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void pointerDragged(final int x, final int y) {
// Adjust the press location to fit in the canvas area.
int py = y;
if (master.hasTitleBar()) {
final Theme theme = UIManager.getTheme();
py -= theme.getTitleHeight();
}
// Notify the master.
master.pointerDragged(x, py);
// Forward the pointer event.
super.pointerDragged(x, y);
}
COM: <s> called when a stylus drags across the screen </s>
|
funcom_train/3834311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MapSize getSelectedMapSize() {
MapSize[] mss = getOfferedMapSizes();
MapSize ms = mss[0];
for (int i = 0; i < mss.length; i++) {
if ( mss[i].isSelected() ) {
ms = mss[i];
break;
}
}
return ms;
}
COM: <s> returns the tt map size tt that is marked as selected </s>
|
funcom_train/43343230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void caluculateMovement() {
switch (movementType) {
case FORWARD: {
translation.z = -elapsedTime * translationSpeed;
}
break;
case BACKWARD: {
translation.z = elapsedTime * translationSpeed;
}
break;
case TURN_RIGHT: {
angle = -elapsedTime * rotationSpeed;
}
break;
case TURN_LEFT: {
angle = elapsedTime * rotationSpeed;
}
break;
case STRAFE_LEFT: {
translation.x = -elapsedTime * translationSpeed;
break;
}
case STRAFE_RIGHT: {
translation.x = elapsedTime * translationSpeed;
break;
}
}
rotation.fromAngleAxis(angle, rotAxis);
}
COM: <s> does the actual movement calculations </s>
|
funcom_train/45357460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseReleased(MouseEvent e) {
if ( !e.isConsumed() ) if ( e.isPopupTrigger() ) {
setPopupMenuState();
popupMenu.show(this, e.getX()-listScroll.getViewport().getViewPosition().x+20, e.getY()-listScroll.getViewport().getViewPosition().y+15);
}
}
COM: <s> mouse event mouse released </s>
|
funcom_train/49356209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void buildSelectLists(ControllerBean controllerBean) throws BasicException {
LogicBean logic = controllerBean.getCurrentLogicBean();
if (logic.getSelectListNames() == null){
return;
}
List listNames = logic.getSelectListNames();
for (int i = 0; i < listNames.size(); i++){
String selectListName = (String)listNames.get(i);
this.buildSelectList(controllerBean, selectListName, null, false);
}
}
COM: <s> build select lists combobox lists declared in logic object </s>
|
funcom_train/23852199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void assertUniqueEntries(@SuppressWarnings("rawtypes") Collection collection) {
boolean assertsAreEnabled = false;
assert (assertsAreEnabled = true) == true;
if (assertsAreEnabled) {
for (Object node : collection) {
int count = 0;
for (Object compareNode : collection) {
if (node.equals(compareNode)) {
count++;
}
}
assert count == 1;
}
}
}
COM: <s> checks if a </s>
|
funcom_train/38557022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public C_Content copyIntoEC(EOEditingContext ec) {
C_Content myNewContent;
try {
myNewContent = (C_Content) this.getClass().newInstance();
} catch (InstantiationException e) {
throw new RuntimeException(e);
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
}
if (ec != null)
ec.insertObject(myNewContent);
myNewContent.setName(name());
return myNewContent;
}
COM: <s> make a copy of the receiver into the given editing context </s>
|
funcom_train/10264958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getXForArea(Area area) {
int x = 0;
VerticalLayer verticalLayer = getVerticalLayer(area.getVerticalLayer());
if (verticalLayer.containsStatus(VerticalLayer.SPLITED)) {
x = getSplitX(area.getVerticalLayer());
} else {
x = getNextXInLayer(area);
}
x = Math.max(x, margin.left);
return x;
}
COM: <s> get the x position for new area in layout </s>
|
funcom_train/35461028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNoExplicitAlignment() throws Exception {
enhanceAndCheck("dcl a based, 2 b fixed bin(15) init(3);",
"(DATA_ITEM (NAME a) (STORAGE BASED)"
+ " (DATA_ITEM (LEVEL 2) (NAME b) (ARITHMETIC FIXED BINARY (PRECISION 15)) (INITIAL 3)))"
);
}
COM: <s> a hierarchy with no explicit alignment should leave the tree unchanged </s>
|
funcom_train/20728591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getJFreeReportFile() {
File file1 = null;
try {
file1 = Fileio.getFile("CustSums2.xml", "reports", false, false);
} catch (Exception ee) {
Log.log(Log.DEBUG, this, "No file? error=" + ee);
}
return file1;
}//}}}
//{{{ +setReportProperties(JFreeReport, String, String, String, int) : void
COM: <s> gets the j free report file attribute of the customer sums object </s>
|
funcom_train/29264754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(){
// try{
// diskQueue.mutex.acquire();
if(write)
disk.beginWrite(i,buf);
else
disk.beginRead(i,buf);
// }catch(InterruptedException ie){
// Thread.currentThread().interrupt();
// }
}
COM: <s> run the request i </s>
|
funcom_train/7655620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getDecodedObject(BerInputStream in) throws IOException {
byte[] bytes = new byte[in.length - 1];
System.arraycopy(in.buffer, in.contentOffset + 1, bytes, 0,
in.length - 1);
return new BitString(bytes, in.buffer[in.contentOffset]);
}
COM: <s> extracts bit string object from ber input stream </s>
|
funcom_train/51100362 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void configureExtendedTypes(ExtendedTypeMap map) {
super.configureExtendedTypes(map);
// must handle CLOBs as strings, otherwise there
// are problems with NULL clobs that are treated
// as empty strings... somehow this doesn't happen
// for BLOBs (ConnectorJ v. 3.0.9)
map.registerType(new CharType(false, false));
map.registerType(new ByteArrayType(false, false));
}
COM: <s> installs appropriate extended types used as converters for passing values between </s>
|
funcom_train/8367174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTransferAll() {
System.out.println("transferAll");
int expResult = 0;
instance.transferAll();
StoreItem[] storeItems = instance.getStoreItems(Store.CASH);
for( int i=0; i < storeItems.length; i++ )
{
assertEquals( expResult, storeItems[i].getQuantity());
}
}
COM: <s> test of transfer all method of class store controller </s>
|
funcom_train/30009136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetName() {
System.out.println("setName");
String name = "";
Publisher instance = new Publisher();
instance.setName(name);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set name method of class papyrus </s>
|
funcom_train/564394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAttribute(final AttributeImpl attribute) throws DevFailed {
if (attribute.getName().equalsIgnoreCase(STATUS_NAME) || attribute.getName().equalsIgnoreCase(STATE_NAME)) {
return;
}
attributeList.remove(attribute);
statusImpl.removeAttributeAlarm(attribute.getName());
stateImpl.removeAttributeAlarm(attribute.getName());
cacheManager.removeAttributePolling(attribute);
}
COM: <s> remove an attribute of the device </s>
|
funcom_train/45251021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateSelectedResourceType() {
// TableItem item = resourceTypeTable.getSelection()[0]; //Single select
// Image image = ((IFileEditorMapping)item.getData()).getImageDescriptor().getImage();
// imagesToDispose.addElement(image);
// item.setImage(image);
}
COM: <s> update the selected type </s>
|
funcom_train/51100159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected List getExistingSequences(DataNode node) throws SQLException {
Connection con = node.getDataSource().getConnection();
try {
Statement sel = con.createStatement();
try {
StringBuffer q = new StringBuffer();
q.append("SELECT SEQNAME FROM SYSCAT.SEQUENCES WHERE SEQNAME")
.append(" LIKE '")
.append(SEQUENCE_PREFIX)
.append("%'");
ResultSet rs = sel.executeQuery(q.toString());
try {
List sequenceList = new ArrayList(32);
while (rs.next()) {
sequenceList.add(rs.getString(1));
}
return sequenceList;
} finally {
rs.close();
}
} finally {
sel.close();
}
} finally {
con.close();
}
}
COM: <s> returns a list of all existing accessible sequences </s>
|
funcom_train/16737220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void putObject(String key, Object value) {
if (key != null && value != null) {
Converter conv = ConvertUtils.lookup(value.getClass());
if (conv != null) {
getDelegate().put(key, (String)
conv.convert(String.class, value));
}
else {
throw new ConversionException("No Converter registered for "+ value.getClass());
}
}
}
COM: <s> associates an arbitrary object which must have a </s>
|
funcom_train/14055964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDefaultMarginInsets(Insets defaultMarginInsets) {
if(!Objects.equals(this.defaultMarginInsets, defaultMarginInsets)) {
this.defaultMarginInsets = defaultMarginInsets;
RBlock block = this.rblock;
if(block != null) {
block.setDefaultMarginInsets(defaultMarginInsets);
block.relayoutIfValid();
}
}
}
COM: <s> sets the default margin insets </s>
|
funcom_train/32055845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CellView getMapping(Object obj, boolean flag) {
if(obj != null) {
CellView cellview = (CellView)views.get(obj);
if(cellview != null) {
return cellview;
}
if(contains(obj)) {
return createMapping(obj);
} else {
return graphLayoutCache.getMapping(obj, false);
}
} else {
return null;
}
}
COM: <s> returns the code cell view code that is mapped to code cell code </s>
|
funcom_train/12159367 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNullLocalNameFails() {
try {
ValueConstraint constraint = new ValueConstraintMock(
"constraintMock", expectations);
new AttributeMatcher(null, null, constraint);
fail("Null localName not detected");
} catch (IllegalArgumentException e) {
assertEquals("Error message incorrect",
"localName cannot be null",
e.getMessage());
}
}
COM: <s> test that a null local name fails </s>
|
funcom_train/45716921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("ProfileRetriever".equals(portName)) {
setProfileRetrieverEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/49757573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void distributeReceivedMessage(UPBMessage theMessage) {
// Distribute a link message
if (theMessage.isLinkMessage()) {
theMessage.getLink().receiveMessage(theMessage);
return;
}
// Distribute a device message
if (theMessage.isDeviceMessage()) {
theMessage.getDevice().receiveMessage(theMessage);
return;
}
// Unhandled message -- ignored
}
COM: <s> handle the received message from the media adapter distribute it to the proper </s>
|
funcom_train/11668593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ArrayList cloneMap(ArrayList list) {
if (list == null) {
list = new ArrayList(5);
}
list.clear();
if (nodes != null) {
final int size = nodes.size();
for (int i = 0; i < size; ++i) {
list.add(nodes.get(i));
}
}
return list;
}
COM: <s> non dom copy content of this map into the specified array list </s>
|
funcom_train/287263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testQueryUser() throws Exception {
new ComponentTest() {
protected void testComponents() throws Exception {
List<User> users = getService().queryUser(new User(),
new Long(0), new Long(20), "id");
System.out.println("QUERY USERS**********");
for (User user : users) {
System.out.println(user);
}
assertEquals(3, users.size());
}
}.run();
}
COM: <s> test the query user operation </s>
|
funcom_train/44165110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Component add(Component comp, boolean editState) {
if (editState) {
if (!(comp instanceof GoodsLabel)) {
logger.warning("Invalid component dropped on this WarehousePanel.");
return null;
}
comp.getParent().remove(comp);
return comp;
}
Component c = add(comp);
return c;
}
COM: <s> adds a component to this warehouse panel and makes sure that </s>
|
funcom_train/21404757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void cleanPrerequisites(TaskDescription expTask) {
Collection<TaskDescription> values = this.expansions.values();
Set<TaskDescription> prerequisites = expTask.getPrerequisites();
if (prerequisites == null){
return;
}
for (TaskDescription pre : prerequisites){
if (values.contains(pre)
&& !expTask.getPatternReplacement().equals(pre.getPatternReplacement())){
pre.removeDependency(expTask);
}
}
}
COM: <s> this removes all the unnecessary expansions of prerequisites of the given task </s>
|
funcom_train/11651334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void configure(TestElement testElement) {
if (testElement instanceof HTTPSamplerBase) {
HTTPSamplerBase base = (HTTPSamplerBase) testElement;
tableModel.clearData();
HTTPFileArg[] files = base.getHTTPFiles();
for(int i=0; i< files.length; i++){
tableModel.addRow(files[i]);
}
checkDeleteAndBrowseStatus();
}
}
COM: <s> a newly created component can be initialized with the contents of a </s>
|
funcom_train/35535159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDocument(final IndexWriter writer, final String id, final String text) throws IOException {
final Document document = new Document();
document.add(new Field(FIELD_ID, id, Field.Store.YES, Field.Index.NOT_ANALYZED));
document.add(new Field(FIELD_TEXT, text, Field.Store.YES, Field.Index.ANALYZED));
writer.addDocument(document);
}
COM: <s> adds the document to the index </s>
|
funcom_train/47115725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private byte convertLittleEndian(String str) {
int result = 0x00;
for(int i = 0; i < str.length(); i++) {
if(str.charAt(i) == '1') {
result += Math.pow(2, str.length() - 1 - i);
}
}
return (byte)result;
}
COM: <s> convert a string of bit from big endian to little endian </s>
|
funcom_train/5315805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isCommandInList(Command cmd) {
if (this.lst != null) {
for (Command cmdLocal : this.lst) {
/*
* check if it's the same command
*/
if (cmd.equals(cmdLocal)) {
/*
* check if it's the same relevance
*/
if (cmd.compareTo(cmdLocal) == 0) {
return true;
}
}
}
}
return false;
}
COM: <s> check if the command is in the local list </s>
|
funcom_train/41621454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Vector3f readVector() throws IOException {
float[] values = new float[3];
for(int i = 0; i < 3; i++) {
while(this.reader.ttype != StreamTokenizer.TT_NUMBER) {
this.reader.nextToken();
}
values[i] = (float)this.reader.nval;
this.reader.nextToken();
}
return new Vector3f(values[0], values[1], values[2]);
}
COM: <s> read in a three dimensional vector </s>
|
funcom_train/47864482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSinglePixelIteratorH() {
final TestLinearImage testLinearImage = new TestLinearImage(4, 3);
testLinearImage.iterateH(1, 1, 1);
// before first
assertEquals(4, testLinearImage.get());
assertTrue(testLinearImage.hasNext());
assertEquals(5, testLinearImage.next());
assertFalse(testLinearImage.hasNext());
}
COM: <s> single pixel h iterator shall work properly </s>
|
funcom_train/3288564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleComment(char[] values,int param) {
if ( !( inStyle || inScript))
return;
try {
result.write("<!--");
result.write(values);
result.write("-->");
} catch (Exception e) { /* ignore */ }
// we ignore them
}
COM: <s> because scripts and stlyle sometimes are defined in comments thoese </s>
|
funcom_train/27822784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCreationDate(Date creationDate) throws KAONException {
if (creationDate==null) {
Object currentCreationDate=getLiteralPropertyValue(OMO_creationDate);
if (currentCreationDate!=null)
removePropertyValue(OMO_creationDate,null);
}
else
setPropertyValue(OMO_creationDate,s_dateFormat.format(creationDate));
}
COM: <s> sets the date of the creation of the oi model </s>
|
funcom_train/51119963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireItemPropertySetChange() {
if (propertySetChangeListeners != null) {
Object[] l = propertySetChangeListeners.toArray();
Item.PropertySetChangeEvent event = new PropertysetItem.PropertySetChangeEvent(
this);
for (int i = 0; i < l.length; i++)
((Item.PropertySetChangeListener) l[i])
.itemPropertySetChange(event);
}
}
COM: <s> send a property set change event to all interested listeners </s>
|
funcom_train/14273075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCurrencyInfo(byte type, int i, String s) {
switch(type) {
case COUNTRY:
currencies[i].country = s;
break;
case SYMBOL:
currencies[i].symbol = s;
break;
case EXCHANGE_RATE:
currencies[i].exchangeRate = s;
break;
default:
return;
}
} // end-method
COM: <s> set the category info field value code s code for the type </s>
|
funcom_train/25713561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setup(){
screen.getLabel(0).setText("Verbinden");
screen.setButton(0, "DDL: ",true);
screen.setButton(1, "Beheerder: ",true);
screen.setButton(2, "Locatie: ",true);
screen.setButton(5, "Aanmelden",false);
screen.setButton(11, "Afsluiten", false);
setupKeys();
screen.headpanel.requestFocus();
}
COM: <s> setup screen and setup keys </s>
|
funcom_train/25256772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
// Override AbstractSet version to avoid calling size()
if (o == this)
return true;
if (!(o instanceof Set))
return false;
Collection<?> c = (Collection<?>) o;
try {
return containsAll(c) && c.containsAll(this);
} catch (ClassCastException unused) {
unused.printStackTrace();
return false;
} catch (NullPointerException unused) {
unused.printStackTrace();
return false;
}
}
COM: <s> compares the specified object with this set for equality </s>
|
funcom_train/2304307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void encode(OutputStream output, Indenter indenter) {
PrintStream out = new PrintStream(output);
String indent = indenter.makeString();
String tag = "<AttributeSelector RequestContextPath=\"" + contextPath +
"\" DataType=\"" + type.toString() + "\"";
if (mustBePresent)
tag += " MustBePresent=\"true\"";
tag += "/>";
out.println(indent + tag);
}
COM: <s> encodes this selector into its xml representation and </s>
|
funcom_train/31357788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeDriver(int ID) {
// Signal Removal
event(1, "Drivermanager (removeDriver) ID=" + ID);
// Unload Driver
unloadDriver(ID);
// Remove Property Entries
propertyList.remove(new String[]{"DRIVERS", String.valueOf(ID)});
// update permissions for the service
((ServiceSupport)service).registerPermissions();
return true;
} // removeDriver()
COM: <s> unload driver and remove it from management </s>
|
funcom_train/2615250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void keyPressed(KeyEvent e) {
if(e.getKeyCode()==10 && isRunning){
emptyAnswerField = true;
if(!firstTime){
checkAnswer();
showFeedback = true;
}else{
gameDescription = "";
firstTime = false;
}
try{
Thread.sleep(700);
}catch(InterruptedException ie){
System.err.println(ie);
}
showFeedback = false;
setupNextQuestion();
}else if(e.getKeyCode()==27){
isRunning=false;
//contentPane.remove(answerField);
//contentPane.remove(questionArea);
frame.requestFocus();
inputManager.resetAllGameActions();
inputManager.setNormalBehavior();
}
}
COM: <s> handle the key pressed event from the text field </s>
|
funcom_train/4870764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAtDragArea(Point p) {
if ((p.getX() < thickness || p.getY() < thickness || p.getX() + thickness > height || p.getY() + thickness > width) && !isAtCorner(p)) {
return true;
} else {
return false;
}
}
COM: <s> checks if the point p is near the drawing area </s>
|
funcom_train/22782938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String formatPath(File file) {
// check for null
if (file == null) {
return "";
}
// just return the name of the parent folder
String dir = file.getParentFile().getName();
// if it is still to long, cut it of
if (dir.length() > 15) {
dir = dir.substring(0, 12) + "...";
}
// remove filename
return dir;
}
COM: <s> this methode will format the path of an image to be displayed </s>
|
funcom_train/17118296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void add(String element) {
int pos = element.length();
boolean loop = true;
while (loop) {
if (element.charAt(pos - 1) == ' ') {
pos--;
} else {
loop = false;
element = element.substring(0, pos);
}
}
//debug(this, "\"" + element + "\"");
this.vec.add(element);
}
COM: <s> adds a value to the internal hashtable </s>
|
funcom_train/14228238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void generateDtmf(String digits) throws InvalidStateException, ResourceUnavailableException {
// test if we are in an active state
if (this.getMediaAvailability() != AVAILABLE)
throw new InvalidStateException(this, InvalidStateException.TERMINAL_CONNECTION_OBJECT, this.getState());
// delegate off
this.getMediaService().generateDtmf(digits);
}
COM: <s> forward a string of digits off to a dtmf signal generator </s>
|
funcom_train/41976166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean stay(){
try{
securityZoneManager.accessZone(securityZoneManager.getActivatedZoneID()).deactivateZone();
}
catch(Exception e){
return false;
}
state = SafeHomeState.IDLE;
stateStatusLabel.setText(IDLE);
updateStateWebService();
this.webService.acessTitleFrame().refreshSecurityMenu();
this.controlPanel.updateDisplay(state);
return true;
}
COM: <s> disarm safe home </s>
|
funcom_train/25291262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTransform(Transform3D t1) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_TRANSFORM_WRITE))
throw new CapabilityNotSetException(Ding3dI18N.getString("TransformGroup1"));
if (!t1.isAffine()) {
throw new BadTransformException(Ding3dI18N.getString("TransformGroup0"));
}
((TransformGroupRetained)this.retained).setTransform(t1);
}
COM: <s> sets the transform component of this transform group to the value of </s>
|
funcom_train/19382595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTestCharge(Charge c) {
// System.out.println("ATC x,y " + c.getX() + " " + c.getY());
if (!animated) {
listTestCharges.add(c);
} else {
throw new RuntimeException("Animation in progress, cannot add charges");
}
}
COM: <s> adds a test charge to the spacial modler </s>
|
funcom_train/35812175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean mapSender(Message msg) {
boolean result = false;
if (msg != null && msg.getSender() != null) {
// get current message sender
MessageSender msgSender = msg.getSender();
// get persistent sender
MessageSender persistentSender = getOrInsertSender(msgSender
.getName());
if (persistentSender != null && persistentSender.isPersistent()) {
// replace message sender with persistent one
msg.mapperSetSender(persistentSender);
result = true;
}
}
return result;
}
COM: <s> maps given sender to its database representation </s>
|
funcom_train/21508617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Double getMinThreshold(List<Double> results) {
// Use hardcoded minimum threshold value if data for a day is unavailable.
if (results.isEmpty()) {
return new Double(1500.0);
}
double ave = (Collections.max(results) + Collections.min(results)) / 2.0;
double min = (ave + Collections.min(results)) / 2.0;
return min;
}
COM: <s> calculates the minimum threshold value </s>
|
funcom_train/44482517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleConfigureException(Log log, ApplicationException e) {
if (getExitCode() == 0) {
setExitCode(1);
}
log.error(e.getMessage());
if (log.isDebugEnabled()) {
log.debug(e.getMessage(), e);
}
}
COM: <s> called when there was a problem in the configuration step </s>
|
funcom_train/31958975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getTimeUnitStringRepresentation(int timeUnit){
if (timeUnit == Calendar.DAY_OF_MONTH)
return "day";
if (timeUnit == Calendar.HOUR_OF_DAY)
return "hour";
if (timeUnit == Calendar.MONTH)
return "month";
if (timeUnit == Calendar.YEAR)
return "year";
return "";
}
COM: <s> returns a string representation of the time unit which value is </s>
|
funcom_train/8483442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Address startServing() throws IOException {
InetAddress myAddress = InetAddress.getByName(getCurrentEnvironmentNetworkIp(communicationBus_.getIpAddress()));
listenSocket_ = new ServerSocket(0, 50, myAddress); // create a socket that will listen on any free port
this.start();
return new Address(myAddress, listenSocket_.getLocalPort(), communicationBus_.getGroupName());
}
COM: <s> tries to create a local server socket connection to handle incoming </s>
|
funcom_train/1171251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeColor(String s, Card c, boolean addTo, long timestamp) {
Card_Color removeCol = null;
for (Card_Color cc : cardColor)
if (cc.equals(s, c, addTo, timestamp))
removeCol = cc;
if (removeCol != null)
cardColor.remove(removeCol);
}
COM: <s> p remove color </s>
|
funcom_train/50576683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isEditableDevice(MusicDevice dev) {
String devName = dev.getClass().getName();
ArrayList devTypes = TuneologyFactory.getCreatableDevices();
for(int i = 0; i < devTypes.size(); i++) {
if (((Class) devTypes.get(i)).getName().equals(devName))
return true;
}
return false;
}
COM: <s> returns true if the device was not auto detected </s>
|
funcom_train/28750116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPtypeid(Long newVal) {
if ((newVal != null && this.ptypeid != null && (newVal.compareTo(this.ptypeid) == 0)) ||
(newVal == null && this.ptypeid == null && ptypeid_is_initialized)) {
return;
}
this.ptypeid = newVal;
ptypeid_is_modified = true;
ptypeid_is_initialized = true;
}
COM: <s> setter method for ptypeid </s>
|
funcom_train/35716319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void undoTextChange() {
try {
IDocument document= fTextViewer.getDocument();
if (document instanceof IDocumentExtension4)
((IDocumentExtension4)document).replace(fStart, fText.length(), fPreservedText, fUndoModificationStamp);
else
document.replace(fStart, fText.length(), fPreservedText);
} catch (BadLocationException x) {
}
}
COM: <s> undo the change described by this command </s>
|
funcom_train/4832046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void moveAnimationView(int x, int y) {
FrameLayout.LayoutParams params = (FrameLayout.LayoutParams) animationView.getLayoutParams();
float dpi = getResources().getDisplayMetrics().density;
params.width = params.height = (int) (50 * dpi);
params.leftMargin = (int) ((x * 30 - 10) * dpi);
params.topMargin = (int) ((y * 30 - 10) * dpi);
animationView.setLayoutParams(params);
}
COM: <s> move animation view to some column and row </s>
|
funcom_train/17749797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public VolumeMap fromFiles(List<FileMap> files) {
VolumeMap result = new VolumeMap();
result.bitmapSize = bitmapSize;
result.bitmap = new int[bitmap.length];
for (FileMap fm : files) {
for (LCNSegment s : fm.segments) {
if (s.start >= 0) {
for (long l = s.start; l < s.start + s.size; l++) {
result.set(l);
}
}
}
}
return result;
}
COM: <s> create a volume bitmap from the given list of file maps </s>
|
funcom_train/3909456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected MD_Field createElementWidget(SchemaElement schemaElement) {
// Do we have a vocabulary?
VocabularyList vList = _schemaController.getVocabularyList(schemaElement);
// If we do, make a combo box
if(vList != null) return new MD_ComboBox(_metadata, schemaElement, vList);
// Else make a Text Field
else return new MD_TextField(_metadata, schemaElement);
}
COM: <s> create a widget bound to an element </s>
|
funcom_train/11009966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XSSFColor getBorderColor(BorderSide side) {
switch(side){
case BOTTOM:
return getBottomBorderXSSFColor();
case RIGHT:
return getRightBorderXSSFColor();
case TOP:
return getTopBorderXSSFColor();
case LEFT:
return getLeftBorderXSSFColor();
default:
throw new IllegalArgumentException("Unknown border: " + side);
}
}
COM: <s> gets border color </s>
|
funcom_train/12111069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getColumnCount() {
try {
if (model == null){
return 0;
} else{
// mainPackage.CostantiDavide.msgInfo("Column: " + model.getMetaData().getColumnCount());
return model.getMetaData().getColumnCount();
}
} catch (SQLException e) {
mainPackage.CostantiDavide.msgEccezione("Eccezione in getColumnCount");
e.printStackTrace();
return 0;
}
}
COM: <s> get column count method comment </s>
|
funcom_train/8335344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTrainResults(int index, double newTrainResults) {
System.out.println("train done");
double oldTrainResults = this.trainResults[index];
this.trainResults[index] = newTrainResults;
propertyChangeSupport.fireIndexedPropertyChange(PROP_TRAINRESULTS, index, oldTrainResults, newTrainResults);
}
COM: <s> set the value of train results at specified index </s>
|
funcom_train/29939108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateOptions() {
Display display = getShell().getDisplay();
Runnable process = new Runnable() {
@Override
public void run() {
if (optionTableViewer != null) {
// in case of option addition
optionTableViewer.setInput(new String());
updateColumnWidth(optionTableViewer.getTable());
}
}
};
display.asyncExec(process);
}
COM: <s> updates the option list </s>
|
funcom_train/19221373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void buildLiftForState(byte state){
//creating the singleton for the state
StateSet singleton = new StateSet(state);
//so we need a chain and containing the required state
TiledSet p = HolonomyDecomposition.tiling.getTop();
//System.err.println("+++" + p + " " + p.getHeight());
while (p.getHeight() > 0){
TiledSet next_p = p.getTileWhichContains(singleton);
setComponent(p.getHeight(),inverse_selector(p,next_p));
p = next_p;
}
}
COM: <s> fills the lift for a given state with the new bottom up method </s>
|
funcom_train/35281565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ViewPort getPostView(String viewName) {
for (int i = 0; i < postViewPorts.size(); i++) {
if (postViewPorts.get(i).getName().equals(viewName)) {
return postViewPorts.get(i);
}
}
return null;
}
COM: <s> returns the post view port with the given name </s>
|
funcom_train/20534245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addConnectorLinkPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Connector_connectorLink_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Connector_connectorLink_feature", "_UI_Connector_type"),
NetworkPackage.Literals.CONNECTOR__CONNECTOR_LINK,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the connector link feature </s>
|
funcom_train/99475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public ijResult XA_EndStatement() throws ParseException, SQLException {
int flag = 0;
int xid = 0;
jj_consume_token(XA_END);
flag = xatmflag();
xid = intValue();
xahelper.EndStatement(this, flag, xid);
{if (true) return null;}
throw new Error("Missing return statement in function");
}
COM: <s> xa end statement is xa end xa suspend xa success xa fail xid </s>
|
funcom_train/28308557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initForwarderSpecific() throws Exception {
driverName = configuration.getParameterValue(ParameterNames.driver);
connectionString = configuration.getParameterValue(ParameterNames.connectionString);
queryString = configuration.getParameterValue(ParameterNames.query);
userName = configuration.getParameterValue(ParameterNames.user);
password = configuration.getParameterValue(ParameterNames.password);
}
COM: <s> reads all paramater values </s>
|
funcom_train/9132254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private RulePriority getRulePriority(Module module) {
if (module.getProperties() != null) {
for (Property property : module.getProperties()) {
if ("severity".equals(property.getName())) {
return priorityMapper.from(property.getValue());
}
}
}
return null;
}
COM: <s> gets the rule priority </s>
|
funcom_train/15677151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double area() {
double area = 0;
Point2D prev = this.vertices.get(this.vertices.size() - 1);
Point2D point;
for (int i = 0; i < vertices.size(); i++) {
point = this.vertices.get(i);
area += prev.getX() * point.getY() - prev.getY() * point.getX();
prev = point;
}
return area /= 2;
}
COM: <s> computes the signed area of the linear ring </s>
|
funcom_train/3373616 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void shiftEnd(int newSize) {
int oldGapEnd = getGapEnd();
super.shiftEnd(newSize);
// Adjust marks.
int dg = getGapEnd() - oldGapEnd;
int adjustIndex = findMarkAdjustIndex(oldGapEnd);
int n = marks.size();
for (int i = adjustIndex; i < n; i++) {
MarkData mark = marks.elementAt(i);
mark.index += dg;
}
}
COM: <s> make the gap bigger moving any necessary data and updating </s>
|
funcom_train/45392417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cancelTasks() {
synchronized (m_timerTasks) {
Iterator<TimerTask> iter = m_timerTasks.keySet().iterator();
while (iter.hasNext()) {
TimerTask task = iter.next();
if (task != null)
task.cancel();
iter.remove();
}
}
}
COM: <s> cancels all pending timer tasks </s>
|
funcom_train/40411469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("Store".equals(portName)) {
setStoreEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/13541863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isInPackage(String sUrl) {
if (!bOpenDocument && sUrl.startsWith("#")) { return true; } // old format
if (sUrl.startsWith("./")) { sUrl=sUrl.substring(2); }
return oooDoc.getEmbeddedObject(sUrl)!=null;
}
COM: <s> checks whether this url is internal to the package </s>
|
funcom_train/16480885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String template(String templateName) throws IOException {
String template = templateCache.get(templateName);
if (template == null) {
InputStream in = getClass().getResourceAsStream(templateName);
StringBuilder builder = new StringBuilder();
BufferedInputStream bis = new BufferedInputStream(in);
int b = bis.read();
while (b != -1) {
builder.append((char) b);
b = bis.read();
}
bis.close();
template = builder.toString();
}
return template;
}
COM: <s> get from the classpath the given template </s>
|
funcom_train/35269230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String doCommand(Session session, String command, SampleResult res) throws JSchException, IOException {
StringBuilder sb = new StringBuilder();
ChannelExec channel = (ChannelExec) session.openChannel("exec");
BufferedReader br = new BufferedReader(new InputStreamReader(channel.getInputStream()));
channel.setCommand(command);
res.sampleStart();
channel.connect();
for(String line = br.readLine(); line != null; line = br.readLine()) {
sb.append(line);
sb.append("\n");
}
res.sampleEnd();
channel.disconnect();
return sb.toString();
}
COM: <s> executes a the given command inside a short lived channel in the session </s>
|
funcom_train/25217399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String find(String name) throws FileNotFoundException {
File file = new File(dir, name);
if (file.exists()) {
return new String(readFile(file));
}
if (parent != null) {
return parent.find(name);
}
throw new FileNotFoundException(name);
}
COM: <s> find a file here or up the hierarchy and return its contents </s>
|
funcom_train/3272895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float readFloat() throws IOException, MultiplayerException {
Token current = pop();
if(current.type == Token.STRING && current.value.equalsIgnoreCase("Infinity")){
return Float.POSITIVE_INFINITY;
}
else if (current.type != Token.NUMBER) {
throwException("Number expected: type found = " + current, current);
}
return Float.parseFloat(current.value);
}
COM: <s> read a float from the stream </s>
|
funcom_train/12187890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getURI() {
String result = null;
if (uri == null) {
StringBuffer buf = new StringBuffer(defaultPrefix.length() +
name.length());
buf.append(defaultPrefix).append(name);
result = buf.toString();
} else {
result = uri;
}
return result;
}
COM: <s> returns the uri for the given enumeration literal </s>
|
funcom_train/37518469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void adoptParallelContexts(CFlowControlContextType[] contexts) {
CFlowControlContextType continuationContext = null;
for (int i = 1; i < contexts.length; i++) {
CFlowControlContextType ctxt = contexts[i];
if (ctxt.isReachable()) {
if (continuationContext == null) {
continuationContext = ctxt;
} else {
continuationContext.merge(ctxt);
}
}
}
if (continuationContext == null) {
setReachable(false);
} else {
adopt(continuationContext);
}
}
COM: <s> adopts the information from the given contexts </s>
|
funcom_train/4123245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BufferedImage createBufferedImage(Image img) {
if(img != null) {
BufferedImage buff = new BufferedImage(getWidth(img), getHeight(img), BufferedImage.TYPE_INT_ARGB);
Graphics gfx = buff.createGraphics();
gfx.drawImage(img, 0, 0, null);
gfx.dispose();
return buff;
} else {
return null;
}
}
COM: <s> creates a buffered image out of a given code image code object </s>
|
funcom_train/35032032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void convert(InputStream LWOStream,OutputStream o, AssetManager assetManager) throws IOException {
if (LWOStream==null)
throw new NullPointerException("Unable to load null streams");
Node newnode=new Node("lwo model");
new LWOLoader.LWOLoaderCopy(LWOStream,newnode, assetManager);
BinaryExporter.getInstance().save(newnode,o);
}
COM: <s> creates a node from a </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.