__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/37587359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void watchSet(DebugWatchData w) {
assert EventQueue.isDispatchThread();
_lock.startRead();
try {
int size = _listeners.size();
for (int i = 0; i < size; i++) { _listeners.get(i).watchSet(w); }
}
finally { _lock.endRead(); }
}
COM: <s> called when a watch is set </s>
|
funcom_train/12619635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawSprite(int x, int y, int[] image){
if (!headless) {
for (int i=0; i<spriteHeight; i++) {
for (int j=0; j<spriteWidth; j++){
// if this isn't a background pixel, draw it
if (this.sprite[i * spriteWidth + j] == 1){
image[(width * (y+i)) + (x+j)] = this.colour;
}
}
}
}
}
COM: <s> draws the sprite onto a pixel array </s>
|
funcom_train/51348647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void runJob() throws Exception, InterruptedException {
final long begin = System.currentTimeMillis();
// unless successful.
boolean failure = true;
try {
startClients();
awaitAll();
failure = false;
} finally {
final long elapsed = System.currentTimeMillis() - begin;
if (log.isInfoEnabled())
log.info("Done: " + (failure ? "failure" : "success")
+ ", elapsed=" + elapsed);
}
}
COM: <s> start the client tasks and await their futures </s>
|
funcom_train/26625492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String logString(String module, int level, String message) {
StringBuffer sb=new StringBuffer();
sb.append("[").append(timestamp()).append("] [").append(Format.levelToString(level)).append("] ");
sb.append(module).append(": ").append(message);
return sb.toString();
}
COM: <s> creates a formatted string suitable for output </s>
|
funcom_train/37125502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBackgroundImage(String backgroundImage) {
String oldValue = backgroundImage ;
m_backgroundImage = backgroundImage ;
if(m_backgroundImage != null) {
try {
m_viewportContainer.setImage(m_backgroundImage) ;
} catch(kanaputs.logging.Exception e) {}
}
firePropertyChange("backgroundImage", oldValue, m_backgroundImage) ;
}
COM: <s> set the background image of the text </s>
|
funcom_train/37425818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public long LastID(Connection connect) throws ClassNotFoundException, SQLException {
Statement stmt = connect.createStatement();
ResultSet rs = stmt.executeQuery("select last_insert_id()");
long lastID = 0;
if (rs.next())
lastID = rs.getLong("last_insert_id()");
stmt.close();
return lastID;
}
COM: <s> shows the last id generated by my sql </s>
|
funcom_train/34341378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getComandoSiguiente() {
if (ComandoSiguiente == null) {//GEN-END:|23-getter|0|23-preInit
// write pre-init user code here
ComandoSiguiente = new Command("siguiente", Command.ITEM, 0);//GEN-LINE:|23-getter|1|23-postInit
// write post-init user code here
}//GEN-BEGIN:|23-getter|2|
return ComandoSiguiente;
}
COM: <s> returns an initiliazed instance of comando siguiente component </s>
|
funcom_train/46746978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInstanceDt(DateTimeModel instanceDt) {
if (Converter.isDifferent(this.instanceDt, instanceDt)) {
DateTimeModel oldinstanceDt= DateTimeModel.getNow();
oldinstanceDt.copyAllFrom(this.instanceDt);
this.instanceDt.copyAllFrom(instanceDt);
setModified("instanceDt");
firePropertyChange(String.valueOf(APPOINTMENTINSTANCES_INSTANCEDT), oldinstanceDt, instanceDt);
}
}
COM: <s> date time the instance of the appointment occurs </s>
|
funcom_train/4923041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDigestType() {
// Create the expected type
ManagedObjectTypeBuilder type = this.createCoreType();
type.addDependency(
"Dependency-"
+ net.officefloor.plugin.web.http.security.scheme.DigestHttpSecuritySource.Dependencies.CREDENTIAL_STORE
.name(), CredentialStore.class, null, 2, null);
// Validate type
ManagedObjectLoaderUtil
.validateManagedObjectType(
type,
HttpSecurityServiceManagedObjectSource.class,
HttpSecurityServiceManagedObjectSource.PROPERTY_AUTHENTICATION_SCHEME,
HttpSecurityServiceManagedObjectSource.DIGEST_AUTHENTICATION_SCHEME,
DigestHttpSecuritySource.PROPERTY_REALM, "TestRealm",
DigestHttpSecuritySource.PROPERTY_PRIVATE_KEY,
"TestPrivateKey");
}
COM: <s> ensure correct type for code digest code authentication </s>
|
funcom_train/18513256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor getCopyDropCursor(boolean isDropOk) {
Cursor result;
if (isDropOk) {
result = this.getCursor("copyDrop");
if (result == null) {
result = DragSource.DefaultCopyDrop;
}
} else {
result = this.getCursor("copyNoDrop");
if (result == null) {
result = DragSource.DefaultCopyNoDrop;
}
}
return result;
}
COM: <s> returns a cursor for drag and drop in case the action is copy </s>
|
funcom_train/325519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void floodImage(Color col) {
if (displayImage == null) return;
Graphics2D g2d = (Graphics2D) displayImage.getGraphics();
g2d.setColor(PamColors.getInstance().getColor(PamColor.PlOTWINDOW));
g2d.fillRect(0, 0, innerPanel.getWidth(), innerPanel.getHeight());
}
COM: <s> fill the entire image with the same comour </s>
|
funcom_train/13500453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComponent createNorthPanel() {
Box tempP1 = Box.createHorizontalBox();
tempP1.add(Utility.addLabelLeft("ID: ", entryIDField));
tempP1.add(Box.createHorizontalStrut(5));
tempP1.add(Utility.addLabelLeft("Mime Type: ", mimeTypeField));
return tempP1;
}
COM: <s> this method creates and assembles the north panel portion of this </s>
|
funcom_train/29274699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getStep(int _size) {
long i = 0;
switch (_size) {
case 8:
i = getStepByte();
break;
case 16:
i = getStep16();
break;
case 32:
i = getStep32();
break;
case 64:
i = getStep64();
break;
}
return i;
}
COM: <s> get a long value from the underlying memory block </s>
|
funcom_train/11373127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isConsistent() throws IOException {
if (blockTotal == -1 && blockSafe == -1) {
return true; // manual safe mode
}
int activeBlocks = blockManager.getActiveBlockCount();
return (blockTotal == activeBlocks) ||
(blockSafe >= 0 && blockSafe <= blockTotal);
}
COM: <s> checks consistency of the class state </s>
|
funcom_train/9707045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void copyToFaultMap() {
Map classNameMap = mapper.getAllMappedNames();
Iterator keys = classNameMap.keySet().iterator();
while (keys.hasNext()) {
Object key = keys.next();
instantiatableMessageClassNames.put(key,
classNameMap.get(key));
}
}
COM: <s> utility method to copy the faults to the correct map </s>
|
funcom_train/50463255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image getComponentDragImage() {
BufferedImage image = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_ARGB);
Graphics2D g = (Graphics2D)image.getGraphics();
//remeber currently dragged so that we don't wash out the drag image
boolean state = currentlyDragging_flag;
currentlyDragging_flag = false;
this.paint(g);
currentlyDragging_flag = state;
return image;
}
COM: <s> returns the image that will be used while this component is being dragged </s>
|
funcom_train/18786751 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel createLicencePanel() {
JPanel licence = new JPanel(new BorderLayout());
JTextArea area = new JTextArea(projectInfo.getLicenceText());
area.setLineWrap(true);
area.setWrapStyleWord(true);
area.setCaretPosition(0);
area.setEditable(false);
licence.add(new JScrollPane(area));
return licence;
}
COM: <s> creates a panel showing the licence </s>
|
funcom_train/34759124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean tableExist() throws SQLException {
DefaultSqlOperation query = new DefaultSqlOperation();
query.setJDBCConnector(getJDBCConnector());
query.setPersistable(new UniversalPersistable());
query.queryTemplate="select * from user_tables where TABLE_NAME='"+getTableName()+"'";
List result = (List)query.execute();
if (result.size() < 1)
return false;
else
return true;
}
COM: <s> check if table exist </s>
|
funcom_train/8640012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float writeSelectedRows(int rowStart, int rowEnd, float xPos, float yPos, PdfContentByte[] canvases) {
return writeSelectedRows(0, -1, rowStart, rowEnd, xPos, yPos, canvases);
}
COM: <s> writes the selected rows to the document </s>
|
funcom_train/4674987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getSQL (String area) {
String sql = "";
if (area.equalsIgnoreCase("FZE_D")) {
sql = " AND C.direct = 1 ";
area = "FZE";
} else if (area.equalsIgnoreCase("FZE")) {
sql = " AND C.direct = 0 ";
}
sql += " AND P.name = \'" + area + "\' ";
return sql;
}
COM: <s> if area is type of fze or fze d generate specific sql </s>
|
funcom_train/42884888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ExprList (Pos pos, Pos closingBracket, Op op, boolean ambiguous, ConstList<Expr> args, long weight, JoinableList<Err> errs) {
super(pos, closingBracket, ambiguous, Type.FORMULA, 0, weight, errs);
this.op = op;
this.args = args;
}
COM: <s> constructs an expr list node </s>
|
funcom_train/13559043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean ensureModification(JAXXContext rootContext) throws IllegalArgumentException {
if (rootContext == null) {
throw new IllegalArgumentException("rootContext can not be null");
}
DivxtekMainUI ui = getUI(rootContext);
if (ui == null) {
// no ui, so no modification
return true;
}
// check ui is not modified
return true;
}
COM: <s> test if there is some modification on screen </s>
|
funcom_train/35279383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox setUpRendererChooser() {
String modes[] = {"NULL", "JOGL-OpenGL1", "LWJGL-OpenGL2", "LWJGL-OpenGL3", "LWJGL-OpenGL3.1"};
JComboBox nameBox = new JComboBox(modes);
nameBox.setSelectedItem(source.getRenderer());
return nameBox;
}
COM: <s> code set up renderer chooser code sets the list of available renderers </s>
|
funcom_train/25862353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Session getSession(String sessionId) {
if (sessionId == null || sessionId == "") {
// create new session
Session newSession = new Session();
this.sessions.add(newSession);
return newSession;
} else {
// check if sessionId exists
for (int i=0;i<sessions.size();i++){
if (sessions.get(i).getSessionId().equals(sessionId)) {
return sessions.get(i);
}
}
}
// create new session / session does not exist
Session newSession = new Session();
this.sessions.add(newSession);
return newSession;
}
COM: <s> return same if session exists else create and add to sessions </s>
|
funcom_train/13182919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (obj instanceof ValueTick && super.equals(obj)) {
ValueTick vt = (ValueTick) obj;
if (!(this.value == vt.value)) {
return false;
}
return true;
}
return false;
}
COM: <s> tests this tick for equality with an arbitrary object </s>
|
funcom_train/165225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Object o1, Object o2) {
try {
Locale l1 = (Locale) o1;
Locale l2 = (Locale) o2;
if (locale == null) {
return l1.getDisplayName().compareTo(l2.getDisplayName());
} else {
return l1.getDisplayName(locale).compareTo(l2.getDisplayName(locale));
}
} catch (Exception ex) {}
return 0;
}
COM: <s> compares two locales </s>
|
funcom_train/50545078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTagTable(int page, String[] tagTable) {
// TODO: clear entries in tagTable?
for (int i = 0; i < tagTable.length; i++) {
if (tagTable[i] != null) {
Object idx = new int[]{page, i+5};
this.tagTable.put(tagTable[i], idx);
}
}
}
COM: <s> sets the tag table for a given page </s>
|
funcom_train/39109289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public void output() {
if (eventList == null || eventList.isEmpty()) {
try {
PredefinedPage sysPage = getInternalPage();
userData.getEnvironment().getOut().println(sysPage.toString());
}
catch (NotInternalPageException ignore) {
processEventListAndWriteLog();
}
}
else {
processEventListAndWriteLog();
}
}
COM: <s> coordinates writing page out on specified output stream </s>
|
funcom_train/42713548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void phase1_computeExpansionFactor(long seed) {
Phase_ExpansionFactor p1 = new Phase_ExpansionFactor(soln, fitCrit.phase1,
primaryRegion, peopleInArchTypes,
configTime);
p1.setRandomSeed(seed);
p1.setParams(params);
numRealizations2Make = p1.go();
}
COM: <s> compute the expansion factor for household archtypes </s>
|
funcom_train/13717883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetGroup() {
System.out.println("testSetGroup");
Assert.assertNotNull(complete_rdd.getGroup());
DatasetGroup dg = new DatasetGroup();
complete_rdd.setGroup(dg);
Assert.assertSame(dg, complete_rdd.getGroup());
}
COM: <s> test of set group method of class be </s>
|
funcom_train/24506098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void presetField(Algos algo, Grid grid, int delay) {
try {
this.solver = new WayProblemSolver(
AlgorithmFactory.getAlgorithm(algo), this.gridPanel, grid, 50);
} catch (InvalidAlgorithmParameterException e) {
JOptionPane.showMessageDialog(this,
"Please select a valid Algorithm!", "Invalid Algorithm",
JOptionPane.ERROR_MESSAGE);
}
this.algosList.setSelectedItem(algo);
this.pack();
this.setLocationRelativeTo(null);
}
COM: <s> presets a grid and sets the specified algo and delay </s>
|
funcom_train/22718455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeDocument(Canvas canvas) throws IOException {
writeLine(XML_COMMENT);
writeStartElement(FileOpener.XML_ELEMENT_CANVAS);
writeTables(canvas.getTables());
writeForeignKeys(canvas.getForeignKeys());
writeEndElement(FileOpener.XML_ELEMENT_CANVAS);
}
COM: <s> write out the xml document </s>
|
funcom_train/17673323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getWidestType(int typeL, int typeR) {
if (typeL == typeR) {
return typeL;
}
int lValue = getWidth(typeL);
int rValue = getWidth(typeR);
if (lValue < rValue) {
return typeR;
} else {
return typeL;
}
}
COM: <s> this must check the types and determine the wider of the 2 </s>
|
funcom_train/31940186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel BuildBatchSizePanel() {
JPanel ipanel = new JPanel();
ipanel.setLayout(new BoxLayout(ipanel, BoxLayout.Y_AXIS));
Box firstRow = Box.createHorizontalBox();
firstRow.add(_batchSizeLabel);
firstRow.add(_batchSizeField);
firstRow.add(_whereLabel);
ipanel.add(firstRow);
return ipanel;
}
COM: <s> build the batch size section of the gui </s>
|
funcom_train/48153785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stateChanged(ChangeEvent e){
if (e.getSource() == nScroll.getSlider()) {
n = (int)nScroll.getValue();
spinner.setDivisions(n);
rv = new RandomVariable(new FiniteDistribution(1, n, 1, spinner.getProbabilities()), "N");
rvGraph.setRandomVariable(rv);
rvTable.setRandomVariable(rv);
reset();
}
}
COM: <s> this method handles the slider events for the number of divisions </s>
|
funcom_train/5459663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URI getDataSourceType(URI uri) throws ApertureServerException {
if (!isARegisteredDataSource(uri)) {
return null;
}
RDFContainer container = new RDFContainerImpl(configurationModel,uri);
URI typeUri = null;
try {
typeUri = container.getURI(RDF.type);
} catch (MultipleValuesException mve) {
throw new ApertureServerException(mve);
}
container = null;
return typeUri;
}
COM: <s> returns the type of the data source </s>
|
funcom_train/42785782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void receive(HLAInteraction intr, Set notified, Object tag) {
for (Iterator i = listeners.iterator(); i.hasNext();) {
HLAInteractionClassListener il = (HLAInteractionClassListener) i
.next();
if (!notified.contains(il)) {
il.interactionReceived(intr, tag);
notified.add(il);
}
}
if (parent != null) {
HLAInteractionClass intrClsParent = (HLAInteractionClass) parent;
intrClsParent.receive(intr, notified, tag);
}
}
COM: <s> notify all listeners that an interaction was received from another </s>
|
funcom_train/2999459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getTrains(Section section) {
HashSet set = new HashSet();
for (Iterator i = occupations.iterator(); i.hasNext(); ) {
Occupation oc = (Occupation)i.next();
if (oc.getSection() == section) {
set.add(oc.getTrain());
}
}
return set;
}
COM: <s> gets all trains occupying a given section </s>
|
funcom_train/34519663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void emit(edu.arizona.cs.mbel.ByteBuffer buffer){
long len = length;
int i=0;
while(len>=SIZE){
buffer.put(data[i]);
i++;
len-=SIZE;
}
for (int j=0;j<len;j++)
buffer.put(data[i][j]);
}
COM: <s> writes this strings stream out to a buffer should write get length bytes </s>
|
funcom_train/40799811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addZipFile(ZipFile jar) {
for(Enumeration e = jar.entries(); e.hasMoreElements(); ) {
ZipEntry ze = (ZipEntry)e.nextElement();
String f = ze.getName();
if(isValidFileName(f)) {
addFileName(f);
}
}
}
COM: <s> add contents of a zip file for automatic package export consideration </s>
|
funcom_train/15636928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPack1DMax() {
System.out.println("pack 1D (max)");
BitString expResult, result;
double[] value = new double[1];
Hasher instance = new Hasher("t1");
// testing max
value[0] = instance.getMaxHash(0);
expResult = BitString.createMax();
result = instance.pack(value);
assertTrue(expResult.equals(result));
}
COM: <s> tests if packing the max val in 1 d results in all ones </s>
|
funcom_train/36787479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Typeface getFontType(String ft) {
Typeface fontType = Typeface.DEFAULT;
if (ft.equals(Constant.ITALIC)) {
fontType = Typeface.create(Typeface.SERIF, Typeface.ITALIC);
} else if (ft.equals(Constant.BOLD)) {
fontType = Typeface.DEFAULT_BOLD;
} else if (ft.equals(Constant.UNDERLINE)) {
// Underline text, not implemented yet in android
} else if (ft.equals(Constant.ITALICBOLD)) {
fontType = Typeface.create(Typeface.SERIF, Typeface.BOLD_ITALIC);
}
return fontType;
}
COM: <s> gets font type from a string </s>
|
funcom_train/5276126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean save() {
if (!viewValuesValid()) {
JOptionPane.showOptionDialog(
YUIToolkit.getCurrentWindow(),
"View has invalid values.",
"Error",
JOptionPane.DEFAULT_OPTION,
JOptionPane.ERROR_MESSAGE,
null,
new String[] {"Ok"},
"Ok");
return false;
} else {
boolean wasNew = equipmentModel.isNewEquipment();
equipmentModel.save();
// updating view state, no unsaved changes:
resetViewChanges();
if (wasNew) {
sendApplicationEvent(new YApplicationEvent(
UiConstants.EQUIPMENT_ADDED, equipmentModel.getPerson()));
}
// disabling buttonSave:
equipmentView.setEditable(true, false);
return true;
}
}
COM: <s> handles flow of saving person data </s>
|
funcom_train/8080149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updatePredicted() {
int predictedClass = -1;
double bestProb = 0.0;
for(int i = 0; i < m_Distribution.length; i++) {
if (m_Distribution[i] > bestProb) {
predictedClass = i;
bestProb = m_Distribution[i];
}
}
if (predictedClass != -1) {
m_Predicted = predictedClass;
} else {
m_Predicted = MISSING_VALUE;
}
}
COM: <s> determines the predicted class doesnt detect multiple </s>
|
funcom_train/20306187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int graphIdAlloc ( String graphName ) {
int dbid = 0;
try {
String op = "insertGraph";
dbid = getInsertID(GRAPH_TABLE);
PreparedStatement ps = m_sql.getPreparedSQLStatement(op,GRAPH_TABLE);
ps.setInt(1,dbid);
ps.setString(2,graphName);
ps.executeUpdate();
m_sql.returnPreparedSQLStatement(ps);
} catch (SQLException e) {
throw new RDFRDBException("Failed to get last inserted ID: " + e);
}
return dbid;
}
COM: <s> allocate an identifier for a new graph </s>
|
funcom_train/25504187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showVersion() {
// final AboutDialog about = new AboutDialog(this.layout.shell(), RB.FILE_SCANNER_ABOUT,
// RB.FILE_SCANNER_ABOUT_VERSION, RB.FILE_SCANNER_ABOUT_LOGO);
//
// try {
// about.setTune(RB.FILE_SCANNER_ABOUT_TUNE);
// about.open();
// } catch (final ResourceUnavailableException e) {
// ApplicationError.open(this.layout.shell(), e);
// }
}
COM: <s> show the version dialog </s>
|
funcom_train/28420615 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(File f) {
boolean ret = false;
if (f != null) {
if ((f.isFile() && (f.getName().endsWith(EAR_FILE_FILTER_EXTENSION))) || f.isDirectory()) {
ret = true;
}
}
return ret;
}
COM: <s> true if the file is accepted </s>
|
funcom_train/43245444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetTmpCounty() {
System.out.println("setTmpCounty");
String tmpCounty = "";
PatientDemographicsDG5Object instance = new PatientDemographicsDG5Object();
instance.setTmpCounty(tmpCounty);
// 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 tmp county method of class org </s>
|
funcom_train/50488609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int countTokens(String s, String delim) {
if (s!=null) {
if (s.length()>0) {
int pos = 0;
int wc = 0;
pos = s.indexOf(delim);
while (pos>0) {
wc++;
pos = s.indexOf(delim, pos+1);
}
return pos;
}
return -1;
}
return -1;
}
COM: <s> this function counts the tokens in a string separated by a delimiter </s>
|
funcom_train/32156432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareHPLV(Instantiation I2) {
if (I2 == null || this.isEmpty())
return 1;
if (I2.isEmpty())
return -1;
VarAssignment last1 = this.last();
VarAssignment last2 = I2.last();
// return rank(last2) - rank(last1)
return this.instantiation.comparator().compare(last2, last1);
// TODO you can improve this function if last1==last2
// compare the size or the order of other agents.
}
COM: <s> performs the highest possible lowest variable heuristic </s>
|
funcom_train/3075903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectionData(String value) {
for (int i = 0; i < this.buttons.length; i++) {
Button bt = this.buttons[i];
if (bt.getSelection()) {
if (this.fields[i] != null) {
this.fields[i].setText(value);
return;
}
}
}
}
COM: <s> set text field for selected button </s>
|
funcom_train/18047652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(Point p) {
if (Point.orientation(p0, p1, p) == 0) {
if (p.x < p0.x && p.x < p1.x)
return false;
if (p.x > p0.x && p.x > p1.x)
return false;
if (p.y < p0.y && p.y < p1.y)
return false;
if (p.y > p0.y && p.y > p1.y)
return false;
return true;
}
return false;
}
COM: <s> check if an edge contains a point </s>
|
funcom_train/47855708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean containsSubTaskState(ITask currentTask, ProgressState state) {
if (currentTask.getProgress().getProgressState() == state)
return true;
if (currentTask.hasSubTasks()) {
Iterator<ITask<? extends Object, ? extends Object>> itTasks = currentTask.getSubTasks().iterator();
while (itTasks.hasNext()) {
ITask subTask = itTasks.next();
if (containsSubTaskState(subTask, state))
return true;
}
}
return false;
}
COM: <s> returns true if this task contains a subtask in this state </s>
|
funcom_train/22440674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkReadOnly() {
if (isFile()) {
checkReadOnly(_resource);
} else {
try {
// for each file..
_resource.accept(new IResourceVisitor() {
public boolean visit(final IResource resource) {
if (VSSPluginProvider.isIgnored(resource)) {
return true;
}
if (resource.getType() == IResource.FILE) {
checkReadOnly(resource);
}
return true;
}
});
} catch (CoreException e) {
VSSPlugin.log(e);
}
}
}
COM: <s> method check read only </s>
|
funcom_train/45451648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Date getDateEndValue() {
Date dateValue = null;
if (!Pattern.matches("[01]?\\d/[0-3]?\\d/\\d\\d", dateEnd)) {
return null;
}
try {
dateValue = new SimpleDateFormat("MM/dd/yy").parse(dateEnd);
} catch (ParseException e) {
}
return dateValue;
}
COM: <s> returns the end date as a date value </s>
|
funcom_train/4095321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDefinitions(String[] definitions) {
if (definitions != null) {
String defs = StringUtils.arrayToCommaDelimitedString(definitions);
logger.info("TilesConfigurer: adding definitions [" + defs + "]");
this.tilesPropertyMap.put(DefinitionsFactory.DEFINITIONS_CONFIG, defs);
}
}
COM: <s> set the tiles definitions i </s>
|
funcom_train/44430992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof ImageIF)) return false;
final ImageIF image = (ImageIF) o;
if (location != null ? !location.equals(image.getLocation()) : image.getLocation() != null) return false;
return true;
}
COM: <s> images are equal when their locations are equal </s>
|
funcom_train/36254836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private float getPivot(float[] values, int part) {
float pivot = 0;
int size=0;
float[] aux = new float[values.length];
for (int i=0; i<values.length; i++) {
aux[i] = values[i];
if (values[i]>=0) {
size++;
}
}
Arrays.sort(aux);
if (size>0) {
pivot = aux[(aux.length-1) - size/part];
//System.out.println("Pivot from # "+(size/part)+"/"+aux.length);
}
return pivot;
}
COM: <s> get a pivot of an array of availabilities </s>
|
funcom_train/40678709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFourccString(String fieldName) {
int f = getFourcc(fieldName);
byte[] b = {(byte)((f>>0)&0xff),(byte)((f>>8)&0xff),
(byte)((f>>16)&0xff),(byte)((f>>24)&0xff)};
return new String(b);
}
COM: <s> gets fourcc field string representation </s>
|
funcom_train/36241922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void waitForSend() {
try {
int count = 0;
while (!sent.get()) {
count++;
Thread.sleep(1000);
if (!sent.get()) {
if (count % 10 == 0) {
log.info("Still waiting... {}", String.format("%TT", new Date()));
}
if (count > 300) {
log.info("5 minutes? I think this test has failed");
assert false;
}
}
}
} catch (InterruptedException ex) {
//nothing
}
}
COM: <s> waits inside a loop blocking the calling thread until the channel </s>
|
funcom_train/37841195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
JComboBox cb = (JComboBox) e.getSource();
String graphingMode = (String) cb.getSelectedItem();
if (graphingMode.equals(resources.getString("grmode.dotted"))) {
graphPanel.setGraphingMode(graphPanel.LAYER_DOTTED);
} else {
graphPanel.setGraphingMode(graphPanel.LAYER_LINED);
}
}
COM: <s> receives the combobox changes </s>
|
funcom_train/22101810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List findAllResourcesInstancesForOperation(int opId) {
final String sql =
"SELECT r.instanceId FROM Resource r, Operation o " +
"WHERE o.resourceType = r.resourceType" +
" AND o.id = :opId";
return getSession().createQuery(sql)
.setInteger("opId", opId)
.list();
}
COM: <s> returns an ordered list of instance ids for a given operation </s>
|
funcom_train/3390155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void activateDisplayListener() {
GraphicsEnvironment ge =
GraphicsEnvironment.getLocalGraphicsEnvironment();
// We could have a HeadlessGE at this point, so double-check before
// assuming anything.
// Also, no point in listening to display change events if
// the image is never going to be accelerated.
if (ge instanceof SunGraphicsEnvironment) {
((SunGraphicsEnvironment)ge).addDisplayChangedListener(this);
}
}
COM: <s> this method should be called from subclasses which create </s>
|
funcom_train/2759068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createDefaultClusterServers() {
// register the cluster as a default server
getNodeFactory().createServer(this);
// register the resource loader
ResourceManagerImpl rmi = new ResourceManagerImpl();
getNodeFactory().createServer(rmi);
// create the cluster class loader
ClusterClassLoaderImpl cldr = new ClusterClassLoaderImpl();
cldr.setCluster(this);
this.getNodeFactory().createServer(cldr);
}
COM: <s> method that creates the default cluster servers when the cluster starts up </s>
|
funcom_train/3491151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkNewTreeElements(Object[] elements) {
for(Object currentElement : elements){
boolean checked = checkedStateStore.containsKey(currentElement);
treeViewer.setChecked(currentElement, checked);
treeViewer.setGrayed(currentElement, checked && !whiteCheckedTreeItems.contains(currentElement));
}
}
COM: <s> iterate through the passed elements which are being realized for the first </s>
|
funcom_train/37444194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getRequiredBoolean(final String key) {
CDebug.checkParameterNotEmpty(key, "key");
final String stringResource = getRequiredString(key, null);
try {
return CBoolean.parseBoolean(stringResource);
} catch (final IllegalArgumentException exception) {
LOGGER.error(createNotABooleanMessage(key, stringResource));
throw new IllegalArgumentException(createNotABooleanMessage(key, stringResource), exception);
}
}
COM: <s> gets a required boolean resource from the list of resource bundles </s>
|
funcom_train/18219760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addFolderActivities(DevelopmentLineContainer branchContainer) {
ScmFolder newFolder;
for (Iterator<String> folderIterator = branchContainer
.getAffectedFolderKeySet().iterator(); folderIterator.hasNext();) {
newFolder = branchContainer
.getAffectedFolder(folderIterator.next());
writeFolderActivityTableEntry(getFolderID(newFolder
.getFolderAndPath()), newFolder);
}
}
COM: <s> entries for folder activity table will be written </s>
|
funcom_train/7745779 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List removeNullProperties(List properties) {
List result = new ArrayList();
for(Iterator iter = properties.iterator();iter.hasNext();){
XMLPropertyMappingData propertyMappingData = (XMLPropertyMappingData) iter.next();
Object propertyValue =OgnlUtils.getPropertyValue(example,propertyMappingData.getName());
if(propertyValue != null) {
result.add(propertyMappingData);
}
}
return result;
}
COM: <s> remove the properties with null value from the properties of the object </s>
|
funcom_train/9869994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRecordlog(Boolean newVal) {
if ((newVal != null && this.recordlog != null && newVal.equals(this.recordlog)) ||
(newVal == null && this.recordlog == null && recordlog_is_initialized)) {
return;
}
this.recordlog = newVal;
recordlog_is_modified = true;
recordlog_is_initialized = true;
}
COM: <s> setter method for recordlog </s>
|
funcom_train/29312818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
try {
java.awt.EventQueue.invokeAndWait(new Runnable() {
public void run() {
initComponents();
som2dDemoPanel = new SOM2DDemoPanel(100, 100);
getContentPane().add(som2dDemoPanel, BorderLayout.CENTER);
resize(450, 450);
}
});
} catch (Exception ex) {
ex.printStackTrace();
}
}
COM: <s> initializes the applet som2 ddemo applet </s>
|
funcom_train/36959754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeHandlerAndKeyBindingSupport() {
// Remove handler submission
if (fShowViewMenuHandlerSubmission != null)
PlatformUI.getWorkbench().getCommandSupport().removeHandlerSubmission(fShowViewMenuHandlerSubmission);
// Restore editor's key binding scope
if (fKeyBindingService != null && fKeyBindingScopes != null) {
fKeyBindingService.setScopes(fKeyBindingScopes);
fKeyBindingScopes= null;
}
}
COM: <s> removes handler and key binding support </s>
|
funcom_train/8973203 | /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 ("IDirectoryLookupWSPort".equals(portName)) {
setIDirectoryLookupWSPortEndpointAddress(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/7929176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TokenStream tokenStream(String fieldName, Reader reader) {
if (reader instanceof FastStringReader) { // fast path
return tokenStream(fieldName, ((FastStringReader)reader).getString());
}
try {
String text = toString(reader);
return tokenStream(fieldName, text);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
COM: <s> creates a token stream that tokenizes all the text in the given reader </s>
|
funcom_train/2341413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double delta(double y, double bMutationParameter) {
double rand = RandomGenerator.nextDouble();
return (y * (1.0 - Math.pow(rand, Math.pow((1.0 - currentIteration / (double) maxIterations), bMutationParameter))));
} // delta
COM: <s> calculates the delta value used in non uniform mutation operator </s>
|
funcom_train/20823538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(final Cues other) {
removeAll();
for (int i = 0; i < other.size(); i++) {
insertCue(size(), other.get(i));
}
if (size() > 0) {
setCurrent(0);
}
else {
setCurrent(-1);
}
}
COM: <s> replace all code cue code objects in this collection by </s>
|
funcom_train/46459357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCoords(ImageCoordSystem coords) {
if (coords == this.coords) return;
this.coords.removePropertyChangeListener(this);
coords.addPropertyChangeListener(this);
this.coords = coords;
isMeasured = true;
isValidMeasure = false;
firePropertyChange("coords", null, coords); //$NON-NLS-1$
}
COM: <s> sets the image coordinate system used to convert from </s>
|
funcom_train/8097145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testClassIs2() {
m_Filter = getFilter("(CLASS is 'r') or (CLASS is 'g') or (CLASS is 'b')");
Instances result = useFilter();
assertEquals(m_Instances.numAttributes(), result.numAttributes());
assertEquals(m_Instances.numInstances(), result.numInstances());
}
COM: <s> tests the class shortcut with is over all class labels using or </s>
|
funcom_train/5403354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean showDialog() {
this.pack();
this.setLocationRelativeTo( frmOwner );
this.show();
if( STATUS == SAVE_OPTION ) {
System.out.println( "Something has changed, refreshing." );
return true;
} else {
System.out.println( "Nothing has changed, not refreshing." );
return false;
}
}
COM: <s> packs and shows this dialog </s>
|
funcom_train/29622458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toXMLString() {
String return_value = CHABBER.STRING_DEFAULT_VALUE ;
if (! this.extensions.isEmpty()) {
for (int i=0; i<extensions.size(); i++) {
return_value += this.extensions.elementAt(i).toXMLString() ;
}
}
return return_value ;
}
COM: <s> common part of xml treatment extensions </s>
|
funcom_train/41046420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resumeMIDlet()
{//GEN-END:|4-resumeMIDlet|0|4-preAction
// write pre-action user code here
switchDisplayable(null, getAcquireFixScreen().getSvgCanvas());//GEN-LINE:|4-resumeMIDlet|1|4-postAction
// write post-action user code here
}//GEN-BEGIN:|4-resumeMIDlet|2|
COM: <s> performs an action assigned to the mobile device midlet resumed point </s>
|
funcom_train/33146845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int serialize(final int activePathIndex) {
expandBuffers();
final int newState = size;
final int start = activePath[activePathIndex];
final int len = nextArcOffset[activePathIndex] - start;
System.arraycopy(serialized, start, serialized, newState, len);
size += len;
return newState;
}
COM: <s> serialize a given state on the active path </s>
|
funcom_train/14407238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void findNodesByName(String name,List<ITaskLauncherTreeNode> result) throws WbemsmtException {
if (name.equalsIgnoreCase(getName()))
{
result.add(this);
}
Vector<ITaskLauncherTreeNode> subnodes2 = getSubnodes();
for (int i=0; i < subnodes2.size(); i++)
{
TaskLauncherTreeNode node = (TaskLauncherTreeNode) subnodes2.get(i);
node.findNodesByName(name,result);
}
}
COM: <s> find nodes by the given node name </s>
|
funcom_train/25305681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void describePut(MethodInfo info) {
info.setDocumentation("Modifies a SVA associated to the dataset");
this.addStandardGetRequestInfo(info);
ParameterInfo pi = new ParameterInfo("svaId", true, "xs:string", ParameterStyle.TEMPLATE, "Identifier of SVA");
info.getRequest().getParameters().add(pi);
this.addStandardObjectResponseInfo(info);
}
COM: <s> initiate the resource </s>
|
funcom_train/43232687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkForDoublePerson(final Person person) throws DoubleDefinitionException {
for (final Person current : this.model.getAllPersons()) {
if (current.getFirstname().equals(person.getFirstname())
&& current.getLastname().equals(person.getLastname())) {
throw new DoubleDefinitionException(
fhdw.ipscrum.shared.constants.ExceptionConstants.DOUBLE_DEFINITION_ERROR);
}
}
}
COM: <s> helper method to ensure that no double personss will exist </s>
|
funcom_train/25187883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetMinimum() throws Exception {
System.out.println("setMinimum");
JSchema instance = new JSchema();
assertNull(instance.getMinimum());
instance.setMinimum(1);
assertEquals(1, instance.getMinimum());
instance.setMinimum(-121.2);
assertEquals(-121.2, instance.getMinimum());
}
COM: <s> test of set minimum method of class jschema </s>
|
funcom_train/28755311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setObsmolwt(Long newVal) {
if ((newVal != null && this.obsmolwt != null && (newVal.compareTo(this.obsmolwt) == 0)) ||
(newVal == null && this.obsmolwt == null && obsmolwt_is_initialized)) {
return;
}
this.obsmolwt = newVal;
obsmolwt_is_modified = true;
obsmolwt_is_initialized = true;
}
COM: <s> setter method for obsmolwt </s>
|
funcom_train/21297183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(T entity) {
EntityManagerHelper.log("deleting " + entityClass.getSimpleName() + " instance", Level.INFO, null);
try {
// entity = getEntityManager().getReference(entity.getClass(),
// entity.getName());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent sequence entity </s>
|
funcom_train/8763487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSlider getLatBar() {
if (latBar == null) {
latBar = new JSlider();
latBar.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent e) {
// simulationView.setCameraLat(latBar.getValue() *
// FastMath.PI
// / 200f);
simulationView.canvasInstance.repaint();
}
});
}
return latBar;
}
COM: <s> this method initializes lat bar </s>
|
funcom_train/10981061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetSimpleLong() {
long oldValue = ((Long) dynaForm.get("longProperty")).longValue();
long newValue = oldValue + 1;
dynaForm.set("longProperty", new Long(newValue));
assertEquals("Matched new value", newValue,
((Long) dynaForm.get("longProperty")).longValue());
}
COM: <s> test set simple property on a long property </s>
|
funcom_train/7421330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeActivity(Activity activity) {
this.activities.remove(activity);
// remove transition with activity as source or target
for (Iterator<Transition> it =
activity.getSourceFor().iterator(); it.hasNext();) {
Transition transition = it.next();
removeTransition(transition);
transition.getTarget().removeTargetFor(transition);
}
for (Iterator<Transition> it =
activity.getTargetFor().iterator(); it.hasNext();) {
Transition transition = it.next();
removeTransition(transition);
transition.getSource().removeSourceFor(transition);
}
}
COM: <s> removes an activity from the containers activities </s>
|
funcom_train/1213816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateList(Group g) {
list.clear();
if (g == null) {
return;
}
if (g.getBouts() == null) {
logger.error("No bouts in group [" + g + "]");
return;
}
List<Bout> bList = new ArrayList<Bout>(g.getBouts());
Collections.sort(bList, new BoutSort());
list.addAll(bList);
}
COM: <s> update the gui table with the list of bouts from the given group </s>
|
funcom_train/3640755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String renderStatus() {
return Schedule.days[dayOffset]
+ ":" + getName()
+ ":" + getStartTimeAsString()
+ ":" + getSetpoint()
+ ":" + (isOn() ? "on" : "-")
+ ":" + (isVoting() ? "voting" : "-")
+ ":" + getDumpPriority();
}
COM: <s> render the one line representation so it can be sent over the </s>
|
funcom_train/33857106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstructor2() {
NumberRange nr = new NumberRange(five, ten);
assertSame(five, nr.getMinimumNumber());
assertSame(ten, nr.getMaximumNumber());
nr = new NumberRange(ten, five);
assertSame(five, nr.getMinimumNumber());
assertSame(ten, nr.getMaximumNumber());
}
COM: <s> tests non exceptional conditions for the two argument constructor </s>
|
funcom_train/3546397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initTree(Map<Integer, TreeSecurityItem> modelData) {
String textColumn = Main.getString("fina2.security.fi");
Icon branchIcon = Main.getIcon("folder.gif");
Icon leafIcon = Main.getIcon("banks.gif");
// Data model for tree
treeModel = new TreeViewModel(modelData, textColumn, false);
super.initTree(treeModel, branchIcon, leafIcon);
}
COM: <s> inits the fi tree </s>
|
funcom_train/43245252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetRelationship() {
System.out.println("getRelationship");
FamilyDemographicDependentObject instance = new FamilyDemographicDependentObject();
String expResult = "";
String result = instance.getRelationship();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get relationship method of class org </s>
|
funcom_train/37147582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void upCurrentNodes() {
List<Task> selection = getTaskSelectionManager().getSelectedTasks();
final TaskContainmentHierarchyFacade hierarchy = getTaskManager().getTaskHierarchy();
for (Task nextSelected : selection) {
int position = hierarchy.getPositionInParent(nextSelected);
if (position>0) {
hierarchy.move(nextSelected, hierarchy.getContainer(nextSelected), position-1);
}
}
}
COM: <s> function to put up the selected tasks </s>
|
funcom_train/28653202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAttribute(String key,String state,String[] val) {
Attribute attribute;
if(val == null) {
String s[] = {""};
attribute = new Attribute(state, s);
} else {
attribute = new Attribute(state, val);
}
getAttributeHashtable().put(key, attribute);
}
COM: <s> there are set attribute and add attribute methods </s>
|
funcom_train/5395396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetStringIndex() {
System.out.println("getStringIndex");
String data = "";
TableManager instance = new TableManager();
Integer expResult = null;
Integer result = instance.getStringIndex(data);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get string index method of class org </s>
|
funcom_train/51069809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int forceRegisterNonce( long timeout, Object userData ) {
NonceMsg nm = new GenericNonceMsg( null );
nm.setNonce( nextNonce() );
nm.setStageId( my_stage_id );
NonceState ns = new NonceState( nm, timeout, userData );
ns.token = resender.remember( nm, ns.timeout );
waiting_nonces.put( new Integer(nm.getNonce()), ns );
return nm.getNonce();
}
COM: <s> keep a record of a non nonce msg message </s>
|
funcom_train/19417182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addAnnotation(final AnnotationImpl annotation) {
assert annotation != null;
if (this.annotations.contains(annotation)) {
return;
}
// for (final Iterator itr = iterator(); itr.hasNext();) {
// final AnnotationImpl tmpAnnotation = (AnnotationImpl) itr.next();
// if (tmpAnnotation.isRelevant(annotation)) {
// itr.remove();
// }
// }
this.annotations.add(annotation);
}
COM: <s> adds a new code annotation impl code to the annotation list </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.