__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/11677684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setActive(boolean active, MessageContext synMessageContext) {
Endpoint endpoint = synMessageContext.getEndpoint(key);
if (endpoint == null) {
handleException("Reference to non-existent endpoint for key : " + key);
}
assert endpoint != null;
endpoint.setActive(active, synMessageContext);
}
COM: <s> activating or deactivating an indirect endpoint is the activating or deactivating its </s>
|
funcom_train/14233221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadOnlineListsPanel(){
online.removeAll();
// Load online lists panel
for (int i = 0; i < onlineBans.size(); i ++){
//BanlistPanel newBanlistPanel = new BanlistPanel(onlineBans.get(i));
//newBanlistPanel.setOpaque(false);
online.addTab(onlineBansNames.get(i), null, new BanlistPanel(onlineBans.get(i)), null);
}
}
COM: <s> loads online panel </s>
|
funcom_train/44427570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createForwarder(Socket inboundSocket) {
String baseThreadName = "prt" + Integer.toString(serverPort) + "c" +
Long.toString(connCount++);
SocketForwarder socketForwarder = new SocketForwarder(this,
inboundSocket, mapping, baseThreadName);
synchronized (forwarders) {
forwarders.add(socketForwarder);
}
(new Thread(socketForwarder, baseThreadName)).start();
}
COM: <s> creates an outbound socket for the specified inbound socket according to </s>
|
funcom_train/25108482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void endElement(String uri, String localName, String qName) {
String text = getTweenerText();
// get text between tags
if (Constants.NODE_ID.equals(qName)) {
Model candidate = null;
if ((candidate = current.findChildByName(text)) != null) {
current = candidate;
}
} else if (Constants.VARIABLE_NAME.equals(qName)) {
vName = text;
} else if (Constants.VALUE.equals(qName)) {
value = text;
}
}
COM: <s> handle end of an xml element </s>
|
funcom_train/17939264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSplitPane getChartjSplitPane() {
if (chartjSplitPane == null) {
chartjSplitPane = new JSplitPane();
chartjSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
chartjSplitPane.setOneTouchExpandable(true);
chartjSplitPane.setDividerSize(8);
chartjSplitPane.setDividerLocation(171);
chartjSplitPane.setContinuousLayout(true);
chartjSplitPane.setBottomComponent(getBottomjPanel());
chartjSplitPane.setTopComponent(getTopjPanel());
}
return chartjSplitPane;
}
COM: <s> this method initializes chartj split pane </s>
|
funcom_train/10238521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateMaterial(Tuple3f newColor, int id){
//System.out.println("id="+id);
switch (id){
case 0: mat.setAmbientColor(new Color3f(newColor)); break;
case 1: mat.setDiffuseColor(new Color3f(newColor)); break;
case 2: mat.setSpecularColor(new Color3f(newColor)); break;
case 3: mat.setEmissiveColor(new Color3f(newColor)); break;
}
ap.setMaterial(mat);
}
COM: <s> update the material </s>
|
funcom_train/7873871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addCollidable(int x, int y, byte t) {
// Check bounds
if(x < 0 || y < 0 || x >= mapWidth || y >= mapHeight)
return false;
// Check if theres already something there
if(collideMap[x][y] > 0)
return false;
// Add to the collideMap
collideMap[x][y] = t;
return true;
}
COM: <s> add a collidable by type to the collide map </s>
|
funcom_train/46360122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Long removeClientFromChatNotification(){
try {
IConnection current = Red5.getConnectionLocal();
RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId());
String streamid = currentClient.getStreamid();
currentClient.setIsChatNotification(false);
currentClient.setChatUserRoomId(null);
this.clientListManager.updateClientByStreamId(streamid, currentClient);
} catch (Exception err) {
log.error("[addClientToCahtNotification]",err);
}
return new Long(-1);
}
COM: <s> removes a client from the additional list of users to chat </s>
|
funcom_train/49130280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAnimator(Animator animator) {
if (animator == null) {
throw new IllegalArgumentException("Animator must be non-null");
}
if (animator.isRunning()) {
throw new IllegalStateException("Cannot perform this operation " +
"while animator is running");
}
this.animator = animator;
animator.addTarget(transitionTimingTarget);
}
COM: <s> sets animator that drives this screen transition </s>
|
funcom_train/3454813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addToPathes(Path p) {
for(int i=0;i<pathes.size();i++) {
if(((Path)pathes.get(i)).size()<=p.size()) {
pathes.add(i, p);
return;
}
}
pathes.add(p);
}
COM: <s> adds a path to pathes orders them by length descending </s>
|
funcom_train/21464737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionHandleSuppliedLink(String link) {
/** Favorite already exists, load it */
if (Category.linkExists(link))
rssOwlGui.loadNewsFeed(link, SearchDefinition.NO_SEARCH, true, true, NewsTabFolder.DISPLAY_MODE_FOCUS);
/** Favorite is new, open Dialog to add it */
else
rssOwlGui.eventManager.actionAddToFavorites("", link);
}
COM: <s> handle the supplied link </s>
|
funcom_train/41490361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean fieldsAreValid() {
String value = mEditPhoneNumber.getText().toString();
String integerRegex = FormValidationUtils.INTEGER_REGEX;
if(value.length() == 0) {
mDialogInvalidFormTitle = "Please enter a phone number.";
return false;
}
if(Pattern.matches(integerRegex, value))
return true;
else {
mDialogInvalidFormTitle = "Please enter a valid phone number.";
return false;
}
}
COM: <s> validates the phone number </s>
|
funcom_train/41965271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isSelectedIndexNonTransient(int index) {
assert 0 <= index;
boolean isSelected = false;
Selection selected = new Selection(index, index);
synchronized (mSelections) {
for (Selection s : mSelections) {
if ((isSelected = (s.contains(selected)
&& !(s instanceof TransientSelection)))) {
break;
}
}
}
return isSelected;
}
COM: <s> determines if the interval determined by index index index is currently </s>
|
funcom_train/19418810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset(final ActionMapping mapping, final HttpServletRequest request) {
super.reset(mapping, request);
setAttachment(null);
// XXX Does this need to be flushed out?
// TODO Yes it should be BUT we make assumptions that prevent this from happening.
// ModifyComposeAction and SentAction need to know how to correctly communicate
}
COM: <s> resets the code folder form code and then resets todo </s>
|
funcom_train/20768910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void releaseDevice() throws HardwareInterfaceException {
log.log(Level.INFO, "{0} releasing device", this);
int status = gUsbIo.releaseDevice();
if (status != 0) {
throw new HardwareInterfaceException("Unable to release device from exclusive use: " + UsbIo.errorText(status));
}
}
COM: <s> release the device from exclusive use </s>
|
funcom_train/10977692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isLocale() {
if (localeSet) {
return locale;
}
ValueBinding vb = getValueBinding("locale");
if (vb != null) {
Boolean value = (Boolean) vb.getValue(getFacesContext());
if (null == value) {
return locale;
}
return value.booleanValue();
} else {
return locale;
}
}
COM: <s> p return a flag indicating whether a locale should be created </s>
|
funcom_train/18645929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String fault="";
if (NamesUtil.isSet(getFaultName())) {
fault = "fault="+getFaultName()+" ";
}
return("message[operation="+getOperationName()+" "+fault+
"request=\""+isRequest()+"\" messageType="+
getType()+" serviceType="+
getServiceType()+" serviceEndpoint="+
getServiceEndpoint()+" outbound="+isOutbound()+"]");
}
COM: <s> this method returns a description of the message </s>
|
funcom_train/35838855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getReferenceNodes() {
Vector refNodes = new Vector(51);
for (Enumeration e = htMemberNodes.elements(); e.hasMoreElements(); ) {
NodePosition pos = (NodePosition) e.nextElement();
NodeSummary node = pos.getNode();
int type = node.getType();
if (type == ICoreConstants.REFERENCE || type == ICoreConstants.REFERENCE_SHORTCUT)
refNodes.addElement(node);
}
return refNodes;
}
COM: <s> get all the reference nodes in this view </s>
|
funcom_train/3976854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DelaunayPanel (DelaunayAp controller) {
this.controller = controller;
initialTriangle = new Triangle(
new Pnt(-initialSize, -initialSize),
new Pnt( initialSize, -initialSize),
new Pnt( 0, initialSize));
dt = new Triangulation(initialTriangle);
colorTable = new HashMap<Object, Color>();
}
COM: <s> create and initialize the dt </s>
|
funcom_train/3703790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startup() {
if (flagLocRunning == true) {
return;
}
flagLocRunning = true;
props.put(USER, // arbitrary name for entity
LOCATION, // arbitrary name for property
getInfoSpaceUrl(),
XPathLib.getCurrentLocationXPath(),
67,
ActiveProperties.PERIODIC_QUERY);
} // of method
COM: <s> start the properties </s>
|
funcom_train/12276362 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeInt(long i) throws IOException {
byte[] raw = new byte[4];
raw[0] = (byte) (i >> 24);
raw[1] = (byte) (i >> 16);
raw[2] = (byte) (i >> 8);
raw[3] = (byte) (i);
write(raw);
}
COM: <s> write an integer to the array </s>
|
funcom_train/17466067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isRestartComplete() throws MojoExecutionException {
boolean restartComplete = false;
try {
String inspectURL = processURL(SERVER_INSPECT_URL);
URLConnection conn = connect(inspectURL);
// if the stream cannot be created (IOException), then the restart
// did not finish yet.
BufferedReader in = new BufferedReader(new InputStreamReader(conn
.getInputStream()));
in.close();
restartComplete = true;
} catch (IOException e) {
restartComplete = false;
getLog().info("Server restart is in progress.");
}
return restartComplete;
}
COM: <s> checks whether the restart finished or still in progress </s>
|
funcom_train/3474194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WindowActivationCatcher (Environment env) {
super(env);
waitingInstances = new PriorityListWindowActivationCatcherObserver();
// just "window opened" events
WindowEventMask eventMask = new WindowEventMask(env, WindowEventMask.ALL_EXCLUDED);
eventMask.setIncluded (WindowEvent.WINDOW_ACTIVATED, true);
setAWTEventMask (eventMask);
}
COM: <s> creates a new window activation catcher with a specified env </s>
|
funcom_train/47394949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initTasks(int nRunsMC) {
tasks = new Vector(nRunsMC);
for( int i=0; i < nRunsMC; i++ ) {
String header="MC run "+String.valueOf(i);
ToTask task = new ToTask(header, (long)i*11);
tasks.addElement((Object) task);
}
}
COM: <s> generates the parameters for the given monte carlo simulation </s>
|
funcom_train/20880880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove() {
try {
surfaceObject.renderableObjects.get(objectLayer).remove(renderObject);
if (surfaceObject.renderableObjects.get(objectLayer).size() == 0) {
surfaceObject.renderableObjects.remove(objectLayer);
}
} catch (ArrayIndexOutOfBoundsException aioobe) {
}
}
COM: <s> called to remove this objects refence form the surface </s>
|
funcom_train/118821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setSelectionModel(GraphSelectionModel newLSM) {
cancelEditing(graph);
if (graphSelectionListener != null && graphSelectionModel != null)
graphSelectionModel.removeGraphSelectionListener(
graphSelectionListener);
graphSelectionModel = newLSM;
if (graphSelectionModel != null && graphSelectionListener != null)
graphSelectionModel.addGraphSelectionListener(
graphSelectionListener);
if (graph != null)
graph.repaint();
}
COM: <s> resets the selection model </s>
|
funcom_train/26379868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void duplicateMenuActionPerformed(ActionEvent evt) {
Object object = _node.getUserObject();
if (object instanceof Help) {
} else if (object instanceof Mobile) {
} else if (object instanceof Item) {
} else if (object instanceof Room) {
} else if (object instanceof Shop) {
} else if (object instanceof Repair) {
}
}
COM: <s> called when the duplicate menu item is selected </s>
|
funcom_train/24592481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startMusic() {
if (SOUND_AVAILABLE) {
//musicOn = true;
nextTrack = 0; // Start at beginning
assert(musicPlayer == null);
playNextMusic();
musicPlayer = new Thread(this); // Make a thread to play in the background
musicPlayer.setDaemon(true); // Don't let it keep the program open
musicPlayer.start(); // Let it rock!
}
}
COM: <s> start the music </s>
|
funcom_train/9197598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List removeContent(final Filter filter) {
final List old = new ArrayList();
final Iterator iter = content.getView(filter).iterator();
while (iter.hasNext()) {
final Content child = (Content) iter.next();
old.add(child);
iter.remove();
}
return old;
}
COM: <s> remove all child content from this parent matching the supplied filter </s>
|
funcom_train/36611917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkData() {
if (!user.equals("") || !password.equals("") || !confirmPassword.equals("") || !firstName.equals("") || !lastName.equals("") || !address.equals("")) {
if (password.equals(confirmPassword)) {
if (databaseConnection.checkAvailability(user)) {
return true;
}
}
}
return false;
}
COM: <s> checks if any of the data gotten from the user isnt filled in </s>
|
funcom_train/1559610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateMenuDecimalPlaces() {
if (menuDecimalPlaces == null)
return;
int pos = -1;
if (kernel.useSignificantFigures) {
int figures = kernel.getPrintFigures();
if (figures > 0 && figures < Application.figuresLookup.length)
pos = Application.figuresLookup[figures];
} else {
int decimals = kernel.getPrintDecimals();
if (decimals > 0 && decimals < Application.decimalsLookup.length)
pos = Application.decimalsLookup[decimals];
}
try {
((JRadioButtonMenuItem) menuDecimalPlaces.getMenuComponent(pos))
.setSelected(true);
} catch (Exception e) {
}
}
COM: <s> update the menu with all decimal places </s>
|
funcom_train/1458477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String toLilypondOrGuidoStringHelper(ToNotationStringMethod toNotationStringMethod) {
StringBuilder strBuilder = new StringBuilder();
boolean firstElementDone = false;
for (NotationElement element : this) {
if (firstElementDone) strBuilder.append(this.elementSeperator);
strBuilder.append(toNotationStringMethod.toNotationString(element));
firstElementDone = true;
}
return strBuilder.toString();
}
COM: <s> helper method for to lilypond string and to guido string containing </s>
|
funcom_train/44614732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
OverflowingLRUCache newCache = (OverflowingLRUCache)newInstance(this.spaceLimit, this.overflow);
LRUCacheEntry qEntry;
/* Preserve order of entries by copying from oldest to newest */
qEntry = this.entryQueueTail;
while (qEntry != null) {
newCache.privateAdd (qEntry.key, qEntry.value, qEntry.space);
qEntry = qEntry.previous;
}
return newCache;
}
COM: <s> returns a new cache containing the same contents </s>
|
funcom_train/50608063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setInternalNetObject(InternalClass ctype) {
//init fields...
DataField dataField;
for (Iterator i=ctype.getDatum().iterator(); i.hasNext();) {
dataField = (DataField)i.next();
data.put(dataField.getName(),
new Field(this, dataField));
}
}
COM: <s> sets the constructor value for this class helper </s>
|
funcom_train/50453311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ConfigChunk remove (String name) {
ConfigChunk ch;
ListIterator i = chunks.listIterator();
while (i.hasNext()) {
ch = (ConfigChunk)i.next();
if (ch.getName().equalsIgnoreCase(name)) {
ChunkDBEvent e = new ChunkDBEvent (this, ChunkDBEvent.REMOVE,
ch, null);
i.remove();
notifyChunkDBTargets (e);
return ch;
}
}
return null;
}
COM: <s> removes the config chunk in self whose name name </s>
|
funcom_train/26485582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Driver getDriver() {
logger.info("METHOD_ENTRY: getDriver");
Driver driver = null;
try {
driver = getProviderChoice().getDriver();
} catch (NullPointerException e) {
logger.debug("Driver is null");
// ignore
}
logger.info("METHOD_EXIT: getDriver, driver:" + driver);
return driver;
}
COM: <s> returns the value of field driver </s>
|
funcom_train/28648007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAgedExporter() {
if(this.exporterList.size() == 0) return;
Object[] exporters = this.exporterList.toArray();
ExporterEntry pkgEntry = null;
for (int i = 0; i < exporters.length; i++) {
pkgEntry = (ExporterEntry) exporters[i];
if (pkgEntry.isAged()) {
this.exporterList.remove(pkgEntry);
}
}
}
COM: <s> remove all the exporter entry which exporter entry </s>
|
funcom_train/22031598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getString (int length) throws IOException {
if (length > 1024)
throw new IOException("Attempt to read more than 1024 bytes from file");
try {
in.read (array, 0, length);
} catch (IOException e) {
throw new IOException("Couldn't read string from file");
}
pos += length;
return (new String (array, 0 , length)).trim();
}
COM: <s> reads in and returns a string of the specified length from the current </s>
|
funcom_train/47686992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insert(E e) {
Node<E> n = head;
move n down list until n is before the location
where e should be inserted:
either n.next is null
or n.next.value > e
maintain invariant that n.value <= e
Node<E> newNode = new Node<E>(e, n.next);
n.next = newNode;
}
COM: <s> insert an element at the appropriate location in the list </s>
|
funcom_train/49678374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAttributeValue(String nameAttribute) {
if (this.xmlManager != null) {
Node xmlNode = this.xmlManager.getNodeByAttribute(
HangmanConstants.CONFIG_ATTR_NAME, nameAttribute);
if (xmlNode != null) {
Node valueAttr = this.xmlManager.getAttributeByNode(xmlNode,
HangmanConstants.CONFIG_ATTR_VALUE);
return valueAttr.getNodeValue();
}
}
return "";
}
COM: <s> gets value of configuration value attribute by specifying value of </s>
|
funcom_train/32070946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void btnDeletePressed() {
int result = JOptionPane.showConfirmDialog(view,
I18NToolkit.getLabel("db.view.notify.really.delete"),
I18NToolkit.getLabel("db.view.notify.delete"),
JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if (result == JOptionPane.YES_OPTION) {
model.deleteSelectedVocabulary();
}
}
COM: <s> button delete was pressed </s>
|
funcom_train/3418998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void cleanKerberosCred() throws LoginException {
// Clean the ticket and server key
try {
if (kerbTicket != null)
kerbTicket.destroy();
if (kerbKeys != null) {
for (int i = 0; i < kerbKeys.length; i++) {
kerbKeys[i].destroy();
}
}
} catch (DestroyFailedException e) {
throw new LoginException
("Destroy Failed on Kerberos Private Credentials");
}
kerbTicket = null;
kerbKeys = null;
kerbClientPrinc = null;
}
COM: <s> clean kerberos credentials </s>
|
funcom_train/20764785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean sendOnchipConfig() throws HardwareInterfaceException {
byte[] bytes = formatConfigurationBytes(this);
if (bytes == null) {
return false; // not ready yet, called by super
}
sendConfig(CMD_IPOT, 0, bytes); // the usual packing of ipots with other such as shifted sources, on-chip voltage dac, and diagnotic mux output and extra configuration
return true;
}
COM: <s> sends everything on the on chip shift register f </s>
|
funcom_train/50136671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setScriptingEnabled(boolean enabled) {
scriptingEnabled = enabled;
if (enabled) {
NeuralNetListener listener = getMacroPlugin();
if (listener == null)
System.out.println("MacroPlugin not set: Impossible to enable the scripting");
else
this.addNeuralNetListener(getMacroPlugin());
}
else {
if (macroPlugin != null)
this.removeNeuralNetListener(macroPlugin);
}
}
COM: <s> enable disable the scripting engine for the net </s>
|
funcom_train/46997212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getCbxDepth() {
if (cbxDepth == null) {
cbxDepth = new JComboBox();
cbxDepth.setBounds(new Rectangle(20, 50, 140, 22));
cbxDepth.addItem("16 bits");
cbxDepth.addItem("24 bits");
cbxDepth.addItem("32 bits");
cbxDepth.setSelectedIndex(2);
}
return cbxDepth;
}
COM: <s> this method initializes cbx depth </s>
|
funcom_train/1067191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ModelManager getModelManager(){
//Darpan
IEditorPart ie = (IEditorPart)
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
if (ie instanceof MultiDiagramEditor) {
MultiDiagramEditor mde = (MultiDiagramEditor) ie;
return mde.getModelManager();
} else {
return (ModelManager) ie.getAdapter(ModelManager.class);
}
}
COM: <s> update the model manager </s>
|
funcom_train/19803548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void viewActionHangupCall() {
if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
LOG.info("viewActionHangupCall");
}
sendCommand(this.COMMAND_VOJXTA_HANGUP_REQUEST, this.COMMAND_VOJXTA_HANGUP_ACCEPT);
setProtocolState(this.SESSION_VOJXTA_HANGUP_REQUEST_SENT);
setCallEndTime();
micControl.endMic();
micControl.releaseHardware();
speakerControl.endSpeaker();
speakerControl.releaseHardware();
}
COM: <s> called from iu signaling user wishes to hangup call </s>
|
funcom_train/47869381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getBinPath() {
Object retVal = this.props.get(PROP_BIN_PATH).toString();
if (retVal instanceof File)
return ((File) retVal);
else
return (new File(this.props.get(PROP_BIN_PATH).toString()));
}
COM: <s> returns the binary path of grobid </s>
|
funcom_train/51188096 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton() {
if (jButton == null) {
jButton = new JButton();
jButton.setText("Cargar Imagen de Referencia");
jButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
System.out.println("El usuario ha solicitado cargar una imagen de " +
" referencia.");
if(showLoadImageDialog() == JFileChooser.APPROVE_OPTION)
displayImage(displayJAI);
}
});
}
return jButton;
}
COM: <s> this method initializes j button </s>
|
funcom_train/29507607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void verifyDate(Date toCheck) throws SAML2Exception{
if(toCheck == null){
throw new SAML2Exception("Date-parameter is null.");
}
if((toCheck.before(getNotBefore())) || (toCheck.after(getNotOnOrAfter()))){
throw new SAML2Exception("Login-date is illegal.");
}
}
COM: <s> verify that this condition is legal for a given date time </s>
|
funcom_train/1589973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String print(ReadablePeriod period) {
checkPrinter();
checkPeriod(period);
PeriodPrinter printer = getPrinter();
StringBuffer buf = new StringBuffer(printer.calculatePrintedLength(period, iLocale));
printer.printTo(buf, period, iLocale);
return buf.toString();
}
COM: <s> prints a readable period to a new string </s>
|
funcom_train/2465986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initMnemonics() {
mnemonicToIndexMap = new Hashtable();
mnemonicInputMap = new InputMapUIResource();
mnemonicInputMap.setParent(SwingUtilities.getUIInputMap(tabPane,
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT));
SwingUtilities
.replaceUIInputMap(tabPane,
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,
mnemonicInputMap);
}
COM: <s> installs the state needed for mnemonics </s>
|
funcom_train/32724766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node deepCopy() {
if (children==null)
return this;
Node n = (Node)clone();
if (children!=null)
for (int i=0; i<children.length; i++)
n.children[i] = children[i].deepCopy();
return n;
}
COM: <s> make a deep copy of this node </s>
|
funcom_train/5235805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Builder registerObject(String key, Object obj) {
if (key.equals(CommandExecute.FLYWHEEL)) {
throw new RuntimeException("FATAL ERROR: "
+ CommandExecute.FLYWHEEL + " is a reserved key.");
}
if (key.indexOf(".") > -1) {
throw new RuntimeException(
"FATAL ERROR: key can not be qualified");
}
registeredObjects.put(key, obj);
return this;
}
COM: <s> register any instantiated objects you want available to the execute </s>
|
funcom_train/33885969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createToIgnoreList() {
toIgnore = new ArrayList<String>();
String sToIgnore = ApplicationParameters.getSingleton().getParameter(
ParameterConstants.IDENTIFIER_PARTS_TO_IGNORE_KEY, "");
if (sToIgnore != null) {
StringTokenizer tokenizer = new StringTokenizer(sToIgnore,
" ,\t\n\r\f");
while (tokenizer.hasMoreTokens()) {
toIgnore.add(tokenizer.nextToken());
}
}
}
COM: <s> creates a list of tokens that shouldnt be considered when comparing </s>
|
funcom_train/29576434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean unequalNotNull(Object expected, Object actual) {
if (XMLUnit.getIgnoreWhitespace()
&& expected instanceof String && actual instanceof String) {
return !(((String)expected).trim().equals(((String)actual).trim()));
}
return !(expected.equals(actual));
}
COM: <s> test two non null values for inequality </s>
|
funcom_train/5071037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateConfigFromLocalShared(ILaunchConfigurationWorkingCopy config) {
if (isShared()) {
String containerPathString = fSharedLocationText.getText();
IContainer container = getContainer(containerPathString);
config.setContainer(container);
} else {
config.setContainer(null);
}
}
COM: <s> updates the configuration form the local shared config working copy </s>
|
funcom_train/41209454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pointerReleased(final int[] x, final int[] y){
longPointerCharged = false;
pointerPressedAndNotReleased = false;
if(impl.getCurrentForm() == null){
return;
}
addInputEvent(createPointerEvent(x, y, POINTER_RELEASED));
}
COM: <s> pushes a pointer release event with the given coordinates into lwuit </s>
|
funcom_train/31890713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void openSelectedRoom() {
if(!table.getSelectionModel().isSelectionEmpty()){
int index = table.getSelectionModel().getMinSelectionIndex();
String name = (String) tableSorter.getValueAt(index, 0);
String path = (String) tableSorter.getValueAt(index, 2);
this.conference.openRoom(path);
}
}
COM: <s> opens room selected in the table </s>
|
funcom_train/48749463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Input getInput(Document d) throws Exception {
Input anotherI = (Input)Input.fromXML(d);
FastStringBuffer fsb = new FastStringBuffer(128);
// if (isTrace(this)) System.out.println("\nInput After De-Serialization:");
// if (isTrace(this)) System.out.println(anotherI.toXML(fsb).toString());
return anotherI;
}
COM: <s> helper to rebuild the input from xml </s>
|
funcom_train/22397462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void executeDele(int index) throws IOException, MailException {
if(EventLogger.getMinimumLevel() >= EventLogger.DEBUG_INFO) {
EventLogger.logEvent(
AppInfo.GUID,
("PopProtocol.executeDele("+index+")").getBytes(),
EventLogger.DEBUG_INFO);
}
execute(DELE_ + index);
}
COM: <s> execute the dele command </s>
|
funcom_train/17576863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getMailCheckMenuItem() {
if (mailCheckMenuItem == null) {
mailCheckMenuItem = new JMenuItem();
mailCheckMenuItem.setText("Mail Checker...");
mailCheckMenuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JDialog d = new JDialog(JavbotFrame.this, "Mail Checker", true);
d.setSize(320,200);
d.setContentPane(new MailCheckPanel());
d.setVisible(true);
}
});
}
return mailCheckMenuItem;
}
COM: <s> this method initializes mail check menu item </s>
|
funcom_train/4978289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Reputation getReputation(Entity entity, Focus focus) {
String user = entity.getName();
int feedbackScore = this.eBay.getUser(user).getFeedbackScore();
double rangeValue = this.computeScoreToRange(feedbackScore);
Value value = new ZeroToOneRangeValue(rangeValue);
Target target = new Target(entity);
Evaluation evaluation = new Evaluation(focus, target, value);
Recipient recipient = new Recipient(entity, focus);
Voice voice = new Voice(recipient, evaluation);
return new Reputation(null, voice, null);
}
COM: <s> return the reputation value for a given entity the focus has no effect </s>
|
funcom_train/33393411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isNextCharacterEscapable(String nextLine, boolean inQuotes, int i) {
return inQuotes // we are in quotes, therefore there can be escaped
// quotes in here.
&& nextLine.length() > (i + 1) // there is indeed another
// character to check.
&& (format.isDelimiter(nextLine.charAt(i + 1)) || format.isEscape(nextLine
.charAt(i + 1)));
}
COM: <s> precondition the current character is an escape </s>
|
funcom_train/8606190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getVendorSellModifier(Race playerRace) {
return (int) ((int) ((int) (PricesConfig.VENDOR_SELL_MODIFIER *
this.getGlobalPrices(playerRace) / 100F) *
this.getGlobalPricesModifier() / 100F) *
this.getTaxes(playerRace) / 100F);
}
COM: <s> used in sm sell item </s>
|
funcom_train/6204731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadParameterPanelValues() {
getParameterPanel().setInitialParameters(getValidationStep().getValidationParameters());
getParameterPanel().load();
String errMsg = getValidationStep().getDefaultErrorMessage();
defaultErrorMsg.setText((errMsg == null) ? "" : errMsg);
abortOnFail.setSelection(getValidationStep().isAbortOnFail());
}
COM: <s> load the ui values </s>
|
funcom_train/28751741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInputdate(java.util.Date newVal) {
if ((newVal != null && this.inputdate != null && (newVal.compareTo(this.inputdate) == 0)) ||
(newVal == null && this.inputdate == null && inputdate_is_initialized)) {
return;
}
this.inputdate = newVal;
inputdate_is_modified = true;
inputdate_is_initialized = true;
}
COM: <s> setter method for inputdate </s>
|
funcom_train/9877990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveSelectedLociSpots() {
int [] indices = getSelectedIndices();
if(indices.length == 0) {
JOptionPane.showMessageDialog(framework.getFrame(), "There are no loci selected. Shift+Left Click to select.", "Empty Locus Selection List", JOptionPane.INFORMATION_MESSAGE);
return;
}
saveSpotsForLocusList(indices);
}
COM: <s> saves spots that map to selected loci </s>
|
funcom_train/48525637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void runTest() {
if (NUM_NODES < 2) {
System.out.println("The DistPastRegrTest must be run with at least 2 nodes for proper testing. Use the '-nodes n' to specify the number of nodes.");
return;
}
// Run each test
testRouteRequest();
}
COM: <s> method which should run the test this is called once all of the </s>
|
funcom_train/9663505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void prepareChoiceButton() {
ToggleButton dropDownButton = getChoiceButton();
dropDownButton.getUpFace().setImage(getChoiceButtonImage());
dropDownButton.getDownFace().setImage(getChoiceButtonImage());
dropDownButton.setStyleName("choice-button");
}
COM: <s> prepares the drop down button for displaying </s>
|
funcom_train/44171274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getConvertProbability() {
Specification spec = getSpecification();
int opt = spec.getIntegerOption("model.option.nativeConvertProbability")
.getValue();
return 0.01f * FeatureContainer.applyModifierSet(opt,
getGame().getTurn(),
getModifierSet("model.modifier.nativeConvertBonus"));
}
COM: <s> gets the probability that an attack by this unit will provoke a </s>
|
funcom_train/26416186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRead() throws Exception {
ReportLineCollector colly = new ReportLineCollector(is);
// wait for collection to complete
colly.innerThread.join(2000);
MyPipedInputStream izzy = new MyPipedInputStream();
colly.inPipe = izzy;
assertTrue("read already called on izzy", ! izzy.readCalled);
assertEquals("wrong val returned", -41, colly.read());
assertTrue("read not called on izzy", izzy.readCalled);
}
COM: <s> see that read correctly reads from the internal pipe </s>
|
funcom_train/3527814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
if ( (namespaceURI == null) || (namespaceURI.length() == 0) ) {
namespaceURI = defaultNamespace.getURI();
qName = defaultNamespace.getPrefix() + ":" + qName;
}
super.startElement(namespaceURI, localName, qName, atts);
}
COM: <s> overwrite code start element code in order to provide the </s>
|
funcom_train/20228940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Article getArticleByTitle(String title) {
title = title.substring(0,1).toUpperCase() + title.substring(1) ;
try {
return new Article(database, title) ;
} catch (Exception e) {};
try {
Redirect r = new Redirect(database, title) ;
return r.getTarget() ;
} catch (Exception e) {};
return null ;
}
COM: <s> returns the article referenced by the given case sensitive title </s>
|
funcom_train/45538067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void adaptToPreferenceChange(PropertyChangeEvent event) {
if (fCodeScanner.affectsBehavior(event))
fCodeScanner.adaptToPreferenceChange(event);
if (fMultilineCommentScanner.affectsBehavior(event))
fMultilineCommentScanner.adaptToPreferenceChange(event);
if (fSinglelineCommentScanner.affectsBehavior(event))
fSinglelineCommentScanner.adaptToPreferenceChange(event);
if (fStringScanner.affectsBehavior(event))
fStringScanner.adaptToPreferenceChange(event);
if (fJSCDocScanner.affectsBehavior(event))
fJSCDocScanner.adaptToPreferenceChange(event);
}
COM: <s> adapts the behavior of the contained components to the change </s>
|
funcom_train/48210734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMapping(SQLColumn pkColumn, SQLColumn fkColumn) throws SQLObjectException {
ColumnMapping cmap = new ColumnMapping();
cmap.setPkColumn(pkColumn);
cmap.setFkColumn(fkColumn);
logger.debug("add column mapping: "+pkColumn.getParent()+"." +
pkColumn.getName() + " to " +
fkColumn.getParent()+"."+fkColumn.getName() );
addMapping(cmap);
}
COM: <s> convenience method for adding a sqlrelationship </s>
|
funcom_train/43245910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetPlaceOfBirthCity() {
System.out.println("getPlaceOfBirthCity");
PatientDataObject instance = new PatientDataObject();
String expResult = "";
String result = instance.getPlaceOfBirthCity();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get place of birth city method of class org </s>
|
funcom_train/8408506 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(int index, Object element) {
if (fast) {
synchronized (this) {
ArrayList temp = (ArrayList) list.clone();
temp.add(index, element);
list = temp;
}
} else {
synchronized (list) {
list.add(index, element);
}
}
}
COM: <s> insert the specified element at the specified position in this list </s>
|
funcom_train/33398647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Document buildDocument() throws IOException {
Document document = new Document();
Element rootElement = new Element(ELEMENT_REGISTRY);
rootElement.setAttribute(ATTR_VERSION, version);
document.setRootElement(rootElement);
rootElement.addContent(getPluginsElement());
rootElement.addContent(getContentElement());
rootElement.addContent(getProtocolElement());
rootElement.addContent(getMimeElement());
rootElement.addContent(getCaptureDeviceElement());
return document;
}
COM: <s> builds a document from the registry data structures </s>
|
funcom_train/16176105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMoveableXY(Moveable moveable, int x, int y ) {
moveable.setX(x / SimGraphics.getInstance().getCellWidthScale()); //DisplayConstants.CELL_WIDTH);
moveable.setY(y / SimGraphics.getInstance().getCellHeightScale()); //DisplayConstants.CELL_HEIGHT);
}
COM: <s> sets the new coordinates for specified moveable </s>
|
funcom_train/31810672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static private String pathConcat(String p1, String p2) {
p2 = p2.replace('/', FS.charAt(0));
if (!p1.endsWith(FS)) {
p1 = p1 + FS;
}
if (p2.startsWith(FS)) {
p2 = p2.substring(0, p2.length() - 1);
}
return (p1 + p2);
}
COM: <s> concatenates path strings util method </s>
|
funcom_train/29961616 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addPiece(Position position,Piece piece,Player player,boolean hasBeenMoved){
BoardPiece boardPiece=new AbstractBoardPiece(piece,position,player,hasBeenMoved);
board[arrayIndex(position.getX(),position.getY())]=boardPiece;
if (player.isWhite()){
if (piece==King.PIECE){
whiteKing=boardPiece;
}
whitePieces.add(boardPiece);
} else {
if (piece==King.PIECE){
blackKing=boardPiece;
}
blackPieces.add(boardPiece);
}
}
COM: <s> this add the piece to the board and initialize all the list asociated </s>
|
funcom_train/35678386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPropertyNameFromFieldName() throws Exception {
assertEquals(null, CodeGenUtil.propertyNameFromFieldName(null));
assertEquals("A", CodeGenUtil.propertyNameFromFieldName("a"));
assertEquals("Abc", CodeGenUtil.propertyNameFromFieldName("abc"));
}
COM: <s> check property name from field name </s>
|
funcom_train/781895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isSubpageOfInitial(CrawlURL c) {
boolean r = false;
Iterator<URL> it = this.initial.iterator();
while (it.hasNext()) {
String base = it.next().toString();
if (c.getURL().toString().startsWith(base)) {
r = true;
}
}
return r;
}
COM: <s> check if an url is a subpage of an initial url </s>
|
funcom_train/13515716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JSONObject toJSONObject(JSONArray names) throws JSONException {
if (names == null || names.length() == 0 || length() == 0) {
return null;
}
JSONObject jo = new MJSONObject();
for (int i = 0; i < names.length(); i += 1) {
jo.put(names.getString(i), this.opt(i));
}
return jo;
}
COM: <s> produce a jsonobject by combining a jsonarray of names with the values </s>
|
funcom_train/31729649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ArrayList getText(Object[] args) {
ArrayList text = new ArrayList();
for(Iterator i=iterator(); i.hasNext();) {
StringBuffer line_buf = new StringBuffer();
List line = (List)i.next();
for(Iterator j=line.iterator(); j.hasNext();) {
DataLayoutItem item = (DataLayoutItem)j.next();
line_buf.append(item.getItem(args));
}
if(line_buf.length()>0)
text.add(line_buf.toString());
}
if(text.size()==0)
return null;
else
return text;
}
COM: <s> code get text code converts data into strings </s>
|
funcom_train/19812966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start(String taskName) throws IllegalStateException {
if (this.running) { throw new IllegalStateException("Can't start StopWatch: it's already running"); }
this.startNanoTime = System.nanoTime();
this.running = true;
this.currentTaskName = taskName;
}
COM: <s> start a named task </s>
|
funcom_train/44011366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetMembershipID() {
System.out.println("setMembershipID");
String membershipID = "";
MembershipBO instance = null;
instance.setMembershipID(membershipID);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set membership id method of class edu </s>
|
funcom_train/18460730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstant_5() {
Vector elements = new Vector();
Term element = new Term(1, "+D", 1, '*');
elements.add(element);
String formula = getFormula(elements);
double d = Double.parseDouble(formula.substring(5));
assertTrue(d>0);
}
COM: <s> the placeholder is expected to be replaced by a positive double </s>
|
funcom_train/18645752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected UsageType translateUsageType(org.pi4soa.cdl.UsageType type) {
UsageType ret=null;
if (type == org.pi4soa.cdl.UsageType.DISTINCT) {
ret = UsageType.DISTINCT;
} else if (type == org.pi4soa.cdl.UsageType.ONCE) {
ret = UsageType.ONCE;
} else if (type == org.pi4soa.cdl.UsageType.SHARED) {
ret = UsageType.SHARED;
}
return(ret);
}
COM: <s> this method translates the cdl channel usage type into the </s>
|
funcom_train/16791219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doRename() {
String name;
if (this.model == null)
return;
try {
name = FilenamePanel.rename(this.getShell(), this.resources, this.model);
if (name == null)
return;
this.getClient().renameFile(this.model, name);
} catch (Exception ex) {
this.logger.error("Unable to open rename dialog", ex);
return;
}
}
COM: <s> rename the currently selected recording </s>
|
funcom_train/39379899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onInit() {
addModel("mode", getMode());
Context context = getContext();
if (getError() != null) {
ErrorReport errorReport =
new ErrorReport(error,
getPageClass(),
false,
context.getRequest(),
context.getServletContext());
addModel("errorReport", errorReport);
}
}
COM: <s> this method initializes the error page populating the model with error </s>
|
funcom_train/22050224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rule_holding() {
if (this.isContestedByOccupation()) { // Can't do anything about this!
iContested.remove_all_elements(); // Clear all other contests
EnsureContestedDueToOccupation(); // But put back the contested by occupation
return;
} else if (isContested()) {
iContested.remove_all_elements();
} else {
iHlevel++;
}
}
COM: <s> this rules the holding </s>
|
funcom_train/18585640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initializeCProject(ICElement cElement, ILaunchConfigurationWorkingCopy config) {
ICProject cProject = cElement.getCProject();
String name = null;
if (cProject != null && cProject.exists()) {
name = cProject.getElementName();
}
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, name);
}
COM: <s> set the c project attribute based on the icelement </s>
|
funcom_train/50153945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setupGenerator(TextfileGenerator generator) {
if (generator != null && project != null) {
generator.setDocumentRoot(project.getProperty(Project.DOCUMENT_ROOT));
generator.setSourceCodeRoot(project.getProperty(Project.JAVA_OUTPUT));
generator.setTemplateFactoryImplementation( project.getProperty(Project.GENERATOR_TEMPLATE_FACTORY));
}
}
COM: <s> method setup generator </s>
|
funcom_train/7959663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDockable(WSDockKey compoundDockable, WSDockKey childDockable){
SingleDockableNode node = getNode(compoundDockable);
Node parent = node.parent;
CompoundDockableNode cnode = new CompoundDockableNode(compoundDockable);
replaceChild(parent, node, cnode);
cnode.setNestedNode(new SingleDockableNode(childDockable));
}
COM: <s> adds a dockable into a compound dockable </s>
|
funcom_train/33851462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isNullCheck() {
// Null check blocks must be exception throwers,
// and are always empty. (The only kind of non-empty
// exception throwing block is one terminated by an ATHROW).
if (!isExceptionThrower() || getFirstInstruction() != null)
return false;
short opcode = exceptionThrower.getInstruction().getOpcode();
return nullCheckInstructionSet.get(opcode);
}
COM: <s> return whether or not this block is a null check </s>
|
funcom_train/3368761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEditor(JComponent editor) {
if (editor == null) {
throw new IllegalArgumentException("null editor");
}
if (!editor.equals(this.editor)) {
JComponent oldEditor = this.editor;
this.editor = editor;
if (oldEditor instanceof DefaultEditor) {
((DefaultEditor)oldEditor).dismiss(this);
}
editorExplicitlySet = true;
firePropertyChange("editor", oldEditor, editor);
revalidate();
repaint();
}
}
COM: <s> changes the code jcomponent code that displays the current value </s>
|
funcom_train/18950466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SectionSet modify( SectionSet pSectionSet, PropertySet pPropertySet ) throws ModifierException {
if( ErrorUtil.is_null( pSectionSet, "pSectionSet" ) ) {
return new SectionSet();
}
applyModificationsInOrder( pSectionSet, pPropertySet );
return pSectionSet;
}
COM: <s> modify all sections in the section set </s>
|
funcom_train/51099319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startup() {
DataDomain domain = eventController.getCurrentDataDomain();
String factory = (String) domain.getProperties().get(
DataRowStore.EVENT_BRIDGE_FACTORY_PROPERTY);
CacheSyncTypesModel topModel = buildTypesModel(factory);
setModel(topModel);
setView(new CacheSyncConfigDialog());
// build cards, showing the one corresponding to DataDomain state
prepareChildren(factory);
super.startup();
}
COM: <s> creates and shows a new modal dialog window </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.