__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
|---|---|---|
funcom_train/46689622
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public ResultTestSuite createInitialResultTestSuite(int maxDepth) {
ResultTestSuite initialTestSuite = SuggestionSpaceFactory.eINSTANCE.createResultTestSuite();
initialTestSuite.setMaxDepth(maxDepth);
initialTestSuite.setDepth(0);
for (MMTest initTest : MMTest.getExecutionLog()) {
initialTestSuite.getResults().add(createTestResultFromTest(initTest));
}
return initialTestSuite;
}
COM: <s> creates a new </s>
|
funcom_train/12652024
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testKind() {
int code = generator.nextInt();
// Ensure that the holder is empty
Procedure procedure = new Procedure();
assert procedure.getKind() == null : "Kind not null " + procedure.getKind();
// Test the set and get
procedure.setKind(new CharacteristicCode(code));
assert new CharacteristicCode(code).equals(procedure.getKind())
: "Characteristic " + code + " not contained in procedure " + procedure;
}
COM: <s> test kind field </s>
|
funcom_train/29282083
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private boolean isValidRecordID(int recordID) {
try {
recordStore.getRecordSize(recordID);
return true;
} catch (RecordStoreNotOpenException e) {
throw new RuntimeException("Record store not open: " + e);
} catch (InvalidRecordIDException e) {
return false;
} catch (RecordStoreException e) {
return false;
}
}
COM: <s> checks whether the given record id is a valid record id </s>
|
funcom_train/18545954
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void createAllocLayerMenus(MenuGantt parent){
Iterator<Layer> i = this.htLayers.values().iterator();
while(i.hasNext()){
Layer ay = i.next();
MenuCheckItemGantt subCheck = new MenuCheckItemGantt(ay.getName());
parent.add(subCheck);
}
}
COM: <s> in case of layer allocation target create new sub menus item </s>
|
funcom_train/13198011
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private AttributeType extractAttType(PhysicalAttribute physAtt) {
if (AttributeDataType.doubleType.equals(physAtt.getDataType())) {
return AttributeType.numerical;
}
if (AttributeDataType.integerType.equals(physAtt.getDataType())) {
return AttributeType.numerical;
}
if (AttributeDataType.stringType.equals(physAtt.getDataType())) {
return AttributeType.categorical;
}
//default is not specified
return AttributeType.notSpecified;
}
COM: <s> converts attribute data type to attribute type </s>
|
funcom_train/7660243
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testFairEmptyFull() {
SynchronousQueue q = new SynchronousQueue(true);
assertTrue(q.isEmpty());
assertEquals(0, q.size());
assertEquals(0, q.remainingCapacity());
assertFalse(q.offer(zero));
}
COM: <s> a fair synchronous queue is both empty and full </s>
|
funcom_train/44519853
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void deliver( Message message ) throws MessagingException {
// message = getWriteableMessage( message );
try {
transport.sendMessage( message, new Address[] { new InternetAddress( localUser + "@" + domain ) } );
} catch( MessagingException me) {
logger.error("Could not deliver message through SMTP " + me.getMessage());
throw me;
}
}
COM: <s> deliver the message through smtp </s>
|
funcom_train/39101516
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void dataModelChangeValue(DataModelEvent event) {
if (event.getSource() == model.getValueArray()) {
setVector(new SortedVector((Object[]) model.getValueArray().getArray()));
// calls fireListDataChanged() already
} else {
fireListDataChanged();
}
}
COM: <s> if the assotiated limit int model changes its value array </s>
|
funcom_train/46718636
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setValue(CtxObjectKeys key, String value) throws EpubFormatException {
if (activeKeys.contains(key)) {
if (value != null && value.length()>0) {
kevMatrix.put(key,value);
}
else {
kevMatrix.remove(key);
}
}
else {
throw new EpubFormatException("BibliographicInfo key "+key.toString()+" not allowed for format "+format.toString());
}
// push data to DC:identifier element
pushDCIdentifier();
}
COM: <s> set the value for a specific key </s>
|
funcom_train/42937917
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void preInitialize() {
HorizontalPanel titlePanel = new HorizontalPanel();
titlePanel.setWidth("600px");
titlePanel.setSpacing(20);
titlePanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);
panelSecondaryTitle = new Label("", true);
titlePanel.add(panelSecondaryTitle);
helperImage = new Image();
helperImage.setSize("270px", "170px");
helperImage.setVisible(false);
titlePanel.add(helperImage);
titlePanel.setCellHorizontalAlignment(helperImage, HasHorizontalAlignment.ALIGN_RIGHT);
super.add(titlePanel);
}
COM: <s> performs initialization that should precede the implementing class initialization </s>
|
funcom_train/3576623
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void comoServidor(String nick, int puerto, String nivelPermisos) throws Exception {
resetearAplicacion();
getDialogoConexion().deshabilita();
getGestorChat().anadirTexto(GestorIdiomasFtol.getInstance().getString(FtolLangConstants.WAR_CREANDO_SERVER) + " " + puerto + " ...",GestorPanelChat.ATT_SISTEMA);
getGestorComms().iniciarServidor(nick,puerto,nivelPermisos);
}
COM: <s> inicia el trabajo como servidor </s>
|
funcom_train/42475746
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private String retagString(String text) {
if (text != null) {
Pattern p = Pattern.compile("\\<\\;");
Matcher m = p.matcher(text);
String temp = m.replaceAll("<");
p = Pattern.compile("\\>\\;");
m = p.matcher(temp);
return m.replaceAll("<");
}
return "";
}
COM: <s> restores xml tags </s>
|
funcom_train/32069953
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean removeDocumentGroup(DocumentGroup documentGroup) {
boolean removedOK = getDocumentGroups().remove(documentGroup);
if (removedOK) {
documentGroup.setParentGroup(null);
} else {
if (logger.isWarnEnabled()) {
logger.warn("remove returned false");
}
}
return removedOK;
}
COM: <s> remove the passed document group from the parent group collection and unset </s>
|
funcom_train/20025161
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void enableDisableLogger() {
IPreferenceStore preferencStore = Activator.getDefault().getPreferenceStore();
boolean logJME = preferencStore.getBoolean(Preferences.LOG_JME);
if (logJME)
Logger.getLogger("").setLevel(Level.INFO); //$NON-NLS-1$
else
Logger.getLogger("").setLevel(Level.OFF); //$NON-NLS-1$
}
COM: <s> enable or disable the logging system in j me </s>
|
funcom_train/49319499
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void print() throws PrinterException {
int index = _tabbedPane.getSelectedIndex();
if (index != -1) {
PrintUtil printUtil = new PrintUtil(_chartPanel[index]);
printUtil.setUseBgThread(false); // otherwise get ConcurrentModificationException
printUtil.print();
}
}
COM: <s> display a dialog for printing the chart </s>
|
funcom_train/16677179
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int compare(String source, String target) {
if (source == null) {
return 1;
}
if (target == null) {
return -1;
}
long val1 = 0;
long val2 = 0;
try {
val1 = Long.parseLong(source);
}
catch (NumberFormatException e) {
return 1;
}
try {
val2 = Long.parseLong(target);
}
catch (NumberFormatException e) {
return -1;
}
if (val1 < val2) {
return -1;
}
else if (val1 == val2) {
return 0;
}
else {
return 1;
}
}
COM: <s> first the given strings are check for code null code </s>
|
funcom_train/39907940
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void printLineInfo(){
String leftStatus, rightStatus;
if(left.onLine()) leftStatus="on";
else leftStatus="off";
if(right.onLine()) rightStatus="on";
else rightStatus="off";
LCD.clear();
LCD.drawString("l: "+leftStatus, 0, 3);
LCD.drawString("r: "+rightStatus, 0, 4);
LCD.refresh();
}
COM: <s> prints out on or off depending if the light </s>
|
funcom_train/49461183
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Long getLastInsertedId(String tableName) throws Exception {
if (StringHelper.nullify(tableName) == null)
throw new IllegalArgumentException("The table name cannot be null");
DbProbeStatus dps = lastIds.get(jdbcUrl+"#"+tableName);
if(dps == null)
return null;
return dps.lastId;
}
COM: <s> return the last inserted id from the given tablename for the probe </s>
|
funcom_train/11348941
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public ComponentInstance create() throws UnacceptableConfiguration, MissingHandlerException, ConfigurationException {
start();
if (m_pojo != null) {
Dictionary dict = new Properties();
dict.put("instance.object", m_pojo);
return createInstance(dict);
} else {
return createInstance();
}
}
COM: <s> starts the component type and creates the singleton </s>
|
funcom_train/17202113
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void removePhisThatDominateAllDefs(BitVector needsPhi, IR ir, BitVector defs) {
for (int i = 0; i < needsPhi.length(); i++) {
if (!needsPhi.get(i)) {
continue;
}
if (ir.HIRInfo.dominatorTree.dominates(i, defs)) {
needsPhi.clear(i);
}
}
}
COM: <s> if node n dominates all defs of a register r then n does </s>
|
funcom_train/19052499
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setEditIndex(ViewablePhoto photo) {
Component[] components = getComponents();
int size = components.length;
ArrayList selectedPhotos = new ArrayList();
for (int i = 0; i < size; i++) {
ThumbnailWidget thumb = (ThumbnailWidget) components[i];
String id = thumb.getPhoto().getPhotoID();
if (id.compareTo(photo.getPhotoID()) == 0)
editIndex = i;
}
}
COM: <s> this method searches for the given photo in the pane and sets its </s>
|
funcom_train/32304808
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String toString() {
StringBuffer sb = new StringBuffer(dst.toString());
sb.append(" = POPER " + LQop.toString(opcode) + "(");
for (int i=0; i<operands.length; i++) {
sb.append(operands[i].toString());
if (i<operands.length-1)
sb.append(", ");
}
sb.append(')');
return sb.toString();
}
COM: <s> returns a human readable representation of this quad </s>
|
funcom_train/38318873
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private boolean needsMerge () {
if (_overwrite || !_destination.exists()) {
return true;
}
long destinationModified = _destination.lastModified();
long lastModified = getLastestModifiedSourceFileTimestamp();
boolean needsMerge = lastModified > destinationModified;
if (_verbose) {
if (needsMerge) {
log("File " + _destination.getAbsolutePath() + " needs to be recreated.");
} else {
log("File " + _destination.getAbsolutePath() + " is up to date.");
}
}
return needsMerge;
}
COM: <s> checks if the destination file needs to be generated </s>
|
funcom_train/16758957
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void performAction(InputActionEvent evt) {
node.accelerate(evt.getTime());
Vector3f loc = node.getLocalTranslation();
loc.addLocal(node.getLocalRotation().getRotationColumn(2, tempVa)
.multLocal(node.getVelocity() * evt.getTime()));
node.setLocalTranslation(loc);
}
COM: <s> the action calls the vehicles accelerate command which adjusts its velocity </s>
|
funcom_train/17202404
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean isSingleSuccessor(SortedGraphNode currentNode, SortedGraphNode nextNode) {
// check that next node has only 1 predecessor
if (!nextNode.hasOneIn()) return false;
// now check that the predecessor is current node
Enumeration<? extends SortedGraphNode> inEnum = nextNode.getInNodes();
return inEnum.nextElement() == currentNode;
}
COM: <s> this method checks to see if the second parameter has a single </s>
|
funcom_train/19372151
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testReferentialIntegrity() {
try {
this.contactManager.delete(this.userPopulator.getContact1().getKey());
fail("Referential integrity not enforced.");
} catch (InUseException ignore) {
} catch( Exception e) {
fail(e.getMessage());
}
}
COM: <s> verify referential integrity constraints by attempting to delete the code contact code </s>
|
funcom_train/42211896
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void useMemory(Pointer m, int offset) {
// Invoking size() here is important when this method is invoked
// from the ctor, to ensure fields are properly scanned and allocated
try {
this.memory = m.share(offset, size());
this.array = null;
}
catch(IndexOutOfBoundsException e) {
throw new IllegalArgumentException("Structure exceeds provided memory bounds");
}
}
COM: <s> set the memory used by this structure </s>
|
funcom_train/17544356
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void attachEdgeTargetAnchor(String edge, String oldTargetPin, String targetPin) {
/** I added the first part of this if statement - it is needed for removing widgets. */
if (targetPin == null) {
((ConnectionWidget) findWidget(edge)).setTargetAnchor(null);
} else {
((ConnectionWidget) findWidget(edge)).setTargetAnchor(getPinAnchor(targetPin));
}
}
COM: <s> attaches an anchor of a target pin an edge </s>
|
funcom_train/24474243
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void connect(Port fromPort, Port toPort) {
try {
// check the validity of the connection.
Edge edge = this.graph.addEdge(fromPort, toPort);
selectEdge(edge);
} catch (GraphException e) {
logger.caught(e);
this.engine.getErrorWindow().warning(e.getMessage());
} catch (RuntimeException e) {
logger.caught(e);
this.engine.getErrorWindow().error(ErrorMessages.UNEXPECTED_ERROR);
}
}
COM: <s> connects two ports specified </s>
|
funcom_train/29925160
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void loadMailContentFilterSettings() throws IOException{
// Open and read properties file
File inputFile = new File(mailContentFilterIniFile);
FileInputStream in = new FileInputStream(inputFile);
Properties p = new Properties();
p.load(in);
in.close();
mailContentFilterProps = p;
}
COM: <s> loads the settings for </s>
|
funcom_train/44458261
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void addServlet(String servletClassName, String virtualPath) throws ServletException{
LocalServletHandler servlet = new LocalServletHandler(servletClassName);
if (! virtualPath.endsWith("/")) {
virtualPath += '/';
}
_servlets.put(virtualPath, servlet);
}
COM: <s> adds a new servlet </s>
|
funcom_train/5380258
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void copyToClipboard() {
if (clipboard != null)
clipboard.dispose();
StringBuffer statusBuffer = new StringBuffer();
populateCopyBuffer(status, statusBuffer, 0);
clipboard = new Clipboard(list.getDisplay());
clipboard.setContents(new Object[] { statusBuffer.toString() },
new Transfer[] { TextTransfer.getInstance() });
}
COM: <s> copy the contents of the statuses to the clipboard </s>
|
funcom_train/26169283
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Object getValueAt(Object node, int column) {
if (! (node instanceof HttpUrl)) return null;
HttpUrl url = (HttpUrl) node;
if (column == 0) return url;
return ((ColumnDataModel) _columns.get(column-1)).getValue(url);
}
COM: <s> returns the value of the particular column </s>
|
funcom_train/19388917
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected HashMap getCompletionInfoMappings() {
return m_mappings;
}//}}}
//}}}
//{{{ Private static members
private static final int READ_SIZE = 5120;
private static final int WRITE_SIZE = 5120;
private static final int IO_BUFFER_SIZE = 32768;
//}}}
//{{{ Private members
//{{{ Flags
COM: <s> gets the namespace uri to completion info mappings for this document </s>
|
funcom_train/1589602
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public DateTime toDateTime(ReadableInstant baseInstant) {
Chronology chrono = DateTimeUtils.getInstantChronology(baseInstant);
long instantMillis = DateTimeUtils.getInstantMillis(baseInstant);
long resolved = chrono.set(this, instantMillis);
return new DateTime(resolved, chrono);
}
COM: <s> resolves this partial against another complete instant to create a new </s>
|
funcom_train/41975837
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String checkRequest() throws DataBaseException{
FacesContext context = FacesContext.getCurrentInstance();
int groupid = Integer.parseInt(context.getExternalContext().getRequestParameterMap().get("groupId"));
for(GroupDecorater groupDec:this.groupList){
if(groupDec.getId()==groupid){
this.selectedGroup = groupDec;
this.requestList = groupDec.getApplyingUsers();
break;
}
}
return "checkRequest";
}
COM: <s> method to respond to check requester list command </s>
|
funcom_train/32138198
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void run() {
LogManager.logDebug("Start run:", this);
continueRun = true;
if(isValid()) {
// String[] script = buildScript();
// String[] envVars = getEnvironmentVariables();
if(continueRun)
{
createClientSession();
}
}
LogManager.logDebug("End run:", this);
}
COM: <s> the main body of this event </s>
|
funcom_train/3749196
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public PicoContainer getGlobalContainer() {
if (logger.isDebugEnabled()) {
logger.debug("getGlobalContainer() - start");
}
assert (globalContainer != null);
if (logger.isDebugEnabled()) {
logger.debug("getGlobalContainer() - end - return value = "
+ globalContainer);
}
return globalContainer;
}
COM: <s> get the root pico container and initialize it if it was not already </s>
|
funcom_train/37035286
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void createMBeans() {
try {
MBeanFactory factory = new MBeanFactory();
createMBeans(factory);
createMBeans(ServerFactory.getServer());
} catch (MBeanException t) {
Exception e = t.getTargetException();
if (e == null)
e = t;
log("createMBeans: MBeanException", e);
} catch (Throwable t) {
log("createMBeans: Throwable", t);
}
}
COM: <s> create the mbeans that correspond to every existing node of our tree </s>
|
funcom_train/12804057
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setPropertyValue(String aPropertyName, Object argument) {
loggingCategory.debug("Property: " + aPropertyName);
boolean primitiveArgument = false;
//set up the setter name based on the field name.
StringBuffer setter = new StringBuffer("set");
setter.append(aPropertyName.substring(0, 1).toUpperCase());
setter.append(aPropertyName.substring(1));
loggingCategory.debug("Setter: " + setter);
performWith(setter.toString(), argument);
}
COM: <s> set the value of the bean property </s>
|
funcom_train/34068504
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int getRacePosition(Contestant c) {
List<Contestant> positions = getRacePositions();
for (int i = 0; i < positions.size(); i++) {
if (positions.get(i) == c) {
// Race position is list index plus one
return i + 1;
}
}
throw new IllegalArgumentException("Contestant is not in session: " + c);
}
COM: <s> returns the race position of the specified contestant </s>
|
funcom_train/51572717
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean canHoldMatch(File file, File baseDir) {
boolean canHold = file.isDirectory();
if (canHold) {
String path = relativePath(file, baseDir);
canHold = matchInternal(path, segments, true, true);
}
return canHold;
}
COM: <s> whether the path of code file code relative to code base dir code </s>
|
funcom_train/1842905
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private SimulationStudy getNextSimulationStudy() {
for (int i=0; i < studies.size(); i++) {
SimulationStudy sst = (SimulationStudy) studies.get(i);
if ( ! sst.hasFinished() && sst != currentStudy) {
return sst;
}
}
// no unprocessed study found
return null;
}
COM: <s> find a simulation study that has not been processed yet </s>
|
funcom_train/24085813
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public TargetValues transformValues(Values values) {
TargetValues result = new TargetValues();
for (Value v : values.getList()) {
if (v instanceof INumericValue) {
result.add(transform((INumericValue) v));
} else {
result.add(transform((IOrdinalValue) v));
}
}
return result;
}
COM: <s> transforms all the values in the list of the provided </s>
|
funcom_train/36204186
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void getAlreadyDefinedRendering(TerminologyObject element, StringBuffer sb, int depth) {
int margin = 30 + depth * 20;
sb.append("<div id='" + element.getName() + "' " +
"class='alreadyDefined' style='margin-left: " + margin + "px; display: block'; >");
sb.append(getLabel(element) + " is already defined!");
sb.append("</div>");
}
COM: <s> assembles an own div for indicating questions questionnaires that have </s>
|
funcom_train/18879063
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private ProjCoordinate projectRadians(double x, double y, ProjCoordinate dst ) {
project(x, y, dst);
if (unit == Units.DEGREES) {
// convert radians to DD
dst.x *= RTD;
dst.y *= RTD;
}
else {
// assume result is in metres
dst.x = totalScale * dst.x + totalFalseEasting;
dst.y = totalScale * dst.y + totalFalseNorthing;
}
return dst;
}
COM: <s> transform a geographic point in radians </s>
|
funcom_train/19717827
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void screenToGraphPoint(JPowerGraphPoint point, Point2D graphPoint) {
graphPoint.setLocation(point.x - getSize().x / 2, point.y - getSize().y / 2);
if (m_lens != null)
m_lens.undoLens(this, graphPoint);
}
COM: <s> converts a given screen point into a point on the graph </s>
|
funcom_train/24537556
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void setDefaultTitle(IProxy componentProxy, EObject jtab, IExpression expression) {
if (componentProxy != null) {
getJTabAdapter(jtab).clearError(sfTitle);
BeanAwtUtilities.invoke_JTabbedPane_setDefaultTitle(getProxy(), componentProxy, expression);
revalidateBeanProxy();
}
}
COM: <s> we have a default title i </s>
|
funcom_train/3463207
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Object clone() {
EnhancedLinkedList clone = null;
try {
clone = (EnhancedLinkedList)super.clone();
} catch (CloneNotSupportedException e) {
throw new InternalError();
}
// Put clone into "virgin" state
clone.header = newEntry(null, null, null);
clone.header.next = clone.header.previous = clone.header;
clone.size = 0;
clone.modCount = 0;
// Initialize clone with our elements
for (Entry e = header.next; e != header; e = e.next)
clone.add(e.element);
return clone;
}
COM: <s> returns a shallow copy of this tt enhanced linked list tt </s>
|
funcom_train/43449098
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Dimension getPreferredSize() {
if (this.image != null) {
int width = this.image.getWidth(this);
if (width == 0) {
width = 20;
System.err.println(
"Detected size 0 for image width! Maybe there is an error!");
}
int height = this.image.getHeight(this);
if (height == 0) {
height = 20;
System.err.println(
"Detected size 0 for image height! Maybe there is an error!");
}
return new Dimension(width + 4, height + 4);
} else {
return new Dimension(20, 20);
}
}
COM: <s> p returns preferred size for this shadow object </s>
|
funcom_train/37841237
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void changeFunction(int index, Function f) {
functions.set(index, f);
ListDataEvent foo = new ListDataEvent(functions, ListDataEvent.CONTENTS_CHANGED, index, index);
Iterator i = functionListeners.iterator();
while (i.hasNext()) {
((ListDataListener) i.next()).contentsChanged(foo);
}
dirty = true;
fireFunctionSetChanged();
}
COM: <s> change function at given position </s>
|
funcom_train/5395751
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testSetSerializeTime() {
System.out.println("setSerializeTime");
long time = 0L;
GZipProcess instance = null;
instance.setSerializeTime(time);
// 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 serialize time method of class org </s>
|
funcom_train/24086092
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void initWeights() {
if (this.isWeightsInitialized()) {
log.debug("Weights already initialized");
} else {
log.debug("Initializing weights for the first time");
root.setWeight(1.0);
root.initWeights();
this.setWeightsInitialized(true);
}
}
COM: <s> checks if weights have been initialised </s>
|
funcom_train/28424694
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Object put( int x, int y, Object o ) {
Object old_object = get( x, y );
Point p = new Point( x, y );
if ( o != null && o.equals( getDefaultValue() ) )
remove( p );
else if ( o == null && getDefaultValue() == null )
remove( p );
else
table.put( p, o );
return old_object;
}
COM: <s> store an object at a given location in the table </s>
|
funcom_train/32636031
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private WorkUnit findWorkUnit(String workUnitID) throws InvalidTaskException {
WorkUnit wu = TaskFactory.createWorkUnit(workUnitID);
WorkUnit[] matches = wu.find();
// If the work unit was not found, throw an exception.
if (matches.length == 0)
throw new InvalidTaskException("Work unit " + workUnitID + " is not a known work unit.");
return matches[0];
}
COM: <s> searches the database for a work unit with the given id </s>
|
funcom_train/41685054
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void processPrefix(String prefix, String uri) {
if (uri != null && prefix != null) {
this.ontModel.setNsPrefix(prefix, uri);
MeaModel.standardQueryString += "PREFIX " + prefix + ": <" + uri + "> \n";
}
}
COM: <s> adds a new prefix uri set to the standard prefix string </s>
|
funcom_train/39533539
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Color pickColor(Point point){
Color color=new Color(255, 255, 255);
if(point!=null){
//getting the offscreen image of the canvas
BufferedImage image=getScrollPane().getSVGCanvas().getOffscreen();
int pos=image.getRGB(point.x, point.y);
ColorModel model=image.getColorModel();
if(pos!=0){
color=new Color(model.getRed(pos), model.getGreen(pos), model.getBlue(pos));
}
}
return color;
}
COM: <s> picks the color at the given point on a canvas </s>
|
funcom_train/812015
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void addQueryFilePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PcoreFilterType_queryFile_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PcoreFilterType_queryFile_feature", "_UI_PcoreFilterType_type"),
PcorefilterPackage.Literals.PCORE_FILTER_TYPE__QUERY_FILE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the query file feature </s>
|
funcom_train/43384176
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void loadReportDataSources(List reportDataSources) throws Exception{
ReportDataSource rds = null;
for (Iterator i = reportDataSources.iterator();i.hasNext();) {
rds = (ReportDataSource)i.next();
logger.info("loadReportDataSources() about to load datasource " +
rds.getDescription() + " into database");
createAndStoreReportDataSource(rds);
}
}
COM: <s> create and store an array list of report data sources </s>
|
funcom_train/18228560
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public FileObject findResource(String name) {
if (name.length () == 0) {
return root;
}
StringTokenizer st = new StringTokenizer(name, "/");
FileObject fo = root;
while (fo != null && st.hasMoreTokens()) {
String next = st.nextToken();
fo = fo.getFileObject(next, null); // XXX ??
}
return fo;
}
COM: <s> finds a file given its full resource path </s>
|
funcom_train/22232512
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void analyzeProjection(Transform3D p, double xMax) {
if (viewCache.projectionPolicy == View.PARALLEL_PROJECTION)
System.err.println("PARALLEL_PROJECTION =");
else
System.err.println("PERSPECTIVE_PROJECTION =");
System.err.println(p);
double projectionPlaneZ = ((p.mat[0] * xMax + p.mat[3] - p.mat[15]) /
(p.mat[14] - p.mat[2]));
System.err.println("projection plane at z = " + projectionPlaneZ);
}
COM: <s> debugging routine to analyze the projection matrix </s>
|
funcom_train/19716995
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Image getImage(Object element) {
// if (element instanceof OntologyFilterEntry) {
// OntologyFilterEntry proposal = (OntologyFilterEntry) element;
// if (proposal.entity instanceof OWLClass)
// return Images.get(Images.CLAZZ);
// else if (proposal.entity instanceof OWLIndividual)
// return Images.get(Images.INDIVIDUAL);
// else if (proposal.entity instanceof OWLDataProperty)
// return Images.get(Images.DATA_PROPERTY);
// else if (proposal.entity instanceof OWLObjectProperty)
// return Images.get(Images.OBJECT_PROPERTY);
// }
return null;
}
COM: <s> uses default ne on toolkit icons </s>
|
funcom_train/31040689
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private TapestryComponentModel resolveComponent(String path) {
TapestryComponentModel result = null;
IStorage[] storages = null;
if (path.endsWith(".jwc")) {
storages = lookup.findComponent(path);
} else if (path.endsWith(".page")) {
storages = lookup.findPage(path);
}
if (storages != null && storages.length == 1) {
result = (TapestryComponentModel) mgr.getReadOnlyModel(storages[0]);
}
return result;
}
COM: <s> method resolve component </s>
|
funcom_train/44596803
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void eatThroughBlock(boolean leftBraceRead) {
int currentDepth = 0;
if (leftBraceRead) currentDepth = 1;
while (!atEnd()) {
if (consume(ITerminalSymbols.TokenNameRBRACE)) {
--currentDepth;
if (currentDepth <= 0) return;
} else if (consume(ITerminalSymbols.TokenNameLBRACE)) {
++currentDepth;
} else {
next();
}
}
}
COM: <s> eats tokens until a balanced pair of braces has been read </s>
|
funcom_train/7266328
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public BigInteger readDHTSize() throws IOException {
int length = readUnsignedByte();
if (length > KUID.LENGTH) { // can't be more than 2**160 bit
throw new IOException("Illegal length: " + length);
}
byte[] num = readBytes(length);
return new BigInteger(1 /* unsigned */, num);
}
COM: <s> reads a big integer from the input stream </s>
|
funcom_train/39172496
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private String getString(gate.Annotation annot) {
return ontologyTreePanel.ontoViewer.getDocument().getContent().toString()
.substring(annot.getStartNode().getOffset().intValue(),
annot.getEndNode().getOffset().intValue());
}
COM: <s> retrieves the underlying text of the annotation </s>
|
funcom_train/22232353
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setBackDistance(double backDistance) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_BACK_DISTANCE_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("Clip0"));
if (isLive())
((ClipRetained)this.retained).setBackDistance(backDistance);
else
((ClipRetained)this.retained).initBackDistance(backDistance);
}
COM: <s> sets the back clip distance to the specified value </s>
|
funcom_train/39015570
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void update() {
board[0] = state.substring(0, 4).toCharArray();
board[1] = state.substring(4, 8).toCharArray();
board[2] = state.substring(8, 12).toCharArray();
board[3] = state.substring(12, 16).toCharArray();
board[4] = state.substring(16).toCharArray();
}
COM: <s> update the matrix representation using the state string buffer </s>
|
funcom_train/8685944
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String replaceTokens(String line) {
String replacedLine = line;
for (Enumeration e = filterSets.elements(); e.hasMoreElements();) {
FilterSet filterSet = (FilterSet) e.nextElement();
replacedLine = filterSet.replaceTokens(replacedLine);
}
return replacedLine;
}
COM: <s> does replacement on the given string with token matching </s>
|
funcom_train/23825014
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Dimension getPreferredSize() {
if(getGraph() == null) {
return new Dimension(10, 10);
}
else {
Dimension prefSize = new Dimension(getGraph().getShape().getBounds().getSize());
prefSize.width = (int) (prefSize.width * (zoomLevel / 100.0));
prefSize.height = (int) (prefSize.height * (zoomLevel / 100.0));
return prefSize;
}
}
COM: <s> if the code preferred size code has been set to a </s>
|
funcom_train/43384901
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public ExecutableTests getExecutableTests() throws ShiftException {
loadInheritedActions();
ExecutableTests eTests = new ExecutableTests();
for (Iterator iter = tests.entryIterator(); iter.hasNext();) {
Test test = (Test) iter.next();
optimizeTest(test);
fillOutTest(test);
eTests.add(convertTest(test));
}
return eTests;
}
COM: <s> optimizes all tests makes them ready to be executed and returns the </s>
|
funcom_train/23164696
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public JavaField getJavaField() {
if (javaField == null) {
// not set => calculate
// Please note, cannot call super.getJavaField, because it
// returns a JavaField!
JavaType javaType = getDeclaringClass().getJavaType();
javaField = javaType.getJavaProperty(getName());
}
return javaField;
}
COM: <s> get the corresponding java field representation for this jdoproperty </s>
|
funcom_train/805943
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void storeSelectedCategoryAndWizard(IDialogSettings settings) {
Object selected = getSingleSelection((IStructuredSelection) filteredTree
.getViewer().getSelection());
if (selected != null) {
if (selected instanceof IWizardCategory) {
settings.put(STORE_SELECTED_ID, ((IWizardCategory) selected)
.getPath().toString());
} else {
// else its a wizard
settings.put(STORE_SELECTED_ID, ((IWizardDescriptor) selected)
.getId());
}
}
}
COM: <s> stores the currently selected element in this pages dialog store in </s>
|
funcom_train/43410038
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public JPanel getJAddIngrediencePanel() {
if (jAddIngrediencePanel == null) {
jAddIngrediencePanel = new JPanel();
jAddIngrediencePanel.setLayout(new BorderLayout());
jAddIngrediencePanel.setToolTipText("Add Ingredience");
jAddIngrediencePanel.add(getJAddIngredienceInnerPanel(), java.awt.BorderLayout.CENTER);
}
return jAddIngrediencePanel;
}
COM: <s> this method initializes j add ingredience panel </s>
|
funcom_train/21185724
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public SampleSecure getSampleSecure(final Sample sample) {
SampleSecure sampleSecure = null;
Query query = managerSecure.createQuery(
"SELECT ss "
+ "FROM SampleSecure ss "
+ "WHERE ss.sample = '"
+ sample.getPseudoSampleId() + "' ");
try {
sampleSecure =
(SampleSecure) query.getSingleResult();
} catch (NoResultException e) {
sampleSecure = null;
}
return sampleSecure;
}
COM: <s> translate a code sample code to its corresponding </s>
|
funcom_train/12165437
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String getAttribute(String key) {
String value = "";
ListIterator iter = this.attrsHeader.listIterator();
while(iter.hasNext()) {
String field = (String) iter.next();
if(field.toLowerCase().startsWith(key.toLowerCase())) {
value = field.split(": ")[1];
value = value.trim();
}
}
return value;
}
COM: <s> returns the value of the header attribute with a given name </s>
|
funcom_train/11023381
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testProtected() {
String property = "protectedProperty";
Class clazz = MappedPropertyTestBean.class;
try {
MappedPropertyDescriptor desc
= new MappedPropertyDescriptor(property, clazz);
fail("Property '" + property + "' found in " + clazz.getName());
} catch (Exception ex) {
// expected result
}
}
COM: <s> test protected mapped property </s>
|
funcom_train/44286623
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean validateAfter(FactoryWriterXML xml, TransactionXML transaction, List listReference) {
if(!super.validateAfter(xml, transaction, listReference)) return false;
if(className != null)
className.validate(xml, transaction, listReference);
return true;
}
COM: <s> class control validate after </s>
|
funcom_train/37598679
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void initialise() {
this.setLayout(new java.awt.BorderLayout());
this.setSize(200, 180);
this.setPreferredSize(new java.awt.Dimension(200, 180));
//this.setBackground(SystemColor.activeCaptionText);
this.setOpaque(false);
this.add(getNorthPanel(), java.awt.BorderLayout.NORTH);
this.add(getSouthPanel(), java.awt.BorderLayout.SOUTH);
this.add(getCenterPanel(), java.awt.BorderLayout.CENTER);
}
COM: <s> initialise the control </s>
|
funcom_train/863307
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void translate() throws IOException {
FileOutputStream out = new FileOutputStream( avm2swf );
SWFWriter writer = new SWFWriter( out );
TagWriter tagWrt = new TagWriter( writer );
AVM1ActionInterceptor interceptor = new AVM1ActionInterceptor( avm1swf.getName(), tagWrt, runtimeSwf );
FileInputStream in = new FileInputStream( avm1swf );
SWFReader reader = new SWFReader( interceptor, in );
reader.readFile();
in.close();
out.close();
}
COM: <s> perform the translation process </s>
|
funcom_train/18734497
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public LazyClassGen getLazyClassGen() {
LazyClassGen ret = lazyClassGen;
if (ret == null) {
// System.err.println("creating lazy class gen for: " + this);
ret = new LazyClassGen(this);
// ret.print(System.err);
// System.err.println("made LCG from : " +
// this.getJavaClass().getSuperclassName );
if (isAspect()) {
lazyClassGen = ret;
}
}
return ret;
}
COM: <s> return the lazy class gen associated with this type </s>
|
funcom_train/28364291
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: static public SolveStopper targetStopperWithMaxTime(final double targetScore, final double maxTime) {
return new SolveStopper() {
public boolean shouldStop(Scoreboard scoreboard) {
double elapsedTime = scoreboard.elapsedTime();
if ( elapsedTime > maxTime ) return true;
if ( scoreboard.getBestScore() <= targetScore ) return true;
return false;
}
};
}
COM: <s> run until the best score less than the target score </s>
|
funcom_train/35838805
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean containsOriginalID(String sOriginalID) {
for (Enumeration e = htMemberNodes.elements(); e.hasMoreElements(); ) {
NodePosition pos = (NodePosition) e.nextElement();
NodeSummary node = pos.getNode();
String sID = node.getOriginalID();
if (sOriginalID.equals(sID)) {
return true;
}
}
return false;
}
COM: <s> does this view contain the node with the given original id </s>
|
funcom_train/26401629
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void loadData() {
try {
setProjects(getServletClient().getProjects());
setUserData(getServletClient().getUserData());
setGroups(getServletClient().getGroups());
} catch (I18NException e) {
showError(e);
}
}
COM: <s> loads basic data projects user data and user groups </s>
|
funcom_train/29289963
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void removeUserGroup(UserGroupCMPData data) throws EJBException {
try {
UserGroupCMPLocal userGroupLocal = getUserGroupCMPLocalHome()
.findByPrimaryKey(data.getGroup_id());
userGroupLocal.remove();
} catch (FinderException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (RemoveException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
COM: <s> remove user group busines method </s>
|
funcom_train/3087392
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private Element createIMG(RenderingContext rc, String imageUri, int width, int height) {
Element img = new Element(ElementNames.IMG,false);
img.setWhitespaceRelevant(true);
img.addAttribute(ElementNames.Attributes.SRC,imageUri);
img.addAttribute(ElementNames.Attributes.BORDER,0);
img.addAttribute("vspace",0);
img.addAttribute("hspace",0);
if (width > 0)
img.addAttribute(ElementNames.Attributes.WIDTH,width);
if (height > 0)
img.addAttribute(ElementNames.Attributes.HEIGHT,height);
return img;
}
COM: <s> creates an img tag for a image servic e </s>
|
funcom_train/19761820
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testAssetEnums() throws Exception {
_logger.info("----------------------------------------------------------------------------");
_logger.info("Testing com.netstoke.core.asset package.");
Class[] classes = new Class[]{AssetType.class};
testEnumValues(classes);
Long id = null;
try {
AssetType.valueOf(id);
fail();
} catch (NullPointerException e) {assertFalse(e.getMessage().contains("!"));}
try {
id = 9000L;
AssetType.valueOf(id);
fail();
} catch (IllegalArgumentException e) {assertFalse(e.getMessage().contains("!"));}
}
COM: <s> tests all enum values </s>
|
funcom_train/438584
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void initialize() {
this.setSize(415, 258);
//*** IMPORTANT *** dont set the close behavior, this is done in some super class already!!!
//this.setDefaultCloseOperation(javax.swing.JFrame.HIDE_ON_CLOSE);
this.setContentPane(getJContentPane());
this.setTitle("DreiNullDrei");
//*** IMPORTANT *** this stuff is all covered by the underlying class (VSTPluginGUIAdapter)
//this.setVisible(true);
this.setResizable(false);
}
COM: <s> this method initializes this </s>
|
funcom_train/23872714
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Environment addVariableDeclaration(String name, Classifier type, Boolean imp) {
if (name == null) return this;
if (type == null) return this;
// the name must not clash with names already existing in this environment
if (namedElements.get(name) != null) return this;
VariableDeclaration vd = new VariableDeclaration$Class(name);
vd.setType(type);
EnvironmentImpl result = (EnvironmentImpl) this.clone();
result.namedElements.put(name, new NamedElementImpl(name, vd, imp));
return result;
}
COM: <s> add a variable into the environment </s>
|
funcom_train/982688
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void gluQuadricCallback (GLUquadricObj qobj, int which, String fn) {
if (qobj != null && which == GLU_ERROR) {
Class[] parameterTypes = new Class[] { int.class };
try {
qobj.ErrorFunc = JavaGL.glJGetComponent().getClass().getMethod(fn, parameterTypes);
} catch (NoSuchMethodException e) {
System.out.println ("No method named "+fn);
}
}
}
COM: <s> glvoid glu quadric callback gluquadric obj qobj glenum which void glcallback fn </s>
|
funcom_train/31534362
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void addListener(String listenerName, String listenerClass, Hashtable parameters) {
try {
Class thisListenerClass = (Class)Class.forName(listenerClass);
Constructor con = thisListenerClass.getConstructor(new Class[]{Bot.class,Hashtable.class});
Runnable thisListener = (Runnable)con.newInstance(new Object[]{MyBot,parameters});
listeners.put(listenerName,thisListener);
} catch(Exception e) { System.out.println(e);}
}
COM: <s> adds a listener to the hashtable of listeners </s>
|
funcom_train/47958762
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void addTooltipTransformers(){
//show tooltips on vertices and edges
vv.setVertexToolTipTransformer(new Transformer<Doc, String>() {
@Override
public String transform(Doc v) {
return v.getUrl().toString();
}
});
vv.setEdgeToolTipTransformer(new Transformer<Link, String>() {
@Override
public String transform(Link edge) {
return edge.getAnchorText();
}
});
}
COM: <s> add tooltips to this graph visualization </s>
|
funcom_train/8811892
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void addDependency(FlexTableView other) {
// Checks if the other view is correct.
if (other == null) {
throw new NullPointerException("other must not be null");
}
// Checks if the two views share the same table.
if (table != other.table) {
throw new IllegalArgumentException("the other view doesn't share the same table as the current view");
}
dependencies.add(other);
}
COM: <s> adds a dependency to this view </s>
|
funcom_train/36656317
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setEndDate(String endDate) {
SimpleDateFormat sdf = new SimpleDateFormat(defaultFormat);
try {
end = sdf.parse(endDate);
} catch (ParseException ex) {
Logger.getLogger(Event.class.getName()).log(Level.SEVERE, null, ex);
}
}
COM: <s> sets the end date and time for this event </s>
|
funcom_train/14461994
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setFontWeight(int wt){
if (data == null)this.setData(this.getData());
byte[] newwt = ByteTools.shortToLEBytes((short)wt);
System.arraycopy(newwt, 0, data, 6 ,2);
bls = wt;
}
COM: <s> set the weight of the font in 1 20 point units </s>
|
funcom_train/40221996
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void removeUser(String name) {
// verify that this user is in list.
int found = -1;
for (int i = 0; i< numPlayers; i++) {
if (name.equals (players[i])) {
found = i;
break;
}
}
if (found == -1) return;
players[found] = players[numPlayers-1];
points[found] = points[numPlayers-1];
gamesWon[found] = gamesWon[numPlayers-1];
/** decrease count */
numPlayers--;
sortPlayers();
// repaint if visible
if (isVisible())
repaint();
}
COM: <s> remove user from display </s>
|
funcom_train/7656051
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void addCertStore(CertStore store) {
if (store == null) {
// do nothing if null provided
return;
}
if (certStores == null) {
// set to empty List if has not been set yet
certStores = new ArrayList();
}
// add store
certStores.add(store);
}
COM: <s> adds a certificate store to the list of certificate stores that are used </s>
|
funcom_train/33886313
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void exchange(Virtualizable<V> u, Virtualizable<V> v) {
int posU = this.vertices.indexOf(u);
int posV = this.vertices.indexOf(v);
this.vertices.set(posV, u);
this.vertices.set(posU, v);
}
COM: <s> exchange the position of two vertices u and v </s>
|
funcom_train/6154
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private int findMapperIndex(Class mapperClass){
ListModel<MapperDecorator> model = pluginsList.getModel();
int length = model.getSize();
for (int i = 0;i < length; i++ ){
AttributeMapper current = model.getElementAt(i).getDelegate();
if (current.getClass().equals(mapperClass))
return i;
}
return -1;
}
COM: <s> searches for plugin class in list of available plugins </s>
|
funcom_train/29271385
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public byte retrieveByteValue(String src) throws InvalidValueException{
Object value = retrieveValue(src);
if(value instanceof Integer)
return ((Integer)value).byteValue();
else if(value instanceof Float)
return ((Float)value).byteValue();
else if(value instanceof Double)
return ((Double)value).byteValue();
else if(value instanceof Long)
return ((Long)value).byteValue();
else if(value instanceof String)
return Byte.parseByte((String)value);
else {
throw new InvalidValueException();
}
}
COM: <s> retrieve byte value process a retrieved value and return a primative byte </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.