__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/28227276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean sameFileContents(File file1, File file2) throws IOException {
byte[] content1 = getBytesFromFile(file1);
byte[] content2 = getBytesFromFile(file2);
if (content1.length != content2.length) return false;
for (int a = 0; a < content1.length; a++) {
if (content1[a] != content2[a]) return false;
}
return true;
}
COM: <s> compares the content of two files as code byte code arrays </s>
|
funcom_train/43467473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
BOCollection colBOCollection = new BOCollection(size());
ZXBO objBO;
Iterator iter = iterator();
Iterator iterKey = iteratorKey();
while (iter.hasNext()) {
objBO = (ZXBO) iter.next();
colBOCollection.put(iterKey.next(), objBO);
}
return colBOCollection;
}
COM: <s> clone the bo collection object </s>
|
funcom_train/119384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyCellChange(Vector changedCells) {
int cCellCount = changedCells.size();
boolean[] newness = new boolean[cCellCount];
Object[] cells = new Object[cCellCount];
CellPlaceHolder placeholder;
for (int counter = 0; counter < cCellCount; counter++) {
placeholder = (CellPlaceHolder) changedCells.elementAt(counter);
newness[counter] = placeholder.isNew;
cells[counter] = placeholder.cell;
}
GraphSelectionEvent event =
new GraphSelectionEvent(this, cells, newness);
fireValueChanged(event);
}
COM: <s> notifies listeners of a change in path </s>
|
funcom_train/42703896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void buildFrame() {
if (frameBuilder != null) {
frameBuilder.beginFrame(roundOver);
for (Collection<? extends ArenaObject> objectCollection : allFramedObjects) {
for (ArenaObject object : objectCollection) {
frameBuilder.addObject(object.getSnapshot());
}
}
frameBuilder.endFrame();
}
}
COM: <s> prepare a snapshot of the current arena state in the </s>
|
funcom_train/19259304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawCross(Graphics gc, UTMMapData globalRef) {
// Extract the the point and convert to screen coordinates.
UTMCoord center = getCoord();
Point aPoint = globalRef.UTMtoPoint( center );
int x0 = aPoint.x;
int y0 = aPoint.y;
// Create horizontal line.
int x1 = x0 - 3;
int x2 = x0 + 3;
gc.drawLine(x1,y0, x2,y0);
// Create vertical line.
int y1 = y0 - 3;
int y2 = y0 + 6;
gc.drawLine(x0,y1, x0,y2);
}
COM: <s> method to draw a cross in the center of the cemetery </s>
|
funcom_train/42957481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void performNullTest(RevisionIdentifierSource identifierSource) {
setUpIdentifiers();
for (int i = 0; i < AVAILABLE_IDENTIFIERS; i++) {
identifierSource.getAvailableIdentifier();
}
RevisionIdentifier identifierNull;
try {
identifierNull = identifierSource.getAvailableIdentifier();
}
catch (NoSuchElementException ex) {
identifierNull = null;
}
assertNull("Identifier should be null.", identifierNull);
}
COM: <s> perform a null test for the specified identifier source </s>
|
funcom_train/10836703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startWrite(String startString) throws IOException {
// inject the out.write( part and the initial string
if (startString != null && startString.length() > 0) {
doVerbatim(startString);
}
doVerbatim("out.write(");
// if out is not set yet, we also acquire it now setting it
// globally
if (outUndefined) {
doVerbatim(outInitStatement);
outUndefined = false;
}
}
COM: <s> injects the call to write template text and checks whether the global </s>
|
funcom_train/31931140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
boolean equals = false;
if (obj != null) {
try {
Outcome r = (Outcome) obj;
equals = getOutcomeDetails().equals(r.getOutcomeDetails())
&& status() == r.status();
}
catch (ClassCastException cce) {
// ignore, the default value
}
}
return equals;
}
COM: <s> override return code true code if code obj code is equal to this </s>
|
funcom_train/38382464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JInternalFrame getCurrentInternalFrame() {
UIInternalFrame internalFrame =
(UIInternalFrame) desktop.getSelectedFrame();
if (internalFrame == null) {
JInternalFrame[] frames = desktop.getAllFrames();
if (frames.length > 0) {
try {
frames[0].setSelected(true);
internalFrame = (UIInternalFrame) frames[0];
} catch (PropertyVetoException e) {
return null;
}
}
}
if (internalFrame == null)
return null;
return internalFrame;
}
COM: <s> returns the currently selected internal frame </s>
|
funcom_train/50298316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getSRBString(byte[] displayBuffer) {
count += 1;
int length = getGds().iscVaxInteger(displayBuffer, count, 2);
count += 2;
String string = new String(displayBuffer, count, length);
count += length;
return string;
}
COM: <s> returns a string from ther service request buffer </s>
|
funcom_train/10500668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(TestResult result) {
if (initialisationException==null && suite!=null) {
//normal case, the test is executed from the suite
suite.runTest(this, result);
} else {
//special case, the suite failed to be created
//the execution will be handled by this object
//directly
super.run(result);
}
}
COM: <s> called by a junit runner that want to executes specifically </s>
|
funcom_train/164901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetLastElement() {
System.out.println("getLastElement");
Path instance = new Path("a/b/c/d");
assertEquals(instance.getLastElement(), "d");
instance = new Path("a/b/c/..");
assertEquals(instance.getLastElement(), "b");
}
COM: <s> test of get last element method of class org </s>
|
funcom_train/4193976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onTransportTerminated(Transport transport, Exception error)
{ printLog("transport "+transport+" terminated",LogLevel.MEDIUM);
if (transport.getProtocol().equals(PROTO_TCP))
{ ConnectionIdentifier conn_id=new ConnectionIdentifier((ConnectedTransport)transport);
removeConnection(conn_id);
}
if (error!=null)
printException(error,LogLevel.HIGH);
}
COM: <s> when transport terminates </s>
|
funcom_train/38385038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int copyInto(byte[] arr, int from, int arrSize, int myOff) {
int retVal = 0;
fBuffer.seek(fOrg + myOff);
int readAmount = Math.min(arrSize - from, fLength - myOff);
fBuffer.readBytes(arr, from, readAmount);
return readAmount - fBuffer.getRes();
}
COM: <s> copy parts of run into char array </s>
|
funcom_train/35294136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addObject(Header header) throws COPSException {
if (header == null) {
throw new COPSException("Client Accept Message: Header is null");
}
if (header.getOpcode() != Header.CAT) {
throw new COPSException("Client Accept Message: OPCode should be CAT");
}
this.header = header;
setLength();
}
COM: <s> adds a header to the message </s>
|
funcom_train/18738963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConsistent() throws FormatException {
FormatErrorSet errors = new FormatErrorSet();
// collect the exceptions of the rules
if (this.typeGraph == null) {
errors.add(String.format("Labels and subtypes not initialised"));
}
// if any exception was encountered, throw it
errors.throwException();
}
COM: <s> tests if the rule system is consistent </s>
|
funcom_train/47675890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setReplaced(Boolean p_replaced) {
if (getOriginEnum() != PaletteEnum.COMPONENT) {
throw new IllegalArgumentException("This method may only be called on a BeanWrapperElement of type PaletteEnum.COMPONENT. The current element is of type: \"" + getOriginEnum() + "\"");
}
replaced = p_replaced;
}
COM: <s> set the replaced flag on this object </s>
|
funcom_train/2801763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDescription(String pDescription) {
mDescription = pDescription;
if (mTransport != null) {
if ((mDescription != null) && (mDescription.trim().length() != 0)) {
try {
mTransport.setDescription(mDescription);
} catch (TibrvException e) {
throw new IllegalArgumentException("Invalid description for Rendezvous Transport", e);
}
}
}
}
COM: <s> defines the description of this nucleus </s>
|
funcom_train/43266943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JComboBox getTypeComboBox() {
if (typeComboBox == null) {
typeComboBox = new JComboBox();
// Populate with media types
String types[] = Media.TYPES;
for (int i = 0; i < types.length; i++) {
typeComboBox.addItem(types[i]);
}
}
return typeComboBox;
}
COM: <s> this method initializes type combo box </s>
|
funcom_train/46192124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCellList(String columnName, List<Cell> paramCells) {
TreeMap<Cell.Key, Cell> cellMap = cells.get(columnName);
if(cellMap == null) {
cellMap = new TreeMap<Cell.Key, Cell>();
cells.put(columnName, cellMap);
}
for(Cell eachCell: paramCells) {
internalAddCell(cellMap, eachCell);
}
}
COM: <s> add cell list to specified column </s>
|
funcom_train/5663615 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleChangedResources() {
if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) {
editingDomain.getCommandStack().flush();
for (Iterator i = changedResources.iterator(); i.hasNext(); ) {
Resource resource = (Resource)i.next();
if (resource.isLoaded()) {
resource.unload();
try {
resource.load(Collections.EMPTY_MAP);
}
catch (IOException exception) {
ResumeEditorPlugin.INSTANCE.log(exception);
}
}
}
}
}
COM: <s> handles what to do with changed resources on activation </s>
|
funcom_train/42081760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IMetadata addNewELO(IELO elo) {
if (elo == null) {
throw new EmptyELOException();
}
Object identifierKey = elo.getMetadata().getMetadataValueContainer(MetadataTypeManager.getInstance().getMetadataKey(CoreRooloMetadataKeyIds.IDENTIFIER)).getValue();
if (identifierKey != null) {
throw new ELOAlreadyAddedException(elo);
}
return addELO(elo);
}
COM: <s> add a new annotated emerging learning object elo </s>
|
funcom_train/2292980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setResourcesParam(List resources) {
m_collectorParameter += I_CmsListResourceCollector.SEP_PARAM
+ I_CmsListResourceCollector.PARAM_RESOURCES
+ I_CmsListResourceCollector.SEP_KEYVAL;
if (resources == null) {
// search anywhere
m_collectorParameter += "/";
} else {
m_collectorParameter += CmsStringUtil.collectionAsString(resources, "#");
}
}
COM: <s> sets the resources parameter </s>
|
funcom_train/1722174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String nextText() {
if (!mNextAlreadyCalled) {
mNextAlreadyCalled = true;
try {
mEventType = mXpp.next();
} catch (XmlPullParserException e) {
mEventType = PARSER_ERROR;
} catch (IOException e) {
mEventType = IO_ERROR;
}
}
if (mEventType == XmlPullParser.TEXT)
return mXpp.getText();
return "";
}
COM: <s> after calling this its no longer possible to call get attribute </s>
|
funcom_train/1960017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public byte get() throws NetSimException {
TCPPacket packet = pBuffer.get();
Vector data = (Vector) packet.getPayload();
if (data == null || data.size() == 0) {
pBuffer.removePacket();
return get();
}
Integer returnvalue = ((Integer) data.firstElement());
jlogger.info("removing "+returnvalue);
data.remove(returnvalue);
return returnvalue.byteValue();
}
COM: <s> reads one byte a packet from the sliding window packet buffer and removes </s>
|
funcom_train/31657739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getNodeType(Constant type) {
if (type.getConstant().equals(AnonymousResource)) {
return Variable.ANONYMOUS_RESOURCE;
} else if (type.getConstant().equals(NonAnonymousResource)) {
return Variable.URI_RESOURCE;
} else if (type.getConstant().equals(Resource)) {
return Variable.RESOURCE;
} else if (type.getConstant().equals(Literal)) {
return Variable.LITERAL;
} else {
return Variable.ANY;
}
}
COM: <s> gets the node type </s>
|
funcom_train/40360192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onApplicationEvent(ApplicationEvent event) {
LOGGER.info(listenerName + ": Entering onApplicationEvent...");
LOGGER.info(listenerName + ": Event=" + event);
synchronized (eventQueue) {
eventQueue.add(event);
}
LOGGER.info(listenerName + ": ...exiting onApplicationEvent.");
}
COM: <s> logs the given event and stores it in an event queue </s>
|
funcom_train/6485307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addServer(Server server) {
if (serverList.contains(server)) {
return;
}
serverList.add(server);
server.addPropertyChangeListener(this);
needsSaving = true;
propertyChangeSupport.firePropertyChange("serverList" +
(serverList.size() - 1), null,
server);
}
COM: <s> adds a server to the list </s>
|
funcom_train/29023509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createChartPrintJob() {
PrinterJob job = PrinterJob.getPrinterJob();
PageFormat pf = job.defaultPage();
PageFormat pf2 = job.pageDialog(pf);
if (pf2 != pf) {
job.setPrintable(panel, pf2);
if (job.printDialog()) {
try {
job.print();
}
catch (PrinterException e) {
JOptionPane.showMessageDialog(panel, e);
}
}
}
}
COM: <s> creates a print job for the chart </s>
|
funcom_train/25868511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean fileExists(String name) {
try {
if (searchClassPath(name)) {
logger.debug("Found it by classpath.");
return true;
}
if (searchPaths(path, name)) {
logger.debug("Found it by paths.");
return true;
}
} catch (Exception e) {
logger.error("There was a problem looking for the file", e);
}
return false;
}
COM: <s> handles searching for file existance by looking through either the </s>
|
funcom_train/42971909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Box addBox(float x, float y, float z) {
Appearance oAppearance_1 = new Appearance();
Material oMaterial_1 = new Material();
oMaterial_1.setDiffuseColor(new Color3f(1, 1, 1));
oMaterial_1.setSpecularColor(new Color3f(1, 1, 1));
oMaterial_1.setShininess(10.0f);
oAppearance_1.setMaterial(oMaterial_1);
Box box = new Box(x, y, z, oAppearance_1);
return box;
}
COM: <s> fonction add box params float float float retour box shape3 d desc </s>
|
funcom_train/45739255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(Writer writer) throws IOException{
List<Float> accuracies=new ArrayList<Float>(resultMap.keySet());
Collections.sort(accuracies);
Collections.reverse(accuracies);
for (Float acc:accuracies){
writer.write("Models reaching accuracy value of "+acc+"\n");
for (SNPFoldResult result:resultMap.get(acc)){
result.write(writer);
}
}
}
COM: <s> dumps all good models through a writer </s>
|
funcom_train/36817217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseReleased(MouseEvent e)
{
if(validPoint(e.getPoint()) && isDragged )
{
moveCells();
}
else if( !isCellBorder )
{
showContextMenu(e);
}
else
{
isDragged = false;
sheetRenderer.setDrawEnabled(isDragged);
sheetRenderer.setMoveBox(-1, -2, -3, -4);
sheet.revalidate();
sheet.repaint();
}
}
COM: <s> this event is triggered when the pressed mouse is released </s>
|
funcom_train/46101576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean modifyProperty(String prop, Object value, Object[] state, String[] propertyNames) {
boolean modified = false;
for(int i = 0; i < propertyNames.length; i++) {
if(propertyNames[i].equals(prop)) {
if(state[i] != value) {
state[i] = value;
modified = true;
}
}
}
return modified;
}
COM: <s> modify a property in an entity state array </s>
|
funcom_train/41165044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(CoCourseUserHistory entity) {
EntityManagerHelper.log("saving CoCourseUserHistory instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved co course user history </s>
|
funcom_train/33388645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetBoardConfigurationDoubleWin() {
String resultString = ProtocolManager.getParser()
.getBoardConfiguration(new BackgammonBoardImpl(), null, true,
GameOverStatus.DOUBLE);
assertEquals(
resultString,
"2 1 0 1 0 1 0 1 0 1 5 0 0 1 3 0 0 1 0 1 0 1 5 1 5 0 0 1 0 1 0 1 3 1 0 1 5 1 0 1 0 1 0 1 0 1 2 0 0 0 0 0 1 1 2 ");
}
COM: <s> tests getting board configuration with double win for game over status </s>
|
funcom_train/18195547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean remove(Object o) {
if (!(o instanceof TestElement)) {
throw new ClassCastException(
"An ElementContainer may only contain TestElements.");
}
if (children.remove(o)) {
// if o was contained, decrement the author's references
((TestElement) o).deRegister();
return true;
} else {
// if o wasn't contained, return false as per specification
return false;
}
}
COM: <s> removes the first occurrence of the specified element from this list if </s>
|
funcom_train/40466893 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean send(String tweet) {
try {
update(props.getTwitterUser(), props.getTwitterPassword(), tweet);
MessageOutputer.outputMessage("Twitter: " + tweet);
return true;
}
catch (RPCException error) {
System.out.println(error.getMessage());
return false;
}
}
COM: <s> sends the tweet to the twitter server </s>
|
funcom_train/26042879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(String uri, Class<?> extClass)
{
if ( ! PropertyFunction.class.isAssignableFrom(extClass) )
{
ALog.warn(this, "Class "+extClass.getName()+" is not an PropertyFunction" );
return ;
}
registry.put(uri,new PropertyFunctionFactoryAuto(extClass)) ;
}
COM: <s> insert an property function class </s>
|
funcom_train/20315031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TaggedDocument getDocument(String uri, boolean byDOM) {
TaggedDocument document = null;
if (byDOM) {
Logger.getRootLogger().debug("getDocumentByDOM(" + uri + ")");
document = new TaggedDocument(getDocumentByDOM(uri), uri);
} else {
Logger.getRootLogger().debug("getDocumentBySAX");
document = new TaggedDocument(getDocumentBySAX(uri), uri);
}
return document;
}
COM: <s> returns a tagged document object from given uri local or remote </s>
|
funcom_train/24059245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object readResolve() throws InvalidObjectException {
Map<String, ? extends Attribute> instances = this.getInstances();
Attribute instance = (Attribute) instances.get(getName());
if (instance != null) {
return instance;
} else {
throw new InvalidObjectException("unknown attribute name");
}
}
COM: <s> resolves instances being deserialized to the predefined constants </s>
|
funcom_train/19399798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void abort(long startTime) {
TxMetadata tx = activeTx.get(startTime);
if (tx == null)
throw new IllegalStateException("Unknown: " + startTime);
if(!tx.isActive()) {
throw new IllegalStateException("Not active: " + startTime);
}
// Note: do not wait for the task to run.
commitService.submit(new AbortTask(tx));
}
COM: <s> abort the transaction asynchronous </s>
|
funcom_train/41665149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getModelConceptTestDirectoryPath(String conceptCode) {
String modelPackageCode = modelConfig.getPackageCode();
String modelPackageCodeWithSlash = textHandler
.replaceDotWithSlash(modelPackageCode);
String conceptCodeAllLowerLetters = textHandler
.allLettersToLower(conceptCode);
String modelConceptTestDirectoryPath = testDirectoryPath + SEPARATOR
+ modelPackageCodeWithSlash + SEPARATOR
+ conceptCodeAllLowerLetters;
return modelConceptTestDirectoryPath;
}
COM: <s> gets model concept test directory path for a concept code </s>
|
funcom_train/3298549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Component add(Component c) throws IllegalArgumentException {
if (c instanceof JextarButton) {
getLayout().addLayoutComponent("", c);
return super.add(c);
} else if (c instanceof GlassPane) {
return super.add(c);
}
//Dont allow to add anything else so far
else {
throw new IllegalArgumentException("Only JextarButtons"
+ "can be added to a JextarPanel");
}
}
COM: <s> the only components allowed in a jextar panel so far are the obligatory </s>
|
funcom_train/3534649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(final Object anObject) {
if (anObject == this) {
return true;
} else if (anObject instanceof NamedObject) {
final NamedObject other = (NamedObject)anObject;
final String name = this.getName();
if (name == null) {
return other.getName() == null;
}
return name.equals(other.getName());
} else {
return false;
}
}
COM: <s> tests the supplied </s>
|
funcom_train/40312298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetPrecision_InvalidColumn2() {
try
{
ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry);
resMetaData.getPrecision(0);
fail("SQLException is expected.");
}
catch(SQLException e)
{
//ensure the SQLException is thrown by getPrecision method.
assertEquals("The sqlstate mismatches", "22003", e.getSQLState());
}
}
COM: <s> tests get precision with column index equals to 0 </s>
|
funcom_train/32869892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void execute() throws IllegalAccessException, InvocationTargetException {
ANY adviceThis = new ANY();
adviceThis.setObject(stackArgs[0]);
REST adviceRest = new REST();
Object[] restParams = new Object[stackArgsLength - 1 ];
System.arraycopy(stackArgs,1,restParams,0,restParams.length);
adviceRest.setObject(restParams);
advice.methodObj.invoke(methodCut,new Object[]{adviceThis,adviceRest});
}
COM: <s> unpack the stack parameters and create two arguments objects </s>
|
funcom_train/37785691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare( Object a_obj1, Object a_obj2 ) {
if (null == a_obj1) {
throw new IllegalArgumentException("Argument 'a_obj1' is null") ;
}
if (null == a_obj2) {
throw new IllegalArgumentException("Argument 'a_obj2' is null") ;
}
return ((String) a_obj1).compareTo(a_obj2) ;
}
COM: <s> compare two objects </s>
|
funcom_train/6259976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String classThisCls() {
String sfx = "";
if (scope == ScopeKindEnum.CLASSIFIER_LEVEL) {
sfx = "Class";
}
return jmi.javaClassPackage(thisCls.getContainer()) + "." +
jmi.nameOfClass(getName(thisCls), sfx) + ".class, \"";
}
COM: <s> returns this class name with the </s>
|
funcom_train/39803403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent evt) {
ActionManager manager = ActionManager.getInstance();
Iterator<String> iter = getActionIDs().iterator();
while (iter.hasNext()) {
String id = iter.next();
Action action = manager.getAction(id);
if (action != null) {
action.actionPerformed(evt);
}
}
}
COM: <s> callback for composite actions </s>
|
funcom_train/37820982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean startAlgorithm() {
try {
AlgorithmStartAction anAction = new AlgorithmStartAction(myModel,
null);
myActionStack.perform(anAction);
// The Observers must be informed, that model has changed.
myModel.notifyObservers();
return true;
}
// Exceptions are thrown by the ActionStack if startAlgorithm is not
// possible.
// These Exceptions arent handled.
catch (Exception e) {
myModel.notifyObservers();
return false;
}
}
COM: <s> this mehtod performs the firs step in the algorithm </s>
|
funcom_train/41016552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleGPVTG(String[] tokens) {
if (tokens.length < 9)
return;
try {
double temp = Double.parseDouble(tokens[5]);
speed = temp * GeoTools.METERS_PER_HOUR_PER_KNOT / 1000;
heading = Double.parseDouble(tokens[1]);
}
catch (NumberFormatException nfe) {
ExtLogger.handle(nfe, false, "GPVTG Error parsing speed/heading data");
}
}
COM: <s> process the gpvtg gps command </s>
|
funcom_train/3600182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected PooledConnection createConnection() throws SQLException {
PooledConnection con = null;
try {
con = new PooledConnection(DriverManager.getConnection(this.url, this.user, this.password),
this);
} catch (SQLException e) {
throw new SQLException("ConnectionPool:createConnection::SQLException " + e.toString());
}
return con;
}
COM: <s> creates new connection </s>
|
funcom_train/8039394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSetThreadPrinting() {
TTCCLayout layout = new TTCCLayout();
assertEquals(true, layout.getThreadPrinting());
layout.setThreadPrinting(false);
assertEquals(false, layout.getThreadPrinting());
layout.setThreadPrinting(true);
assertEquals(true, layout.getThreadPrinting());
}
COM: <s> tests get thread printing and set thread printing </s>
|
funcom_train/20893968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent arg0) {
if (arg0.getSource()==vCurveList.getAdd()){
VCurve vCurve=new VCurve(vCurveList.getVMaths());
MCurve mCurve=vCurve.getMCurve();
mCurve.setName(vCurveList.getCurveName().getText());
vCurveList.getCurveName().setText("");
System.out.println("Add curve "+mCurve.getName());
mCurveList.add(mCurve);
}
}
COM: <s> action event handler click on the add button </s>
|
funcom_train/18934773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute(SchedulerData data, ServiceManager manager) {
fillData(data.getXml());
DeploymentID workerDeploymentID = new DeploymentID(workerID);
Worker worker = manager.getDAO(WorkerDAO.class).getWorker(workerDeploymentID);
if (worker != null) {
worker.sendMessage(new GetFileInfoMessageHandle(handleId, requestID, destinationFileName));
}
}
COM: <s> get file info handle id long local file name string description string </s>
|
funcom_train/18369604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void inspectTriple(NamedGraphSet ngs, Triple t, int step) {
Node sub = t.getSubject();
Node pred = t.getPredicate();
Node obj = t.getObject();
this.inspectNode(ngs, sub, step);
this.inspectNode(ngs, pred, step);
this.inspectNode(ngs, obj, step);
}
COM: <s> inspects a triple if it contains uris </s>
|
funcom_train/17413230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean execute(String sql, int fetchSize, Object... parameters) {
boolean successful = false;
lastResult = null;
ResultSet rs = null;
try {
rs = executeQuery(sql, fetchSize, parameters);
if (rs != null) {
lastResult = new QueryResult(rs);
}
successful = true;
} catch (SQLException e) {
logger.error(e);
} finally {
closeResultSet(rs);
}
return successful;
}
COM: <s> executes the specified query </s>
|
funcom_train/21985833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireCloseTabEvent(MouseEvent e, int overTabIndex) {
this.overTabIndex = overTabIndex;
EventListener closeListeners[] = getListeners(CloseListener.class);
for (int i = 0; i < closeListeners.length; i++) {
((CloseListener) closeListeners[i]).closeOperation(e, overTabIndex);
}
}
COM: <s> sends a code mouse event code whose source is this tabbedpane to </s>
|
funcom_train/50208201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ConnectionAnchor getTargetConnectionAnchor(Request request) {
Point pt = new Point(((DropRequest)request).getLocation());
List unconnectedAnchors = request instanceof ReconnectRequest
? getUnconnectedAnchors(false, (TransitionModelPart)((ReconnectRequest)request).getConnectionEditPart().getModel())
: getUnconnectedAnchors(false);
return FlowletFigure.getClosestConnectionAnchorAt(pt, unconnectedAnchors);
}
COM: <s> returns the connection anchor of a terget connection which </s>
|
funcom_train/31467773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object visit(EqualExpression node) {
if (node.hasProperty(NodeProperties.VALUE)) {
// The expression is constant
return node.getProperty(NodeProperties.VALUE);
} else {
Node ln = node.getLeftExpression();
Node rn = node.getRightExpression();
return InterpreterUtilities.equalTo(NodeProperties.getType(ln),
NodeProperties.getType(rn),
ln.acceptVisitor(this),
rn.acceptVisitor(this));
}
}
COM: <s> visits an equal expression </s>
|
funcom_train/34272292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateBoatData() throws DataLoadingException, BoatNotFoundException {
boat.updateBoatData();
//- Fire again this change to report to the EditPart of such changes
firePropertyChange(Boat.BOAT_UPDATE, null, boat.getSpeed());
//- Update the state depending on the model contents.
setState(ModelStates.CONFIGURED);
if ((null != boatid) && (null != clef)) {
setState(ModelStates.READY);
errorMessage = null;
}
}
COM: <s> goes to the game server for a new update of the boat information </s>
|
funcom_train/19322081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkMaxDegree(int value) {
if (value < ROLE_CARDINALITY_INFINITY) {
return false;
} else if (value == ROLE_CARDINALITY_INFINITY) {
if (maxDegree != ROLE_CARDINALITY_INFINITY)
return false;
} else {
if (maxDegree != ROLE_CARDINALITY_INFINITY && value > maxDegree)
return false;
}
return true;
}
COM: <s> returns a boolean to specify if given value is less or equal than </s>
|
funcom_train/16767977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIoSession(IoSession protocolSession) {
SocketAddress remote = protocolSession.getRemoteAddress();
if (remote instanceof InetSocketAddress) {
remoteAddress = ((InetSocketAddress) remote).getAddress().getHostAddress();
remotePort = ((InetSocketAddress) remote).getPort();
} else {
remoteAddress = remote.toString();
remotePort = -1;
}
remoteAddresses = new ArrayList<String>(1);
remoteAddresses.add(remoteAddress);
remoteAddresses = Collections.unmodifiableList(remoteAddresses);
this.ioSession = protocolSession;
}
COM: <s> setter for mina i o session connection </s>
|
funcom_train/7389107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getStringItem8() {
if (stringItem8 == null) {//GEN-END:|164-getter|0|164-preInit
// write pre-init user code here
stringItem8 = new StringItem("Ill/healthy:", creature.getTextIllness());//GEN-LINE:|164-getter|1|164-postInit
// write post-init user code here
}//GEN-BEGIN:|164-getter|2|
return stringItem8;
}
COM: <s> returns an initiliazed instance of string item8 component </s>
|
funcom_train/51344433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public String toString() {
/*
* Note: info reported here MUST be safe and MUST NOT require a
* lock!
*/
// return Long.toString(tx);
return "GlobalTxState{tx=" + tx + ",readOnly=" + readOnly
+ ",runState=" + runState + "}";
}
COM: <s> returns a string representation of the transaction state </s>
|
funcom_train/23234550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int updatePoints(Player player) {
MidhedavaPRuleProcessor rules = MidhedavaPRuleProcessor.get();
DeathmatchState deathmatchState = DeathmatchState.createFromQuestString(player.getQuest("deathmatch"));
rules.addHallOfFamePoints(player.getName(), "D", deathmatchState.getQuestLevel());
return rules.getHallOfFamePoints(player.getName(), "D");
}
COM: <s> updates the players points in the hall of fame for deathmatch </s>
|
funcom_train/9887005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setExperiment(AlgorithmSet algSet, Experiment experiment, int [] indices, boolean geneReduction) {
ScriptDataTransformer transformer = new ScriptDataTransformer(experiment, framework);
Experiment trimmedExperiment = transformer.getTrimmedExperiment(indices, geneReduction);
algSet.setExperiment(trimmedExperiment);
}
COM: <s> sets the experiment into the output nodes </s>
|
funcom_train/48144047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void recurse(double start, double end, int n) {
if(n==0)
return;
final double l_3=(end-start)/3.0;
eraseLine(start+l_3, end-l_3);
recurse(start, start+l_3, n-1);
recurse(end-l_3, end, n-1);
}
COM: <s> the recursive algorithm for cantor dust </s>
|
funcom_train/33265311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GadgetGraphics create(int x, int y, int width, int height) {
return new GadgetGraphics(awtGraphics.create(),
this.xOffset+x,
this.yOffset+y,
width,height,
gadget,paintingAll/*,damageList*/);
}
COM: <s> creates a new graphics object with the specified parameters based on the original </s>
|
funcom_train/36198232 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Enumeration listOptions() {
Vector newVector = new Vector(3);
newVector.addElement(new Option(
"\tSpecify list of attributes to process. First and last are valid\n"
+ "\tindexes. (default none)", "R", 1,
"-R <index1,index2-index4,...>"));
newVector
.addElement(new Option("\tInvert matching sense", "V", 0, "-V"));
newVector.addElement(new Option("\tDisallow internal periods", "P", 0,
"-P"));
return newVector.elements();
}
COM: <s> returns an enumeration describing the available options </s>
|
funcom_train/123798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(CharSequenceImpl that) {
if (that == null)
return false;
if (this.length != that.length)
return false;
final char[] thatData = that.data;
final int end = offset + length;
for (int i = offset, j = that.offset; i < end;) {
if (data[i++] != thatData[j++])
return false;
}
return true;
}
COM: <s> compares this character sequence against the specified </s>
|
funcom_train/8690556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Path createUnifiedSourcePath() {
Path p = path == null ? new Path(getProject()) : (Path) path.clone();
Vector s = createUnifiedSources();
Enumeration e = s.elements();
while (e.hasMoreElements()) {
p.add((FileSet) e.nextElement());
}
return p;
}
COM: <s> clone our path and add all explicitly specified file sets as </s>
|
funcom_train/3345374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean mkDir(String file) throws IOException {
FSEntry entry = getEntry(file);
if (entry != null) {
log.debug(file + "exists");
return false;
}
FSDirectory directory = getParentDirectoryEntry(file);
if (directory == null) {
return false;
}
// Ok, add the dir
entry = directory.addDirectory(getName(file));
return true;
}
COM: <s> make a directory </s>
|
funcom_train/49759065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object execute(ExecutionEvent event) throws ExecutionException {
//IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
//MessageDialog.openInformation(
// window.getShell(),
// "HPE Plug-in",
// "Hello, Eclipse world");
try {
HpeCmd hpecmd = new HpeCmd("HPE Command Line");
hpecmd.start();
} catch (Exception e) {
System.out.print(e.getMessage());
System.out.print(e.getLocalizedMessage());
}
return null;
}
COM: <s> the command has been executed so extract extract the needed information </s>
|
funcom_train/10679252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object allocateObject(Random r, int size) {
Object obj = new byte[size - ARRAY_HEADER_SIZE
- getCompositeObjectSize()];
if (_compositeObjectClass != null) {
try {
Constructor<?> c = _compositeObjectClass.getConstructors()[0];
obj = c.newInstance(this, obj, size);
} catch (Exception e) {
error(e);
}
}
return obj;
}
COM: <s> creates an object with the given size </s>
|
funcom_train/43199611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void relocateMembers() {
if (!members.isEmpty()
&& !relativeHouseholds.isEmpty()) {
Integer id = (Integer) relativeHouseholds
.get(Uniform.staticNextIntFromTo(0, relativeHouseholds.size()-1));
Household relativeHousehold = (Household) model.getHouseholdMap().get(id);
if (relativeHousehold != null
&& model.getHouseholdList().contains(relativeHousehold)) {
ArrayList<Person> temp = new ArrayList<Person>(members);
for (Person member : temp) {
relativeHousehold.addMember(member);
}
members.clear();
temp = null;
}
}
}
COM: <s> relocate children in the without adult members to a randomly chosen relative household </s>
|
funcom_train/31071729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void returnHandler(HandlerThread handler) {
LOG.debug("Returning handler to the pool.");
Vector pool = this.getClassPool(handler.getClass());
Vector active = this.getClassActive(handler.getClass());
if (active.remove(handler)) {
LOG.debug("It's OK, it was active so will put it into the pool.");
pool.add(handler);
}
}
COM: <s> returns the handler into the pool </s>
|
funcom_train/40841113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int countMapping(String table) {
try {
SQLiteDatabase db = this.getSqliteDb(true);
int total = db.rawQuery("SELECT * FROM " + table, null).getCount();
db.close();
//Log.i("countMapping", "Table," + table + ": " + total);
return total;
} catch (Exception e) {
e.printStackTrace();
}
return 0;
}
COM: <s> count total amount of specific table </s>
|
funcom_train/1059649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NotificationChain basicSetSemanticParent(DiagramElement newSemanticParent, NotificationChain msgs) {
DiagramElement oldSemanticParent = semanticParent;
semanticParent = newSemanticParent;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_ELEMENT__SEMANTIC_PARENT, oldSemanticParent, newSemanticParent);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
COM: <s> begin user doc </s>
|
funcom_train/9101124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getData(boolean refresh, String encoding) throws IOException {
Reader is = this.getReader(refresh, encoding);
StringWriter bos = new StringWriter();
// now process the Reader...
char chars[] = new char[200];
int readCount = 0;
while ((readCount = is.read(chars)) > 0) {
bos.write(chars, 0, readCount);
}
is.close();
return bos.toString();
}
COM: <s> open this url and read its data then return it as a string </s>
|
funcom_train/12768337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadPreferences() {
// // hide the routes if the preferences say so
// if (!TagSEAPreferences.isShowRoutes()) {
// toggleRoutesComposite.toggle();
// }
// load the preferred column widths
Table table = waypointsTableViewer.getTable();
for (int i = 0; i < table.getColumnCount(); i++) {
table.getColumn(i).setWidth(TagSEAPreferences.getColumnWidth(i));
}
}
COM: <s> loads the preferences checks if the routes should be hidden </s>
|
funcom_train/41556854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Matrix B) {
double[][] X = A;
boolean result = true;
for (int i = 0; i < m; i++) {
for (int j = 0; j < n; j++) {
result &= (X[i][j] == B.get(i, j));
}
}
return result;
}
COM: <s> compare two matrices </s>
|
funcom_train/18338828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cacheClearer(Instance instanceToDelete){
Ontology dummyHackByHolger = wsmoFactory.createOntology(wsmoFactory.createIRI("urn://unique/"+System.currentTimeMillis()));
try {
dummyHackByHolger.addInstance(instanceToDelete);
ClearTopEntity.clearTopEntity(dummyHackByHolger);
} catch (SynchronisationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InvalidModelException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
COM: <s> helper method for deletions </s>
|
funcom_train/8018189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resetDirtyRect(float eventX, float eventY) {
// The lastTouchX and lastTouchY were set when the ACTION_DOWN
// motion event occurred.
dirtyRect.left = Math.min(lastTouchX, eventX);
dirtyRect.right = Math.max(lastTouchX, eventX);
dirtyRect.top = Math.min(lastTouchY, eventY);
dirtyRect.bottom = Math.max(lastTouchY, eventY);
}
COM: <s> resets the dirty region when the motion event occurs </s>
|
funcom_train/50067578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isProtectedAccessible(Symbol sym, ClassSymbol c, Type site) {
while (c != null
&& !(c.isSubClass(sym.owner) && (c.flags() & INTERFACE) == 0 && ((sym
.flags() & STATIC) != 0
|| sym.kind == TYP || site.tsym.isSubClass(c))))
c = c.owner.enclClass();
return c != null;
}
COM: <s> is given protected symbol accessible if it is selected from given site </s>
|
funcom_train/25121041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BooleanMatrix booleanBasis(int N){
if(N <= basis.V(basis.length()-1).intValue()){
throw new LPError("N must be greater than the max value of the basis");
}
BooleanMatrix result = BooleanMatrix.create(N,1).zeros();
for(int i=0; i<basis.length(); i++){
result.assign(true,basis.V(i).intValue());
}
return result;
}
COM: <s> n should be no less than the max value of basis </s>
|
funcom_train/3605554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateExtensionColors() {
Set keySet = colorMap.getKeySet();
for(Iterator it = keySet.iterator(); it.hasNext();) {
String crtKey = (String)it.next();
RGB newRgb = FileExtColorList.getInstance().getRgbForExtension(crtKey);
RGB storedRgb = colorMap.getRGB(crtKey);
if(newRgb != null && !newRgb.equals(storedRgb)) {
colorMap.put(crtKey, newRgb);
}
}
}
COM: <s> refreshes the extension colors based on updated values from the file extension </s>
|
funcom_train/9867658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFailedValidator(IExtractor extractor, ValidatorStatus status) {
if (status.isSuccessful()) {
return;
}
if (this.extractorStatusMap.containsKey(extractor)) {
List<ValidatorStatus> statusList = this.extractorStatusMap
.get(extractor);
statusList.add(status);
} else {
List<ValidatorStatus> statusList = new LinkedList<ValidatorStatus>();
statusList.add(status);
this.extractorStatusMap.put(extractor, statusList);
}
}
COM: <s> adds a new code validator status code to the list of failing </s>
|
funcom_train/1104583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void hideTabs() {
if (getPageCount() <= 1) {
setPageText(0, ""); //$NON-NLS-1$
if (getContainer() instanceof CTabFolder) {
((CTabFolder)getContainer()).setTabHeight(1);
Point point = getContainer().getSize();
getContainer().setSize(point.x, point.y + 6);
}
}
}
COM: <s> if there is just one page in the multi page editor part </s>
|
funcom_train/21105288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected MJButton getBtCustRepExecuteReport() {
if (btCustRepExecuteReport == null) {
btCustRepExecuteReport = new MJButton();
btCustRepExecuteReport.setPreferredSize(new Dimension(100, 20));
btCustRepExecuteReport.setText("aF9 Exec");
btCustRepExecuteReport.setMnemonic(KeyEvent.VK_F9);
}
return btCustRepExecuteReport;
}
COM: <s> this method initializes bt cust rep execute report </s>
|
funcom_train/10238427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVRforCADappMode(int appMode){
this.removeAll();
if(appMode==VRforCAD.MODE_CAD)setPanels(cad);
else if(appMode==VRforCAD.MODE_FREEFORM)setPanels(freeform);
else if(appMode==VRforCAD.MODE_ROBOTICS)setPanels(robotics);
else if(appMode==VRforCAD.MODE_MEDICINE)setPanels(medicine);
else if(appMode==VRforCAD.MODE_VISUALIZATION)setPanels(visualization);
}
COM: <s> this method sets the current vrfor cad application mode </s>
|
funcom_train/21036016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void copy(InputStream inStream, OutputStream outStream, int bufSize) throws IOException {
try {
byte[] buffer = new byte[bufSize];
int count = inStream.read(buffer);
while (count > -1) {
outStream.write(buffer, 0, count);
count = inStream.read(buffer);
}
} finally {
try {
inStream.close();
outStream.close();
} catch (Exception ignorable) {
}
}
}
COM: <s> copies all data from the iniput stream to the output stream using a </s>
|
funcom_train/44185322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void prepare(CrawlURI curi) {
// set schedulingDirective
curi.setSchedulingDirective(getSchedulingDirective(curi));
// set canonicalized version
curi.setCanonicalString(canonicalize(curi));
// set queue key
curi.setClassKey(getClassKey(curi));
// set cost
curi.setHolderCost(getCost(curi));
// set URI precedence
getUriPrecedencePolicy().uriScheduled(curi);
}
COM: <s> apply all configured policies to crawl uri </s>
|
funcom_train/39184068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setColumnValue1(int column, boolean greater, double number){
crit2CheckBox.setSelected(true);
crit2ComboBox1.setSelectedIndex(column);
crit2ComboBox2.setSelectedIndex(greater?0:1);
crit2TextField.setText(String.valueOf(number));
crit2ComboBox1.setEnabled(true);
crit2ComboBox2.setEnabled(true);
crit2TextField.setEnabled(true);
crit2Label.setEnabled(true);
}
COM: <s> changes the settings for the first column value criteria </s>
|
funcom_train/20898188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toStringAbbrev() {
StringBuffer sbuf = new StringBuffer();
sbuf.append(queryProtID).append(":")
.append(queryLength).append(":")
.append(hitProtID).append(":")
.append(hitLength);
return sbuf.toString();
}
COM: <s> the code to string abbrev code method returns a brief textual </s>
|
funcom_train/47514334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ParallelColtFloatMatrix mult(Matrix B) {
// note could use cern.colt.matrix.linalg.Algebral.mult(A,B) instead
return new ParallelColtFloatMatrix(matrix.zMult(
((ParallelColtFloatMatrix)B).matrix, null, 1, 0, false, false));
}
COM: <s> required b is a parallel colt matrix </s>
|
funcom_train/31894823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BufferedImage getBackground() {
if (backgroundImageArray != null) {
BufferedImage backImage = new BufferedImage(
backgroundImageDim.width, backgroundImageDim.height,
BufferedImage.TYPE_INT_RGB);
backImage.setRGB(0, 0, backImage.getWidth(), backImage.getHeight(),
backgroundImageArray, 0, backImage.getWidth());
return backImage;
} else {
return null;
}
}
COM: <s> returns the background image of the map </s>
|
funcom_train/23022023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean getBooleanAttribute(Attributes attrs, String attrName) throws ParseException {
Boolean result = null;
String value = attrs.getValue("", attrName);
try {
result = parseBooleanValue(value);
}
catch (ParseException ex) {
ParseException pe = new ParseException(CoreErrorDomain.ERR.invalidAttributeValue);
pe.setInternalReason("Invalid value for " + attrName + " attribute: " + value);
throw pe;
}
return result;
}
COM: <s> utility method to return the value of an xsd boolean attribute </s>
|
funcom_train/50332170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public AcelaTrafficController instance() {
// Bob C: This seems wrong
if (self == null) {
if (log.isDebugEnabled()) log.debug("creating a new AcelaTrafficController object");
// Bob C: and the following line won't work in a static.
// self = this;
// So, ..., create a new one.
self = new AcelaTrafficController();
}
return self;
}
COM: <s> static function returning the acela traffic controller instance to use </s>
|