__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/14129112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane initPDFDisplay() {
JScrollPane currentScroll = new JScrollPane();
pdfDecoder.setDisplayView(Display.SINGLE_PAGE,Display.DISPLAY_CENTERED);
currentScroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
currentScroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
currentScroll.getViewport().add(pdfDecoder);
//currentScroll.setViewportView(pdfDecoder);
return currentScroll;
}
COM: <s> returns the scrollpane with pdf decoder set as the viewport </s>
|
funcom_train/27675800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String readIPv6address() {
final StringBuilder builder = new StringBuilder();
byte b = this.message.read();
while ( URIUtils.isHEXDIG( (char) b ) || b == ':' || b == '.' ) {
builder.append( (char) b );
b = this.message.read();
}
this.message.unread();
return builder.toString();
}
COM: <s> reads an code ipv6address code at the current position </s>
|
funcom_train/26478478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addInterceptor(Interceptor interceptor) {
assert !(interceptor instanceof ConstructionInterceptor) : "Construction interceptors are added on the aspect instance";
Method[] methods = getAllMethods();
for (int i = 0; i < methods.length; i++) {
Method method = methods[i];
addInterceptor(method, (MethodInterceptor) interceptor);
}
}
COM: <s> adds this interceptor to all methods </s>
|
funcom_train/3122320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Tuple getTupleByAttribute(String strAttribute) {
Iterator it = tuples();
Tuple t;
while (it.hasNext()) {
t = (Tuple) it.next();
if (t.getAttribute(strAttribute) != null) {
return (t);
}
}
return (null);
} // of method
COM: <s> get the first tuple with the specified attribute key defined </s>
|
funcom_train/50244704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLocation( int x, int y ){
this.setLocationDelta(
(int)(x - drawpath.getBounds2D().getCenterX()),
(int)(y - drawpath.getBounds2D().getCenterY()));
//this.setInetGeoAddress(x,y);
}
COM: <s> moves the location of the visual vertex to the new coordinate </s>
|
funcom_train/51617302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void refreshState() {
boolean configLoaded = (object != null); //whether or not a config file is loaded
cmdCompile.setEnabled( configLoaded );
if( !configLoaded ) {
setFilename(null);
txtConfigFile.setText( "" );
txtOwner.setText( "" );
txtDescription.setText( "" );
}
mnuOpen.setEnabled( !compiling );
}
COM: <s> determine what should be enabled disabled based on the current state of things </s>
|
funcom_train/22155141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void sendPart(Station to, int part) throws Exception {
to.fileParts[part] = SIMULATOR.getRoundNum();
SIMULATOR.getStatisticOutStream().println("S " + this.nodeIndex + " " + to.nodeIndex + " " + part);
TOPOLOGY.transmit(this.nodeIndex, to.nodeIndex, (short)1);
this.uploadPartCounter++;
}
COM: <s> send given part from this station to the to station </s>
|
funcom_train/2655079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() {
final DataCache cache =_app.getDataCache();
final IdentifierFactory factory = IdentifierFactory.getInstance();
final ISQLAlias alias = cache.createAlias(factory.createIdentifier());
new AliasMaintDialog(_app, _frame, alias,
AliasMaintDialog.MaintenanceType.NEW).show();
}
COM: <s> create a new tt isqlalias tt objwect and display a dialog </s>
|
funcom_train/50982847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExecute_NotFound() {
final ObjectStore store
= new DispatchingObjectStore(new HashMap(3), Collections.EMPTY_MAP);
try {
store.execute( new CommandA() );
fail("Expected exception");
}
catch( ObjectStoreCommandNotSupportedException e ) {
// Expected path
}
}
COM: <s> try to dispatch a command for which we havent defined a store </s>
|
funcom_train/27825840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EvolutionParameters getEvolutionParameters(OIModel oimodel) throws KAONException {
EvolutionParameters evolutionParameters=(EvolutionParameters)m_evolutionParametersByOIModel.get(oimodel);
if (evolutionParameters==null)
throw new KAONException("Evolution parameters hasn't been set for OI-model '"+oimodel.getLogicalURI()+"'");
return evolutionParameters;
}
COM: <s> finds evolution parameters for a given oimodel </s>
|
funcom_train/37507121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updatePeer(Peer peer) {
int i;
Peer comparedPeer;
for (i=0;i<peerSockets.size();i++) {
comparedPeer = ((PeerSocket)peerSockets.get(i)).getPeer();
if(comparedPeer.isSamePeer(peer)) {
((PeerSocket)peerSockets.get(i)).updatePeer(peer);
P4PAgent.incrNetworkSize(peer.getSetSize() - comparedPeer.getSetSize());
}
}
}
COM: <s> updates the informations about a peer ie set id and set size </s>
|
funcom_train/32720345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireIncrementCounter(CounterEvent event) {
if (counterListeners != null) {
Vector listeners = counterListeners;
int count = listeners.size();
for (int i = 0; i < count; i++) {
((CounterListener) listeners.elementAt(i)).incrementCounter(event);
}
}
}
COM: <s> inform all registered listeners that the supplied counter needs to be </s>
|
funcom_train/22528513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IGraphicalConnectedModelObject getGraphicalLDChild(String identifier) {
for(IGraphicalModelObject gxfObject : getChildren()) {
if(gxfObject instanceof IGraphicalConnectedModelObject) {
if(identifier.equals(((IGraphicalConnectedModelObject)gxfObject).getIdentifier())) {
return (IGraphicalConnectedModelObject)gxfObject;
}
}
}
return null;
}
COM: <s> get a graphical connected child object given its identifier </s>
|
funcom_train/2877519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initKeyManagers() throws SFGeneralSecurityException {
try {
KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
kmf.init(ks, keyStorePasswd.toCharArray());
keyManagers = kmf.getKeyManagers();
} catch (Exception e) {
throw new SFGeneralSecurityException(e);
}
}
COM: <s> initializes a set of key managers that jsse needs using as base the </s>
|
funcom_train/34301681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CategoryData getCurrentDropCategory( DropTargetDragEvent dtde ) {
Point dropPoint = dtde.getLocation();
TreePath dropPath = getPathForLocation( dropPoint.x, dropPoint.y );
if( null != dropPath ) {
return (CategoryData)((DefaultMutableTreeNode)dropPath.getLastPathComponent()).getUserObject();
}
return null;
}
COM: <s> returns the currently selected category during drag action </s>
|
funcom_train/7278304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readyForWriting() {
if (_isChoked || _requested.isEmpty())
return;
usingSlot = true;
int proceed = usManager.requestSlot(
this,
!context.getDiskManager().isComplete());
if (proceed == -1) { // denied, choke the connection
usingSlot = false;
choke();
} else if (proceed == 0)
beginPieceSend();
// else queued, will receive callback.
}
COM: <s> notifies this that the connection is ready to write the next chunk of </s>
|
funcom_train/4366387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Iterator findChildren(String name) {
if (children == null)
return (Collections.EMPTY_LIST.iterator());
ArrayList results = new ArrayList();
Iterator items = children.iterator();
while (items.hasNext()) {
TreeNode item = (TreeNode) items.next();
if (name.equals(item.getName()))
results.add(item);
}
return (results.iterator());
}
COM: <s> return an iterator over all children of this node that have the </s>
|
funcom_train/20343176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public E get(Value value) throws RepositoryException, ClassCastException {
if (value.getType() == propertyMetaType.getCode()) {
I internal = propertyMetaType.getValue(value);
return valueType.getExternal(internal);
} else {
throw new ClassCastException();
}
}
COM: <s> converts a jcr value to its external representation </s>
|
funcom_train/32382834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(String name, Scriptable start, Object value) {
// try to use setter
if (name == null || name.length() < 1)
throw reportUnknownField(name, value);
String setterName =
"set" +
name.substring(0,1).toUpperCase() +
name.substring(1);
Callable setter = (Callable)get(setterName, start);
setter.call(null, null, null, new Object[]{value});
}
COM: <s> set a field </s>
|
funcom_train/22782958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTag(TagGroup tag, String prefix) {
if (tag == null) {
removeTag.setToolTipText("");
removeTag.setIcon(null);
label.setText("");
} else {
removeTag.setToolTipText("Remove Tag " + tag.getName());
removeTag.setIcon(Icons.TAG_REMOVE_ASSOCIATED);
label.setText(prefix + tag.getName());
if (!(tag instanceof Tag)) {
label.setFont(TAG_GROUP_FONT);
} else {
label.setFont(TAG_FONT);
}
listener.setTag(tag);
}
}
COM: <s> exchange shown tag </s>
|
funcom_train/32959073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MenuStructure getThisParentMenu( ) {
// return getMenuLocal().findMenuStructure( getAccountId(), getTargetMenuPath().getParentPath() ); //commented by Arun
return getMenuLocal().findMenuStructure(TolvenRequest.getInstance().getAccountUser(), getTargetMenuPath().getParentPath() );
}
COM: <s> get the parent of the requested element </s>
|
funcom_train/45553553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSecondLifeId(final String inSpotId) {
String theResult = null;
if (theIdMapping.containsValue(inSpotId)) {
for (String anId : theIdMapping.keySet()) {
if (theIdMapping.get(anId).equals(inSpotId)) {
theResult = anId;
break;
}
}
}
return theResult;
}
COM: <s> get id in the second life scheme </s>
|
funcom_train/14009001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processEvent(BlojsomEvent event) {
Iterator handlerIterator = _listeners.iterator();
while (handlerIterator.hasNext()) {
EventHandler eventHandler = (EventHandler) handlerIterator.next();
if (eventHandler._filter.processEvent(event)) {
eventHandler._listener.processEvent(event);
}
}
}
COM: <s> process an event with all listeners </s>
|
funcom_train/8528467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeAttrRecursive(Element elem, String attrName) {
NodeList nodes = XPathUtils.selectNodes(elem, "//*[@" + attrName + "]");
for (int i = 0; i < nodes.getLength(); i++) {
Element e = (Element) nodes.item(i);
e.removeAttribute(attrName);
}
}
COM: <s> removes the attribute represented by code attr name code from </s>
|
funcom_train/39783051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addColors(String[] colors, Vector v) {
for (int i = 0, c = colors.length; i < c; i = i + 2) {
if ("".equals(colors[i + 1])) {
continue;
}
v.addElement(colors[i]);
v.addElement(colors[i + 1]);
}
}
COM: <s> adds a feature to the colors attribute of the compound skin object </s>
|
funcom_train/4519613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void parse(String path) {
try {
BufferedReader reader = new BufferedReader(new FileReader(path));
new ParserDelegator().parse(reader, new CallbackHandler(), true);
} catch (IOException ioe) {
System.out.println("IOE: " + ioe);
JOptionPane.showMessageDialog(null, "Load Bookmarks",
"Unable to load bookmarks", JOptionPane.ERROR_MESSAGE);
}
}
COM: <s> adds the bookmarks in the file at code path code to the current </s>
|
funcom_train/9218849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Class getPropertyTypeForSetter(Object object, String name) {
if (object instanceof Class) {
return getClassPropertyTypeForSetter((Class) object, name);
} else if (object instanceof org.w3c.dom.Document) {
return DOM_PROBE.getPropertyTypeForSetter(object, name);
} else {
return BEAN_PROBE.getPropertyTypeForSetter(object, name);
}
}
COM: <s> returns the class that the setter expects to receive as a parameter when </s>
|
funcom_train/18836317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireEvent(String eventType, EndPoint source, Object payload) {
for(Enumeration e = this.listeners.elements(); e.hasMoreElements();) {
((BTListener)e.nextElement()).handleAction(eventType, source, payload);
}
}
COM: <s> sends an event to listening </s>
|
funcom_train/1621502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeDep(List<IResource> toRemove, IProgressMonitor pmonitor) {
for (IResource res : toRemove) {
IPath relPath = res.getProjectRelativePath();
//remove entries from files that have this resource as dependent
//don't care about files that depend on the resource. they will be updated some other way
manager.removeItem(relPath.toOSString());
}
}
COM: <s> removes dependencies for resources that will be removed </s>
|
funcom_train/11599315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isSerializeStateInSession(FacesContext context) {
String value = context.getExternalContext().getInitParameter(
SERIALIZE_STATE_IN_SESSION_PARAM);
boolean serialize = DEFAULT_SERIALIZE_STATE_IN_SESSION;
if (value != null) {
serialize = new Boolean(value).booleanValue();
}
return serialize;
}
COM: <s> reads the value of the code org </s>
|
funcom_train/22448716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DiagramElement_name_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DiagramElement_name_feature", "_UI_DiagramElement_type"),
ModelPackage.Literals.DIAGRAM_ELEMENT__NAME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the name feature </s>
|
funcom_train/9233860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void thirdWalk(IFigure v, int dx, int dy) {
Rectangle bounds = boundsByFigure.get(v);
if (bounds != null)
v.setBounds(bounds.getTranslated(dx, dy));
for (IFigure w : dualTree.getAncestors(v)) {
if (w != null)
thirdWalk(w, dx, dy);
}
}
COM: <s> walks the tree moving nodes so that the smallest bounding box is located </s>
|
funcom_train/41075286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DocNameExtractor (final String docNameField) {
this.docNameField = docNameField;
fldSel = new FieldSelector() {
private static final long serialVersionUID = 1352400932677913751L;
public FieldSelectorResult accept(String fieldName) {
return fieldName.equals(docNameField) ?
FieldSelectorResult.LOAD_AND_BREAK :
FieldSelectorResult.NO_LOAD;
}
};
}
COM: <s> constructor for doc name extractor </s>
|
funcom_train/39965764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doQuery(List<String> params) throws XmldbException {
if (params.size() == 0) {
System.err.println("ERROR: Missing query text");
System.exit(1);
}
String query = params.get(0);
String result = connector.executeQuery(query);
System.out.println(result);
}
COM: <s> executes an ad hoc query </s>
|
funcom_train/32748265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reloadGroups() {
SESSION_MODELS.clear();
PV_LOGGER.removeAllLoggerSessions();
try {
final List<LoggerSession> loggerSessions = PV_LOGGER.requestEnabledLoggerSessionsForService( SERVICE_ID );
for ( final LoggerSession session : loggerSessions ) {
final String groupType = session.getChannelGroup().getLabel();
SESSION_MODELS.put( groupType, new SessionModel( session ) );
}
}
catch( Exception exception ) {
exception.printStackTrace();
}
}
COM: <s> reload the channel groups from the persistent store </s>
|
funcom_train/10023627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringBuffer convert() throws EDIException, ModuleException {
String SIGNATURE = "convert()";
trace.entering(SIGNATURE, new Object[] { ediSB });
// Used for old version when only converting
String separator = File.separator;
String schemaPath = basicXSDFolderPath + separator + defaultXSDFolder;
//Method to analyze the edi-type and build the xml in the following
analyzeEdi(ediSB, schemaPath);
trace.exiting(SIGNATURE);
//return sbXML;
return resultSB;
}
COM: <s> converts content from edi in payload to xml if convertflag true </s>
|
funcom_train/29849452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Iterator getSuccessors(Node node) {
LinkedList result = new LinkedList();
for (Iterator neighbors = node.getNeighborsIterator(); neighbors.hasNext();) {
Node neighbor = (Node) neighbors.next();
if (((Integer) bfsNum.get(node)).intValue() < ((Integer) bfsNum.get(neighbor)).intValue()) {
result.add(neighbor);
}
}
return result.iterator();
}
COM: <s> get the successors of the given node </s>
|
funcom_train/37401032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleFlagged(String handlerName, String flagValue, Set elements) {
ActionHandler handler = (ActionHandler) handlers.get(handlerName);
if (handler == null) {
context.log("Handler '"+handlerName+"' unknown.");
} else {
handler.handleFlagged(context, flagValue, elements);
}
}
COM: <s> invoke an action upon a set of elements </s>
|
funcom_train/49995361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void mergeMeasures(Measure newMeasure, Measure oldMeasure) {
if (oldMeasure == null) {
return;
}
if (newMeasure.getStreamTrendParameters() == null) {
newMeasure.setStreamTrendParameters(oldMeasure.getStreamTrendParameters());
}
if (newMeasure.getParticipationParameters() == null) {
newMeasure.setParticipationParameters(oldMeasure.getParticipationParameters());
}
}
COM: <s> merge the old measure into the new one </s>
|
funcom_train/35282463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateWorldTransforms() {
if (parent == null) {
worldTransform.set(localTransform);
refreshFlags &= ~RF_TRANSFORM;
} else {
// check if transform for parent is updated
assert ((parent.refreshFlags & RF_TRANSFORM) == 0);
worldTransform.set(localTransform);
worldTransform.combineWithParent(parent.worldTransform);
refreshFlags &= ~RF_TRANSFORM;
}
}
COM: <s> should only be called from update geometric state </s>
|
funcom_train/2539989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void hideCursorInFrame(){
int[] pixels = new int[16 * 16];
Image image = Toolkit.getDefaultToolkit().createImage(
new MemoryImageSource(16, 16, pixels, 0, 16));
Cursor transparentCursor =
Toolkit.getDefaultToolkit().createCustomCursor
(image, new Point(0, 0), "invisibleCursor");
app.frame.setCursor(transparentCursor);
}
COM: <s> hides the mousecursor in multiple mice mode </s>
|
funcom_train/3099524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void populateActuatorPool() {
List resources = new ArrayList();
resources.add(ResourcePool.getInstance().getResource(Resource.CONSOLE));
ConsoleOutput consoleOutput = new ConsoleOutput(DirectActuator.CONSOLE_OUTPUT,
resources,
new BoundedBuffer(NodeFactory.CHANNEL_CAPACITY));
ActuatorPool.getInstance().setActuator(consoleOutput.getName(), consoleOutput);
}
COM: <s> populates the actuator pool </s>
|
funcom_train/47279396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkNotEqual(Message m1, Message m2) {
String equalsError = m1 + " should not be equal to " + m2;
assertFalse(equalsError, m1.equals(m2));
assertFalse(equalsError, m2.equals(m1));
assertFalse(
m1 + " should have a different hash code from " + m2,
m1.hashCode() == m2.hashCode());
}
COM: <s> asserts that the given protos are not equal and have different hash codes </s>
|
funcom_train/17927513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void derivate() throws Exception {
m_strSystem = m_strAxiom;
for (int i = 1; i <= m_iDepth; i++) // repeat derivation m_iDepth times
{
m_strSystem = replace(m_strSystem);
}
// Log.debug("Derivation ended");
// Log.debug(m_strSystem);
}
COM: <s> this method derivates the lsystem </s>
|
funcom_train/50034117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addMail(String mail, Date date) throws HibouTechnicalException {
MailScheduler scheduler = getMailScheduler(mail);
Transaction tr = null;
Session session = null;
try {
session = HibernateUtil.openSession();
tr = session.beginTransaction();
if(scheduler == null) {
return false;
}
int nbSent = scheduler.getNbSentMail();
scheduler.setLastMailDate(date);
scheduler.setNbSentMail(nbSent+1);
session.update(scheduler);
tr.commit();
} catch (Exception e) {
if(tr != null) {
tr.rollback();
}
throw new HibouTechnicalException(e);
} finally {
session.close();
}
return true;
}
COM: <s> notify that another mail have been sent to given mail address </s>
|
funcom_train/5442560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopPlaying() {
Address[] a = m_terminal.getAddresses();
int iHandle;
if(m_bPlayURL = true)
iHandle = ((XAddress)a[0]).m_lineHandle;
else
iHandle = -1;
final int handle = iHandle;
m_provider.stopPlaying(((XAddress)a[0]).m_lineHandle);
}
COM: <s> stop the playing </s>
|
funcom_train/7693234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteJudge (Judge judge) {
// Get the calling Method name
String caller = new Throwable().fillInStackTrace().getStackTrace()[1].getMethodName();
// Remove him from then list of Judges in the related Meet object
// unless the Meet object is being deleted.
if( ! caller.equalsIgnoreCase("deleteMeet")) {
Meet meet = getMeetById(judge.getMeet().getId());
meet.getJudges().remove(judge);
updateMeet(meet);
}
judgeDao.delete(judge);
}
COM: <s> delete the given judge object from the database </s>
|
funcom_train/29962306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void modifyPermiInCache(Permission permi, String orgPerminame) {
List users = userDao.findUsersByPermission(permi);
for (Iterator iter = users.iterator(); iter.hasNext();) {
User user = (User) iter.next();
userDetailsInCache(user);
}
for (Iterator iter = permi.getResources().iterator(); iter.hasNext();) {
Resource resource = (Resource) iter.next();
resourceDetailsInCache(resource);
}
}
COM: <s> user cache resource cache </s>
|
funcom_train/16911693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getMinimumNumRows() {
if ((getInputData() == null) || (getTrainingData() == null)) {
return 0;
}
int inputRows = getInputData().length;
int targetRows = getTrainingData().length;
if (inputRows < targetRows) {
return inputRows;
} else {
return targetRows;
}
}
COM: <s> returns the number of rows in whichever dataset has fewer rows </s>
|
funcom_train/6453194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Option selectOption(List<Option> options){
if(options == null){ // if events=retrieve, option list may be null
options = new Vector<Option>();
}
getLogger().finest("Options: "+options);
return (Option)apply(Option.class, options);
}
COM: <s> apply module composition to the option aspect </s>
|
funcom_train/38829642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void retainAllTrees(RegularTreeLanguage<F> lang) {
NumberedStateConstructor<Pair<NumberedState,NumberedState>> pc = new NumberedStateConstructor<Pair<NumberedState,NumberedState>>();
GenFTACreator<F,NumberedState> fc = new GenFTACreator<F,NumberedState>();
underlyingFTA = translateFTA(FTAOps.reduceBottomUp(FTAOps.intersectionBU(underlyingFTA, lang.underlyingFTA, pc, fc),fc));
}
COM: <s> intersects this language with a given regular tree language </s>
|
funcom_train/16981780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(){
String s="[";
for(int i=0; i<this.receivers.size();i++){
s+=((Station)this.receivers.get(i)).getName()+"; ";
}
s+="]";
return "wishedEmission3 (\n"
+"from " + this.sender + " to " + s
+ "\n from date " + this.getStartTime() + " param "
+ this.parameters + " )";
}
COM: <s> print a wished emission3 </s>
|
funcom_train/3990000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addWypisaneDokumentyPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Lekarz_wypisaneDokumenty_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Lekarz_wypisaneDokumenty_feature", "_UI_Lekarz_type"),
PrzychodniaPackage.Literals.LEKARZ__WYPISANE_DOKUMENTY,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the wypisane dokumenty feature </s>
|
funcom_train/19315907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void lineto() throws PsOperatorException {
final PsNumber y = popPSNumber(PsOperator.LINETO);
final PsNumber x = popPSNumber(PsOperator.LINETO);
this.currentGS().lineto(x, y);
try {
linetoDevice(x, y);
} catch (final PsDeviceException e) {
throw new PsOperatorException(e, PsError.UNDEFINED, PsOperator.LINETO, null);
}
}
COM: <s> executes the lineto operator </s>
|
funcom_train/14425828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void propInfo(StringBuffer buffer, Property prop){
buffer.append(" * <<<" + prop.getName());
if (!prop.isMandatory()){
buffer.append(" (" + STDMess.get("tasks.script.propoptional") + ")");
}
if (prop.getDescription() != null){
buffer.append(" : "+prop.getDescription());
}
buffer.append(">>>\n\n");
}
COM: <s> adds to the given buffer the props info name status description </s>
|
funcom_train/35324067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
try {
ZipEntry e = (ZipEntry)super.clone();
e.extra = (extra == null) ? null : extra.clone();
return e;
} catch (CloneNotSupportedException e) {
// This should never happen, since we are Cloneable
throw new InternalError();
}
}
COM: <s> returns a copy of this entry </s>
|
funcom_train/864174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write( OutStream out ) throws IOException {
out.writeUBits( 4, blockWidth/16 - 1 );
out.writeUBits( 12, imageWidth );
out.writeUBits( 4, blockHeight/16 - 1 );
out.writeUBits( 12, imageHeight );
for (int i = 0; i < imageBlocks.length; i++) {
imageBlocks[i].write( out );
}
}
COM: <s> write the packet in swf format </s>
|
funcom_train/50040477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createUIComponents() {
glJList = new JList() {
public String getToolTipText(MouseEvent evt) {
int index = locationToIndex(evt.getPoint());
if (index >= 0) {
Object item = getModel().getElementAt(index);
GeneList gl = geneLists.get(item);
return gl.getDescription();
}
return null;
}
};
}
COM: <s> stub method generated by jform designer t0 place custom code </s>
|
funcom_train/5618363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PyObject Date(int year, int month, int day) {
Calendar c = Calendar.getInstance();
c.set(Calendar.YEAR, year);
c.set(Calendar.MONTH, month - 1);
c.set(Calendar.DATE, day);
return DateFromTicks(c.getTime().getTime() / 1000);
}
COM: <s> this function constructs an object holding a date value </s>
|
funcom_train/3022628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void renameParameter(MethodSummary method, ParameterSummary param) {
HungarianNamer namer = new HungarianNamer();
RenameParameterRefactoring rpr = RefactoringFactory.get().renameParameter();
rpr.setMethodSummary(method);
rpr.setParameterSummary(param);
rpr.setNewName(namer.getDefaultName(param, "a_"));
runRefactoring(rpr);
}
COM: <s> renames a parameter to have hungarian notation </s>
|
funcom_train/12190794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Map createChannelInfo () {
Map channelInfo = new HashMap ();
channelInfo.put ( NowSMSWAPPushChannelAdapter.URL,
getDefaultHost () );
channelInfo.put ( NowSMSWAPPushChannelAdapter.DEFAULT_COUNTRY_CODE,
getDefaultCountryCode () );
channelInfo.put ( NowSMSWAPPushChannelAdapter.MSS_URL,
getDefaultMSSUrl () );
return channelInfo;
}
COM: <s> create a testable channel info for use in creating test instances of </s>
|
funcom_train/17788662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumPrecinctsHeigh() {
CADIRectangle bounds = getBounds();
int tmp = parent.getPrecinctHeights(rLevel);
return (int)Math.ceil(1.0 * (bounds.y + bounds.height) / tmp)
- (int)Math.floor(1.0 * bounds.y / tmp);
}
COM: <s> returns the number of precincts in the height dimension </s>
|
funcom_train/36003194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLsfileaxGenerate() throws Exception {
/* Build the model */
CixsJbossEsbService cixsJbossEsbService = Samples.getLsfileaxService();
initCixsJbossEsbService(cixsJbossEsbService);
mAntModel.setSampleConfigurationTransport(JBossESBTransport.JBM);
mAntModel.getJbmTransportParameters().initialize(cixsJbossEsbService.getName());
processAnt();
}
COM: <s> adapter case for an lsfileax </s>
|
funcom_train/40414417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void show(Point loc) {
if( loc != null ) {
loc = map.toScreen(loc);
}
panel.getElement().getStyle().setLeft(loc.getX()+10, Unit.PX);
panel.getElement().getStyle().setTop(loc.getY()+10, Unit.PX);
panel.setVisible(true);
onShow();
}
COM: <s> display the info window at the specified location </s>
|
funcom_train/28352768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void exportInitialParameters( final java.io.Writer writer ) throws java.io.IOException {
writer.write( "# Current parameters generated by the Energy Management Application \n" );
writer.write( "\nExported: " + new SimpleDateFormat( "MMM dd, yyyy HH:mm:ss" ).format( new Date() ) + "\n" );
exportParameters( writer, Collections.EMPTY_MAP );
}
COM: <s> write the initial parameter values </s>
|
funcom_train/23721262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected URIComponents parse(String uriString) throws URISyntaxException {
URI uri = new URI(uriString);
return new URIComponents(uri.getScheme(), uri.getRawSchemeSpecificPart(),
uri.getRawUserInfo(), uri.getHost(), uri.getPort(),
uri.getRawPath(), uri.getRawQuery(), uri.getRawFragment());
}
COM: <s> perform an initial parse on a uri string to split it </s>
|
funcom_train/22233257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printVerbose(PrintStream printStream) {
printStream.println(this);
if (graphicsDevice != null) {
printStream.println("graphicsDevice = " + graphicsDevice);
}
if (canvas != null) {
printStream.println("canvas = " + canvas);
}
if (detailMessage != null) {
printStream.println();
printStream.println("Detail Message");
printStream.println("--------------");
printStream.println(detailMessage);
}
}
COM: <s> prints a verbose error report to the specified print stream </s>
|
funcom_train/50463032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void launchInternal(URL jnlpURL) throws LaunchException {
JNLPAppDesc jnlpDesc = new JNLPAppDesc();
String url = jnlpURL.toString();
jnlpDesc.setName(url.substring(url.lastIndexOf('/')));
jnlpDesc.setJNLPAddress(jnlpURL);
launchInternal(jnlpDesc);
}
COM: <s> launch an jnlp app from a url </s>
|
funcom_train/17387664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void userChanged(String username, String oldFlags, String newFlags) {
Enumeration<UserDatabasePlugin> e = userDatabasePlugins.elements();
while (e.hasMoreElements()) {
UserDatabasePlugin plugin = (UserDatabasePlugin) e.nextElement();
((UserDatabaseCallback) plugin.getCallback()).userChanged(username,
oldFlags, newFlags, plugin.getData());
}
}
COM: <s> a user who was already in the database was given new flags </s>
|
funcom_train/10007538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteItem(int id, int slot, int amount) {
if (p.playerItems[slot] != null || p.playerItems[slot].id == (id + 1)) {
if (p.playerItems[slot].qty > amount) p.playerItems[slot].qty -= amount;
else p.playerItems[slot] = null;
resetItems();
}
}
COM: <s> deletes an item </s>
|
funcom_train/1805308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CellFeed getCellFeed() {
try {
return service.getFeed(cellFeedUrl, CellFeed.class);
} catch (IOException ioe) {
SpreadsheetApiDemo.showErrorBox(ioe);
return null;
} catch (ServiceException se) {
SpreadsheetApiDemo.showErrorBox(se);
return null;
}
}
COM: <s> gets a list of all cells </s>
|
funcom_train/9270341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void reset() {
explicitlyClosed = false;
state = NOT_OPENED;
hasdata = true;
rsLens = null;
rsDRDATypes = null;
rsPrecision = null;
rsScale = null;
outovr_drdaType = null;
withHoldCursor = 0;
scrollType = ResultSet.TYPE_FORWARD_ONLY;
concurType = 0;
rowCount = 0;
rs = null;
blksize = 0;
maxblkext = 0;
outovropt = 0;
qryclsimp = CodePoint.QRYCLSIMP_NO;
qryrelscr = false;
qryrownbr = 0;
qryrfrtbl = false;
qryscrorn = 0;
qryrowsns = false;
qryblkrst = false;
qryrtndta = false;
qryrowset = 0;
qryprctyp = 0;
gotPrctyp = false;
rtnextdta = 0;
nbrrow = 0;
rslsetflg = null;
extDtaObjects = null;
rsExtPositions = null;
pkgcnstkn = null;
splitQRYDTA = null;
}
COM: <s> this method resets the state of this drdaresultset object so that it can </s>
|
funcom_train/35694776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void switchToNormalMode() {
redirector = new Redirector() {
public void redirect(String uri) {
try {
response.sendRedirect(uri);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
};
cookieTransporter = new CookieTransporter() {
public void send(Cookie cookie) {
response.addCookie(cookie);
}
};
}
COM: <s> switch to normal redirection mode using the httpservlet response object </s>
|
funcom_train/42773603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void relocate(IFigure target) {
Dimension prefSize = target.getPreferredSize();
Point center = getReferencePoint();
calculatePosition();
//@tag zest(bug(GEFProblem)) : there seems to be a bug in GEF that if the following is done, then labels get printed in the wrong location
//target.translateToRelative(center);
prefSize.width+=1;
target.setBounds(getNewBounds(prefSize, center));
}
COM: <s> recalculates the position of the figure and returns the updated bounds </s>
|
funcom_train/44325297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void unlockItem(CacheItem item) throws Exception {
if (item.isLocked()) {
item.unlock();
Object key = item.getKey();
Object value = item.getValue();
if (fLockListener != null)
fLockListener.onDecLockCounter(key, value, item
.getLockCounter());
}
}
COM: <s> unlocks the given item and notifies all listeners about the modifications </s>
|
funcom_train/46378323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeMouseWheelListener(MouseWheelListener listener) {
if (app == null) {
return;
}
synchronized (app.getAppCleanupLock()) {
synchronized (this) {
if (mouseWheelListeners == null) {
return;
}
mouseWheelListeners.remove(listener);
if (mouseWheelListeners.size() == 0) {
mouseWheelListeners = null;
}
}
}
}
COM: <s> remove a listener for mouse wheel events </s>
|
funcom_train/9231010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Query setParameters(Query query, Map<String, ?> parameters) {
check(query);
checkNotNull(parameters, "Null parameters map");
for (Entry<String, ?> entry : parameters.entrySet()) {
final String name = checkNotNull(entry.getKey(), "Null parameter name");
query.setParameter(name, checkNotNull(entry.getValue(), "Null %s parameter value", name));
}
return query;
}
COM: <s> sets named parameters of a query </s>
|
funcom_train/50396132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean needToDownload(Chunk chunk){
String status=properties.getProperty("chunk."+format(chunk.getIndex())+".status",null);
if(status==null)return true;
if("done".equals(status))return false;
if("partial".equals(status)){
try{
long actualSize=getActualFileSize(chunk);
if(actualSize>0){
chunk.setOffset(actualSize);
chunk.setLength(chunk.getLength()-actualSize);
chunk.setAppend(true);
}
}catch(Exception ignored){}
}
return true;
}
COM: <s> check if this chunk has to be re downloaded </s>
|
funcom_train/18183788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void testEqualsPrivateKey() {
connectionRequestInfoImpl.setRecaptchaPrivateKey(RECAPTCHA_PRIVATE_KEY_TEST);
secondConnectionRequestInfoImpl.setRecaptchaPrivateKey(RECAPTCHA_PRIVATE_KEY_TEST);
assertThat(connectionRequestInfoImpl.equals(secondConnectionRequestInfoImpl), is(true));
assertThat(secondConnectionRequestInfoImpl.equals(connectionRequestInfoImpl), is(true));
}
COM: <s> test equality for only recaptcha private key property </s>
|
funcom_train/36109370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object db2java(ResultSet set, int i, int sqlType, boolean createLong) throws SQLException{
try{
return super.db2java(set, i, sqlType, createLong);
}catch(NullPointerException e){
switch(sqlType){
case Types.VARCHAR: return null;
case Types.INTEGER:
if(createLong) return new Long(Long.MIN_VALUE);
else return new Integer(Integer.MIN_VALUE);
case Types.BIT: return Boolean.FALSE;
case Types.DOUBLE: return new Double(Double.NaN);
case Types.LONGVARBINARY:
case Types.LONGVARCHAR:
return new ZeroInputStream();//see inner class!
default: return null;
}
}
}
COM: <s> catching null pointer exceptions workaround of bug in oracle lite 4 </s>
|
funcom_train/1627062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int searchForOpenBracket(int startPosition, char openBracket, char closeBracket, IDocument document) throws BadLocationException {
int stack= 1;
int openPos= startPosition - 1;
char nextChar;
while (openPos >= 0 && stack > 0) {
nextChar= document.getChar(openPos);
if (nextChar == closeBracket && nextChar != openBracket)
stack++;
else if (nextChar == openBracket)
stack--;
openPos--;
}
if (stack == 0)
return openPos + 1;
return -1;
}
COM: <s> returns the position of the open bracket before code start position code </s>
|
funcom_train/8686129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initChecksum() {
if (checksum != null) {
return;
}
if ("CRC".equalsIgnoreCase(algorithm)) {
checksum = new CRC32();
} else if ("ADLER".equalsIgnoreCase(algorithm)) {
checksum = new Adler32();
} else {
throw new BuildException(new NoSuchAlgorithmException());
}
}
COM: <s> initialize the checksum interface </s>
|
funcom_train/50872597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object copy() {
OMApplication application = new OMApplication();
Enumeration enumeration = this.elements.elements();
OMObject object = null;
for (; enumeration.hasMoreElements();) {
object = (OMObject) enumeration.nextElement();
application.addElement((OMObject) object.copy());
}
return application;
}
COM: <s> copies the object performing a full copy </s>
|
funcom_train/39570093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean overlaps() {
if (size() > 0 && ( ccwSet.member(cwSet.get(cwSet.size()-1).getNodeId()) ||
cwSet.member(ccwSet.get(ccwSet.size()-1).getNodeId()) ) )
return true;
else return false;
}
COM: <s> test if the leafset overlaps </s>
|
funcom_train/50999892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
Iterator it = preparedStatementCache.keySet().iterator();
try {
while (it.hasNext()) {
((PreparedStatement) it.next()).close();
}
} catch (SQLException q) {
ExecutionException e = new ExecutionException(q);
e.setPatient(this);
throw e;
}
}
COM: <s> closes cached prepared statements </s>
|
funcom_train/4381801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean checkState() {
boolean result = false;
if (emptyStringAllowed) {
result = true;
}
if (textField == null) {
return false;
}
String txt = textField.getText();
result = txt.trim().length() > 0 || emptyStringAllowed;
// call hook for subclasses
result = result && doCheckState();
if (result) {
clearErrorMessage();
} else {
showErrorMessage(errorMessage);
}
return result;
}
COM: <s> checks whether the text input field contains a valid value or not </s>
|
funcom_train/32084773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LineAttributes getLineAttributes() {
if (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
float[] dashes = null;
if (data.lineDashes != null) {
dashes = new float[data.lineDashes.length];
System.arraycopy(data.lineDashes, 0, dashes, 0, dashes.length);
}
return new LineAttributes(data.lineWidth, data.lineCap, data.lineJoin, data.lineStyle, dashes, data.lineDashesOffset, data.lineMiterLimit);
}
COM: <s> returns the receivers line attributes </s>
|
funcom_train/42589366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OntologyServiceType getServiceType() {
// File will have http in accession
// TODO: check if that's true for OBO
if (getOntologyAccession().startsWith("http"))
return OntologyServiceType.FILE;
// OLS will be up to four letters
if (getOntologyAccession().matches("[A-Z]{2,5}"))
return OntologyServiceType.OLS;
// BioPortal will be four digits
if (getOntologyAccession().matches("\\d{4}"))
return OntologyServiceType.BIOPORTAL;
log.warn("Could not infer ServiceType!");
return OntologyServiceType.UNKNOWN;
}
COM: <s> gets the service type that the ontology term origanted from </s>
|
funcom_train/44612689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String translateExpression(final Expression expr) {
if (this.methodDecl != null) {
return this.exprTranslator.translate(expr, (SourceTypeBinding) this.methodDecl.binding.declaringClass,
this.racResult); // TODO
} else {
return this.exprTranslator.translate(expr, this.racResult); // TODO
}
}
COM: <s> translates the given expression to rac code </s>
|
funcom_train/37084521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getGenomicStartPad() {
// The genomicStart coord is already padded at this point
if (isForwardStrand())
return genomicSequence.getResidues(getGenomicStart(),getGenomicStart()+pad-1);
// since start-pad+1 < start should come back revcomped
else
return genomicSequence.getResidues(getGenomicStart(),getGenomicStart()-pad+1);
}
COM: <s> returns the sequence padding for the beginning of the block </s>
|
funcom_train/6268109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUser(String user) {
this.user = user;
// BUG Fix submitted by Lamine Brahimi
// add this (taken form sip_messageParser)
// otherwise comparison of two SipUrl will fail because this
// parameter is not set (whereas it is set in sip_messageParser).
if (user != null
&& (user.indexOf(POUND) >= 0 || user.indexOf(SEMICOLON) >= 0)) {
setUserType(TELEPHONE_SUBSCRIBER);
} else {
setUserType(USER);
}
}
COM: <s> set the user member </s>
|
funcom_train/36685374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void display(List<String> list) {
if (list != null && list.size() > 0) {
Collections.reverse(list);
String text = "<html>";
for (String s : list) {
text += s + "<br><br>";
}
text += "</html>";
myComments.setText(text);
repaint();
Collections.reverse(list);
}
}
COM: <s> displays the contents of the list inserting a line break in between each </s>
|
funcom_train/49789457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testChecks() throws Exception {
root = loadAndInfer(LoginHandlerInstance.class);
Session session = assertHasSession(root, "my session");
Frame dest = assertHasFrame(session, "current user");
assertNotGenerated(dest);
Operation check = assertHasOperation(session, "check instance");
Event access = dest.getOnAccess();
{
// a run action
ECARule run = assertHasRunAction(session, access, check);
assertGenerated(run);
assertEquals("run", run.getName());
}
}
COM: <s> test the generation of event triggers and check operations </s>
|
funcom_train/11023935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PropertyDescriptor findDescriptor(String propertyName, PropertyDescriptor[] descriptors) {
if (descriptors != null) {
for (int i = 0; i < descriptors.length; i++) {
if (propertyName.equals(descriptors[i].getName())) {
return descriptors[i];
}
}
}
return null; // not found
}
COM: <s> find a property descriptor </s>
|
funcom_train/7891996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isAuthenticated() {
boolean authenticated = false;
for (Cookie cookie : httpClient.getCookieStore().getCookies()) {
// Exchange 2003 cookies
if (cookie.getName().startsWith("cadata")
|| "sessionid".equals(cookie.getName())
// Exchange 2007 cookie
|| "UserContext".equals(cookie.getName())) {
authenticated = true;
break;
}
}
return authenticated;
}
COM: <s> look for session cookies </s>
|
funcom_train/11358493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop(BundleContext bc) throws Exception {
if (logger != null) {
logger.log(LogService.LOG_DEBUG, "Stopping JMX OSGi bundle");
}
if (agent != null) {
agent.stop();
}
if (logger != null) {
logger.close();
}
}
COM: <s> p called when jmx osgi bundle stops </s>
|
funcom_train/4479590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getEbnfProduction(Spacing space) {
StringWriter buf = new StringWriter();
PrintWriter out = new PrintWriter(buf);
String temp;
BufferedReader str;
// print result into buffer
astNode.accept(new CommentPrinter(out, space));
out.flush();
temp = buf.toString();
return temp;
}
COM: <s> returns the ebnf production of the current class as a bunch of comments </s>
|
funcom_train/3904408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectFirstNode() {
DweezilTreeModel treeModel = (DweezilTreeModel)getModel();
if(treeModel != null) {
DefaultMutableTreeNode rootNode = treeModel.getRootNode();
if(rootNode != null && rootNode.getChildCount() > 0) {
DefaultMutableTreeNode node = (DefaultMutableTreeNode)rootNode.getChildAt(0);
selectNode(node);
}
}
}
COM: <s> select the first displayed node after the root node </s>
|
funcom_train/30247108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getUsersAuthDir(String userSha1Sum, boolean create) throws IOException{
File authStore = new File(authStoreDir + File.separator + userSha1Sum);
if (!authStore.exists() && create){
boolean check = authStore.mkdirs();
if(!check){
throw new IOException("Error creating AuthStore Directory: " + authStoreDir + File.separator + userSha1Sum);
}
return authStore;
}else if (authStore.exists()){
return authStore;
}else{
return null;
}
}
COM: <s> method checks if theres already users auth folder and creates it if necessary </s>
|
funcom_train/43369209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAncestorOf(Folder child) {
if (this.equals(child) || subfolders.contains(child)) {
return true;
}
for (Iterator i = subfolders.iterator(); i.hasNext();) {
Folder subFolder = (Folder) i.next();
if (subFolder.isAncestorOf(child)) {
return true;
}
}
return false;
}
COM: <s> method is ancestor of </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.