__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/25313237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SetDomain intersect(SetDomain domain) {
assert domain.checkInvariants() == null : domain.checkInvariants() ;
IntDomain lub_i = lub.intersect( domain.lub() );
if( lub_i.isEmpty() )
return emptyDomain;
IntDomain glb_i = glb.intersect( domain.glb() );
return new BoundSetDomain(glb_i,lub_i);
}
COM: <s> it intersects current domain with the one given as a parameter </s>
|
funcom_train/20627747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ArrayList doMinus(String query1, String query2) throws SQLException{
Statement stmt = null;
try {
stmt = this.conn.createStatement();
ResultSet rs = doMinus(stmt, query1, query2);
ArrayList cons = getConList(rs);
rs.close();
return cons;
}
finally {
if (stmt != null) {
stmt.close();
}
}
}
COM: <s> executes minus with the given 2 queries </s>
|
funcom_train/2955159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeFullLines() {
boolean repaint = false;
// Remove full lines
for (int y = height - 1; y >= 0; y--) {
if (isLineFull(y)) {
removeLine(y);
removedLines++;
repaint = true;
y++;
}
}
// Repaint if necessary
if (repaint) {
update();
}
}
COM: <s> removes all full lines </s>
|
funcom_train/40931450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getVehiculoSiReparadoCommand() {
if (vehiculoSiReparadoCommand == null) {//GEN-END:|359-getter|0|359-preInit
// write pre-init user code here
vehiculoSiReparadoCommand = new Command("Si", Command.OK, 0);//GEN-LINE:|359-getter|1|359-postInit
// write post-init user code here
}//GEN-BEGIN:|359-getter|2|
return vehiculoSiReparadoCommand;
}
COM: <s> returns an initiliazed instance of vehiculo si reparado command component </s>
|
funcom_train/22908969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFileDropTarget(java.awt.Component comp) {
FileDrop.Listener listener = new FileDrop.Listener() {
public void filesDropped(java.io.File[] files) {
fireFileDropHappened(files);
} // end filesDropped
}; // end listener
boolean recursive = true;
new FileDrop(comp, recursive, listener);
} // end newDropTarget
COM: <s> registers a component as a drop target </s>
|
funcom_train/26324837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getOppositeLocation(int loc) {
switch (loc) {
case Aero.LOC_NOSE:
return Aero.LOC_AFT;
case Aero.LOC_LWING:
return Aero.LOC_RWING;
case Aero.LOC_RWING:
return Aero.LOC_LWING;
case Aero.LOC_AFT:
return Aero.LOC_NOSE;
default:
return Aero.LOC_NOSE;
}
}
COM: <s> what location is opposite the given one </s>
|
funcom_train/43814320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void reconnect(MemcachedTCPSession session) {
if (!this.client.isShutdown()) {
// Prevent reconnecting repeatedly
synchronized (session) {
if (!session.isAllowReconnect()) {
return;
}
session.setAllowReconnect(false);
}
MemcachedSession memcachedTCPSession = session;
InetSocketAddressWrapper inetSocketAddressWrapper = memcachedTCPSession
.getInetSocketAddressWrapper();
this.client.getConnector().addToWatingQueue(
new ReconnectRequest(inetSocketAddressWrapper, 0,
this.client.getHealSessionInterval()));
}
}
COM: <s> auto reconect to memcached server </s>
|
funcom_train/22206854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean ofType(Topic topic, Locator subjectOrIndicator) {
Iterator types = topic.getTypes().iterator();
while (types.hasNext()) {
Topic type = (Topic) types.next();
if ((type.getSubject() != null) &&
(type.getSubject().equals(subjectOrIndicator))) {
return true;
}
if (type.getSubjectIndicators().contains(subjectOrIndicator)) {
return true;
}
}
return false;
}
COM: <s> internal evaluation function </s>
|
funcom_train/32155977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JSpinner getMinCpCx() {
if (minCpCx == null) {
minCpCx = new JSpinner(new SpinnerNumberModel(0.40, 0.01, 1, 0.01));
minCpCx.setBounds(new Rectangle(180, 70, 60, 22));
}
return minCpCx;
}
COM: <s> this method initializes min cp cx </s>
|
funcom_train/33877786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPartOfSpeech(PartOfSpeech pos) {
PartOfSpeech existing = this.allPartsOfSpeech.get(pos.getPartOfSpeech());
if(existing == null)
this.allPartsOfSpeech.put(pos.getPartOfSpeech(), pos);
else if(existing != pos)
throw new IllegalArgumentException(existing.getPartOfSpeech() +
" is already present; can't insert a different instance of the same object!");
}
COM: <s> adds the part of speech if it doesnt exist </s>
|
funcom_train/34628625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addOutline(List<OutlineNode> nodes, String fileName) {
outlines.put(fileName, nodes);
IFile mainFile = TexlipseProperties.getProjectSourceFile(currentProject);
String str = mainFile.getFullPath().removeFirstSegments(1).toString();
if (fileName.equals(str)) {
this.topLevelNodes = nodes;
}
}
COM: <s> adds an outline into the project full document outline </s>
|
funcom_train/45231025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ParameterArray doIt() throws IOException, VSMException {
/* This will hold return from VSMAPI call */
composeInputArray();
composeOutputArray();
connect();
writeInput(connection.getOutputStream());
readOutput(connection.getInputStream());
disconnect();
return outParams;
}
COM: <s> run the vsmapi call and return its output parameters </s>
|
funcom_train/28354004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showSolverConfigDialog() {
if ( _solverConfigDialog == null ) {
_solverConfigDialog = new SolverConfigDialog( EnergyManagerWindow.this, getEnergyManagerDocument().getModel().getOptimizer() );
_solverConfigDialog.setLocationRelativeTo( EnergyManagerWindow.this );
}
else {
_solverConfigDialog.setOptimizer( getEnergyManagerDocument().getModel().getOptimizer() );
}
_solverConfigDialog.setVisible( true );
}
COM: <s> show the solver config dialog </s>
|
funcom_train/12778223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMethodExceptionHandler(String catchClass, Patch p) {
verifyState(DURING_PASS);
if (p == null) {
throw new IllegalArgumentException("null p");
}
methodHandlerPatches = new HandlerPatch(methodHandlerPatches, catchClass, allocateLabel(), p);
patchCount++;
}
COM: <s> a method exception handler handles exceptions generated anywhere in the method </s>
|
funcom_train/36753905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object parse(String filename, Class<?> c) {
File file = new File(filename);
// Parse the XML
Object result = null;
try {
Document doc = db.parse(file);
Element root = doc.getDocumentElement();
result = parseObject(c, root);
} catch (Exception e) {
System.out.println("Exception occurred while parsing: " + filename);
e.printStackTrace();
}
return result;
}
COM: <s> parses a given file to generate an object of the given class </s>
|
funcom_train/37228980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean empty() {
if( bShowNull ) return false;
if( (vComponents == null || vComponents.size() == 0) )
return true;
else {
Iterator i = vComponents.iterator();
while( i.hasNext() ) {
HL7Element e = (HL7Element)i.next();
if( e.size() > 0 || e.getShowNull() ) return false;
}
}
return true;
}
COM: <s> is this element empty </s>
|
funcom_train/44940347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean mayNavigateInto(Cell cell) throws DataAccessException {
if (cell.equals(security.getRoot())) {
return true;
}
List<Cell> children = cellHome.findChildren(cell);
for (Cell next : children) {
if (security.check(next, CellOperation.NAVIGATE)) {
return true;
}
}
return false;
}
COM: <s> returns true if user may view content under given cell i </s>
|
funcom_train/5077957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute(Command command) {
if (command == null || !command.canExecute())
return;
flushRedo();
notifyListeners(command, PRE_EXECUTE);
try {
command.execute();
if (getUndoLimit() > 0) {
while (undoable.size() >= getUndoLimit()) {
((Command)undoable.remove(0)).dispose();
if (saveLocation > -1)
saveLocation--;
}
}
if (saveLocation > undoable.size())
saveLocation = -1; //The save point was somewhere in the redo stack
undoable.push(command);
notifyListeners();
} finally {
notifyListeners(command, POST_EXECUTE);
}
}
COM: <s> executes the specified command if possible </s>
|
funcom_train/4226574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Boolean validTextAllowNull(String requiredParam, int maxLength) {
Boolean flg = Boolean.TRUE;
if (requiredParam == null || requiredParam.length()< 1){
flg = Boolean.TRUE;
return flg;
}
if (requiredParam.length() > maxLength){
flg = Boolean.FALSE;
}
return flg;
}
COM: <s> validate the value is not longer than the max length or is null </s>
|
funcom_train/40717322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testJavaPathWithStaticContent() throws Exception {
String javaCode = testJavaPath("<gxp:template"
+ NAMESPACE_DECLS
+ " name='inmemory.gxp.test.Main'>"
+ "hello, world!"
+ "</gxp:template>",
AlertSet.EMPTY);
assertContains("gxp$out.append(\"hello, world!\");", javaCode);
}
COM: <s> tests the java code generation path with static content </s>
|
funcom_train/17679532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SqlExp getClone(SqlExp clone, Map cloneMap) {
if (next != null) clone.next = createClone(next, cloneMap);
if (childList != null) clone.childList = createClone(childList, cloneMap);
clone.preFirstCharIndex = preFirstCharIndex;
clone.lastCharIndex = lastCharIndex;
return clone;
}
COM: <s> clone the current instance </s>
|
funcom_train/17788601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CADIPoint getLocation() {
if (location == null) {
location = parent.parent.getLocation(parent.component);
int den = 1 << (parent.getWTLevels() - rLevel);
location.x = (int)Math.ceil(location.x / den);
location.y = (int)Math.ceil(location.y / den);
}
return location;
}
COM: <s> returns the position upper left corner of the resolution level within </s>
|
funcom_train/18350609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object getCurrentValue(List contextItems) {
Object value = null;
long latestTime = 0L;
Iterator iterator = contextItems.iterator();
while (iterator.hasNext()) {
ContextItem contextItem = (ContextItem) iterator.next();
if (contextItem.getCreatedTimestamp().longValue() > latestTime) {
value = contextItem.getValue();
latestTime = contextItem.getCreatedTimestamp().longValue();
}
}
return value;
}
COM: <s> returns most current object instance for any type from context item list </s>
|
funcom_train/35715091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doPaint(GC gc) {
ILineRange visibleModelLines= computeVisibleModelLines();
if (visibleModelLines == null)
return;
fSensitiveToTextChanges= isViewerCompletelyShown();
fScrollPos= fCachedTextWidget.getTopPixel();
fRevisionPainter.paint(gc, visibleModelLines);
if (!fRevisionPainter.hasInformation()) // don't paint quick diff colors if revisions are painted
fDiffPainter.paint(gc, visibleModelLines);
}
COM: <s> draws the ruler column </s>
|
funcom_train/50154750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void generate(StrutsApplicationModel model) throws GenerationException {
generateSourceFiles(model.getActions(), model);
generateSourceFiles(model.getForms(), model);
generateSourceFiles(model.getExceptionClasses(), model);
generateSourceFiles(model.getExceptionHandlers(), model);
generatePages(model.getPages(), model);
}
COM: <s> given a code struts application model code generate all the relevant </s>
|
funcom_train/34233219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(int id, String ip) {
String[] check_array;
Iterator<String[]> i = state.iterator();
while (i.hasNext()) {
check_array = (String[]) i.next();
if (check_array[0].equals(String.valueOf(id))
&& check_array[1].equals(ip)) {
i.remove();
}
}
}// remove()
COM: <s> remove all entries that match both ip and id </s>
|
funcom_train/25637780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addClassFrameTag(Content contentTree) {
HtmlTree frame = HtmlTree.FRAME(configuration.topFile, "classFrame",
configuration.getText("doclet.Package_class_and_interface_descriptions"),
SCROLL_YES);
contentTree.addContent(frame);
}
COM: <s> add the frame tag for the frame that describes the class in detail </s>
|
funcom_train/5022241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDirty(boolean dirty) {
this.dirty = dirty;
if (dirty) {
if (!editorContext.getElementEditor().isDirty()) {
DirtyElementManager.addDirtyElement(editorContext.getElementWrapper().getElement(), editorContext.getElementEditor());
}
editorContext.getElementEditor().setDirty(dirty);
}
}
COM: <s> when the element in the editor has become dirty call this message </s>
|
funcom_train/12652768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsMemberNotFound() {
int code = 0;
int otherCode = 0;
while (code == otherCode) {
code = generator.nextInt();
otherCode = generator.nextInt();
}
CharacteristicCode characteristicCode = new CharacteristicCode(code);
CharacteristicCode[] set = new CharacteristicCode[] {new CharacteristicCode(otherCode)};
assert !characteristicCode.isMember(set) : "Set " + Arrays.toString(set) + " contains " + characteristicCode;
}
COM: <s> test is member not found </s>
|
funcom_train/37448542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection modifyCollection (Collection proteins, InteractionNetwork aGraph) {
/* Get the list of proteins in the current InteractionNetwork */
ArrayList listAllProteins = new ArrayList (aGraph.getNodes().values());
/* Make a clone of the list */
Collection newList = (Collection) listAllProteins.clone();
/* Remove all proteins of the collection "proteins" */
newList.removeAll(proteins);
return newList;
}
COM: <s> select all the graphs protein which are not in the given collection </s>
|
funcom_train/10537077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String convertToJavaString(byte[] sourceBytes, int offset, int numToConvert) {
try {
return new String(sourceBytes, offset, numToConvert, "UTF-8");
} catch (UnsupportedEncodingException e) {
if (SanityManager.DEBUG) {
SanityManager.THROWASSERT("Could not convert byte[] to Java String using UTF-8 encoding with offset",e);
}
}
return null;
}
COM: <s> offset and num to convert are given in terms of bytes not characters </s>
|
funcom_train/572005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static final public void buildMenuDatFile( ObjectOutputStream s, boolean adminFlag ) {
try {
if( adminFlag ){
s.writeObject( menuTree );
} else {
s.writeObject( menuTree.toUserMenu() );
}
s.flush();
} catch ( Exception e ) {
Log.userWarningMsg( Language.get("dat.cantsave"), e );
return;
}
}
COM: <s> write to stream s the menu </s>
|
funcom_train/36062277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isExpired(){
// 0 -- Precondition Check
// 0.1 -- The expiration date must be set or the rule will assumed to be non-expiring
if( expiresOn == null )
return false;
// 1 -- Determine if the expiration date has been met or exceeded
long currentTime = System.currentTimeMillis();
long expireTime = expiresOn.getTime();
if( currentTime > expireTime )
return true;
else
return false;
}
COM: <s> determines if the given rule has expired </s>
|
funcom_train/29842100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TimeSeriesDataItem getDataItem(final RegularTimePeriod period) {
// check arguments...
if (period == null) {
throw new IllegalArgumentException("Null 'period' argument");
}
// fetch the value...
final TimeSeriesDataItem dummy = new TimeSeriesDataItem(period, new Integer(0));
final int index = Collections.binarySearch(this.data, dummy);
if (index >= 0) {
return (TimeSeriesDataItem) this.data.get(index);
} else {
return null;
}
}
COM: <s> returns the data item for a specific period </s>
|
funcom_train/28258049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUpBorders() {
statesBorder = new TitledBorder(
BorderConstants.etchedBorder, "Player State" );
eventBorder = new TitledBorder(
BorderConstants.etchedBorder, "Events" );
playerpanel.mediaBorder.setTitle("Master Player");
topPanel.setBorder(playerpanel.mediaBorder);
radioPanel.setBorder(statesBorder);
eventPanel.setBorder(eventBorder);
playerpanel.setBorder(BorderConstants.emptyBorder);
}
COM: <s> overrides player panel </s>
|
funcom_train/46150491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isButtonPressed(int pos) {
if ((pos < 1) || (pos > NUM_BUTTONS)) {
System.out.println("Button position out of range (1-" +
NUM_BUTTONS + "): " + pos);
return false;
}
float value = comps[ buttonsIdx[pos-1] ].getPollData();
// array range is 0-NUM_BUTTONS-1
return ((value == 0.0f) ? false : true);
}
COM: <s> checks if button is pressed </s>
|
funcom_train/34451330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addParameterPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_MPlace_parameter_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_MPlace_parameter_feature", "_UI_MPlace_type"),
M3ActionsPackage.Literals.MPLACE__PARAMETER, true, false, true,
null, null, null));
}
COM: <s> this adds a property descriptor for the parameter feature </s>
|
funcom_train/3740312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changePassword(User who, User user, String password) throws UserManagerException {
if (!mayChangePasswd(who,user)) throw new UserManagerException();
try {
Session sess = HibernateUtil.currentSession();
Transaction trans = sess.beginTransaction();
user.setPassword(password);
sess.saveOrUpdate(user);
trans.commit();
} catch (HibernateException e) {
throw new UserManagerException();
}
}
COM: <s> change password attribute of the given user </s>
|
funcom_train/24121211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(OutputStream out) throws IOException {
int size = this.getSize();
WMFConstants.writeLittleEndian(out, size);
WMFConstants.writeLittleEndian(out, WMFConstants.WMF_RECORD_ELLIPSE);
WMFConstants.writeLittleEndian(out, y2);
WMFConstants.writeLittleEndian(out, x2);
WMFConstants.writeLittleEndian(out, y1);
WMFConstants.writeLittleEndian(out, x1);
}
COM: <s> writes the ellipse record to a stream </s>
|
funcom_train/19780922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setValuesForDelete(PreparedStatement pStmt, Object obj) throws SQLException {
TaskDtlVo vo = (TaskDtlVo) obj;
int i = 1;
pStmt.setString(i++, vo.getCompanyCode());
pStmt.setString(i++, vo.getDocType());
pStmt.setString(i++, vo.getTaskCode());
}
COM: <s> sets the values for a sql delete statement </s>
|
funcom_train/22510144 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAttachEdge(String attachEdge) throws WrongValueException {
if (attachEdge == null || attachEdge.length() == 0)
throw new WrongValueException("Empty attachEdge not allowed");
if (!_attachEdge.equals(attachEdge)) {
_attachEdge = attachEdge;
smartUpdate("dojo:attachEdge", attachEdge);
}
}
COM: <s> returns the attach edge </s>
|
funcom_train/28133648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createFormStrategyControls(Composite composite, int nColumns) {
LayoutUtil.setHorizontalSpan(fFormButtons.getLabelControl(composite), 1);
Control control = fFormButtons.getSelectionButtonsGroup(composite);
GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
gd.horizontalSpan = nColumns - 2;
control.setLayoutData(gd);
DialogField.createEmptySpace(composite);
}
COM: <s> creates the controls for form strategies </s>
|
funcom_train/20728611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getJFreeReportFile() {
File file1 = null;
try {
file1 = Fileio.getFile("CustomerReport6.xml", "reports", false, false);
} catch (Exception ee) {
Log.log(Log.DEBUG, this, "No file? error=" + ee);
}
return file1;
}//}}}
//{{{ +getJFreeReportTable(String, int) : TableModel
COM: <s> gets the j free report file attribute of the customer report object </s>
|
funcom_train/5512227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawWind(Graphics2D g2d){
Vector3d wind = new Vector3d((Vector3d) pathData.elementAt(1));
wind.scale(4);
g2d.drawLine(400,425,(400 + (int) wind.x),(425 + (int)wind.z));
g2d.setColor(Color.yellow);
g2d.drawOval(398,423,4,4);
}
COM: <s> draws the wind vector for the current path </s>
|
funcom_train/22965585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void encodeToStream(OutputStream os) {
log.debug("encodeToStream - enter");
try {
BufferedOutputStream out = new BufferedOutputStream(os);
ImageIO.write(_image, "png", out);
} catch (Exception ee) {
log.warn("encodeToStream - exception", ee);
}
log.debug("encodeToStream - exit");
}
COM: <s> encode a buffered image as a png data stream </s>
|
funcom_train/20078307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getDeleteAlbumCommand(String albumId){
return "<xu:remove select=\"/albums/album[@id = \'" + albumId + "\']\" />" +
"<xu:remove select=\"/comments/comment[music_id = \'" + albumId + "\']\" />";
}
COM: <s> delete album and comments on that album command </s>
|
funcom_train/48045829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DateTimeFormatterBuilder append(DateTimePrinter printer, DateTimeParser parser) {
if (printer == null && parser == null) {
throw new NullPointerException("One of DateTimePrinter or DateTimeParser must be non-null");
}
appendInternal(printer, parser);
return this;
}
COM: <s> appends a printer and or parser to the formatter </s>
|
funcom_train/13563814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Coord getRandomPointinRadius(Coord zoneCoordinate){
Coord p = null;
double x, y;
double distance;
do {
x = (zoneCoordinate.getX() - radius) + (random.nextDouble() * 2 * radius);
y = (zoneCoordinate.getY() - radius) + (random.nextDouble() * 2 * radius);
p = new CoordImpl(x, y);
distance = EuclideanDistance.getEuclidianDistance(zoneCoordinate, p);
} while ( distance > radius );
return p;
}
COM: <s> distributing location within a circle defined by a given zone centroid and radius </s>
|
funcom_train/28750414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSummaryid(Long newVal) {
if ((newVal != null && this.summaryid != null && (newVal.compareTo(this.summaryid) == 0)) ||
(newVal == null && this.summaryid == null && summaryid_is_initialized)) {
return;
}
this.summaryid = newVal;
summaryid_is_modified = true;
summaryid_is_initialized = true;
}
COM: <s> setter method for summaryid </s>
|
funcom_train/7412863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("UserService".equals(portName)) {
setUserServiceEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/3935704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getFirstOrSecondOrBoth(String inFirst, String inSecond, String inLink) {
boolean hasFirst = inFirst.length() != 0;
boolean hasSecond = inSecond.length() != 0;
if (hasFirst && hasSecond) {
return inFirst + inLink + inSecond;
}
if (hasFirst) {
return inFirst;
}
return inSecond;
}
COM: <s> returns the first item or the second or both linked if needed </s>
|
funcom_train/7222843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String encode(String url){
// "URL" is not one of java.net, but one provided by PageMixer
URL encoded = new URL(url, encoding_);
encoded.setPath(encoded.getPath() + ";sessionID=" + sessionID_);
return encoded.toString();
}
COM: <s> get encoded url string to include the session id </s>
|
funcom_train/24532765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cancelAttributeSetting(EObject target, EStructuralFeature feature) {
if (!isDead()) {
if (applyRules) {
if (feature instanceof EReference) {
if (feature.isMany()) {
listClear(target, feature);
} else {
if (target.eIsSet(feature))
appendPost(createPost(target.eGet(feature)));
}
}
}
super.cancelAttributeSetting(target, feature);
}
}
COM: <s> cancel the attribute setting value </s>
|
funcom_train/32950624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object findDoc(Long id, AccountUser accountUser, PrivateKey userPrivateKey) throws JAXBException {
MenuData md = menuBean.findMenuDataItem(id);
if (md != null) {
DocXML docXMLFrom = (DocXML) docBean.findDocument(md.getDocumentId());
Object doc = xmlProtectedBean.unmarshal(docXMLFrom, accountUser, userPrivateKey);
return doc;
}
else
return null;
}
COM: <s> this function retrieve object corresponding to conditions and menupath </s>
|
funcom_train/4744207 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Quota getQuota(RunningApplication app) {
Quota found = null;
Collection<Quota> groupQuotas = app.getUserGroup().getQuotas();
for (Quota quota : groupQuotas) {
if (quota.getApplication() != null &&
quota.getApplication().getApplID()
== app.getApplication().getApplID()) {
found = quota;
}
}
return found;
}
COM: <s> returns the quota of the application object belonging to </s>
|
funcom_train/11671841 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void endExternalSubset(Augmentations augs) throws XNIException {
fIndent--;
printIndent();
fOut.print("endExternalSubset(");
if (augs != null) {
fOut.print(',');
printAugmentations(augs);
}
fOut.println(')');
fOut.flush();
} // endExternalSubset(Augmentations)
COM: <s> end external subset </s>
|
funcom_train/46620773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Button getBrowseButton() {
if (iBrowseButton == null) {
try {
iBrowseButton = new Button();
iBrowseButton.setName("BrowseButton");
iBrowseButton.setLabel("...");
} catch (Throwable iExc) {
handleException(iExc);
}
}
return iBrowseButton;
}
COM: <s> return the browse button property value </s>
|
funcom_train/47603092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getProfileItemCommand() {
if (profileItemCommand == null) {//GEN-END:|53-getter|0|53-preInit
// write pre-init user code here
profileItemCommand = new Command("\u0412\u044B\u0431\u0440\u0430\u0442\u044C", Command.ITEM, 0);//GEN-LINE:|53-getter|1|53-postInit
// write post-init user code here
}//GEN-BEGIN:|53-getter|2|
return profileItemCommand;
}
COM: <s> returns an initiliazed instance of profile item command component </s>
|
funcom_train/50208527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void propertyChange(PropertyChangeEvent event) {
String propName = event.getPropertyName();
if (PROP_BOOLEAN_VALUE.equals(propName)) {
BooleanTransitionModelPart source = (BooleanTransitionModelPart)event.getSource();
if (source.getBoolValue() == this.getBoolValue()) {
// the other transition was set to my value, so I have to react
// and change my value
setValue(! source.getBoolValue());
}
} else
super.propertyChange(event);
}
COM: <s> handles the notofication of the other boolean transition after a value change </s>
|
funcom_train/40622536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setPageCount(int pageCount) {
if (pageCount < 0) {
numPagesLabel.setHTML("");
lastImage.setVisible(false);
} else {
numPagesLabel.setHTML("of " + pageCount);
numPagesLabel.setVisible(true);
lastImage.setVisible(true);
}
}
COM: <s> set the page count </s>
|
funcom_train/7281080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumOldConnectionQueries() {
int numQueries = 0;
Iterator<RoutedConnection> iter = CONNECTIONS.iterator();
while(iter.hasNext()) {
TestConnection tc = (TestConnection)iter.next();
if(tc instanceof OldConnection) {
numQueries += tc.getNumQueries();
}
}
return numQueries;
}
COM: <s> returns the total number of queries received over all old connections </s>
|
funcom_train/19811060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CompletionTask createTask(int queryType, JTextComponent component) {
// If a different query type from the expected one is passed, we return null.
if (queryType != CompletionProvider.COMPLETION_QUERY_TYPE){
return null;
}
// Asynchronous task creation.
return new AsyncCompletionTask(new HatomAsynchCompletionQuery(), component);
}
COM: <s> creates the autocompletion task in an asynchronous mode </s>
|
funcom_train/40793394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand2() {
if (okCommand2 == null) {//GEN-END:|114-getter|0|114-preInit
// write pre-init user code here
okCommand2 = new Command("Ok", Command.OK, 0);//GEN-LINE:|114-getter|1|114-postInit
// write post-init user code here
}//GEN-BEGIN:|114-getter|2|
return okCommand2;
}
COM: <s> returns an initiliazed instance of ok command2 component </s>
|
funcom_train/8640257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PdfStream getFullFontStream() throws IOException, DocumentException {
if (cff) {
return new StreamFont(readCffFont(), "Type1C", compressionLevel);
}
else {
byte[] b = getFullFont();
int lengths[] = new int[]{b.length};
return new StreamFont(b, lengths, compressionLevel);
}
}
COM: <s> returns a pdf stream object with the full font program </s>
|
funcom_train/18551740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createOperationRightClickPopup() {
gOperationNodeRightClickMenu = new JPopupMenu();
gAddToResourceItem = new JMenuItem("Add to Resources");
gAddToResourceItem.addActionListener(gUDDISearchPanelButtonHandler);
gOperationNodeRightClickMenu.add(gAddToResourceItem);
}
COM: <s> creates the popup menu on a right click of an operation node </s>
|
funcom_train/38535955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected double getPrecision() {
if (!NumberMath.isRealType(nodeType)) return 0;
double precision = Double.POSITIVE_INFINITY;
if (aexpr!=null)
precision = Math.min(precision, aexpr.getPrecision());
if (zexpr!=null)
precision = Math.min(precision, zexpr.getPrecision());
return Math.max(precision, DoubleUtil.DEFAULT_PRECISION);
}
COM: <s> returns precision that should be used for arcs based on real intervals </s>
|
funcom_train/37596754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override public Void visit(ArrayTypeName node) {
print("l."+node.getSourceInfo().getStartLine()+" ArrayTypeName {");
if (node.getElementType() != null) {
print("elementType:");
node.getElementType().acceptVisitor(this);
}
displayProperties(node);
print("}");
return null;
}
COM: <s> visits a array type name </s>
|
funcom_train/47731447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect() {
DBAddress addr=null;
try {
addr = new DBAddress(host,port);
} catch (UnknownHostException e) {
log.error(e.getMessage());
System.exit(0);
}
mongo = new Mongo(addr);
String bucket = System.getProperty("storageBucket");
if(bucket!=null) {
log.debug("Using bucket "+bucket+" as set in system environment");
this.setBucket(bucket);
}
db = mongo.getDB(DB);
log.debug("New connection: "+db.toString());
}
COM: <s> connect the instance to the remote server </s>
|
funcom_train/34671188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProfiles(Map<String, TrippiProfile> profiles) throws TrippiException {
Properties p = loadProps();
clearProfiles(p);
Iterator<String> ids = profiles.keySet().iterator();
while (ids.hasNext()) {
String id = ids.next();
putProfile(p, profiles.get(id));
}
saveProps(p);
}
COM: <s> set the profiles in the config file </s>
|
funcom_train/3374158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
removeUnusedSets();
String s = "";
Iterator iterator = attributesPool.keySet().iterator();
while (iterator.hasNext()) {
SmallAttributeSet set = (SmallAttributeSet)iterator.next();
s = s + set + "\n";
}
return s;
}
COM: <s> converts a style context to a string </s>
|
funcom_train/15408886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ServerCache getCache(String cacheKey) {
ServerCache cache = concMap.get(cacheKey);
if (cache != null) {
return cache;
}
synchronized (monitor) {
cache = synchMap.get(cacheKey);
if (cache == null) {
ServerCacheOptions options = getCacheOptions(cacheKey);
cache = cacheFactory.createCache(cacheKey, options);
synchMap.put(cacheKey, cache);
concMap.put(cacheKey, cache);
}
return cache;
}
}
COM: <s> return the cache for a given bean type </s>
|
funcom_train/18863259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void keyReleaseOccured(KeyEvent e) {
if (e.character == SWT.TAB) {
// commit any pending changes if the user uses the tab key to go to
// the next ui element
if (dirty)
commit();
} else if (e.character == SWT.ESC) {
// rollback any pending changes if the user presses the ESC key
text.setText(value != null ? value : ""); //$NON-NLS-1$ restore old
dirty = false;
}
listener.selectionChanged(this);
}
COM: <s> called after the user has released a key in the text control </s>
|
funcom_train/37650504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Text buildRuleSetFileText(Composite parent) {
Text text = new Text(parent, SWT.SINGLE | SWT.BORDER);
String ruleSetFile = model.getRuleSetFile();
if (ruleSetFile != null) {
text.setText(ruleSetFile);
}
activeControls.add(text);
return text;
}
COM: <s> create the the rule set file name text </s>
|
funcom_train/25892649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addContinuation(Continuation k, SignalingMessage p) {
SignalingMessage interest = k.init(p);
continuations.put(interest, k);
revContinuations.put(k,interest);
revTimers.remove(k);
addTimer(0L, k);
selector.wakeup(); // wakeup the event handler thread if it's blocked
}
COM: <s> adds a new continuation to the dispatcher </s>
|
funcom_train/18620401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String iso639_2_to_iso639_1(String iso639_2) {
if(isoLanguagesMap639.containsKey(iso639_2.toLowerCase())) {
return iso639_2.toLowerCase();
} else {
return isoLanguagesMap639.inverse().get(iso639_2.toLowerCase());
}
}
COM: <s> retrieves 639 1 code from a 639 2 code </s>
|
funcom_train/49248685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Graph createGraph(HashMap neededProperties) {
this.neededProperties = neededProperties;
Graph g = new GTCGraph();
int gn = (new Integer(numberNodes.getValue()).intValue());
for (int i=0 ; i<gn ; i++) {
ComponentProperties properties = new ComponentProperties();
properties.addProperty(new Position(0,0));
properties.addProperty(new Label("v"+i));
properties.addProperty(new ComponentColor());
properties.addProperty(new ID(i));
Node node = new SimpleNode(properties);
g.addNode(node);
}
return g;
}
COM: <s> creates a new null graph </s>
|
funcom_train/31346405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUser (User user) {
this.user = user;
if (user != null) {
//session.setAttribute("ProjectRoles", ProjectRoleIterator.getProjectRoles(engine, user.getID()));
//session.setAttribute("EventRoles", EventRoleIterator.getEventRoles(engine, user.getID()));
//session.setAttribute("NewsRoles", NewsRoleIterator.getNewsArticleRoles(engine, user.getID()));
}
}
COM: <s> associates a user with this session </s>
|
funcom_train/25658689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFlood() {
truns = 0;
//starting server
SynchronizationServer.main(null);
//connecting clients
final Set<DummyClient> clients = new HashSet<DummyClient>();
for ( int i = 0; i<25; i++ ) {
DummyClient client = new DummyClient("Client"+i);
clients.add(client);
FloodThread thread = new FloodThread();
thread.client = client;
thread.quitAfter = 100;
increaseTRuns();
thread.start();
}
FloodJoin massJoin = new FloodJoin();
massJoin.start();
/*
* Stopping JUnit until the threads are through
*/
joinThread(massJoin);
assertEquals(0,truns);
}
COM: <s> this test is a stability test </s>
|
funcom_train/3849431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(Object value) {
if(value instanceof String){
_value = (String)value;
}
else if(value instanceof Vector){
_value = Conversions.vectorToString((Vector)value);
}
else if(value instanceof ArrayList){
_value = Conversions.arrayListToString((ArrayList)value);
}
else if(value instanceof Integer ||
value instanceof Boolean ||
value instanceof Double ||
value instanceof Float){
_value = value.toString();
}
else{
String s = value.getClass().toString();
throw new PreferenceValueTypeException(
"Preference Type is String there is no acceptable conversion from " + s);}
}
COM: <s> sets the value of this string type </s>
|
funcom_train/41651311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createMimeMessage(InputStream inputStream) throws ParseException {
// headers
headers = new MimeMessageHeaders(inputStream);
ContentType ct = headers.getContentType();
if (ct==null) throw new ParseException("No content type in message");
if (ct.getPrimaryType().equals(MULTIPART_TYPE)) {
part = new MimeMultiPart(inputStream, ct, null, null);
} else {
part = new MimePart(inputStream, ct, headers, null);
}
}
COM: <s> creates mime message from input stream by parsing headers and message body </s>
|
funcom_train/19635798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void swap(int i, int j) {
int hlp = this.pq[i];
this.pq[i] = this.pq[j];
this.pq[j] = hlp;
this.qp[this.pq[i]] = i;
this.qp[this.pq[j]] = j;
}
COM: <s> swap change two items </s>
|
funcom_train/24558039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private User getUserEntityByUserName(String userName) {
List<User> userList = UserDAO.getFromApplicationContext(ac).findByUserName(userName);
// findByUserName should return a List of 1, nonDeleted user with the userName
if (userList.isEmpty()) {
return null;
}
return userList.get(0);
}
COM: <s> gets the user entity by user name </s>
|
funcom_train/3704927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startListeners() {
Iterator it = transportTypes();
TransportType t;
Object obj;
while (it.hasNext()) {
t = (TransportType) it.next();
obj = mapTransports.get(t);
if (obj == null) {
Thread thread = new Thread(t);
mapTransports.put(t, thread);
thread.start();
}
}
} // of method
COM: <s> start a thread on all transport types </s>
|
funcom_train/20270004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void replaceStringsWithAliases() {
for (Entry<String, StringInfo> entry : stringInfoMap.entrySet()) {
String literal = entry.getKey();
StringInfo info = entry.getValue();
if (shouldReplaceWithAlias(literal, info)) {
for (StringOccurrence occurrence : info.occurrences) {
replaceStringWithAliasName(
occurrence, info.getVariableName(literal), info);
}
}
}
}
COM: <s> replace strings with references to alias variables </s>
|
funcom_train/18630461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateDbScore(Text url, CrawlDatum old, CrawlDatum datum, List inlinked) throws ScoringFilterException {
for (int i = 0; i < this.filters.length; i++) {
this.filters[i].updateDbScore(url, old, datum, inlinked);
}
}
COM: <s> calculate updated page score during crawl db </s>
|
funcom_train/2861280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize(Object serverObj, Object user) {
if (initted)
return;
server = (AccessConnectInfo)serverObj;
this.user = user;
log = Log.out; // Set it up to the System log by default.
authorized = false;
if (!server.authorizationByNameRequired())
authorized =true;
else {
setUpClient();
}
initted = true;
}
COM: <s> initialzes a site search access client that will connect to the </s>
|
funcom_train/10546215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void decorateSQL(Statement s) throws SQLException {
Connection conn = s.getConnection();
conn.setAutoCommit(false);
s.execute("CREATE FUNCTION PADSTRING (DATA VARCHAR(32000), "
+ "LENGTH INTEGER) RETURNS VARCHAR(32000) EXTERNAL NAME " +
"'org.apache.derbyTesting.functionTests.util.Formatters" +
".padString' LANGUAGE JAVA PARAMETER STYLE JAVA");
}
COM: <s> creates the table used in the test cases </s>
|
funcom_train/20829718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setKeywordsAsString(final String keywords) {
List<String> keywordList;
if (keywords == null) {
keywordList = null;
} else {
keywordList = new ArrayList<String>();
for (String keyword : StringUtils.split(keywords)) {
keywordList.add(keyword);
}
}
setKeywords(keywordList);
}
COM: <s> sets the keywords as a whitespace delimited string </s>
|
funcom_train/21877985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getLastProjectRevisions(String project, int count) throws DepoException {
WorkbenchProjDesc desc = Workbench.getWorkbenchProjectDescription(project);
Model model = Workbench.getModelFinder(desc).getMapModel();
String maprefUri = desc.getURI();
return getLastRevisions(project, maprefUri, count, model, "Project");
}
COM: <s> get the most recent revisions of this project </s>
|
funcom_train/20422352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object decrypt(SignedObject signedObject, Subject subjEncryptor, Subject subjDecryptor) throws ClassNotFoundException, IOException, GeneralSecurityException {
if (!signedObject.verify(publicKey, SIGNATURE_ENGINE)) {
throw new SignatureException("Unable to verify SignedObject");
}
return signedObject.getObject();
}
COM: <s> decrypt the specified signed object using the public credentials extracted from the </s>
|
funcom_train/9710939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getPDType(ParameterDescription pd) {
String type = null;
if (pd.getParameterType() != null) {
type = pd.getParameterType().getName();
} else if (pd.getParameterActualType() != null) {
type = pd.getParameterActualType().getName();
}
return type;
}
COM: <s> this will get a code string code representing the parameter class of a </s>
|
funcom_train/38950650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void hookContextMenu() {
MenuManager menuMgr = new MenuManager("#PopupMenu");
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager manager) {
TreeView.this.fillContextMenu(manager);
}
});
Menu menu = menuMgr.createContextMenu(viewer.getControl());
viewer.getControl().setMenu(menu);
getSite().registerContextMenu(menuMgr, viewer);
}
COM: <s> hook context menu </s>
|
funcom_train/23278713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LaunchApplication getLaunchApplication(long id){
List objects = getHibernateTemplate().findByNamedQueryAndNamedParam("launchApplication.getbyId","id",id);
if (objects.size()!=1)
return null;
return (LaunchApplication)objects.get(0);
}
COM: <s> returns the launch application related to the given id </s>
|
funcom_train/15917456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public Block stmtToBlock(NodeFactory xnf, Stmt s){
if(s instanceof StmtSeq){
return xnf.Block(s.position(), ((StmtSeq)s).statements());
}
else if(s instanceof Block){
return (Block)s;
}
else {
return xnf.Block(s.position(), s);
}
}
COM: <s> used to transform a stmt into a block </s>
|
funcom_train/41046931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getRandNumberWithinRange(int min, int max) {
//Refresh seed every n iterations
randomGeneratorCounter++;
if (randomGeneratorCounter == 300) {
randomGenerator.setSeed(System.currentTimeMillis());
randomGeneratorCounter = 0;
}
return randomGenerator.nextInt(max - min + 1) + min;
}
COM: <s> random number within range min and max included </s>
|
funcom_train/6270615 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedTopicMap(String tmID) {
this.topicMapID = tmID;
sendMessage(methods.buildMessage(_setSelectedTM,null,"0",tabName,true,tmID), "", false);
if (collabReader != null)
collabReader.setTopicMapID(tmID);
}
COM: <s> instructions to establish an xtmsession for this client </s>
|
funcom_train/46455971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draw(DrawingPanel panel, Graphics g) {
int xpix = panel.xToPix(x)-pixRadius;
int ypix = panel.yToPix(y)-pixRadius;
g.setColor(color);
g.fillOval(xpix, ypix, 2*pixRadius, 2*pixRadius); // draw the circle onto the screen
}
COM: <s> draws the circle </s>
|
funcom_train/48749039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreate() {
try {
DBTool.createTables(null,schemaList,"test");
DBTool.compareTables(null, schemaList, "test");
} catch (Exception e) {
if (Loggy.isTrace(this)) System.out.println(e.getMessage());
e.printStackTrace();
failedOne = true;
fail(e.getMessage());
}
}
COM: <s> runs the create tables on the schema list to make sure no exceptions </s>
|
funcom_train/28662658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createCipher(final Composite parent) {
final GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1);
cipher = new Text(parent, SWT.NONE | SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.WRAP);
cipher.setLayoutData(gd);
cipher.setEnabled(false);
}
COM: <s> creates a text field for the ciphertext </s>
|
funcom_train/9266450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public interface TCBPrivilege {
/**
* Associate the current TCB with the specified <tt>KThread</tt>.
* <tt>AutoGrader.runningThread()</tt> <i>must</i> call this method
* before returning.
*
* @param thread the current thread.
*/
public void associateThread(KThread thread);
/**
* Authorize the TCB associated with the specified thread to be
* destroyed.
*
* @param thread the thread whose TCB is about to be destroyed.
*/
public void authorizeDestroy(KThread thread);
}
COM: <s> an interface that provides access to some private tt tcb tt methods </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.