__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/50154103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getValueAt(int row, int col) {
Object value = null;
if ((rows != null) && (rows[row] != null)) {
switch (col) {
case 0 :
value = rows[row];
break;
case 1 :
value = new Boolean(rows[row].isDefault());
}
}
return value;
}
COM: <s> method get value at </s>
|
funcom_train/18875990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLon(Coords lon) {
this.longitude = lon;
// particular case where an empty string is passed as a longitude
// it may be considered as a latitude (default behavior of Coords)
// this code corrects it
if (lon.isNorth() && (lon.value == 0)) {
// force to a latitude
longitude.setAsDegree(0, Cardinal.E);
}
}
COM: <s> set the new longitude of the position </s>
|
funcom_train/29397689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InterfaceImplementation getInterfaceByName(String namespace, String name) {
for (int i = 0; i < interfaces.size(); i++) {
InterfaceImplementation impl = (InterfaceImplementation) interfaces.get(i);
TypeRef ref = impl.getInterface();
if (ref.getNamespace().equals(namespace) && ref.Name.equals(name))
return impl;
}
return null;
}
COM: <s> returns the interface whose name is given by namespace and name </s>
|
funcom_train/22278657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int minItemWidth() {
int i, width, maxWidth;
maxWidth = 0;
for (i = 0; i < menu.itemCount(); i++) {
width = menu.itemAt(i).minWidth();
if (width > maxWidth) {
maxWidth = width;
}
}
return maxWidth;
}
COM: <s> returns the largest title width of all of the menu views menu items </s>
|
funcom_train/25089760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createSinks(Element elem) {
NodeList elems = elem.getElementsByTagName("logsink");
if (elems != null && elems.getLength() > 0) {
for (int i = 0; i < elems.getLength(); i++) {
register(createSink((Element) elems.item(i)));
}
} else {
register(new LogSinkConsole("default", LogLevel.L3_WARN, new Properties()));
}
}
COM: <s> parse configfile part logsinks </s>
|
funcom_train/13754320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getText() {
StringBuffer ret = new StringBuffer();
ret.append(getHeaderText());
ArrayList<String> text = new ArrayList<String>();
text.addAll(Arrays.asList(getParagraphText()));
text.addAll(Arrays.asList(getFootnoteText()));
text.addAll(Arrays.asList(getEndnoteText()));
for(String p : text) {
ret.append(p);
}
ret.append(getFooterText());
return ret.toString();
}
COM: <s> grab the text based on the paragraphs </s>
|
funcom_train/41379911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
// String author = fOverlayStore.getString(PreferenceMessages.IGCONFIG_authorOVERLAY);
// String mail = fOverlayStore.getString(PreferenceMessages.IGCONFIG_mailOVERLAY);
// String ref = fOverlayStore.getString(PreferenceMessages.IGCONFIG_refOVERLAY);
//
// authorText.setText(author);
// mailText.setText(mail);
// refText.setText(ref);
}
COM: <s> fields initialization with the previous values </s>
|
funcom_train/51341005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setupCommitters() {
assert _fieldReadWriteLock.writeLock().isHeldByCurrentThread();
setupName2AddrBTree(getRootAddr(ROOT_NAME2ADDR));
/*
* Responsible for writing the ICUVersionRecord exactly once onto
* the backing store, e.g., when the store is created or when it is
* open with the "update" option specified for ICU.
*/
setCommitter(ROOT_ICUVERSION, new ICUVersionCommitter());
}
COM: <s> invoked when a journal is first created re opened or when the </s>
|
funcom_train/9643411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateTargetShares(List zoomAttributes) {
if (zoomAttributes == null) {
return;
}
for (Iterator iter = zoomAttributes.iterator(); iter.hasNext();) {
if (Thread.interrupted()) {
Thread.currentThread().interrupt(); // re-set the flag!
return;
}
ZoomAttribute att = (ZoomAttribute) iter.next();
updateTargetShares(att);
repaint();
Thread.yield();
}
}
COM: <s> update target shares </s>
|
funcom_train/35951133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdLogout() {
if (cmdLogout == null) {//GEN-END:|28-getter|0|28-preInit
// write pre-init user code here
cmdLogout = new Command("Logout", Command.ITEM, 0);//GEN-LINE:|28-getter|1|28-postInit
// write post-init user code here
}//GEN-BEGIN:|28-getter|2|
return cmdLogout;
}
COM: <s> returns an initiliazed instance of cmd logout component </s>
|
funcom_train/11687233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initSharedSecretCallbackHandlerCache(ServerContextInformation information) {
SharedSecretCallbackHandlerCache cache = SharedSecretCallbackHandlerCache.getInstance();
Object handler =
information.getProperty(
SecurityConstants.PROP_SECRET_CALLBACK_HANDLER);
if (handler instanceof SecretCallbackHandler) {
cache.setSecretCallbackHandler((SecretCallbackHandler) handler);
}
}
COM: <s> initiating shared secret callback handler cache reusing an existing secret callback handler instance </s>
|
funcom_train/38293242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void consumeChar(char c) throws Codec.CodecException {
try {
skipSpaces();
if (content.charAt(current++) != c) {
throw new Codec.CodecException("Parse error: position "+(current-1)+", found "+content.charAt(current-1)+" while "+c+" was expected ["+content.substring(0, current)+"]");
}
}
catch (IndexOutOfBoundsException ioobe) {
throw new Codec.CodecException(msg+current);
}
}
COM: <s> check that the next character after eventual spaces is </s>
|
funcom_train/6268438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNextToken(char delim) throws ParseException {
StringBuffer retval = new StringBuffer();
while (true) {
char la = lookAhead(0);
//System.out.println("la = " + la);
if (la == delim)
break;
else if (la == '\0')
throw new ParseException("EOL reached", 0);
retval.append(buffer.charAt(ptr));
consume(1);
}
return retval.toString();
}
COM: <s> get the next token from the buffer </s>
|
funcom_train/37513867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void generateAllClassesFile(boolean wantFrames) throws IOException {
String label = getText("doclet.All_Classes");
printHeader(label);
printAllClassesTableHeader();
printAllClasses(wantFrames);
printAllClassesTableFooter();
// Add in the external functions
java.util.Iterator i =
MjdocWrapper.root().topConcreteMethods(null).iterator();
if (i.hasNext()) {
printAllGFTableHeader();
printAllGF(i);
printAllClassesTableFooter();
}
printBodyHtmlEnd();
}
COM: <s> print all the classes in table format in the file </s>
|
funcom_train/37048773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
if (e.getSource() == cancelButton) {
this.listener.actionPerformed(new ActionEvent(this, 0, CANCELED));
} else {
this.selectedItem = box.getSelectedItem();
this.listener.actionPerformed(new ActionEvent(this, 0, OK));
}
this.dispose();
}
COM: <s> called when the ok or cancel button is clicked </s>
|
funcom_train/41332864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Shape decodeEdge(int width, int height) {
path.reset();
path.moveTo(width - 2, 0);
path.lineTo(width - 2, height - 4);
path.lineTo(width - 4, height - 2);
path.lineTo(0, height - 2);
return path;
}
COM: <s> create the edge of the button </s>
|
funcom_train/2893334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isDocPhotoInMyList(String key) {
List objects = getDBObjects(DBObjects.MYARGISALLDOCS);
for (Iterator iObjects = objects.iterator(); iObjects.hasNext();) {
DocSearchResult doc = (DocSearchResult) iObjects.next();
if (doc.getParentDocType() == DBObjects.DOCUMENTPHOTO) {
if (doc.getParentDocId().equals(key))
return true;
}
}
return false;
}
COM: <s> determines if the given document photo object is in the </s>
|
funcom_train/33160953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeNode(Object element) {
GraphNode node = (GraphNode) nodesMap.get(element);
if (node != null) {
// remove the node from the layout algorithm and all the connections
if (getLayoutAlgorithm() != null) {
getLayoutAlgorithm().removeEntity(node.getLayoutEntity());
getLayoutAlgorithm().removeRelationships(node.getSourceConnections());
getLayoutAlgorithm().removeRelationships(node.getTargetConnections());
}
// remove the node and it's connections from the model
node.dispose();
applyLayout();
}
}
COM: <s> removes the given element from the layout algorithm and the model </s>
|
funcom_train/3698432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(){
StringBuffer buffer = new StringBuffer(100);
if (toTokens != null) {
for(int i=0;i<toTokens.length;i++){
if(i > 0){
buffer.append(',');
}
buffer.append(toTokens[i].toString());
}
}
return buffer.toString();
}
COM: <s> to get the content of the token </s>
|
funcom_train/39314274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testChangelayer() {
System.out.println("testchangelayer");
main_canvas m = new main_canvas();
m.layerList.clear();
m.layerList.add(new Object());
// m.changeLayer(0);
assertTrue(m.layerList.size()==1);
System.out.println("done testchangelayer");
}
COM: <s> test of change layer method of class main canvas </s>
|
funcom_train/16555133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addSelfIntersectionNode(int argIndex, Coordinate coord, int loc) {
// if this node is already a boundary node, don't change it
if (isBoundaryNode(argIndex, coord))
return;
if (loc == Location.BOUNDARY && useBoundaryDeterminationRule)
insertBoundaryPoint(argIndex, coord);
else
insertPoint(argIndex, coord, loc);
}
COM: <s> add a node for a self intersection </s>
|
funcom_train/36636651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void translateSelected(Vector3f translation) {
populateVertexList();
selectionCenter.set(0, 0, 0);
for (int i = 0; i < vertexList.size(); ++i) {
int index = vertexList.get(i);
tmp.add(vertices[index].location, translation);
vertices[index].location.set(tmp);
selectionCenter.add(tmp); //update the center
}
selectionCenter.scale(1.0f/vertexList.size());
updateNormals(vertexList);
}
COM: <s> translates the selected vertices by the given value and recalculates the center </s>
|
funcom_train/15930829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int anyIndex() {
if (!hasFilter())
return (origin < fence)? origin : -1;
AtomicInteger result = new AtomicInteger(-1);
PAS.FJSelectAny f = new PAS.FJSelectAny
(this, origin, fence, null, result);
ex.invoke(f);
return result.get();
}
COM: <s> returns the index of some element matching bound and filter </s>
|
funcom_train/3022237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initEndPoints() {
Rectangle left = startPanel.getBounds();
Rectangle right = endPanel.getBounds();
workingSegment.reset(left, right);
double t0 = workingSegment.intersect(left);
double t1 = workingSegment.intersect(right);
vertices[0] = new Vertex(workingSegment.getPoint(t0));
vertices[vertices.length - 1] = new Vertex(workingSegment.getPoint(t1));
}
COM: <s> initialize the end points of the segmented line </s>
|
funcom_train/27976589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeModifier (Modifier modifier) {
if (vector.contains ((Object) modifier)) {
modifier.removeListener (this);
vector.remove ((Object) modifier);
// Update total value of modifiers.
Event event = new Event (this, Event.REMOVED, modifier);
this.value -= modifier.getValue ();
notifyListeners (event);
}
}
COM: <s> remove a modifier from this list of modifiers </s>
|
funcom_train/42180365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNewWallThickness(float newWallThickness) {
if (this.newWallThickness != newWallThickness) {
float oldDefaultThickness = this.newWallThickness;
this.newWallThickness = newWallThickness;
this.propertyChangeSupport.firePropertyChange(Property.NEW_WALL_THICKNESS.toString(),
oldDefaultThickness, newWallThickness);
}
}
COM: <s> sets default thickness of new walls in home and notifies </s>
|
funcom_train/35619957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void repaintPortionOfDesktop(JDesktopPane desktop, Component comp) {
// Indicate to the desktop pane that a certain portion of the
// on-screen representation is dirty. The desktop can map these
// coordinates to the positions of the windows if they are
// different.
Rectangle r = comp.getBounds();
desktop.repaint(r.x, r.y, r.width, r.height);
}
COM: <s> repaints the portion of the passed desktop pane corresponding to </s>
|
funcom_train/3748771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getTelecomAddresses() {
if (logger.isDebugEnabled()) {
logger.debug("getTelecomAddresses() - start");
}
if (logger.isDebugEnabled()) {
logger.debug("getTelecomAddresses() - end - return value = "
+ telecomAddresses);
}
return telecomAddresses;
}
COM: <s> get the telecom addresses of this user as a code list code of </s>
|
funcom_train/37076220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent evt) {
try {
method.invoke(target, new Object[0]);
} catch (InvocationTargetException e) {
logger.error(e.getMessage(), e);
}
catch (IllegalAccessException e) {
logger.error("Unexpected condition, IllegalAccessException", e);
}
catch (IllegalArgumentException e) {
logger.error("Unexpected condition, IllegalArgumentException", e);
}
}
COM: <s> runs the method named in the constructor </s>
|
funcom_train/48504894 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateKeyWithName() {
Key key = KeyFactory.createKey(kind, name);
assertEquals(name, key.getName());
assertEquals(kind, key.getKind());
assertEquals(0L, key.getId());
}
COM: <s> test create key with name </s>
|
funcom_train/20844825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPortTypeAttribute(QName portTypeName, QName attributeName, CustomAttributeValue value) {
PortType portType = (PortType) portTypes.get(portTypeName);
if (portType == null) {
throw new IllegalArgumentException("no such port type: " + portTypeName);
}
portType.setAttribute(attributeName, value);
}
COM: <s> sets the code value code of the port type attribute with the specified </s>
|
funcom_train/48390979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addFolderClickHandler(com.smartgwt.client.widgets.tree.events.FolderClickHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.tree.events.FolderClickEvent.getType()) == 0) setupFolderClickEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.tree.events.FolderClickEvent.getType());
}
COM: <s> add a folder click handler </s>
|
funcom_train/43475243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void leave() {
hasLeaved = true;
sendMessage(null,nodeHandle,predecessor,SET_SUCC,REFRESH, new NodeMessage(finger[0]));
sendMessage(null,nodeHandle,finger[0],SET_PRE,REFRESH,new NodeMessage(predecessor));
Logger.log("LEAVING NODE " + id, Logger.EVENT_LOG);
}
COM: <s> the node leaves the network </s>
|
funcom_train/2586151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(final ActionEvent event) {
final String command = event.getActionCommand();
if (command.equals("helpButton")) {
// display help information
}
else if (command.equals("okButton")) {
this.cancelled = false;
setVisible(false);
}
else if (command.equals("cancelButton")) {
this.cancelled = true;
setVisible(false);
}
}
COM: <s> handles clicks on the standard buttons </s>
|
funcom_train/39895027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addTestSuite(TestSuite newSuite, Project project) {
List<TestSuite> testSuites = getTestSuites(project);
for(TestSuite suite:testSuites){
if(suite.getName().equals(newSuite.getName()))
return false;
}
em.persist(newSuite);
return true;
}
COM: <s> creates new test suite </s>
|
funcom_train/33734368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setServer(String server) {
if(server == null) {
log.error("The server address cannot be null");
throw new IllegalArgumentException("The server address cannot be null");
}
if(server.trim().length() == 0) {
log.error("The server address cannot be empty");
throw new IllegalArgumentException("The server address cannot be empty");
}
this.server = server;
}
COM: <s> setter of the server that the photo resides on </s>
|
funcom_train/2344438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void StartercreateConfigure(){
createConfigure();
Basiscompo.setVisible(true);
Configure.setText("Base");
Configure.setSize(Basiscompo.getSize().x+80, Basiscompo.getSize().y+80);
toolBarConfigure.setLocation((Configure.getSize().x/*-170*/)/3, 0);
Configure.setLocation(display.getDPI().x/1, display.getDPI().y/1);
Configure.open();
}
COM: <s> initializes the configururation shell and opens it </s>
|
funcom_train/40334517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(){
Calendar time = new GregorianCalendar();
time.setTimeInMillis(this.time);
return "Waypoint: long " + longitude + " and lat " + latitude + " time "
+ time.get(Calendar.HOUR_OF_DAY) + ":" + time.get(Calendar.MINUTE) + " " + time.get(Calendar.DAY_OF_MONTH) + "-"
+ (time.get(Calendar.MONTH)+1) + "-" + time.get(Calendar.YEAR);
}
COM: <s> returns a string representation of the this waypoint object </s>
|
funcom_train/28424836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void putRow( int row, List data ) {
removeRow( row );
Iterator it = data.iterator();
for ( int x = 0; it.hasNext(); x++ ) {
put( x + getMinX(), row, it.next() );
}
}
COM: <s> inserts the given data into the row </s>
|
funcom_train/14372095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RowColorAggregator getColorAggregator(Strip strip, long dataUpdateNumber) {
RowColorAggregator result = cMap.get(strip);
if (result == null) {
// System.out.println("Key not found");
return null;
}
if (dataUpdateNumber != result.dataUpdateNumber) {
// System.out.println("data index:" + dataIndex + "doesn't match: " + result.dataIndex);
return null;
}
return result;
}
COM: <s> looks up the row color aggregator for the specified strip </s>
|
funcom_train/644445 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void switchToOptionValueTable(DialogOptions dialogOptions) {
this.dialogOptions = dialogOptions;
CardLayout cl = (CardLayout) (dialogOptions.getPanelOptions().getLayout());
cl.show(dialogOptions.getPanelOptions(), PersistenceManager.Values.CARD_VALUETABLE.name());
dialogOptions.setSelectedOption(PersistenceManager.Values.CARD_VALUETABLE.name());
}
COM: <s> switches to the value table category in the option dialog </s>
|
funcom_train/3372974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAccessibleRowHeader(int r) {
if (validateIfNecessary()) {
TableCellElementInfo cellInfo = getCell(r, 0);
if (cellInfo.isHeaderCell()) {
View v = cellInfo.getView();
if (v != null && model != null) {
try {
return model.getText(v.getStartOffset(),
v.getEndOffset() -
v.getStartOffset());
} catch (BadLocationException e) {
return null;
}
}
}
}
return null;
}
COM: <s> returns the row header at a row in a table </s>
|
funcom_train/37733222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deploy(File warFile) throws IOException {
if(exploder != null) {
exploder.explode(warFile);
}
updateDescriptors();
Iterator it = registrars.iterator();
PortalRegistrarService registrar = null;
while(it.hasNext()) {
registrar = (PortalRegistrarService)it.next();
registrar.register(portletAppDescriptorService);
}
}
COM: <s> deploy the war file at the given location </s>
|
funcom_train/49426317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private float getRFromString(final String color) {
if (isShortMode(color)) {
return (Integer.valueOf(color.substring(1, 2), HEX_BASE) * SCALE_SHORT_MODE) / MAX_INT_VALUE;
} else {
return Integer.valueOf(color.substring(1, 3), HEX_BASE) / MAX_INT_VALUE;
}
}
COM: <s> helper to get red from a string value </s>
|
funcom_train/40296515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private User addUser() {
User user = new User();
user.setId("08937673673258650684");
user.setReputationPoints(20);
user.setRoleName(User.ROLE_USER);
user.setDisplayName("Abhi");
user.setCreatedOn(new Date());
return userService.saveUser(user);
}
COM: <s> add a user into the datastore </s>
|
funcom_train/42363200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setJMenuBar(getJJMenuBar());
this.pack(); //let us maximize the window
this.setExtendedState(Frame.MAXIMIZED_BOTH);
this.setContentPane(getJContentPane());
this.setTitle("UpWind2 Simulator -v.0.3");
// create and add mouse listener to mousePanel
MouseListener mouseListener = new MouseListener();
MouseWheelE mouseWheel = new MouseWheelE();
Canvas.addMouseListener(mouseListener);
Canvas.addMouseWheelListener(mouseWheel);
}
COM: <s> initializes the user interface </s>
|
funcom_train/2408369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object aDestConstraint) {
if (aDestConstraint instanceof XYConstraints) {
XYConstraints objDestConstraint = (XYConstraints) aDestConstraint;
return objDestConstraint.nXPoint_ == nXPoint_ && objDestConstraint.xYPoint_ == xYPoint_ && objDestConstraint.nWidth_ == nWidth_
&& objDestConstraint.nHeight_ == nHeight_;
}
return false;
}
COM: <s> checks whether two xyconstraints are equal </s>
|
funcom_train/45417011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void logAttempt(boolean success) throws LoginException {
Connection con = null;
try {
if (!success) {
incrementCounter();
if (getUtenStatus().getRetries() >= maxRetries) {
log.info("Utente bloccato per superamento tentativi errati ("+maxRetries+")");
lockAccount(TIP_BLK_MAX_TENTATIVI_ERR);
}
}
} catch (Exception e) {
log.error("Unexpected error", e);
} finally {
if (con != null) {
try {
con.close();
} catch (Throwable e) {
log.error("Error closing connection", e);
}
}
}
}
COM: <s> logs login attempt </s>
|
funcom_train/15407124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPersistControllers(DeployBeanDescriptor<?> deployDesc){
for (int i = 0; i < list.size(); i++) {
BeanPersistController c = list.get(i);
if (c.isRegisterFor(deployDesc.getBeanType())){
logger.fine("BeanPersistController on[" + deployDesc.getFullName() + "] " + c.getClass().getName());
deployDesc.addPersistController(c);
}
}
}
COM: <s> return the bean persist controller for a given entity type </s>
|
funcom_train/13393234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Entry getWatchUI() throws MalformedURLException, IOException {
return (UIDescriptorFactory.getUIDescriptor(
AdminUI.ROLE,
new UIComponentFactory(
new URL(context.getExportCodebase() +
"lincoln-ui.jar"),
"net.assimilator.watch.AccumulatorViewer")));
}
COM: <s> override parents get watch ui using lincoln ui </s>
|
funcom_train/43572823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getXmlValue(String value) {
return value.replaceAll("&", "&").replaceAll("<", "<")
.replaceAll(">", ">").replaceAll("\'", "'").replaceAll(
"\"", """);
}
COM: <s> return a new string where specials characters are public </s>
|
funcom_train/33895766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getCookiePath(HttpServletRequest request) {
String path = request.getContextPath();
if (path == null || path.equals("")) return "/";
// The spec says this should never happen, but just to be sure...
if (!path.startsWith("/")) return "/" + path;
return path;
}
COM: <s> root the login cookie at the same location as the webapp </s>
|
funcom_train/21502429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSymbolPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_UnitFactor_symbol_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_UnitFactor_symbol_feature", "_UI_UnitFactor_type"),
TypeSystemPackage.Literals.UNIT_FACTOR__SYMBOL,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the symbol feature </s>
|
funcom_train/51783301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateNoteConnection() {
ClassElement clss = (ClassElement) factory.createNode(ElementType.CLASS);
NoteElement note = (NoteElement) factory.createNode(ElementType.NOTE);
NoteConnection conn = (NoteConnection)
factory.createConnection(RelationType.NOTE_CONNECTOR, clss, note);
assertStdConnectionConditions(conn, clss, note);
assertNull(conn.getModelElement());
}
COM: <s> tests the creation of a note connection </s>
|
funcom_train/36859429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setWithdrawModeToNote() {
if (!isOpen())
return false;
if (methods.getSetting(Constants.SETTING_BANK_TOGGLE_WITHDRAW_MODE) != 1) {
methods.atInterface(Constants.INTERFACE_BANK, Constants.INTERFACE_BANK_BUTTON_NOTE);
methods.wait(methods.random(500, 700));
}
return methods.getSetting(Constants.SETTING_BANK_TOGGLE_WITHDRAW_MODE) == 1;
}
COM: <s> sets the bank withdraw mode to note </s>
|
funcom_train/1944290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeContent(InputStream inputStream, OutputStream outputStream) throws IOException {
byte [] buffer = new byte[1024];
int read = 0;
while((read = inputStream.read(buffer)) > 0) {
outputStream.write(buffer, 0, read);
}
outputStream.flush();
outputStream.close();
}
COM: <s> write the input streams content in the output stream </s>
|
funcom_train/49406852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Query build(final ASTSelectStatement decl){
RawQueryBuilder rb = new RawQueryBuilder(resolver);
List<ASTQueryComparisonStatement> statements = decl.getStatements();
for (ASTQueryComparisonStatement stmt : statements) {
rb.beginWhereStmt();
pushValue(rb, stmt.getSubject());
pushValue(rb, stmt.getPredicate());
pushValue(rb, stmt.getObject());
rb.endWhereStmt();
}
String[] queriedVars = getVariableNames(decl.getQueriedVariables());
return rb.build(queriedVars);
}
COM: <s> builds a query from an </s>
|
funcom_train/9558621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void run2() throws InterruptedException, ThreadChangedException {
synchronized (fMutex) {
checkThread();
tryHold(); // wait / potential state change
assertStates(STOPPED | RUNNING);
while (isState(RUNNING)) {
waitForTimeout(); // wait / potential state change
if (isState(RUNNING))
timedOut(); // state change
assertStates(STOPPED | IDLE);
tryHold(); // wait / potential state change
assertStates(STOPPED | RUNNING);
}
assertStates(STOPPED);
}
}
COM: <s> runs the thread </s>
|
funcom_train/12855692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PersistException toPersistException(Throwable e) {
PersistException pe = transformIntoPersistException(e);
if (pe != null) {
return pe;
}
Throwable cause = e.getCause();
if (cause != null) {
pe = transformIntoPersistException(cause);
if (pe != null) {
return pe;
}
} else {
cause = e;
}
return new PersistException(cause);
}
COM: <s> transforms the given throwable into an appropriate persist exception </s>
|
funcom_train/46966618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double calculatePercentage(Size other) {
if (!(other instanceof LongValueSize)) {
throw new IllegalArgumentException("#calculatePercentage() parameter is not an instance of " + LongValueSize.class.getName());
}
return (double) ((LongValueSize) other).getValue() / (double) value;
}
COM: <s> returns others long value divided by this long value sizes long value </s>
|
funcom_train/25130451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateStyleSet(ARINCWidgetRenderer renderer) {
if (isCurrentUISynth2()) {
try {
String arincID = renderer.getWidget().getWidgetDefinition().getID();
Synth2LookAndFeel.resetSelectedARINCID(arincID);
updateStyleSet((JComponent) renderer);
} catch (UIException e) {
}
}
}
COM: <s> update the look and feel corresponding to the style set of a renderer </s>
|
funcom_train/18745827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean passBasicChecks(Shape dom, Shape cod) {
return dom.nodeCount() == cod.nodeCount()
&& dom.edgeCount() == cod.edgeCount()
&& dom.getEquivRelation().size() == cod.getEquivRelation().size()
&& dom.getEdgeSigSet().size() == cod.getEdgeSigSet().size();
}
COM: <s> performs some basic comparisons between the two given shapes </s>
|
funcom_train/13724593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void extractGroundTerms(Collection<IRule> rules) {
assert rules != null;
for (IRule rule : rules) {
for (ILiteral literal : rule.getHead()) {
for (ITerm term : literal.getAtom().getTuple()) {
extractGroundTermsFromTerm(term);
}
}
for (ILiteral literal : rule.getBody()) {
for (ITerm term : literal.getAtom().getTuple()) {
extractGroundTermsFromTerm(term);
}
}
}
}
COM: <s> extract ground terms from rules and create unique values for each </s>
|
funcom_train/2540021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMTApp(AbstractMTApplication mtApp){
this.mtApp = mtApp;
// this.currentCanvas = mtApp.getCurrentScene().getMainCanvas();
//Add scene change listener to mt app
this.mtApp.addSceneChangeListener(new ISceneChangeListener(){
public void processSceneChangeEvent(SceneChangeEvent sc) {
sceneChange(sc.getLastScene(), sc.getNewScene());
}
});
}
COM: <s> sets the m t app </s>
|
funcom_train/46443328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setConfiguration(CustomSourceConfiguration config) {
// read the list of exclusions
String strExclusions = config.getConfigValue(EXCLUDE);
if (null != strExclusions) {
String[] parts = CmsStringUtil.splitAsArray(strExclusions, ",");
for (int i = 0; i < parts.length; i++) {
String part = parts[i].trim();
if (part.length() == 0) {
// skip empty parts
continue;
}
// add the type to the list
m_htExclusions.put(part, part);
}
}
}
COM: <s> retrieve and saves the configuration option values </s>
|
funcom_train/25540585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isSeriesNonEmpty(SeriesType type) {
Integer num = obsPlotModel.getSrcTypeToSeriesNumMap().get(type);
// This series exists and has obs (or not), so allow it to be selected
// (or not).
boolean hasObs = obsPlotModel.getSeriesNumToObSrcListMap().containsKey(
num)
&& !obsPlotModel.getSeriesNumToObSrcListMap().get(num)
.isEmpty();
return hasObs;
}
COM: <s> does the specified series have corresponding observations </s>
|
funcom_train/33877583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor fetchAllProfiles() {
return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_TITLE, KEY_FREQ, KEY_START_DATE,
KEY_END_DATE}, null, null, null, null, null);
}
COM: <s> return a cursor over the list of all profile in the database </s>
|
funcom_train/21883918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getResourceName() {
final String propName = "reference." + getName() + ".resource-name";
if (!getProject().getProperties().containsKey(propName)) {
throw new BuildException(propName + " property not found");
}
return getProject().getProperty(propName);
}
COM: <s> get the resource name </s>
|
funcom_train/51101295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setObjEntities(List objEntities) {
this.objEntities = objEntities != null
? new ArrayList(objEntities)
: new ArrayList();
// remove generic entities...
Iterator it = objEntities.iterator();
while (it.hasNext()) {
ObjEntity e = (ObjEntity) it.next();
if (e.isGeneric()) {
it.remove();
}
}
}
COM: <s> initializes internal obj entities list </s>
|
funcom_train/7630396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStreamSolo(int streamType, boolean state) {
IAudioService service = getService();
try {
service.setStreamSolo(streamType, state, mICallBack);
} catch (RemoteException e) {
Log.e(TAG, "Dead object in setStreamSolo", e);
}
}
COM: <s> solo or unsolo a particular stream </s>
|
funcom_train/51557807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testModuleImport() throws Exception {
echo("Testing testModuleImport");
String moduleName = getThisProjectsModuleName();
assertTrue("Module '" + moduleName + "' was not imported!", hasModule(moduleName));
assertEquals("testing Dummy Module", getThisProjectsModuleDescription());
assertTrue(hasModule("org.opencms.workplace"));
}
COM: <s> test if all required modules where imported </s>
|
funcom_train/22402782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemLoadAction() {
if (jMenuItemLoadAction == null) {
jMenuItemLoadAction = new JMenuItem();
jMenuItemLoadAction.setText("Load file");
jMenuItemLoadAction.addActionListener(new LoadMenu());
}
return jMenuItemLoadAction;
}
COM: <s> this method initializes j menu item load action </s>
|
funcom_train/44602653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_extended_string_literal_01() {
compileAndExecGivenStatement(
"X.java",
"class X {\n" +
" //@ requires (\"Hello\" + \"World\") != null;\n" +
" public void m() {\n" +
" }\n" +
"}\n",
"new X().m()");
}
COM: <s> extended string literal hello world </s>
|
funcom_train/1912824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void aliasField(String alias, Class type, String fieldName) {
if (fieldAliasingMapper == null) {
throw new InitializationException("No "
+ FieldAliasingMapper.class.getName()
+ " available");
}
fieldAliasingMapper.addFieldAlias(alias, type, fieldName);
}
COM: <s> create an alias for a field name </s>
|
funcom_train/14140620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CellView getSourceCellViewAt( Point point ) {
// Scale from Screen to Model
Point2D tmp = graph.fromScreen( new Point( point ) );
CellView view = graph.getLeafViewAt( tmp.getX(), tmp.getY() );
if (view instanceof NetCellView) {
return ((NetCellView) view);
} else {
return null;
}
}
COM: <s> gets the source cell view at a particular location in the graph </s>
|
funcom_train/8844518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doAction(){
String path =_gui.getSetupView().txtGetOutput();
try{
path = _gui.showSaveDialog();
}
catch (IOException e){
_gui.setStatus(e.getMessage());
}
_gui.getSetupView().setTextOutputFile(path);
}
COM: <s> enables selecting output file </s>
|
funcom_train/29035317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected QName getQName(String prefixedLocalName) {
int colon = prefixedLocalName.indexOf(':');
String prefix = "";
if (colon > 0 && colon <= prefixedLocalName.length()) {
prefix = prefixedLocalName.substring(0,colon);
}
String localName = "";
if (colon < prefixedLocalName.length()-1) {
localName = prefixedLocalName.substring(colon+1);
}
String namespace = getNamespaceUri(prefix);
return new QName(prefix,localName,namespace);
}
COM: <s> extracts the prefix from the given qualified name e </s>
|
funcom_train/25647448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removePort(State removedState) {
Port removedPort = null;
if (removedState instanceof InGate) {
removedPort = inGateToPortMap.remove((InGate)removedState);
} else if (removedState instanceof OutGate) {
removedPort = outGateToPortMap.remove((OutGate)removedState);
}
if (removedPort != null) {
portRemoveObservers.notifyObservers(removedPort);
}
}
COM: <s> removes the port which links to the specified in gates or out gates </s>
|
funcom_train/33860094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getRemoveForAllPanel() {
if (removeForAllPanel == null) {
GridBagConstraints gridBagConstraints61 = new GridBagConstraints();
gridBagConstraints61.fill = GridBagConstraints.BOTH;
gridBagConstraints61.weighty = 1.0;
gridBagConstraints61.weightx = 1.0;
removeForAllPanel = new JPanel();
removeForAllPanel.setLayout(new GridBagLayout());
removeForAllPanel.add(getRemoveForAllSplitPane(), gridBagConstraints61);
}
return removeForAllPanel;
}
COM: <s> this method initializes remove for all panel </s>
|
funcom_train/17758024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextArea getTxtKwalifikator() {
if (txtKwalifikator == null) {
txtKwalifikator = new JTextArea();
txtKwalifikator.setBounds(new Rectangle(102, 48, 337, 73));
txtKwalifikator.setLineWrap(true);
txtKwalifikator.setWrapStyleWord(true);
txtKwalifikator.setFont(new Font("Dialog", Font.PLAIN, 12));
txtKwalifikator.setForeground(new Color(0, 0, 51));
txtKwalifikator.setText("1 AND 2 AND 3 OR 4");
txtKwalifikator.setEditable(false);
}
return txtKwalifikator;
}
COM: <s> this method initializes txt kwalifikator </s>
|
funcom_train/1627065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getIndentOfLine(IDocument document, int line) throws BadLocationException {
if (line > -1) {
int start= document.getLineOffset(line);
int end= start + document.getLineLength(line) - 1;
int whiteend= findEndOfWhiteSpace(document, start, end);
return document.get(start, whiteend - start);
}
return ""; //$NON-NLS-1$
}
COM: <s> returns the content of the given line without the leading whitespace </s>
|
funcom_train/8241621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void newCategoryButtonActionPerformed(ActionEvent evt) {
String value = JOptionPane.showInputDialog(PropertyGetter
.getNamedProperty("New_category_message"));
DefaultComboBoxModel model = (DefaultComboBoxModel) categoryComboBox
.getModel();
if (model.getIndexOf((String) value) == -1) {
model.addElement(value);
}
model.setSelectedItem(value);
categoryComboBox.setModel(model);
}
COM: <s> adds a new category </s>
|
funcom_train/5573128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean hasExportableExtension(String resourceName) {
if (getExportableTypes() == null) // ie.- all extensions are
// acceptable
return true;
int separatorIndex = resourceName.lastIndexOf("."); //$NON-NLS-1$
if (separatorIndex == -1)
return false;
String extension = resourceName.substring(separatorIndex + 1);
Iterator it = getExportableTypes().iterator();
while (it.hasNext()) {
if (extension.equalsIgnoreCase((String) it.next()))
return true;
}
return false;
}
COM: <s> returns whether the extension of the given resource name is an extension </s>
|
funcom_train/42264294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Component getTabContainer() {
int tabCount = tabPane.getTabCount();
for (int i = 0; i < tabCount; i++) {
Component tabComponent = tabPane.getTabComponentAt(i);
if (tabComponent != null) {
return tabComponent.getParent();
}
}
return null;
}
COM: <s> check if we have a custom tab component container </s>
|
funcom_train/34403055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
inited = true;
try {
AL.create();
soundWorks = true;
sounds = true;
} catch (Exception e) {
e.printStackTrace();
soundWorks = false;
sounds = false;
}
if (soundWorks) {
sourceCount = 8;
sources = BufferUtils.createIntBuffer(8);
AL10.alGenSources(sources);
if (AL10.alGetError() != AL10.AL_NO_ERROR) {
sounds = false;
soundWorks = false;
}
}
}
COM: <s> initialise the sound effects stored </s>
|
funcom_train/41209197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTextPosition(int textPosition) {
if (textPosition != LEFT && textPosition != RIGHT && textPosition != BOTTOM && textPosition != TOP) {
throw new IllegalArgumentException("Text position can't be set to " + textPosition);
}
this.textPosition = textPosition;
}
COM: <s> sets the position of the text relative to the icon if exists </s>
|
funcom_train/46998740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getJCheckBox() {
if (jCheckBox == null) {
jCheckBox = new JCheckBox();
jCheckBox.setBounds(new Rectangle(102, 272, 185, 44));
jCheckBox.setToolTipText("Will Cause an Initial Jitter for the Cache Time, depending on Network Speed");
jCheckBox.setText("Cached");
}
return jCheckBox;
}
COM: <s> this method initializes j check box </s>
|
funcom_train/48152969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParameters(double k, double b){
double upperBound;
//Correct invalid parameters
if(k < 0) k = 1;
if(b < 0) b = 1;
shape = k;
scale = b;
//Normalizing constant
c = shape * Math.log(scale) + Functions.logGamma(shape);
//Assign default partition:
upperBound = getMean() + 4 * getSD();
setDomain(0, upperBound, 0.01 * upperBound, CONTINUOUS);
}
COM: <s> this method sets the parameters and creates the default domain </s>
|
funcom_train/50846361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetRowId() throws Exception {
if (!getBooleanProperty("test.types.rowid", true))
{
return;
}
RowId x = null;
PreparedStatement stmt = queryBy("c_object");
try {
stmt.setRowId(1, x);
} catch (SQLException ex) {
fail(ex.toString());
}
}
COM: <s> test of set row id method of interface java </s>
|
funcom_train/46916271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasExternallyManagedClasses(User user) {
for (Iterator i=getClasses().iterator();i.hasNext();) {
Class_ c = (Class_)i.next();
if (c.isEditableBy(user) && c.getManagingDept().isExternalManager().booleanValue())
return true;
}
return false;
}
COM: <s> check if subpart has atleast one externally managed class </s>
|
funcom_train/35414249 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(null);
jContentPane.add(getOriginalPane(), null);
jContentPane.add(getResultPane(), null);
jContentPane.add(getControls(), null);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/32136088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonSaveProduct() {
if (jButtonSaveProduct == null) {
jButtonSaveProduct = new JButton();
jButtonSaveProduct.setText(LanguageManager.getInstance().getVar("jButtonSaveProduct"));
jButtonSaveProduct.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
saveProduct();
}
});
}
return jButtonSaveProduct;
}
COM: <s> this method initializes j button save product </s>
|
funcom_train/44512632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Icon getStatusIcon(int stat) {
ImageIcon icon;
switch (stat) {
case Buddy.ONLINE:
icon = new ImageIcon(GuiController.ICONPATH + "online.gif");
break;
case Buddy.ABSENT:
icon = new ImageIcon(GuiController.ICONPATH + "absent.gif");
break;
case Buddy.BUSY:
icon = new ImageIcon(GuiController.ICONPATH + "busy.gif");
break;
case Buddy.OFFLINE:
icon = new ImageIcon(GuiController.ICONPATH + "offline.gif");
break;
default:
icon = new ImageIcon(GuiController.ICONPATH + "offline.gif");
break;
}
return icon;
}
COM: <s> returns the icon that belongs to the status of the buddy </s>
|
funcom_train/4809305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void switchScreen(int screenType) throws SOTSException {
//don't bother switching screens if the requested screen is the
//current screen.
if (screenType == this.screenType) {
return;
}
if (screenType < 1 || screenType > MAX_SCREEN_NUM) {
throw new SOTSException ("Attempting Switch To Unsupported Screen Type");
}
changeScreen(screenType);
}
COM: <s> switch to one of the following screens </s>
|
funcom_train/2903206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addDrawer(XMLTag tags){
boolean isTaskbar = (tags.attribute!=null) && tags.attribute.containsKey("parent");
if(isTaskbar){
Hashtable ht = new Hashtable(tags.attribute.size()+5);
ht.putAll(tags.attribute);
tags.attribute = ht;
}
else{
if(tags.attribute == null){
tags.attribute = new Hashtable(5);
}
tags.attribute.put("movable", "xy");
tags.attribute.remove("orientation=horizontal");
}
ZDrawer d = new ZDrawer(tags, drawerManager);
drawerManager.add(d);
windowManager.addDesktopGUI(d, drawerManager.getModuleID());
d.invalidate();
d.validate();
d.repaint();
}
COM: <s> add a new drawer </s>
|
funcom_train/3320013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFileTypes(String[] pFileTypes) throws IllegalArgumentException {
if (pFileTypes == null) {
throw new IllegalArgumentException("File type array can't be null");
}
if (pFileTypes.length == 0) {
throw new IllegalArgumentException("File type array can't be empty");
}
mFileTypes = pFileTypes;
}
COM: <s> setter method for the file types </s>
|
funcom_train/39166557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test000TransduceEmptyDoc() throws Exception {
final String japeFilePath = "/jape/test/japefiles/Req-GATETao-8.1.1.jape";
Set<Annotation> actualResults = doTest(Factory.newDocument(""), japeFilePath, annoCreatorEmpty, null);
assertEquals("There must be no transduced annotations.", 0, actualResults.size());
}
COM: <s> try to transduce on empty document </s>
|
funcom_train/43214285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireFailedData(String fileName, File file, BigHash chunkHash, Collection<PropagationExceptionWrapper> exceptions) {
fireFailure(new AddFileToolEvent(AddFileToolEvent.ACTION_FAILED, AddFileToolEvent.TYPE_DATA, file, fileName, null, chunkHash, null), exceptions);
}
COM: <s> p notifies listeners that a data chunk could not be uploaded </s>
|
funcom_train/49802902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SwissProtComposition getComposition(String aSpecies){
for(int i = 0; i<iAllSpecies.size(); i ++){
if(iAllSpecies.get(i).getSpecieName().equalsIgnoreCase(aSpecies)){
return iAllSpecies.get(i);
}
}
return null;
}
COM: <s> get a specific swiss prot composition for a specific species </s>
|
funcom_train/11344283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setServiceLevelDependency() {
m_specLevelReq = true;
PolicyServiceContext context = new PolicyServiceContext(m_handler.getCompositeManager().getGlobalContext(), m_handler.getCompositeManager().getParentServiceContext(), PolicyServiceContext.LOCAL);
setBundleContext(context);
}
COM: <s> set that this dependency is a service level dependency </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.