__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/46098750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getStringItem3() {
if (stringItem3 == null) {//GEN-END:|78-getter|0|78-preInit
// write pre-init user code here
stringItem3 = new StringItem("", LocalizationSupport.getMessage("error.gps"));//GEN-LINE:|78-getter|1|78-postInit
// write post-init user code here
}//GEN-BEGIN:|78-getter|2|
return stringItem3;
}
COM: <s> returns an initiliazed instance of string item3 component </s>
|
funcom_train/28314016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void assertOkButNotRepeatable(Move m) {
assertSetupHasBeenCalled();
assertTryMoveIsOk(m);
assertDoMoveIsOk(m);
assertTryMoveFails(m);
assertDoMoveFails(m);
assertTryUndoMoveIsOk(m);
assertUndoMoveIsOk(m);
assertTryUndoMoveFails(m);
assertTryMoveIsOk(m);
assertDoMoveIsOk(m);
}
COM: <s> generally moves should not be repeatable </s>
|
funcom_train/2538782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector3D getCross(Vector3D v) {
float crossX = y * v.getZ() - v.getY() * z;
float crossY = z * v.getX() - v.getZ() * x;
float crossZ = x * v.getY() - v.getX() * y;
return new Vector3D(crossX,crossY,crossZ);
}
COM: <s> calculate the cross product with another vector </s>
|
funcom_train/18136246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UndoableAction execute() throws ActionExecutionException {
if (taskInputPort.getTask() != task) {
throw new ActionExecutionException(
"The task input does not belong to the task");
}
Decomposition decomposition = task
.getDecomposition();
DecompositionInput oldPortBinding = decomposition
.getDecompositionInputForTaskInputPort(taskInputPort);
decomposition.setDecompositionInputForTaskInputPort(taskInputPort,
decompositionInput);
return new CreateDecompositionInputTaskInputPortMapping(task, taskInputPort,
oldPortBinding);
}
COM: <s> method to execute the action </s>
|
funcom_train/45391718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processInputMode() {
BufferedReader in =
new BufferedReader(
new InputStreamReader(System.in));
String line;
try {
while ((line = in.readLine()) != null &&
!line.startsWith("#endInput")) {
swog.executeCommand(line);
}
} catch (IOException ex) {
errorMessage("Failed to read from std input", ex);
}
}
COM: <s> works in input mode </s>
|
funcom_train/31873136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void shakeTail(int program) {
for (int i=this.freezing[program][0];i<this.parameters.columns;i++) {
for (int k=0;k<this.instructions;k++) {
this.grid[program][i][k] = this.rewardsParameters.initialValue;
}
}
}
COM: <s> reset all the probabilities equal for the instructions following </s>
|
funcom_train/20295935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
client.aliveSocket = new DatagramSocket(client.getClientAlivePort());
} catch (SocketException e1) {
}
// open a UDP socket , from which we will do the communications
// with the server
client.logger.print_info("Client starting sending alive messages from: "
+client.getClientAlivePort() + " to: "+ client.serverUDPPort());
delayTimer.start();
}
COM: <s> the thread run function just creates a udp socket and runs the timer </s>
|
funcom_train/44625944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMiscBug8() {
helpTCF("A.java","public class A { //@ requires true ==> false <== true; \n void p() { }}"
,"/A.java:1: ==> and <== operators may not be mixed without parentheses",46
);
}
COM: <s> checking for mixed implications </s>
|
funcom_train/39289155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void showPage(int id) {
if (id == ID_OUTLINE) {
showOutlineAction.setChecked(true);
showOverviewAction.setChecked(false);
pageBook.showPage(outline.getControl());
if (thumbnail != null) {
thumbnail.setVisible(false);
}
}
else if (id == ID_OVERVIEW) {
showOutlineAction.setChecked(false);
showOverviewAction.setChecked(true);
pageBook.showPage(overview);
thumbnail.setVisible(true);
}
}
COM: <s> helper function used be the above function </s>
|
funcom_train/16176451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLine(String val) {
if (val.indexOf("\n") > 0) {
StringTokenizer t = new StringTokenizer(val, "\n");
while (t.hasMoreTokens()) {
text.add(t.nextToken());
}
} else {
text.add(val);
}
}
COM: <s> adds a line of text to be displayed </s>
|
funcom_train/50083370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PreparedStatement getConnectedPreparedStatement() throws SQLException, Exception {
if (this.connection == null || this.connection.isClosed()) {
connect();
}
if (this.preparedStatement == null ||this.preparedStatement.isClosed()) {
this.preparedStatement = connection.prepareStatement(this.sqlStatement,ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
}
return preparedStatement;
}
COM: <s> get the connected prepared statement to execute the sql query </s>
|
funcom_train/5445144 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getInterfaceMethodRef_Descriptor(int Index) {
if ((Index < 1) || (Index >= ItemType.length) || (ItemType[Index] != CONSTANT_INTERFACE_METHOD_REF))
throw new ClassFormatError("Constant pool item does not exist");
return getNameAndType_Descriptor(((Integer)ItemValue2[Index]).intValue());
}
COM: <s> get the descriptor from a interface method ref constant </s>
|
funcom_train/8065849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics g) {
if (showSelectRect) {
Color selectRectColor = Globals.getPrefs().getRubberbandColor();
// Graphics g = (Graphics)graphicsContext;
g.setColor(selectRectColor);
g.drawRect(selectRect.x, selectRect.y, selectRect.width,
selectRect.height);
}
}
COM: <s> paint this mode by painting the selection rectangle if appropriate </s>
|
funcom_train/28658175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeFields() {
try {
setCurrentField(null); //!!1.04c
setFieldUnderMouse(null); //!!1.04c
setHighLightedField(null); //!!1.04c
ivFields.removeNotify(); //!!V-23/06/97
}
finally {
ivFields = new XI5250FieldsList(this);
}
// NO repaint() needed
}
COM: <s> removes all fields </s>
|
funcom_train/43144319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setArticleStarred(Set<Integer> ids, int articleState) {
if (ids.size() == 0)
return true;
String ret = "";
for (String idList : StringSupport.convertListToString(ids)) {
String url = serverUrl + String.format(OP_UPDATE_ARTICLE, idList, articleState, 0);
ret = doRequestNoAnswer(url);
}
return ret.contains(OK);
}
COM: <s> marks the given article as starred not starred depending on int article state </s>
|
funcom_train/45278680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNextText() {
String text;
if (this.textArea1 != null) {
this.textArea1.selectAll();
text = this.textArea1.getText();
this.textArea1 = null;
} else if (this.textArea2 != null) {
this.textArea2.selectAll();
text = this.textArea2.getText();
this.textArea2 = null;
} else {
text = null;
}
return text;
}
COM: <s> returns the contents of the next text area </s>
|
funcom_train/22478318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void require(final Object fileName) {
this.onSetup(new BaseFunction() {
public Object call(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) {
//TODO: get the real line number and source name here
String script = "crosscheck.require('" + fileName + "');";
return cx.evaluateString(scope, script, "top-level require", 1, null);
}
});
}
COM: <s> creates an on setup function that calls crosscheck </s>
|
funcom_train/23998268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void drawBspNodes( Graphics g, SceneNode node, Vec4dInt area, Vec2dInt viewposition ) {
List< SceneNode > nodes = new ArrayList< SceneNode >();
node.cull( area, nodes, SceneNode.TYPE_BSP_CELL | SceneNode.TYPE_BSP_LEAF, false );
for ( SceneNode n : nodes ) {
n.drawOutlineRectangle( g, viewposition );
}
}
COM: <s> this method draws the bsp nodes contained by node visible in given area </s>
|
funcom_train/11732724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean internalHasPropertyState(PropertyId id) {
try {
// get parent state
NodeState parent = (NodeState) getItemState(id.getParentId());
// handle some default prop states
if (parent instanceof VirtualNodeState) {
return parent.hasPropertyName(id.getName());
}
} catch (ItemStateException e) {
// ignore
}
return false;
}
COM: <s> checks if this provider has the property state of the given id </s>
|
funcom_train/13439599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actualizeText() {
super.actualizeText();
Object[] keys = mainFrame.getMapDesktopItems().keySet().toArray();
for (int i=0; keys!=null && i<keys.length; i++) {
PBasicPanel p = mainFrame.getContentPanel((String)keys[i]);
if (p!=null) {
p.actualizeText();
}
}
}
COM: <s> actualizes the language text </s>
|
funcom_train/9553164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAllotment(String username, String groupname) {
synchronized(allotments) {
Iterator<Allotment> i = allotments.iterator();
while (i.hasNext()) {
Allotment allotment = i.next();
if ((allotment.getGroupname().equalsIgnoreCase(groupname) || groupname == null) && allotment.getUsername().equalsIgnoreCase(username)) {
i.remove();
}
}
}
}
COM: <s> removes an allotment entry for the specified user and group </s>
|
funcom_train/24560853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Contribution createAlias() {
// do not copy any of the relationships from the aliased contribution
Contribution alias = new Contribution(this.getUser(), this.getType(), this.getThumbprints(), this
.getWorkspace(), this.getLockedBy(), this.getFromDate(), null, null, null);
alias.setAliasTo(this);
alias.setId();
return alias;
}
COM: <s> creates an alias to of this entity </s>
|
funcom_train/38308332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getArgumentsAsString() {
StringBuffer ab = new StringBuffer();
int numArguments = arguments.size();
List<Operand> argumentNames = getArguments();
for (int i = 0; i < numArguments; i++) {
if (i > 0) {
ab.append(", ");
}
ab.append(argumentNames.get(i));
}
return ab.toString();
}
COM: <s> gets the argument list as string </s>
|
funcom_train/26655103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DocumentStorage getDocumentStorage(String domain, String name) {
Map<String,DocumentStorage> map = this.domainStores.get(domain);
if ( map == null ) return null;
if ( name == null) {
return map.size() > 0 ? map.values().iterator().next() : null;
} else {
return map.get(name);
}
}
COM: <s> get document storage for given domain and name </s>
|
funcom_train/47486466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void commit() {
for (Iterator<Connection> it = connections.values().iterator(); it.hasNext();) {
Connection conn = it.next();
try {
conn.commit();
} catch (SQLException ex) {
log.severe("Partial commit failure: " + ex.getMessage());
}
}
closeConnections();
}
COM: <s> commit all transactions on all managed connections </s>
|
funcom_train/4376660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initServerSocket(ServerSocket ssocket, boolean clientAuth) {
SSLServerSocket socket = (SSLServerSocket) ssocket;
// Enable all available cipher suites when the socket is connected
String cipherSuites[] = socket.getSupportedCipherSuites();
socket.setEnabledCipherSuites(cipherSuites);
// Set client authentication if necessary
socket.setNeedClientAuth(clientAuth);
}
COM: <s> set the requested properties for this server socket </s>
|
funcom_train/42709825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getDist() {
double diff = 0;
for( int s = 0; s < stats.size(); s++) {
double d = Math.abs(getSum(goals.get(s)) - getSum(stats.get(s)));
diff += d;
}
return diff;
}
COM: <s> cartesian difference compute sum of difference between stats and goals </s>
|
funcom_train/7618314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setComponentOrientation(ComponentOrientation o) {
ComponentOrientation oldOrientation;
toolkit.lockAWT();
try {
oldOrientation = orientation;
orientation = o;
} finally {
toolkit.unlockAWT();
}
firePropertyChange("componentOrientation", oldOrientation, orientation); //$NON-NLS-1$
invalidate();
}
COM: <s> sets the component orientation which affects the components elements and </s>
|
funcom_train/39911449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetListbox1DefaultOptions() {
System.out.println("setListbox1DefaultOptions");
DefaultOptionsList dol = null;
Page1 instance = new Page1();
instance.setListbox1DefaultOptions(dol);
// 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 listbox1 default options method of class timesheetmanagement </s>
|
funcom_train/28405208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireTkFailureEvent(TkFailureEvent failureEvent) {
EventListener[] listeners = list.getListeners(CommandTaskLI.class);
// Process the listeners last to first, notifying
if (listeners != null) {
for (int i = listeners.length - 1; i >= 0; i--) {
((CommandTaskLI) listeners[i]).taskFailed(failureEvent);
}
}
}
COM: <s> fire a task failure event </s>
|
funcom_train/2558835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Model create(Expression path) throws Exception {
Model model = root;
while(model != null) {
String prefix = path.getPrefix();
String name = path.getFirst();
int index = path.getIndex();
if(name != null) {
model = model.register(name, prefix, index);
}
if(!path.isPath()) {
break;
}
path = path.getPath(1);
}
return model;
}
COM: <s> this is used to register a code model code for this builder </s>
|
funcom_train/45040612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb = new StringBuffer(300);
sb.append("[Transaction").append('\n');
sb.append("\tID=").append(guid).append('\n');
sb.append("\tMetaInfo=").append(metaData).append('\n');
sb.append("\tTimings=").append(timings).append('\n');
sb.append("]\n");
return sb.toString();
}
COM: <s> obtains the string representation of this instance </s>
|
funcom_train/37062757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFrontCWString() {
StringBuffer buf = new StringBuffer(50);
int num = simulationGears.getFrontChainWheels().length;
for ( int i=0; i<num; i++ ) {
buf.append( simulationGears.getFrontChainWheels()[i] );
if ( i< num-1)
buf.append( DELIM_1 );
}
return buf.toString();
}
COM: <s> get the string with gears front chainwheels </s>
|
funcom_train/41435380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String dumpState() {
return componentManagement + "\n" + resourceManagement + "\n"
+ timerFacility + "\n" + traceMBeanImpl + "\n"
+ sleeProfileTableManager + "\n" + activityContextFactory
+ "\n" + activityContextNamingFacility + "\n"
+ nullActivityFactory + "\n"
+ getEventRouter() + "\n"
+ getEventContextFactory() + "\n"
+ getTransactionManager() + "\n"
+ cluster.getMobicentsCache().getCacheContent();
}
COM: <s> dumps the container state as a string useful for debug profiling </s>
|
funcom_train/14274292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String parseAddressString(String addr) {
String tmpstr = null;
if (addr !=null && addr.indexOf("\n") > -1) {
tmpstr = addr;
tmpstr = tmpstr.replace('\n', ',');
tmpstr = tmpstr.replace('\t', ',');
}
return tmpstr;
} // end-method
COM: <s> parse any internet address strings to make sure no whitespace is included </s>
|
funcom_train/48054223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addCompositeItems(CompositeTreeTableNode... nodes) {
if (nodes == null) {
return 0;
}
int count = 0;
AbstractOPCTreeTableNode top = getCompositeBranch();
for (AbstractOPCTreeTableNode n : nodes) {
count += addOPCItems(top, n);
}
return count;
}
COM: <s> adds new composite opc nodes to the model </s>
|
funcom_train/24554122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object getPropertyValue(IPropertyDescriptor property) {
// retrieve the property's value from the model
Object value = null;
IPropertySource ps = (IPropertySource) getEditPart().getAdapter(IPropertySource.class);
if (PropertySourceAdapter.isPropertySet(ps, property)) {
value = PropertySourceAdapter.getPropertyValue(ps, property);
if (value != null) {
if (value instanceof IPropertySource)
value = ((IPropertySource) value).getEditableValue();
}
}
return value;
}
COM: <s> get the property value </s>
|
funcom_train/48249157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double energy(int start, int end){
double sum = 0;
for(int i=start;i<end;i++){
sum += ( (((Double) x.elementAt(i)).doubleValue())
*(((Double) x.elementAt(i)).doubleValue())
);
}
return sum;
}
COM: <s> calculate energy in an interval of the speech signal </s>
|
funcom_train/22429370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnEnableAll() {
if (btnEnableAll == null) {
btnEnableAll = new JButton();
btnEnableAll.setText("Enable All");
btnEnableAll.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
getAllCategoryTableModel().setAllCategoryEnabled(true);
}
});
}
return btnEnableAll;
}
COM: <s> this method initializes btn enable all </s>
|
funcom_train/21465088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(Controller controller) {
super.init(controller);
// initialize portrayals
gridPortrayal = new ContinuousPortrayal2D();
networkPortrayal = new NetworkPortrayal2D();
// get width and height from map
display = new Display2D(wh[0], wh[1], this, 1);
display.setClipping(false);
displayFrame = display.createFrame();
displayFrame.setTitle("Map Viewer");
displayFrame.setVisible(true);
display.setVisible(true);
controller.registerFrame(displayFrame);
display.attach(gridPortrayal, "Transport Network");
display.attach(networkPortrayal, "Paths");
display.setBackdrop(Color.white);
}
COM: <s> initializes the gui </s>
|
funcom_train/17143616 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean calcAddNext() {
if (LAST_UNKNOWN != _last && _last <= _list.size()-1) return false;
int index = _list.size();
E element = invokeIndex(index);
//XXX this should not always be the case
if ((element != null) || isNullLegalValue()) {
_list.add(element);
return true;
}
else {
_last = _list.size()-1;
_dirty = false;
return false;
}
}
COM: <s> try to calculate one more independent of the current </s>
|
funcom_train/45811910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Class getClassByName(String class_name) {
try {
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
return Class.forName(class_name, true, classLoader);
} catch (ClassNotFoundException e) {
log.error("Cannot find class " + e.getMessage());
throw new OntopiaRuntimeException(e);
}
}
COM: <s> internal looks up a class object by its name </s>
|
funcom_train/24532701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected List getExistingEvents(int eventDepth) {
List eventInvocations = (List) javaModel.eGet(getSFObjectEvents());
// There are two ways that events are shown, BASIC or EXPERT
// Basic shows one child for each method invocation, and Expert breaks it down into more depth showing
// the actual listeners in the tree
switch (eventDepth) {
case JavaVEPlugin.EVENTS_BASIC:
return getBasicEvents(eventInvocations);
case JavaVEPlugin.EVENTS_EXPERT:
return getExpertEvents(eventInvocations);
}
return Collections.EMPTY_LIST;
}
COM: <s> return the existing events for our model </s>
|
funcom_train/42039264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toJSON() {
return new StringBuilder("{")
.append("id:").append(id)
.append(",name:'").append(StringEscapeUtils.escapeJavaScript(name))
.append("',description:'").append(StringEscapeUtils.escapeJavaScript(description))
.append("',guestDefault:").append(guestDefault)
.append(",userDefault:").append(userDefault)
.append(",version:").append(version)
.append('}').toString();
}
COM: <s> returns a json object representing this object in java script </s>
|
funcom_train/44535063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ContactItem getItem() {
/*
if (this.usrcontact == null) {
Log.info("No DB record (entity object) to get item from");
return null;
}
if (this.item == null) {
Log.info("Ooops - item==null should not happen...");
}
*/
return this.item;
}
COM: <s> get the currently handled item based on the db record object </s>
|
funcom_train/34111218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getFolderChilds(String fldId) {
// ServiceDefTarget endPoint = (ServiceDefTarget) folderService;
// endPoint.setServiceEntryPoint(Config.OKMFolderService);
Main.get().mainPanel.browser.fileBrowser.status.setFlagFolderChilds();
// folderService.getChilds(fldId, callbackGetFolderChilds);
}
COM: <s> gets the folder childs list from the server </s>
|
funcom_train/3413778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFocusable(boolean focusable) {
boolean oldFocusable;
synchronized (this) {
oldFocusable = this.focusable;
this.focusable = focusable;
}
isFocusTraversableOverridden = FOCUS_TRAVERSABLE_SET;
firePropertyChange("focusable", oldFocusable, focusable);
if (oldFocusable && !focusable) {
if (isFocusOwner()) {
autoTransferFocus(true);
}
KeyboardFocusManager.clearMostRecentFocusOwner(this);
}
}
COM: <s> sets the focusable state of this component to the specified value </s>
|
funcom_train/545767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeDataView(JLDataView v) {
dataViews.remove(v);
v.setAxis(null);
if (isHorizontal()) {
// Restore TIME_ANNO and Liner scale
setAnnotation(TIME_ANNO);
if (scale != LINEAR_SCALE) setScale(LINEAR_SCALE);
}
}
COM: <s> removes dataview from this axis </s>
|
funcom_train/37034451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
if (debug >= 1)
log("BACKGROUND THREAD Starting");
// Loop until the termination semaphore is set
while (!threadDone) {
// Wait for our check interval
threadSleep();
// Deploy apps if the Host allows auto deploying
deployApps();
// Check for web.xml modification
checkWebXmlLastModified();
}
if (debug >= 1)
log("BACKGROUND THREAD Stopping");
}
COM: <s> the background thread that checks for web application auto deploy </s>
|
funcom_train/6333739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addToPublishedContentList(String name) throws OzoneCheckedException {
Set content = (Set) db.objectForName(PUBLISHED_CONTENT);
if (content == null) {
content = (Set) db.createObject(NodeTreeSetImpl.class, OzoneInterface.Public, PUBLISHED_CONTENT);
}
content.add(name);
}
COM: <s> we maintain a list of all the things published so we can </s>
|
funcom_train/27811848 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PlayQueueInfo getPlayQueue() throws Exception {
HttpServletRequest request = WebContextFactory.get().getHttpServletRequest();
HttpServletResponse response = WebContextFactory.get().getHttpServletResponse();
Player player = getCurrentPlayer(request, response);
return convert(request, player, false);
}
COM: <s> returns the play queue for the player of the current user </s>
|
funcom_train/44596374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareBuffer(char[] keyword) {
return (this.withoutUnicodePtr != 0) ?
compare(keyword,this.withoutUnicodeBuffer,1,1+this.withoutUnicodePtr)
: compare(keyword,this.source,this.startPosition,
this.currentPosition);
}
COM: <s> compares the argument with the current token text </s>
|
funcom_train/19427038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUnitOwner(Unit unit, Nation nation) {
// Mentioned in texinfo-docs (2005-07-04)
assert unit != null;
assert nation != null;
if (unit.getOwner() != null) {
Nation prevNation = unit.getOwner();
prevNation.removeUnit(unit);
}
unit.setOwner(nation);
nation.addUnit(unit);
}
COM: <s> sets the owner of a unit </s>
|
funcom_train/10480712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(String name, Object instance) {
if (instances.containsKey(name) && !(instances.get(name) instanceof Recipe)) {
throw new ConstructionException("Name " + name + " is already registered to instance " + instance);
}
instances.put(name, instance);
}
COM: <s> add an object instance to this repository </s>
|
funcom_train/38823875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createWindow() {
jfMain = new JFrame(config.getTitle());
jfMain.setIconImage(config.getImageIcon("tscticon").getImage());
createJMenuBar();
createMainPanel();
jfMain.setLocationRelativeTo(null);
jfMain.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
jfMain.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
end();
}
});
}
COM: <s> creates the window </s>
|
funcom_train/8687737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void executeString(String oldValue) throws BuildException {
String newV = DEFAULT_STRING_VALUE;
String currentValue = getCurrentValue(oldValue);
if (currentValue == null) {
currentValue = DEFAULT_STRING_VALUE;
}
if (operation == Operation.EQUALS_OPER) {
newV = currentValue;
} else if (operation == Operation.INCREMENT_OPER) {
newV = currentValue + value;
}
this.newValue = newV;
}
COM: <s> handle operations for type code string code </s>
|
funcom_train/28215542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_StateVariable_type_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_StateVariable_type_feature", "_UI_StateVariable_type"),
StateMachinePackage.Literals.STATE_VARIABLE__TYPE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the type feature </s>
|
funcom_train/44600339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _test_constraint_method_01() {
compileAndExecGivenStatement(
"X.java",
"class X {\n" +
" //@ public instance constraint true for method();\n" +
" public void method() {}\n" +
"}\n",
"new X()");
}
COM: <s> cannot handle constraint of the form constraint e for m </s>
|
funcom_train/29567495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Method resolveMethod(Object instance, String[] methodNames) {
Class thisClass = instance.getClass();
Method m = null;
for(int i = 0; i < methodNames.length; i++) {
m = resolveMethod(thisClass,methodNames[i]);
thisClass = m.getReturnType();
}
return m;
}
COM: <s> resolves method for given instance using each method name in array order </s>
|
funcom_train/42291484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getDigitaisFiscalPanel() {
if (digitaisFiscalPanel == null) {
GridBagConstraints gridBagConstraints161 = new GridBagConstraints();
gridBagConstraints161.anchor = GridBagConstraints.WEST;
digitaisFiscalPanel = new JPanel();
digitaisFiscalPanel.setLayout(new GridBagLayout());
digitaisFiscalPanel.add(getDigitalFiscal1CheckBox(), gridBagConstraints161);
}
return digitaisFiscalPanel;
}
COM: <s> this method initializes digitais fiscal panel </s>
|
funcom_train/2853821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIndices() {
assertEquals(Binding.STRING, Binding.getTypeIndex(String.class));
assertEquals(Binding.BOOLEAN, Binding.getTypeIndex(Boolean.TYPE));
assertEquals(Binding.CHAR, Binding.getTypeIndex(Character.TYPE));
assertEquals(Binding.INT, Binding.getTypeIndex(Integer.TYPE));
}
COM: <s> test static indexes </s>
|
funcom_train/15954701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMinusUIntSetString() throws NumberFormatException, IOException{
String lsValue = "-123456789";
DataUInt ldInt = new DataUInt(flValue);
try{
ldInt.setString(lsValue);
throw new IOException(" set UInt as minus value!");
}
catch(IOException e)
{ throw e; }
catch(Throwable ex)
{}
}
COM: <s> negative test of minus int using set string </s>
|
funcom_train/31480624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean skipChar(int c) throws IOException {
if (this.EOF())
return this.EOF();
if (c != this.nextByte) {
throw new IOException(__me + ".skipChar() Found character 0x" +
Integer.toHexString(this.nextByte) + "where 0x" +
Integer.toHexString(c) + " expected!");
} else {
this.read();
}
return this.EOF();
}
COM: <s> skip the following input character on input stream is if it is </s>
|
funcom_train/3473121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertRecordable(Recordable recordable) {
InsertPoint insertPoint = calcInsertPoint();
if (insertPoint != null) {
insertPoint.getStructureToAdd()
.insertChild(recordable,
insertPoint.getStructureIndexToAdd());
record.insert(recordable, insertPoint.getRecordIndexToAdd());
}
}
COM: <s> inserts a recordable at a specified position the selected </s>
|
funcom_train/9018853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected double estimateMaximumTickLabelHeight(Canvas g2) {
RectangleInsets tickLabelInsets = getTickLabelInsets();
double result = tickLabelInsets.getTop() + tickLabelInsets.getBottom();
Font tickLabelFont = getTickLabelFont();
Paint p = new Paint();
p.setTextSize(tickLabelFont.getSize());
Rectangle2D rec = TextUtilities.getTextBounds("123", p);
result += rec.getHeight();
return result;
}
COM: <s> estimates the maximum tick label height </s>
|
funcom_train/45933698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XMLResponseObjectType getNamespaceXml(GetNamespaceXmlRequest parameters) {
XMLResponseObject responseObject = vocabularyService.getNamespaceXml(
IdentificationSdoHelper.fromIdentificationType(parameters.getIdentification()),
parameters.getRequestId(),
parameters.getNamespace());
return XMLResponseObjectSdoHelper.toXMLRepsonseObjectType(responseObject);
}
COM: <s> interface to return a namespace as xml </s>
|
funcom_train/22498869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String encodeRegexp(String regexp) {
// rewrite shell fname pattern to regexp.
// * -> .*
// ? -> .?
// Add ^,$
// . -> \.
String retval = "^" + regexp + "$";
retval = retval.replaceAll("\\.", "\\.");
retval = retval.replaceAll("\\*", ".*");
retval = retval.replaceAll("\\?", ".?");
return retval;
}
COM: <s> rewrite a shell filename pattern to a regular expression </s>
|
funcom_train/43245228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetName() {
System.out.println("setName");
String name = "";
FamilyDemographicDependentObject instance = new FamilyDemographicDependentObject();
instance.setName(name);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set name method of class org </s>
|
funcom_train/44831172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAggrBoundary(){
List lastPar=(List)paragraphs.get(paragraphs.size()-1);
List lastAggr=(List)lastPar.get(lastPar.size()-1);
if(lastAggr.size()>0)
lastPar.add(new ArrayList());
}
COM: <s> closes the current aggregation segment and creates a new </s>
|
funcom_train/48190255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(PosOperator entity) {
LogUtil.log("saving PosOperator instance", Level.INFO, null);
try {
entityManager.persist(entity);
LogUtil.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
LogUtil.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved pos operator entity </s>
|
funcom_train/48443803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addBrowseService(String objectType, Class<? extends BrowseService> serviceClass) {
browseServices.put(objectType, serviceClass);
configurationContexts.remove(objectType);
if(OnlinePlayableElementService.class.isAssignableFrom(serviceClass)) {
playableElementServices.put(objectType, (Class<? extends OnlinePlayableElementService>)serviceClass);
}
}
COM: <s> register a new browse service for the specified object type </s>
|
funcom_train/5723930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String selectFileAndConfirmRemove() {
LOGGER.debug("Starting method selectFileAndConfirmRemove");
FolderEntryInfo entry = dataSubmissionFiles.getRowData();
LOGGER.debug("Returning to method selectFileAndConfirmRemove");
LOGGER.debug(entry.getId());
setSessionBean(Constants.PAPERSUBMISSION_FOLDERENTRY_SELECTION, Arrays.asList(new FolderEntryInfo[] {entry}));
return Constants.PAPERSUBMISSION_FILE_REMOVE_PAGE;
}
COM: <s> store the selected file into session scope and go to remove confirmation page </s>
|
funcom_train/27664853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ImageWriteParam createWriteParam(String tsuid, ImageWriter writer) {
ImageWriteParam param = writer.getDefaultWriteParam();
String type = config.getProperty(tsuid+".type");
if( type!=null ) {
log.debug("Setting compression to type "+type);
param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
param.setCompressionType(type);
}
return param;
}
COM: <s> this is used to create a param for writing the sub image </s>
|
funcom_train/978083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEntrarOito() {
System.out.println("entrarOito");
Calculadora instance = new Calculadora();
String expResult = "8.0";
String result = instance.entrarOito();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
}
COM: <s> test of entrar oito method of class calculadora </s>
|
funcom_train/9978351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resultTypesItemSelected(Element elt) {
// Open a "new package" window
if (currentPanel != null)
currentPanel.dispose();
// Fill menu
MenuItem addItem = new MenuItem(popupMenu, SWT.PUSH);
addItem.setText("Add result-type");
addItem.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
openAddResultTypePanel((Element) tree.getSelection()[0].getData());
}
});
}
COM: <s> called when result types item has been selected </s>
|
funcom_train/10876285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pruneDeletedSegments() {
for(final Iterator<SegmentInfo> it = segments.iterator(); it.hasNext();) {
final SegmentInfo info = it.next();
if (info.getDelCount() == info.docCount) {
it.remove();
segmentSet.remove(info);
}
}
assert segmentSet.size() == segments.size();
}
COM: <s> prunes any segment whose docs are all deleted </s>
|
funcom_train/50151970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setItemsFromXml(CheckList cl, String itemXml) throws JAXBException {
JAXBContext jc = JAXBContext.newInstance(XmlContainer.class);
Unmarshaller u = jc.createUnmarshaller();
XmlContainer container = (XmlContainer) u.unmarshal(new StringReader(
itemXml));
cl.getItems().clear();
if( container.items != null )
cl.getItems().addAll(container.items);
}
COM: <s> set the items in a net </s>
|
funcom_train/49427853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPreferredWidth() {
int prefWidth = borderLeft + borderRight + getPreferredInnerWidth();
Image bg = getBackground();
if(bg != null) {
prefWidth = Math.max(prefWidth, bg.getWidth());
}
return Math.max(minWidth, prefWidth);
}
COM: <s> returns the preferred width based on its children and preferred inner width </s>
|
funcom_train/25388770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean inBounds(Rectangle nb) {
Rectangle rd = this.getBounds();
if (!(nb.getMinX() >= rd.getMinX() && nb.getMinY() >= rd.getMinY()
&& nb.getMaxX() <= rd.getMaxX() && nb.getMaxY() <= rd.getMaxY()))
return false;
return true;
}
COM: <s> checks whether nb is inside the bounds of this elements bounds </s>
|
funcom_train/26641592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(int idx, Constant c) {
if (v.size() < idx) {
v.setSize(idx);
v.ensureCapacity(idx+v.size()/3);
}
v.set(idx-1, c);
if ((c.getTag() == Constant.DOUBLE) ||
(c.getTag() == Constant.LONG)) {
if (v.size() <= idx) v.setSize(idx+1);
v.set(idx,c);
}
}
COM: <s> set the given constant at the given position in the constant pool </s>
|
funcom_train/46619997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void login() {
if (addCarriageReturn) {
telnet.sendString("\n", true);
}
telnet.waitForString("ogin:");
telnet.sendString(userid, true);
telnet.waitForString("assword:");
telnet.sendString(password, false);
}
COM: <s> process a typical login </s>
|
funcom_train/31930367 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object object) {
boolean equals = false;
if (object != null) {
try {
Person p = (Person) object;
equals = getName().equalsIgnoreCase(p.getName());
}
catch (ClassCastException cce) {
// ignore, already handled
}
}
return equals;
}
COM: <s> override return code true code if the names are the same </s>
|
funcom_train/41018173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean buyTower(int type) {
int cost;
switch(type){
case 0: cost=Tower_Bullet.INITIAL_BUILD_COST; break;
case 1: cost=Tower_Fire.INITIAL_BUILD_COST; break;
default:cost=0; break;
}
if (CREDITS<cost)
return false;
else{
switch(type){
case 0: new Tower_Bullet(); break;
case 1: new Tower_Fire(); break;
default: break;
}
CREDITS-=cost;
return true;
}
}
COM: <s> purchases a tower each tower has a specified cost </s>
|
funcom_train/18748119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GraphConditionOutcome getOutcome(VarMorphism subject) {
//if(true)throw new RuntimeException();
Matching partialMatch = newMatcher(subject);
Map<Matching,GraphPredicateOutcome> matchMap = partialMatch == null ? Collections.<Matching,GraphPredicateOutcome>emptyMap() : partialMatch.getTotalExtensionMap();
return createOutcome(subject, matchMap);
}
COM: <s> creates an initial partial match using the inverse of code this code </s>
|
funcom_train/49609233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getPageNumber(int recordNumber, int blockSize) throws ListResponseException {
if (blockSize==-1)
throw new ListResponseException("'blockSize' property non specified.");
if(recordNumber == 0)
return 0;
return ((recordNumber - 1) / blockSize) + 1;
}
COM: <s> computes the number of the page a record belongs to </s>
|
funcom_train/33264274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOverImage( Image overImage ) {
synchronized(getTreeLock()) {
if ( this.overImage != overImage ) {
this.overImage = overImage;
if ( getMouseState() == OVER ) {
setImage( overImage );
}
else if ( overImage != null ) {
prepareImage( overImage, this );
}
}
}
}
COM: <s> sets the over image variable </s>
|
funcom_train/46460035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XMLControlElement getRootControl() {
if(parent==null) {
return this;
}
XMLProperty prop = parent;
while(prop.getParentProperty()!=null) {
prop = prop.getParentProperty();
}
if(prop instanceof XMLControlElement) {
return(XMLControlElement) prop;
}
return null;
}
COM: <s> gets the root control </s>
|
funcom_train/1749216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeXmlDataNotFound(){
String l_Text = "<Root>No records were found. </Root>";
BufferedWriter l_Out = OpenFileToWrite(true);
WriteInfile(l_Text, l_Out);
CloseFileToWrite(l_Out);
}//writeXmlDataNotFound
COM: <s> function used for xml files </s>
|
funcom_train/20731200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parseRouteInfo(Reader in, String endElement) {
try {
XmlPullParser parser = new MXParser();
parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
parser.setInput(in);
parser.next(); // position into the first tag
this.parseRouteInfo(parser, endElement);
}
catch (Exception e) {
}
}
COM: <s> parse the xml on the input stream </s>
|
funcom_train/44137613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics g) {
if(m_setted) {
Graphics2D g2 = (Graphics2D)g;
int w = this.getWidth();
int h = this.getHeight();
g2.drawImage(this.m_Img, 0, 0, w, h, this);
}
super.paint(g);
}
COM: <s> to paint the image in the component </s>
|
funcom_train/38473253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveDirtyEditors() {
Iterator i = awareFields.iterator();
while (i.hasNext()) {
IAwareWidget field = (IAwareWidget)i.next();
if (field.isDirty()) {
save(field, field.getValue());
field.setDirty(false);
}
}
}
COM: <s> method save dirty editors </s>
|
funcom_train/49333791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hideOverflowMenu() {
if (mPostedOpenRunnable != null && mMenuView != null) {
((View) mMenuView).removeCallbacks(mPostedOpenRunnable);
mPostedOpenRunnable = null;
return true;
}
MenuPopupHelper popup = mOverflowPopup;
if (popup != null) {
popup.dismiss();
return true;
}
return false;
}
COM: <s> hide the overflow menu if it is currently showing </s>
|
funcom_train/2871100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object o) {
if (o instanceof TestContext) {
return getName().compareTo(((TestContext)o).getName());
} else {
throw new ClassCastException(o.getClass().getName() + " cannot be compared to TestContext");
}
}
COM: <s> compares this object with another from the comparable interface </s>
|
funcom_train/8987612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasRelationship(Integer docID, String relationType) throws ApplicationException {
List relationshipList = new ArrayList();
relationshipList = this.getMtmDocuemntRelationshipListByDocumentID(docID, relationType);
if (!Utility.isEmpty(relationshipList)) {
return true;
} else {
return false;
}
}
COM: <s> checks the document has relationship to other documents </s>
|
funcom_train/10266984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSchema(Element schemaElemement) throws YSyntaxException {
XSDPrototypicalSchema proto = XSDPrototypicalSchema.getInstance();
_schema = proto.createSchema(schemaElemement);
if (_schema.getTargetNamespace() != null) {
throw new YSyntaxException("YAWL does not support schemas with target namespaces.");
}
}
COM: <s> sets up an xsd4 yawlbuilder object </s>
|
funcom_train/13866224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setName(String name) {
if (name == null) {
throw new NullPointerException("Name cannot be null");
} else if (name.equals("")) {
throw new IllegalArgumentException("Name cannot be an empty string.");
}
getInputElement().setName(name);
}
COM: <s> sets the name of the hidden field </s>
|
funcom_train/26051259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextArea getJTextArea() {
if (jTextArea == null) {
jTextArea = new JTextArea();
jTextArea.setBackground(SystemColor.text);
jTextArea.setEditable(false);
jTextArea.setEnabled(true);
jTextArea.setLineWrap(true);
}
return jTextArea;
}
COM: <s> this method initializes j text area </s>
|
funcom_train/43235545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int strncmp(String s1, int i1, String s2, int i2, int len) {
if (s1.length() - i1 < len) {
return 1;
} else if (s2.length() - i2 < len) {
return -1;
}
while (len-- > 0) {
if (s1.charAt(i1++) != s2.charAt(i2++)) {
break;
}
}
return s1.charAt(i1-1) - s2.charAt(i2-1);
}
COM: <s> c style string compare method for the specified length </s>
|
funcom_train/2306288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector convertStringLineToVector(String line, String delimeter) throws Exception {
Vector vTemp = new Vector();
try {
if (!line.equalsIgnoreCase("")) {
StringTokenizer strline = new StringTokenizer(line , delimeter);
while (strline.hasMoreTokens()) {
String eachWord = "";
eachWord = (String)strline.nextToken();
vTemp.addElement(eachWord);
}
}
} catch (Exception e) {
throw new Exception("Error !! While executing convertStringLineToVector method");
}
return vTemp;
}
COM: <s> function to convert string to array </s>
|
funcom_train/8352289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resume() {
if (!suspended) {
return;
}
LOG.debug("Resuming server");
Map<String, Listener> listeners = serverContext.getListeners();
for (Listener listener : listeners.values()) {
listener.resume();
}
suspended = false;
LOG.debug("Server resumed");
}
COM: <s> resume the server handler </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.