__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/20906189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printOut(){
size = synonyme.size();
System.out.println("The Term "+ this.name + " has the following synonyms: ");
for(int i = 0;i<size;i++){
System.out.println("" + synonyme.get( i ));
}
}
COM: <s> prints out the synonyms of each term </s>
|
funcom_train/31454093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFilterTag() {
/*
* MetaData md=filterConcept.getMetaData(); String title =
* MetaDataUtils.getLocalizedString(md.get_metametadata_language(),
* md.get_general_title()).string; if(title.length() == 0) title =
* filterConcept.getURI(); return title;
*/
// FIXME filter tags has to be represented in another way.
return null;
}
COM: <s> returns the filtertag of this node </s>
|
funcom_train/17296558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void minimize(int currentY, float dWidth, float dHeight) {
// Interpolation
int width = (int) (getWidth() - dWidth);
int height = (int) (getHeight() - dHeight);
if (width <= 0 || height <= 0) {
stopAnimationTimer();
pyramide2D.remove(this);
pyramide2D.repaint();
}
setBounds((pyramide2D.getWidth() / 2) - (width / 2), currentY - (int) (height / 1.5f), width, height);
}
COM: <s> callback function for i close i </s>
|
funcom_train/37555916 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBorderVisible(boolean show) {
checkWidget();
if (showBorders == show) return;
showBorders = show;
if (showBorders) {
if ((getStyle() & SWT.FLAT) != 0) {
borderBottom = borderTop = borderLeft = borderRight = 1;
} else {
borderLeft = borderTop = 1;
borderRight = borderBottom = 3;
}
} else {
borderBottom = borderTop = borderLeft = borderRight = 0;
}
oldSize = null;
notifyListeners(SWT.Resize, new Event());
}
COM: <s> toggle the visibility of the border </s>
|
funcom_train/18591263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int finishRunningGridlets() {
double now = GridSim.clock();
int itemsFinished = 0;
Iterator<SSGridlet> iter = runningJobs.iterator();
while (iter.hasNext()) {
SSGridlet gridlet = iter.next();
if(gridlet.getActualFinishTime() <= now) {
gridletFinish(gridlet, Gridlet.SUCCESS);
iter.remove();
itemsFinished++;
}
}
return itemsFinished;
}
COM: <s> this method finalises the jobs that have completed </s>
|
funcom_train/8519503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getTextToSpeechQuery() {
String text = this.textToSpeech.trim().replace("Hackystat", "hacky stat").replace(" ", "+");
return QUERYMARK + "sn=" + this.serialNumber + AMPERSAND + "token=" + this.token + AMPERSAND
+ "tts=" + text;
}
COM: <s> send out text to speech command to bunny </s>
|
funcom_train/32220602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getChangeSet(long sessionId, String outputURI) {
try {
File f = new File(new URI(outputURI));
FileWriter writer = new FileWriter(f);
Object obj = HibernateUtil.get(AdlmSession.class, sessionId);
if (obj instanceof AdlmSession) {
Resolve.changeReport((AdlmSession) obj, writer);
writer.close();
}
else {
log.info("Unable to find session "+sessionId);
return false;
}
} catch (Exception e) {
log.info("Error processing change set request",e);
return false;
}
return true;
}
COM: <s> generate a report of the status of a session </s>
|
funcom_train/37421266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void endElement(String qname, String content) {
//these are all required elements:
if (qname.equals("username")) {
username = content;
} else if (qname.equals("status")) {
status = content;
} else if (qname.equals("service")) {
if (GoTClient.DEBUG) {
System.out.println(username
+" has changed status: ["+status+"]");
}
Contact contact =
ContactManager.getContactByUsername(username);
contact.setStatus(status);
}
}
COM: <s> puts the content of tag pairs in variables and sets the </s>
|
funcom_train/4237751 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputPort replaceInputPort(String portName, InputPort newInputPort) {
InputPort oldPort = inputPortMap.remove(portName);
inputPortMap.put(portName, newInputPort);
if (oldPort == null) {
LOG_NODE.fine("No such InputPort: " + portName + ". Adding new port without replacement.");
} else {
LOG_NODE.fine("InputPort " + portName + " has been replaced.");
}
return newInputPort;
}
COM: <s> replace input port replaces a possibly existing input port </s>
|
funcom_train/13410493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Spatial spatial, File file) {
if (spatial == null || file == null)
return;
JMEExporter exporter = BinaryExporter.getInstance();
try {
URL url = new URL("file:/"
+ file.getAbsolutePath().replaceAll(file.getName(), ""));
ResourceLocatorTool.addResourceLocator(
ResourceLocatorTool.TYPE_TEXTURE,
new SimpleResourceLocator(url));
exporter.save(spatial, file);
} catch (IOException e) {
Runtime.handleException(e);
} catch (URISyntaxException e) {
Runtime.handleException(e);
}
}
COM: <s> saves the file to the system </s>
|
funcom_train/27711477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void synchronizeData() {
// no need to sync in the future
needsSyncData(false);
// fluff data
DeferredDocumentImpl ownerDocument =
(DeferredDocumentImpl) this.ownerDocument();
data = ownerDocument.getNodeValueString(fNodeIndex);
isIgnorableWhitespace(ownerDocument.getLastChild(fNodeIndex) == 1);
} // synchronizeData()
COM: <s> synchronizes the data name and value for fast nodes </s>
|
funcom_train/3873812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clientLeft(final int clientId) {
javax.swing.SwingUtilities.invokeLater(
new Runnable() {
public void run() {
// sync tab item add with GUI thread
frame.say("member "+name+": client left: "+clientId);
frame.removeTabListItem(name, new Integer(clientId).toString());
}
}
);
}
COM: <s> a client has left this group </s>
|
funcom_train/2742912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int doEndTag() throws JspException {
// super result
int temp = super.doEndTag();
// all done. clean up
HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
// reset the original nesting values
if (originalNesting == null) {
NestedPropertyHelper.deleteReference(request);
} else {
NestedPropertyHelper.setProperty(request, originalNesting);
NestedPropertyHelper.setName(request, originalNestingName);
}
// return the super result
return temp;
}
COM: <s> this is only overriden to clean up the include reference </s>
|
funcom_train/6253791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void walk (File file, boolean includeDirectories) {
if (file.isDirectory()) {
if (includeDirectories) {
setChanged();
notifyObservers(file);
}
String[] filenames = file.list();
if (filenames != null) {
for (int i=0; i<filenames.length; i++) {
walk(new File(file,filenames[i]),includeDirectories);
}
}
} else {
setChanged();
notifyObservers(file);
}
}
COM: <s> method to call that starts the directory traversal </s>
|
funcom_train/13769946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isSkipSensitive(OperationPtg optg) {
if (optg instanceof AbstractFunctionPtg){
// Skip sensitive is only "optimized" function - just only "IF" and "choose"
AbstractFunctionPtg fptg = (AbstractFunctionPtg)optg;
switch (fptg.getFunctionIndex()) {
case FunctionMetadataRegistry.FUNCTION_INDEX_IF:
case FunctionMetadataRegistry.FUNCTION_INDEX_CHOOSE:
return true;
}
}
return false;
}
COM: <s> has this function optimized form </s>
|
funcom_train/32056820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetHandle() {
System.out.println("testGetHandle");
Object obj = null;
JGraph jgraph = new JGraph();
CellMapper cellmapper = null;
EdgeView edge = new EdgeView(obj, jgraph, cellmapper);
GraphContext graphcontext = null;
edge.getHandle(graphcontext);
}
COM: <s> this function tests get handle function of edge view class </s>
|
funcom_train/16884645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DataSource merge(DataSource lateBindingDs, DataSource staticDs) {
DataSource result = new DataSource();
result.setName(staticDs.getName());
result.setAddress(staticDs.getAddress());
result.setType(staticDs.getType());
result.setSubType(staticDs.getSubType());
result.setDataFormat(staticDs.getDataFormat());
result.setAuthentication(staticDs.getAuthentication());
result.setLateBinding(lateBindingDs.getLateBinding());
return result;
}
COM: <s> this method merges a late binding data source and a static data source </s>
|
funcom_train/24468908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String convertBytes(final byte[] buf, final Charset charset) {
final InputStreamReader isr = new InputStreamReader(
new ByteArrayInputStream(buf), charset);
final StringBuilder sb = new StringBuilder();
int c = 0;
try {
while ((c = isr.read()) != -1) {
sb.append((char) c);
}
} catch (final IOException e) {
LOGGER.warn(e);
}
return sb.toString();
}
COM: <s> this is a java5 compatible way of converting bytes to string </s>
|
funcom_train/6407597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(String command, int keyCode) {
ArrayList<KeyCodes> keyList = new ArrayList<KeyCodes>();
KeyCodes key = new KeyCodes();
key.keys = new int[1];
key.keys[0] = keyCode;
keyList.add(key);
keyMap.put(command, keyList);
}
COM: <s> code set code sets the command to the given keycode overriding </s>
|
funcom_train/51056407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object ob) {
if ( !(ob instanceof PointerBuffer) )
return false;
PointerBuffer that = (PointerBuffer)ob;
if ( this.remaining() != that.remaining() )
return false;
int p = this.position();
for ( int i = this.limit() - 1, j = that.limit() - 1; i >= p; i--, j-- ) {
long v1 = this.get(i);
long v2 = that.get(j);
if ( v1 != v2 ) {
return false;
}
}
return true;
}
COM: <s> tells whether or not this buffer is equal to another object </s>
|
funcom_train/9769361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test(expected=IllegalArgumentException.class) public void testConstructorSequence() {
Combo[] combos = new Combo[] {this.bamboo_seq, this.circle_trp, this.character_trp, this.dragon_trp};
new Scoreentry_TRIPLETS_ONLY_HAND(combos);
}
COM: <s> check if it fails if one element is a sequence </s>
|
funcom_train/11644795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReplaceAdjacentAtStart() {
values.put("code", "GBP");
values.put("amount", "12.50");
StrSubstitutor sub = new StrSubstitutor(values);
assertEquals("GBP12.50 charged", sub.replace("${code}${amount} charged"));
}
COM: <s> tests adjacent keys </s>
|
funcom_train/16769509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGlobalScope(IGlobalScope globalScope) {
log.trace("Set global scope: {}", globalScope);
// XXX: this is called from nowhere, remove?
super.setParent(globalScope);
try {
setPersistenceClass(globalScope.getStore().getClass().getName());
} catch (Exception error) {
log.error("Could not set persistence class.", error);
}
}
COM: <s> setter for global scope </s>
|
funcom_train/22567660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void reIndexCompetence(final long companyId) throws SystemException {
final List<CompetenceMap> listMaps = competenceMapPersistence.findByCompanyId(companyId);
for (CompetenceMap map : listMaps) {
final List<Competence> list = competencePersistence.findByCompetenceMapId(map.getCompetenceMapId());
for (Competence comp : list) {
reIndex(comp);
}
}
}
COM: <s> re index competence </s>
|
funcom_train/12560524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getCurHorAlignment(ItemLFImpl[] itemLFs, int index) {
for (int hAlign, i = index; i >= 0; i--) {
hAlign = itemLFs[i].getLayout() & LAYOUT_HMASK;
if (hAlign == 0) {
continue;
}
return hAlign;
}
// default layout is LAYOUT_LEFT
return Item.LAYOUT_LEFT;
}
COM: <s> gets the current horizontal alignment of the item </s>
|
funcom_train/34568905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ModuleServicable getServiceInterface() throws BaseException{
try {
return getCoreService();
// TODO: cache the interface
} catch (BaseException ex) {
throw ex;
} catch (Throwable ex) {
String msg = "Error to lookup at: "+ module.getMyInstance().getName()+":"+module.getMyInstance().getPort()+"/"+module.getJndiName()+" - ";
logger.error(msg,ex);
throw new BaseException(ErrorCodes.CODE_224,msg);
}
}
COM: <s> contact the service by rmi </s>
|
funcom_train/13874218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIsDefaultPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Assignment_isDefault_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Assignment_isDefault_feature", "_UI_Assignment_type"),
QvtcorePackage.Literals.ASSIGNMENT__IS_DEFAULT,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the is default feature </s>
|
funcom_train/28405826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProject(String project) throws IllegalAccessException, IllegalArgumentException {
if (! isSubmitted) {
if ((project != null) && (project.length() > 0)) {
cmd.setProject(project);
} else {
throw new IllegalArgumentException("Invalid project.");
}
} else {
throw new IllegalAccessException(HTCRequest.errorMessage);
}
}
COM: <s> code set project code sets the project to associate with the request </s>
|
funcom_train/41320034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButton getJRadioButton1() {
if (jRadioButton1 == null) {
jRadioButton1 = new JRadioButton("1", false);
jRadioButton1.setBounds(new Rectangle(30, 40, 21, 21));
jRadioButton1.setBackground(new Color(Integer.valueOf("f3a15a", 16)));
}
return jRadioButton1;
}
COM: <s> this method initializes j radio button1 </s>
|
funcom_train/31289623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void interpret(final Context context) {
logMessage("calling application...");
final URI uri;
try {
uri = new URI(launchUrl);
} catch (java.net.URISyntaxException use) {
logMessage(use.getMessage());
return;
}
try {
session.call(uri);
final SessionListener listener = new SessionListener(session, this);
listener.start();
} catch (org.jvoicexml.event.JVoiceXMLEvent e) {
e.printStackTrace();
}
}
COM: <s> calls the voicexml interpreter context to process the given application </s>
|
funcom_train/44850606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object inObject) {
if (this == inObject)
return true;
if (inObject == null)
return false;
if (getClass() != inObject.getClass())
return false;
final AbstractHtmlView lOther = (AbstractHtmlView) inObject;
if (htmlString == null) {
if (lOther.getHTMLString() != null)
return false;
}
else if (!htmlString.equals(lOther.getHTMLString()))
return false;
return true;
}
COM: <s> two views are equal if their html strings are equal </s>
|
funcom_train/4086240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int computeBitfield( int x, int y, int left, int right, int top, int bottom ) {
int bitfield = 0;
if( x < left ) bitfield |= 1;
if( x > right ) bitfield |= 2;
if( y < top ) bitfield |= 4;
if( y > bottom ) bitfield |= 8;
return bitfield;
}
COM: <s> returns the cohen sutherland bitfield code for point x y </s>
|
funcom_train/4363006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addWrapperLifecycle(String listener) {
synchronized (wrapperLifecyclesLock) {
String results[] =new String[wrapperLifecycles.length + 1];
for (int i = 0; i < wrapperLifecycles.length; i++)
results[i] = wrapperLifecycles[i];
results[wrapperLifecycles.length] = listener;
wrapperLifecycles = results;
}
fireContainerEvent("addWrapperLifecycle", listener);
}
COM: <s> add the classname of a lifecycle listener to be added to each </s>
|
funcom_train/43592209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doFilter() {
boolean progressFadeLevel=true;
for (ScreenFilter filter : filters) {
if (filter.isActive()) {
progressFadeLevel&=filter.renderFilter();
}
}
if (progressFadeLevel) {
// Evaluate fade level
if (asked_FadeOut) {
if (fadeLevel < 255) {
fadeLevel+=Constantes.FADE_SPEED;
} else {
fadeLevel=255;
fadeStarted=false;
}
}
if (asked_FadeIn) {
if (fadeLevel > 0) {
fadeLevel-=Constantes.FADE_SPEED;
} else {
fadeLevel=0;
fadeStarted=false;
fadeEnd();
}
}
}
}
COM: <s> calculate fade level and render active filters </s>
|
funcom_train/28343582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getChromDispersionY() {
double W = this.getKineticEnergy();
double Er = this.getSpeciesRestEnergy();
double gamma = RelativisticParameterConverter.computeGammaFromEnergies(W, Er);
double d = this.getResponseMatrix().getElem(PhaseMatrix.IND_Y, PhaseMatrix.IND_ZP);
return d/(gamma*gamma);
//return d;
}
COM: <s> convenience function for returning the y plane chromatic dispersion as defined by </s>
|
funcom_train/2343682 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMinDateNotSupported(String locatorValue, String exceptionText) {
String r = OWSConstants.xmlHeader + "\n" + OWSConstants.exceptionStartTag +
"<Exception exceptionCode=\"" + MinDateNotSupported + "\"" +
"locator=\"" + locatorValue + "\"";
r += insertExceptionText(exceptionText);
return r;
}
COM: <s> service does not support time and therefore cant respond to a </s>
|
funcom_train/18739014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HostNode createNode(int nr, TypeNode typeNode) {
assert typeNode.getGraph() == this.typeFactory.getGraph();
setLastNodeType(typeNode);
HostNode result = super.createNode(nr);
resetLastNodeType();
assert result.getType() == typeNode;
return result;
}
COM: <s> creates and returns a node with a given number and node type </s>
|
funcom_train/24050037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkNoSelfIntersectingRing(EdgeIntersectionList eiList) {
Set nodeSet = new TreeSet();
boolean isFirst = true;
for (Iterator i = eiList.iterator(); i.hasNext();) {
EdgeIntersection ei = (EdgeIntersection) i.next();
if (isFirst) {
isFirst = false;
continue;
}
if (nodeSet.contains(ei.coord)) {
validErr = new TopologyValidationError(
TopologyValidationError.RING_SELF_INTERSECTION,
ei.coord);
return;
} else {
nodeSet.add(ei.coord);
}
}
}
COM: <s> check that a ring does not self intersect except at its endpoints </s>
|
funcom_train/3199408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean closeEnough(double d1, double d2, String where) {
if (d1 == d2)
return true;
double diff = Math.abs(d1 - d2);
boolean result = diff < Math.abs((d1 + d2) * DOUBLE_EPSILON);
if (!result)
logUnequal(Double.toString(d1), Double.toString(d2), where);
return result;
}
COM: <s> returns code true code if the specified float values are close </s>
|
funcom_train/1842892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
while ( ! checkingThread.isInterrupted() ) {
// Check for new results and save them to db
saveReadyResults();
// Exit condition: if study has finished, we can break
if (simStudy.hasFinished()) {
break;
}
// Sleep for certain period of time
try {
Thread.sleep( 5000 );
} catch ( InterruptedException e ) {
checkingThread.interrupt();
}
}
log.debug("Stopped background saving of simulations");
}
COM: <s> thread main method checks regularly for finished simulations whose </s>
|
funcom_train/8688280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getConstantEntry(Object constantValue) {
int index = -1;
for (int i = 0; i < entries.size() && index == -1; ++i) {
Object element = entries.elementAt(i);
if (element instanceof ConstantCPInfo) {
ConstantCPInfo constantEntry = (ConstantCPInfo) element;
if (constantEntry.getValue().equals(constantValue)) {
index = i;
}
}
}
return index;
}
COM: <s> get the index of a given constant value entry in the constant pool </s>
|
funcom_train/38385021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRule(int reqState, String pattern, boolean caseSensitive, int emitState, Object emitObj, REDRexAction action, boolean rewind) throws REDRexMalformedPatternException {
try {
REDRexParserRule r = new REDRexParserRule(reqState, pattern, caseSensitive, emitState, emitObj, action, rewind, fNextActionId++);
fRules.add(r);
}
catch (PatternSyntaxException mpe) {
throw new REDRexMalformedPatternException(mpe.getMessage(), pattern);
}
}
COM: <s> add rule to parser </s>
|
funcom_train/43246161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetEmailAddress() {
System.out.println("getEmailAddress");
AddlDemographicsObject instance = new AddlDemographicsObject();
String expResult = "";
String result = instance.getEmailAddress();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get email address method of class org </s>
|
funcom_train/36048645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void installPlugin(String pluginClassName, String libraryUrl, boolean force, boolean enable) throws InstantiationException, IllegalAccessException, IOException, ClassNotFoundException, UnsupportedVersionException, HigherVersionInstalledException, CodeConflictException, DependencyMissingException {
addPlugin(pluginClassName, libraryUrl, force, enable, false);
}
COM: <s> p install and eventually enable an external plugin </s>
|
funcom_train/51768504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
Display display = new Display();
shell= new Shell(display);
shell.setText("TestCase Table");
createContents(shell,display);
shell.pack();
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
display.dispose();
}
COM: <s> runs the application </s>
|
funcom_train/9449443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(String name, long value) throws IllegalArgumentException {
ObjectSlot slot = findSlot(name, Long.TYPE);
if (slot == null) {
throw new IllegalArgumentException("no long field '" + name + "'");
}
slot.fieldValue = Long.valueOf(value);
slot.defaulted = false; // No longer default value
}
COM: <s> find and set the long value of a given field named </s>
|
funcom_train/22234175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getInt() throws ParsingErrorException {
try {
int x = 0;
for (int i = 0 ; i < 4 ; i++) {
int readResult = read();
if (readResult == -1)
throw new ParsingErrorException("Unexpected EOF");
x = (x << 8) | readResult;
}
return x;
}
catch (IOException e) {
debugOutputLn(EXCEPTION, "getInt: " + e);
throw new ParsingErrorException(e.getMessage());
}
}
COM: <s> read four bytes from the file and return their integer value </s>
|
funcom_train/25367741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setString (String v, int c) {
// the 0-length string is not well handled by Rconnection's assign fcn.
// So we set the value to null in this case; this will result as a NA value on the server side
if ((v != null) && (v.isEmpty())) v = null;
((String []) (itsBuffers [c])) [itsNextInsertIndex] = v;
}
COM: <s> sets the string value of a column at the current row </s>
|
funcom_train/171178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(int i, Type type){
if (type == Type.BYTE || type == Type.SHORT || type == Type.BOOLEAN || type == Type.CHAR){
throw new AssertionViolatedException("LocalVariables do not know about '"+type+"'. Use Type.INT instead.");
}
locals[i] = type;
}
COM: <s> sets a new type for the given local variable slot </s>
|
funcom_train/46590684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateClientMapping() {
//send the RequestClientListCommand to get the current client-mapping from server
client.sendCommand(new RequestClientsListCommand());
// wait until server updates the clientIdList
if(!client.isClientMappingUpdated()) {
try {
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
currentClientMapping = client.getClientMapping();
}
COM: <s> updates the client id name map from the server </s>
|
funcom_train/7692212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(Consulado entity) {
EntityManagerHelper.log("deleting Consulado instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(Consulado.class,
entity.getId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent consulado entity </s>
|
funcom_train/3368925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSortable(int column, boolean sortable) {
checkColumn(column);
if (isSortable == null) {
isSortable = new boolean[getModelWrapper().getColumnCount()];
for (int i = isSortable.length - 1; i >= 0; i--) {
isSortable[i] = true;
}
}
isSortable[column] = sortable;
}
COM: <s> sets whether or not the specified column is sortable </s>
|
funcom_train/3421286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isCDATAAttribute(QName elName, QName atName) {
int elDeclIdx = getElementDeclIndex(elName);
if (getAttributeDecl(elDeclIdx, fAttributeDecl)
&& fAttributeDecl.simpleType.type != XMLSimpleType.TYPE_CDATA){
return false;
}
return true;
}
COM: <s> returns whether the given attribute is of type cdata or not </s>
|
funcom_train/36243011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Task createAccount(IAccountCreationListener aListener, String ttpUrl, String myTel){
log.debug("account creation requested");
try {
AuthenticationTask authTask = new AuthenticationTask(ttpUrl, aListener);
authTask.setMyTel(myTel);
queue.addTask(authTask);
return authTask;
} catch (Exception ex) {
log.fatal(ex.getMessage(), ex);
}
return null;
}
COM: <s> requests account creation my tel on ttp url </s>
|
funcom_train/3273118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateCommRelativeToShip(Ship ship){
// For Ships in the same Fleet, update relative comm
// Update the list of ships in comm range relative to
// the specified Ship's Movement.
float commRangeSquared = shipComponents.effectiveCommRange(shipsJammingThisShip);
commRangeSquared *= commRangeSquared;
if(distanceSquaredTo(ship) <= commRangeSquared){
if(!shipsInCommRange.contains(ship)){
shipsInCommRange.add(ship);
}
}
else {
shipsInCommRange.remove(ship);
}
}
COM: <s> if ship is in communications range ensure that it </s>
|
funcom_train/33991019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTriangle(FTriangle triangle) {
triangle.setE1(new FEdge(triangle.getV1(), triangle.getV2()));
triangle.setE2(new FEdge(triangle.getV2(), triangle.getV3()));
triangle.setE3(new FEdge(triangle.getV3(), triangle.getV1()));
this.triangles.insertElementAt(triangle, triangles.size());
}
COM: <s> adds an triangle to the solid </s>
|
funcom_train/26489817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String translateTag(String id) {
// Remove the macro identifiers.
if (id.startsWith("(@"))
id = id.substring(2, id.length()-2);
if (dictionary == null)
dictionary = tm.getDictionary(language);
String text = (String)dictionary.get(id);
if (text == null) {
text = "!(" + id + ")!";
}
return text;
}
COM: <s> translate a single tag into the language defined for </s>
|
funcom_train/36933045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void colorToBuffer(CCColor theColor, ShortBuffer theBuffer, int theIndex) {
for(int i = 0; i < _myPixelFormat.numberOfChannels;i++) {
theBuffer.put(
theIndex + _myPixelFormat.offsets[i],
(short)(colorChannel(theColor, color_indices[_myPixelFormat.numberOfChannels - 1][i])*255)
);
}
}
COM: <s> writes a color into a short buffer </s>
|
funcom_train/3925319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean visitObject( Object a ) {
// level 1 is object we are cloning children for
if ( visitLevel == 1 ) {
return( true );
}
// level 2 is children, return false to end visiting
if ( a instanceof VrmlElement ) {
VrmlElement ve = (VrmlElement)a;
VrmlElement childClone = (VrmlElement)ve.vrmlClone( protoInstance );
parent.addChild( childClone );
}
return( false );
}
COM: <s> visits each original non clone child and clones them </s>
|
funcom_train/49006067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
if( in != null ) try { in.close(); in = null; } catch( IOException ignored ) {}
if( out != null ) try { out.flush(); out.close(); out = null; } catch( IOException ignored ) {}
if( socket != null ) try { socket.close(); socket = null; } catch( IOException ignored ) {}
}
COM: <s> close the request </s>
|
funcom_train/42439660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parseParams(String args) {
StringTokenizer tokenizer = new StringTokenizer(args);
while (tokenizer.hasMoreTokens()) {
StringTokenizer key_value =
new StringTokenizer(tokenizer.nextToken(), "=");
String key = key_value.nextToken();
String value = key_value.nextToken();
if (key.startsWith("--kernel-"))
key = key.substring(9);
setParam(key, value);
}
}
COM: <s> set params from string can read string written by </s>
|
funcom_train/25324334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String get(int id, int chunk) throws IOException {
log.debug("Retrieving value for " + id + " from chunk " + chunk);
String key = config.getBaseKey() + "_" + String.valueOf(id) + "_" + String.valueOf(chunk);
//TODO: Should put something in here to retry if connection fails
return get(key);
}
COM: <s> retrieve the data from open key val </s>
|
funcom_train/42507457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IoArmyList mapArmyListFromModeltoIo(final ArmyList list) {
final IoArmyList out = new IoArmyList();
out.setName(list.getName());
out.setDescription(list.getDescription());
out.setType(list.getType().getName());
out.setSlots(mapSlotsFromModelToIo(list));
return out;
}
COM: <s> maps a model project to a io one </s>
|
funcom_train/44851991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPart(HtmlView inHtmlView) throws MessagingException {
MimeBodyPart lBodyPart = new MimeBodyPart();
if (inHtmlView instanceof AbstractHtmlView){
lBodyPart.setContent(((AbstractHtmlView)inHtmlView).getHTMLString(),CONTENT_TYPE_TEXT_HTML) ;
}
else {
lBodyPart.setContent(inHtmlView.toString(),CONTENT_TYPE_TEXT_HTML);
}
getContent().addBodyPart(lBodyPart);
}
COM: <s> adds the specified html view to the content of the message </s>
|
funcom_train/3657687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void displayMessage(String caption, String text, int type)throws NullPointerException{
if(caption == null && text == null)
throw new NullPointerException("Both caption and text are null.");
if(tis != null)
tis.showBalloonMessage(caption, text, type);
}
COM: <s> displays a popup message near the tray icon </s>
|
funcom_train/134473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setStemWidth(int theWidth) {
this.stemWidth = Math.max( Math.min( theWidth, MAX_STEM_WIDTH ), 1 );
if ( 0 == this.stemWidth % 2 ) this.stemWidth--;
this.headY = 2*this.stemWidth+4;
this.headX = this.headY/2;
}
COM: <s> sets the stem width of the arrow </s>
|
funcom_train/35680142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCobolCicsDfhwbcliClientGeneration() throws Exception {
CixsJaxwsService service = Samples.getJvmqueryWs();
getParameters()
.put("cixsOperation", service.getCixsOperations().get(0));
getParameters().put("structHelper", new StructuresGenerator());
addHttpTransportParameters(service, getParameters());
processAndCheck(
service,
Cixs2JaxwsGenerator.OPERATION_COBOL_CICS_DFHWBCLI_CLIENT_VLC_TEMPLATE);
}
COM: <s> generate the dfhwbcli sample cobol client and test it </s>
|
funcom_train/28261889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() {
// Push extra register first, if 32 bit instruction
// Double word will be stored as [bx[LSB][MSB] ebx[LSB][MSB]] because
// stack is counting backwards in memory
if (cpu.doubleWord) {
cpu.setWordToStack(cpu.ebx);
}
// Get word at BX and assign to SS:SP
cpu.setWordToStack(cpu.bx);
}
COM: <s> this pushes the word in bx onto stack top ss sp </s>
|
funcom_train/36817200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeRow(int targetRow){
ArrayList<SpreadsheetCell> thisColumn;
//like addRow, you need to remove a Row from
//each of the outer ArrayLists
for( int i = 0; i < data.size(); i++)
{
thisColumn = data.get(i);
thisColumn.remove( targetRow );
rowCount = thisColumn.size();
}
thisSheetObject.processDeleteRow(targetRow);
}
COM: <s> removes a row specified by target row </s>
|
funcom_train/48500274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRegionMode(boolean on) {
if (on != regionMode) {
if (on) {
regionMode = true;
addMouseListener(mouseHandler);
addMouseMotionListener(mouseHandler);
} else {
regionMode = false;
setRegion(null);
oldRegion = null;
removeMouseListener(mouseHandler);
removeMouseMotionListener(mouseHandler);
}
}
}
COM: <s> turns region selection mode on or off </s>
|
funcom_train/9199636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addToCache(String username, String password, String domainId) {
// if cacheTimeout is zero, there is no caching
if (cacheTimeout == 0) {
return;
}
CacheEntry entry = new CacheEntry(getDigest(password),domainId,
System.currentTimeMillis() + (cacheTimeout * 1000));
synchronized (cache) {
cache.put(username, entry);
}
}
COM: <s> add the user and password to the cache </s>
|
funcom_train/18475648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setMirrorURLList(String mirrorPrefixList, String mirrorSuffix) {
mirrorPrefixList = mirrorPrefixList.trim();
StringTokenizer tokenizer = new StringTokenizer(mirrorPrefixList, ",");
String url;
while (tokenizer.hasMoreTokens()) {
url = tokenizer.nextToken() + mirrorSuffix;
this.mirrorURLList.add(url);
log("Adding this URL to the URL mirror list - " + url);
}
}
COM: <s> set the url mirrors from the mirror prefix list and the mirror suffix </s>
|
funcom_train/51646290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Fragment findFragment(int offsetInMaster, int lengthInMaster) {
Position[] fragments= getFragments();
for (int i= 0; i < fragments.length; i++) {
Fragment f= (Fragment) fragments[i];
if (f.getOffset() <= offsetInMaster && offsetInMaster + lengthInMaster <= f.getOffset() + f.getLength())
return f;
}
return null;
}
COM: <s> finds the fragment of the master document that represents the given range </s>
|
funcom_train/18090903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemoveHeader() {
Request req = new Request();
Header h = new Header("Foo", "Bar");
req.setHeader(h);
assertEquals(h, req.getHeader("Foo"));
req.removeHeader(h);
assertNull(req.getHeader("Foo"));
}
COM: <s> test of remove header method of class request </s>
|
funcom_train/14267862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addReply(FileDesc fd, LimeXMLDocument replyDoc) {
URN hash = fd.getSHA1Urn();
synchronized(mainMap){
mainMap.put(hash,replyDoc);
addKeywords(replyDoc);
}
fd.addLimeXMLDocument(replyDoc);
try {
String identifier = fd.getFile().getCanonicalPath();
replyDoc.setIdentifier(identifier);
} catch(IOException ignored) {}
}
COM: <s> adds a reply into the main map of this collection </s>
|
funcom_train/8081051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Instance farthestInstance(Instances candidateInsts, Instances insts) {
double maxDist = Double.NEGATIVE_INFINITY;
Instance farthestInst = null;
double dist;
setMinMax(m_AllInstances);
Enumeration enumInsts = candidateInsts.enumerateInstances();
while (enumInsts.hasMoreElements()) {
Instance candidate = (Instance) enumInsts.nextElement();
dist = minimumDistance(candidate, insts);
if (dist > maxDist) {
maxDist = dist;
farthestInst = candidate;
}
}
return farthestInst;
}
COM: <s> return the instance in candidate insts that is farthest from any instance </s>
|
funcom_train/44137435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testOsVersion() {
float versionNumber;
m_AllFontAuthorized =true;
if (OSMApplication.isMacOsX()){
try {
versionNumber = Float.parseFloat(System.getProperty("os.version"));
}
catch(Exception e) {
String version = System.getProperty("os.version");
String shortVersion = version.substring(0, version.lastIndexOf("."));
versionNumber = Float.parseFloat(shortVersion);
}
if (versionNumber < 10.3){
m_AllFontAuthorized = false;
}
}
}
COM: <s> tests the os version to know if all fonts can be used </s>
|
funcom_train/8241601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void importWords(ImportBean importBean) {
int status = DAOFactory.getDAOFactory().getStorageDAO().importWords(importBean);
loadSessions();
loadCategories();
if (status == -1) {
UserNotifier.getInstance(trayIcon).displayImportErrorMessage();
} else if (status > 0) {
UserNotifier.getInstance(trayIcon).displayImportSuccessfulMessage(status);
}
}
COM: <s> imports a list of words from a file </s>
|
funcom_train/43374779 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() throws IOException {
int attempts = numAttempts - 1; // fail fast if flush() does times out
try {
out.flush();
attempts = 0;
} finally {
boolean stop = false;
while (!stop) {
try {
out.close();
stop = true;
} catch (InterruptedIOException e) {
if (checkCancellation())
return;
if (++attempts == numAttempts)
throw new InterruptedIOException("close timeout"); //$NON-NLS-1$
}
}
}
}
COM: <s> calls flush then close on the underlying stream </s>
|
funcom_train/3831907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean evaluate (Feature feature) throws FilterEvaluationException {
Object value1 = null;
Object value2 = null;
try {
value1 = propertyName.evaluate (feature);
value2 = literal.getValue ();
} catch(Exception e) {
System.out.println(e);
}
return matches (value2.toString (), value1.toString ());
}
COM: <s> calculates the tt property is like tt s logical value based on the </s>
|
funcom_train/17846609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void toggleOpenCloseMenuItem(boolean open) {
if (open) {
mOpenCloseMenuItem.setText(mLocalizer.msg("menu.open", "Open"));
} else {
mOpenCloseMenuItem.setText(mLocalizer.msg("menu.close", "Close"));
}
}
COM: <s> toggle the text in the open close menu </s>
|
funcom_train/34247301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setupMap() {
for(int i = 0; getChildCount() > i; i++) {
FmmTreeNode lNode = (FmmTreeNode)getChildAt(i);
this.getNodeMap().put(lNode.getFmmObject(), lNode);
}
}
COM: <s> builds the map for node object to fmm object mapping </s>
|
funcom_train/6353121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public static class BaseImpl implements TriggerSensor {
protected final void fireSensorTriggered(long when, boolean sense, int pin) {
for(TriggerSensorListener listener : _listeners) listener.sensorTriggered(when, sense, pin);
}
// TriggerSensor
public final void addListener(TriggerSensorListener listener) {
if(listener == null) throw new IllegalArgumentException();
_listeners.add(listener);
}
public final void removeListener(TriggerSensorListener listener) {
_listeners.remove(listener);
}
// personal
private Collection<TriggerSensorListener> _listeners = new HashSet<TriggerSensorListener>();
}
COM: <s> implementation base class </s>
|
funcom_train/24939734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String showIDLocation() {
IDSourceInfo info = getIDSourceInfo();
String location = showIDLogical();
if (info.getSourceLine() >= 0)
location += " at line " + info.getSourceLine();
else
location += " at line <unknown>";
if (info.getSourceFileName() != null)
location += " in file " + info.getSourceFileName();
else
location += " in file <unknown>";
return location.trim();
}
COM: <s> generates a string representation of where this id comes from of the </s>
|
funcom_train/10833659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream getOctetStream() throws IOException {
if (inputOctetStreamProxy != null) {
if (inputOctetStreamProxy.markSupported()) {
inputOctetStreamProxy.reset();
}
return inputOctetStreamProxy;
}
if (bytes != null) {
inputOctetStreamProxy = new ByteArrayInputStream(bytes);
return inputOctetStreamProxy;
}
return null;
}
COM: <s> returns the octet stream byte stream from input which was specified as </s>
|
funcom_train/21314627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NSArray objects () {
if (this.d2wContext().valueForKey("sortKey") != null) {
return ERXArrayUtilities.sortedArraySortedWithKey(super.objects(), (String) this.d2wContext().valueForKey("sortKey")).immutableClone();
}
else return super.objects();
}
COM: <s> returns the objects sorted if there is a sort key given </s>
|
funcom_train/5379309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setGrayChecked(Object element, boolean state) {
Assert.isNotNull(element);
Widget widget = internalExpand(element, false);
if (widget instanceof TreeItem) {
TreeItem item = (TreeItem) widget;
item.setChecked(state);
item.setGrayed(state);
return true;
}
return false;
}
COM: <s> check and gray the selection rather than calling both </s>
|
funcom_train/50976875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getColumnName(int col) {
String retval = "";
if (col == 0) {
retval = "Property";
if(labels!=null)
retval = labels.getString("property");
} else if (col == 1) {
retval = "Value";
if(labels!=null)
retval = labels.getString("value");
}
return retval;
}
COM: <s> gets the column name attribute of the meta data model object </s>
|
funcom_train/34262536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleApplyButton() {
try {
this.getActionController().validateOK();
this.getActionController().handleApplyButton();
}
catch(OkValidateException ocive) {
OptionDialogHelper.showError(this, "File Pattern", ocive.getMessage());
}
}
COM: <s> handles the apply button </s>
|
funcom_train/934633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int copy(InputStream input, OutputStream output) throws IOException {
byte[] buffer = new byte[getBufferSize()];
int count = 0;
int n = 0;
while ( -1 != (n = input.read(buffer))) {
output.write(buffer, 0, n);
count += n;
}
return count;
}
COM: <s> copy bytes from an code input stream code to an </s>
|
funcom_train/11017716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getImageDimension(){
EscherBSERecord bse = _patriarch._sheet._book.getBSERecord(_pictureIndex);
byte[] data = bse.getBlipRecord().getPicturedata();
int type = bse.getBlipTypeWin32();
return ImageUtils.getImageDimension(new ByteArrayInputStream(data), type);
}
COM: <s> return the dimension of this image </s>
|
funcom_train/25421215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MethodBinding createActLstnrMethodBinding(String expression) {
if(LOG.isLoggable(Level.FINER)) {
LOG.finer("CreateMethod expression = " + expression);
}
return FacesContext.getCurrentInstance().getApplication()
.createMethodBinding(expression, new Class[] { ActionEvent.class });
}
COM: <s> creates the action listener method binding </s>
|
funcom_train/36190317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPlan(CompositionPlan compositionPlan) {
Dbc.require(null != compositionPlan);
String mapKey = this.generateMapKey(compositionPlan.getCompositionId()
.getId());
logger.fine("Add a Composition plan - key " + mapKey);
compositionMap.put(mapKey, compositionPlan);
}
COM: <s> add a composition plan to the store </s>
|
funcom_train/42850144 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSourceRegister1() throws InstructionException {
if (this.isLoadI()) {
return null;
}
try {
return this.tokens.get(1);
}
catch (ArrayIndexOutOfBoundsException e) {
throw new InstructionException(
"Unable to get token for the source register, original string: '" + this.memory + "'");
}
}
COM: <s> get the source register 1 </s>
|
funcom_train/5001787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public Matrix apply(final AbstractMatrixIntIntIntDoubleFunction fun) {
// cacheColSum();
// cacheRowSum();
// cacheSum();
// return new Matrix(
// matrix.copy().forEachNonZero(
// new IntIntDoubleFunction() {
// public double apply(int row, int col, double value) {
// return fun.apply(sum, rowSum[row], colSum[col], value);
// }
// }
// )
// );
// }
COM: <s> apply a four paramters function on the whole table </s>
|
funcom_train/5342271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isPointSelected(Point p) {
int row = rowAtPoint(p);
int col = columnAtPoint(p);
if(row == -1 || col == -1)
return false;
int sel[] = getSelectedRows();
for(int i = 0; i < sel.length; i++)
if(sel[i] == row)
return true;
return false;
}
COM: <s> determines if the given point is a selected row </s>
|
funcom_train/22128999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireAsyncResponse(Object response) throws WSIFException {
Trc.entry(this, response);
//Object result = deserialiseResponseObject(response);
WSIFMessage outMsg = createOutputMessage();
WSIFMessage faultMsg = createFaultMessage();
//TODO
//buildResponseMessages(result, outMsg, faultMsg);
getResponseHandler().executeAsyncResponse(outMsg, faultMsg);
Trc.exit(outMsg);
}
COM: <s> fire async response is called by an async listener when a response </s>
|
funcom_train/48494389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void beginSpaceDeclaration(String spaceName) throws Exception {
if (spaceDeclarationSource != null)
throw new Exception("Space is already defined");
spaceDeclarationSource = new SymbolList();
// TODO: verify space name
// Now it is impossible since parent type (ABMModel) is not resolved here
spaceDeclarationSource.add(
new Symbol(spaceName, sym.IDENTIFIER, "$" + spaceName, -1, -1)
);
}
COM: <s> reads the source code of space declaration </s>
|
funcom_train/35327122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MethodType primsAsBoxes() {
MethodType ct = primsAsBoxes;
if (ct != null) return ct;
MethodType t = erasedType;
ct = canonicalize(erasedType, WRAP, WRAP);
if (ct == null) ct = t; // no prims to box
return primsAsBoxes = ct;
}
COM: <s> turn all primitive types to corresponding wrapper types </s>
|
funcom_train/13258612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLoggingParameters(Object stationKey, Object loggerParameters) {
StationData sd;
if (stationDataHM.containsKey(stationKey)) {
sd = (StationData) stationDataHM.get(stationKey);
} else {
return;
}
if (sd.loggerParameters == null) {
save = true;
} else if (!sd.loggerParameters.equals(loggerParameters)) {
save = true;
}
sd.loggerParameters = loggerParameters;
}
COM: <s> michael fercu marco bertoli 0 </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.