{ // 获取包含Hugging Face文本的span元素 const spans = link.querySelectorAll('span.whitespace-nowrap, span.hidden.whitespace-nowrap'); spans.forEach(span => { if (span.textContent && span.textContent.trim().match(/Hugging\s*Face/i)) { span.textContent = 'AI快站'; } }); }); // 替换logo图片的alt属性 document.querySelectorAll('img[alt*="Hugging"], img[alt*="Face"]').forEach(img => { if (img.alt.match(/Hugging\s*Face/i)) { img.alt = 'AI快站 logo'; } }); } // 替换导航栏中的链接 function replaceNavigationLinks() { // 已替换标记,防止重复运行 if (window._navLinksReplaced) { return; } // 已经替换过的链接集合,防止重复替换 const replacedLinks = new Set(); // 只在导航栏区域查找和替换链接 const headerArea = document.querySelector('header') || document.querySelector('nav'); if (!headerArea) { return; } // 在导航区域内查找链接 const navLinks = headerArea.querySelectorAll('a'); navLinks.forEach(link => { // 如果已经替换过,跳过 if (replacedLinks.has(link)) return; const linkText = link.textContent.trim(); const linkHref = link.getAttribute('href') || ''; // 替换Spaces链接 - 仅替换一次 if ( (linkHref.includes('/spaces') || linkHref === '/spaces' || linkText === 'Spaces' || linkText.match(/^s*Spacess*$/i)) && linkText !== 'OCR模型免费转Markdown' && linkText !== 'OCR模型免费转Markdown' ) { link.textContent = 'OCR模型免费转Markdown'; link.href = 'https://fast360.xyz'; link.setAttribute('target', '_blank'); link.setAttribute('rel', 'noopener noreferrer'); replacedLinks.add(link); } // 删除Posts链接 else if ( (linkHref.includes('/posts') || linkHref === '/posts' || linkText === 'Posts' || linkText.match(/^s*Postss*$/i)) ) { if (link.parentNode) { link.parentNode.removeChild(link); } replacedLinks.add(link); } // 替换Docs链接 - 仅替换一次 else if ( (linkHref.includes('/docs') || linkHref === '/docs' || linkText === 'Docs' || linkText.match(/^s*Docss*$/i)) && linkText !== '模型下载攻略' ) { link.textContent = '模型下载攻略'; link.href = '/'; replacedLinks.add(link); } // 删除Enterprise链接 else if ( (linkHref.includes('/enterprise') || linkHref === '/enterprise' || linkText === 'Enterprise' || linkText.match(/^s*Enterprises*$/i)) ) { if (link.parentNode) { link.parentNode.removeChild(link); } replacedLinks.add(link); } }); // 查找可能嵌套的Spaces和Posts文本 const textNodes = []; function findTextNodes(element) { if (element.nodeType === Node.TEXT_NODE) { const text = element.textContent.trim(); if (text === 'Spaces' || text === 'Posts' || text === 'Enterprise') { textNodes.push(element); } } else { for (const child of element.childNodes) { findTextNodes(child); } } } // 只在导航区域内查找文本节点 findTextNodes(headerArea); // 替换找到的文本节点 textNodes.forEach(node => { const text = node.textContent.trim(); if (text === 'Spaces') { node.textContent = node.textContent.replace(/Spaces/g, 'OCR模型免费转Markdown'); } else if (text === 'Posts') { // 删除Posts文本节点 if (node.parentNode) { node.parentNode.removeChild(node); } } else if (text === 'Enterprise') { // 删除Enterprise文本节点 if (node.parentNode) { node.parentNode.removeChild(node); } } }); // 标记已替换完成 window._navLinksReplaced = true; } // 替换代码区域中的域名 function replaceCodeDomains() { // 特别处理span.hljs-string和span.njs-string元素 document.querySelectorAll('span.hljs-string, span.njs-string, span[class*="hljs-string"], span[class*="njs-string"]').forEach(span => { if (span.textContent && span.textContent.includes('huggingface.co')) { span.textContent = span.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 替换hljs-string类的span中的域名(移除多余的转义符号) document.querySelectorAll('span.hljs-string, span[class*="hljs-string"]').forEach(span => { if (span.textContent && span.textContent.includes('huggingface.co')) { span.textContent = span.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 替换pre和code标签中包含git clone命令的域名 document.querySelectorAll('pre, code').forEach(element => { if (element.textContent && element.textContent.includes('git clone')) { const text = element.innerHTML; if (text.includes('huggingface.co')) { element.innerHTML = text.replace(/huggingface.co/g, 'aifasthub.com'); } } }); // 处理特定的命令行示例 document.querySelectorAll('pre, code').forEach(element => { const text = element.innerHTML; if (text.includes('huggingface.co')) { // 针对git clone命令的专门处理 if (text.includes('git clone') || text.includes('GIT_LFS_SKIP_SMUDGE=1')) { element.innerHTML = text.replace(/huggingface.co/g, 'aifasthub.com'); } } }); // 特别处理模型下载页面上的代码片段 document.querySelectorAll('.flex.border-t, .svelte_hydrator, .inline-block').forEach(container => { const content = container.innerHTML; if (content && content.includes('huggingface.co')) { container.innerHTML = content.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 特别处理模型仓库克隆对话框中的代码片段 try { // 查找包含"Clone this model repository"标题的对话框 const cloneDialog = document.querySelector('.svelte_hydration_boundary, [data-target="MainHeader"]'); if (cloneDialog) { // 查找对话框中所有的代码片段和命令示例 const codeElements = cloneDialog.querySelectorAll('pre, code, span'); codeElements.forEach(element => { if (element.textContent && element.textContent.includes('huggingface.co')) { if (element.innerHTML.includes('huggingface.co')) { element.innerHTML = element.innerHTML.replace(/huggingface.co/g, 'aifasthub.com'); } else { element.textContent = element.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } } }); } // 更精确地定位克隆命令中的域名 document.querySelectorAll('[data-target]').forEach(container => { const codeBlocks = container.querySelectorAll('pre, code, span.hljs-string'); codeBlocks.forEach(block => { if (block.textContent && block.textContent.includes('huggingface.co')) { if (block.innerHTML.includes('huggingface.co')) { block.innerHTML = block.innerHTML.replace(/huggingface.co/g, 'aifasthub.com'); } else { block.textContent = block.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } } }); }); } catch (e) { // 错误处理但不打印日志 } } // 当DOM加载完成后执行替换 if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', () => { replaceHeaderBranding(); replaceNavigationLinks(); replaceCodeDomains(); // 只在必要时执行替换 - 3秒后再次检查 setTimeout(() => { if (!window._navLinksReplaced) { console.log('[Client] 3秒后重新检查导航链接'); replaceNavigationLinks(); } }, 3000); }); } else { replaceHeaderBranding(); replaceNavigationLinks(); replaceCodeDomains(); // 只在必要时执行替换 - 3秒后再次检查 setTimeout(() => { if (!window._navLinksReplaced) { console.log('[Client] 3秒后重新检查导航链接'); replaceNavigationLinks(); } }, 3000); } // 增加一个MutationObserver来处理可能的动态元素加载 const observer = new MutationObserver(mutations => { // 检查是否导航区域有变化 const hasNavChanges = mutations.some(mutation => { // 检查是否存在header或nav元素变化 return Array.from(mutation.addedNodes).some(node => { if (node.nodeType === Node.ELEMENT_NODE) { // 检查是否是导航元素或其子元素 if (node.tagName === 'HEADER' || node.tagName === 'NAV' || node.querySelector('header, nav')) { return true; } // 检查是否在导航元素内部 let parent = node.parentElement; while (parent) { if (parent.tagName === 'HEADER' || parent.tagName === 'NAV') { return true; } parent = parent.parentElement; } } return false; }); }); // 只在导航区域有变化时执行替换 if (hasNavChanges) { // 重置替换状态,允许再次替换 window._navLinksReplaced = false; replaceHeaderBranding(); replaceNavigationLinks(); } }); // 开始观察document.body的变化,包括子节点 if (document.body) { observer.observe(document.body, { childList: true, subtree: true }); } else { document.addEventListener('DOMContentLoaded', () => { observer.observe(document.body, { childList: true, subtree: true }); }); } })(); \");\n out.flush();\n out.close();\n } catch (FileNotFoundException ex) {\n log.error(\"Could not write to local file: Not found!\", ex);\n }\n }\n \n // -------------------- tables only --------------------"},"clean_method":{"kind":"string","value":"void function(String dest) { try { PrintWriter out = new PrintWriter(dest); out.write(STR1.0\\STRUTF-8\\STR); out.write(STR); out.write(buildSingleRatingTable(TankType.LightTank, FieldDef.rating)); out.write(STR); out.write(buildSingleRatingTable(TankType.MediumTank, FieldDef.rating)); out.write(STR); out.write(buildSingleRatingTable(TankType.HeavyTank, FieldDef.rating)); out.write(STR); out.write(buildSingleRatingTable(TankType.TankDestroyer, FieldDef.rating)); out.write(STR); out.write(buildSingleRatingTable(TankType.SelfPropelledGun, FieldDef.rating)); out.write(STR); out.flush(); out.close(); } catch (FileNotFoundException ex) { log.error(STR, ex); } }"},"doc":{"kind":"string","value":"/**\n * Writes a table for each tank type, containing the ratings for each tank,\n * as defined by the TankRating class.\n * @param dest the file where the tables shall be stored in\n */"},"comment":{"kind":"string","value":"Writes a table for each tank type, containing the ratings for each tank, as defined by the TankRating class"},"method_name":{"kind":"string","value":"writeRatingTable"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"Klamann/WotCrawler\",\n \"path\": \"src/main/java/de/nx42/wotcrawler/xml/Transformer.java\",\n \"license\": \"gpl-3.0\",\n \"size\": 14097\n}"},"imports":{"kind":"list like","value":["de.nx42.wotcrawler.db.tank.Tank","de.nx42.wotcrawler.ext.FieldDef","java.io.FileNotFoundException","java.io.PrintWriter"],"string":"[\n \"de.nx42.wotcrawler.db.tank.Tank\",\n \"de.nx42.wotcrawler.ext.FieldDef\",\n \"java.io.FileNotFoundException\",\n \"java.io.PrintWriter\"\n]"},"imports_info":{"kind":"string","value":"import de.nx42.wotcrawler.db.tank.Tank; import de.nx42.wotcrawler.ext.FieldDef; import java.io.FileNotFoundException; import java.io.PrintWriter;"},"cluster_imports_info":{"kind":"string","value":"import de.nx42.wotcrawler.db.tank.*; import de.nx42.wotcrawler.ext.*; import java.io.*;"},"libraries":{"kind":"list like","value":["de.nx42.wotcrawler","java.io"],"string":"[\n \"de.nx42.wotcrawler\",\n \"java.io\"\n]"},"libraries_info":{"kind":"string","value":"de.nx42.wotcrawler; java.io;"},"id":{"kind":"number","value":1661297,"string":"1,661,297"}}},{"rowIdx":2912505,"cells":{"method":{"kind":"string","value":" public FacesConfigFactoryType getOrCreateFactory()\n {\n List nodeList = model.get(\"factory\");\n if (nodeList != null && nodeList.size() > 0)\n {\n return new FacesConfigFactoryTypeImpl(this, \"factory\", model, nodeList.get(0));\n }\n return createFactory();\n }"},"clean_method":{"kind":"string","value":"FacesConfigFactoryType function() { List nodeList = model.get(STR); if (nodeList != null && nodeList.size() > 0) { return new FacesConfigFactoryTypeImpl(this, STR, model, nodeList.get(0)); } return createFactory(); }"},"doc":{"kind":"string","value":"/**\n * If not already created, a new factory element will be created and returned.\n * Otherwise, the first existing factory element will be returned.\n * @return the instance defined for the element factory \n */"},"comment":{"kind":"string","value":"If not already created, a new factory element will be created and returned. Otherwise, the first existing factory element will be returned"},"method_name":{"kind":"string","value":"getOrCreateFactory"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"forge/javaee-descriptors\",\n \"path\": \"impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/facesconfig20/WebFacesConfigDescriptorImpl.java\",\n \"license\": \"epl-1.0\",\n \"size\": 44350\n}"},"imports":{"kind":"list like","value":["java.util.List","org.jboss.shrinkwrap.descriptor.api.facesconfig20.FacesConfigFactoryType","org.jboss.shrinkwrap.descriptor.api.facesconfig20.WebFacesConfigDescriptor","org.jboss.shrinkwrap.descriptor.spi.node.Node"],"string":"[\n \"java.util.List\",\n \"org.jboss.shrinkwrap.descriptor.api.facesconfig20.FacesConfigFactoryType\",\n \"org.jboss.shrinkwrap.descriptor.api.facesconfig20.WebFacesConfigDescriptor\",\n \"org.jboss.shrinkwrap.descriptor.spi.node.Node\"\n]"},"imports_info":{"kind":"string","value":"import java.util.List; import org.jboss.shrinkwrap.descriptor.api.facesconfig20.FacesConfigFactoryType; import org.jboss.shrinkwrap.descriptor.api.facesconfig20.WebFacesConfigDescriptor; import org.jboss.shrinkwrap.descriptor.spi.node.Node;"},"cluster_imports_info":{"kind":"string","value":"import java.util.*; import org.jboss.shrinkwrap.descriptor.api.facesconfig20.*; import org.jboss.shrinkwrap.descriptor.spi.node.*;"},"libraries":{"kind":"list like","value":["java.util","org.jboss.shrinkwrap"],"string":"[\n \"java.util\",\n \"org.jboss.shrinkwrap\"\n]"},"libraries_info":{"kind":"string","value":"java.util; org.jboss.shrinkwrap;"},"id":{"kind":"number","value":1225452,"string":"1,225,452"}}},{"rowIdx":2912506,"cells":{"method":{"kind":"string","value":" @FIXVersion(introduced=\"5.0SP1\")\n @TagNumRef(tagNum=TagNum.UnderlyingLegOptAttribute)\n public void setUnderlyingLegOptAttribute(Character underlyingLegOptAttribute) {\n this.underlyingLegOptAttribute = underlyingLegOptAttribute;\n }"},"clean_method":{"kind":"string","value":"@FIXVersion(introduced=STR) @TagNumRef(tagNum=TagNum.UnderlyingLegOptAttribute) void function(Character underlyingLegOptAttribute) { this.underlyingLegOptAttribute = underlyingLegOptAttribute; }"},"doc":{"kind":"string","value":"/**\n * Message field setter.\n * @param underlyingLegOptAttribute field value\n */"},"comment":{"kind":"string","value":"Message field setter"},"method_name":{"kind":"string","value":"setUnderlyingLegOptAttribute"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"marvisan/HadesFIX\",\n \"path\": \"Model/src/main/java/net/hades/fix/message/comp/UnderlyingLegInstrument.java\",\n \"license\": \"gpl-3.0\",\n \"size\": 27982\n}"},"imports":{"kind":"list like","value":["net.hades.fix.message.anno.FIXVersion","net.hades.fix.message.anno.TagNumRef","net.hades.fix.message.type.TagNum"],"string":"[\n \"net.hades.fix.message.anno.FIXVersion\",\n \"net.hades.fix.message.anno.TagNumRef\",\n \"net.hades.fix.message.type.TagNum\"\n]"},"imports_info":{"kind":"string","value":"import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum;"},"cluster_imports_info":{"kind":"string","value":"import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*;"},"libraries":{"kind":"list like","value":["net.hades.fix"],"string":"[\n \"net.hades.fix\"\n]"},"libraries_info":{"kind":"string","value":"net.hades.fix;"},"id":{"kind":"number","value":1046797,"string":"1,046,797"}}},{"rowIdx":2912507,"cells":{"method":{"kind":"string","value":" public void write(NetInterfaceConfig netConfig) throws KuraException;"},"clean_method":{"kind":"string","value":"void function(NetInterfaceConfig netConfig) throws KuraException;"},"doc":{"kind":"string","value":"/**\n * Persists the network configuration received as argument. Throws a {@link KuraException} if the persist operation\n * fails.\n * \n * @param netConfig\n * @throws KuraException\n */"},"comment":{"kind":"string","value":"Persists the network configuration received as argument. Throws a KuraException if the persist operation fails"},"method_name":{"kind":"string","value":"write"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"darionct/kura\",\n \"path\": \"kura/org.eclipse.kura.linux.net/src/main/java/org/eclipse/kura/internal/linux/net/NetInterfaceConfigSerializationService.java\",\n \"license\": \"epl-1.0\",\n \"size\": 1457\n}"},"imports":{"kind":"list like","value":["org.eclipse.kura.KuraException","org.eclipse.kura.net.NetInterfaceAddressConfig","org.eclipse.kura.net.NetInterfaceConfig"],"string":"[\n \"org.eclipse.kura.KuraException\",\n \"org.eclipse.kura.net.NetInterfaceAddressConfig\",\n \"org.eclipse.kura.net.NetInterfaceConfig\"\n]"},"imports_info":{"kind":"string","value":"import org.eclipse.kura.KuraException; import org.eclipse.kura.net.NetInterfaceAddressConfig; import org.eclipse.kura.net.NetInterfaceConfig;"},"cluster_imports_info":{"kind":"string","value":"import org.eclipse.kura.*; import org.eclipse.kura.net.*;"},"libraries":{"kind":"list like","value":["org.eclipse.kura"],"string":"[\n \"org.eclipse.kura\"\n]"},"libraries_info":{"kind":"string","value":"org.eclipse.kura;"},"id":{"kind":"number","value":834728,"string":"834,728"}}},{"rowIdx":2912508,"cells":{"method":{"kind":"string","value":"\t\n\tprivate Object readResolve() {\n\t\twakeUpQueue = new ArrayBlockingQueue(MAX_BUFFFER_SIZE, true);\n\t\ttimer = new Timer();\n\t\treturn this;\n\t}\t\n\t\n\t/**\n\t * {@inheritDoc}"},"clean_method":{"kind":"string","value":"Object function() { wakeUpQueue = new ArrayBlockingQueue(MAX_BUFFFER_SIZE, true); timer = new Timer(); return this; } /** * {@inheritDoc}"},"doc":{"kind":"string","value":"/**\n\t * Resolves uninitialized fields after XML Deserialization.\n\t *\n\t * @return The current {@link ZWaveWakeUpCommandClass} instance.\n\t */"},"comment":{"kind":"string","value":"Resolves uninitialized fields after XML Deserialization"},"method_name":{"kind":"string","value":"readResolve"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"Greblys/openhab\",\n \"path\": \"bundles/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/protocol/commandclass/ZWaveWakeUpCommandClass.java\",\n \"license\": \"epl-1.0\",\n \"size\": 20107\n}"},"imports":{"kind":"list like","value":["java.util.Timer","java.util.concurrent.ArrayBlockingQueue","org.openhab.binding.zwave.internal.protocol.SerialMessage"],"string":"[\n \"java.util.Timer\",\n \"java.util.concurrent.ArrayBlockingQueue\",\n \"org.openhab.binding.zwave.internal.protocol.SerialMessage\"\n]"},"imports_info":{"kind":"string","value":"import java.util.Timer; import java.util.concurrent.ArrayBlockingQueue; import org.openhab.binding.zwave.internal.protocol.SerialMessage;"},"cluster_imports_info":{"kind":"string","value":"import java.util.*; import java.util.concurrent.*; import org.openhab.binding.zwave.internal.protocol.*;"},"libraries":{"kind":"list like","value":["java.util","org.openhab.binding"],"string":"[\n \"java.util\",\n \"org.openhab.binding\"\n]"},"libraries_info":{"kind":"string","value":"java.util; org.openhab.binding;"},"id":{"kind":"number","value":1635370,"string":"1,635,370"}}},{"rowIdx":2912509,"cells":{"method":{"kind":"string","value":" private void createLabel(final Composite parent, final String text) {\n Label label = new Label(parent, SWT.WRAP);\n label.setText(text);\n label.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false,\n false, 1, 1));\n }"},"clean_method":{"kind":"string","value":"void function(final Composite parent, final String text) { Label label = new Label(parent, SWT.WRAP); label.setText(text); label.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1)); }"},"doc":{"kind":"string","value":"/**\n * Creates a label with the given text.\n *\n * @param parent\n * The parent for the label\n * @param text\n * The text for the label\n */"},"comment":{"kind":"string","value":"Creates a label with the given text"},"method_name":{"kind":"string","value":"createLabel"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"fqqb/yamcs-studio\",\n \"path\": \"bundles/org.csstudio.opibuilder/src/org/csstudio/opibuilder/visualparts/OPIColorDialog.java\",\n \"license\": \"epl-1.0\",\n \"size\": 13030\n}"},"imports":{"kind":"list like","value":["org.eclipse.swt.layout.GridData","org.eclipse.swt.widgets.Composite","org.eclipse.swt.widgets.Label"],"string":"[\n \"org.eclipse.swt.layout.GridData\",\n \"org.eclipse.swt.widgets.Composite\",\n \"org.eclipse.swt.widgets.Label\"\n]"},"imports_info":{"kind":"string","value":"import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label;"},"cluster_imports_info":{"kind":"string","value":"import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*;"},"libraries":{"kind":"list like","value":["org.eclipse.swt"],"string":"[\n \"org.eclipse.swt\"\n]"},"libraries_info":{"kind":"string","value":"org.eclipse.swt;"},"id":{"kind":"number","value":1190943,"string":"1,190,943"}}},{"rowIdx":2912510,"cells":{"method":{"kind":"string","value":" private void renewClaimedTasks() {\n try {\n List claimedTasks = ImmutableList.copyOf(_claimedTasks.values());\n List tasks = Lists.newArrayList();\n\n for (ClaimedTask claimedTask : claimedTasks) {\n if (claimedTask.isComplete()) {\n // Task is likely being removed in another thread. However, go ahead and remove it now\n // to allow other tasks to start sooner.\n _log.info(\"Complete claimed task found during renew: id={}\", claimedTask.getTaskId());\n _claimedTasks.remove(claimedTask.getTaskId());\n } else if (claimedTask.isStarted()) {\n // Task has started and is not complete. Renew it.\n tasks.add(claimedTask.getTask());\n }\n }\n\n if (!tasks.isEmpty()) {\n _scanWorkflow.renewScanRangeTasks(tasks, QUEUE_RENEW_TTL);\n for (ScanRangeTask task : tasks) {\n _log.info(\"Renewed scan range task: {}\", task);\n }\n }\n } catch (Exception e) {\n _log.error(\"Failed to renew scan ranges\", e);\n }\n }"},"clean_method":{"kind":"string","value":"void function() { try { List claimedTasks = ImmutableList.copyOf(_claimedTasks.values()); List tasks = Lists.newArrayList(); for (ClaimedTask claimedTask : claimedTasks) { if (claimedTask.isComplete()) { _log.info(STR, claimedTask.getTaskId()); _claimedTasks.remove(claimedTask.getTaskId()); } else if (claimedTask.isStarted()) { tasks.add(claimedTask.getTask()); } } if (!tasks.isEmpty()) { _scanWorkflow.renewScanRangeTasks(tasks, QUEUE_RENEW_TTL); for (ScanRangeTask task : tasks) { _log.info(STR, task); } } } catch (Exception e) { _log.error(STR, e); } }"},"doc":{"kind":"string","value":"/**\n * Renews all claimed scan range tasks that have not been released. Unless this is called periodically the\n * scan workflow will make this task available to be claimed again.\n */"},"comment":{"kind":"string","value":"Renews all claimed scan range tasks that have not been released. Unless this is called periodically the scan workflow will make this task available to be claimed again"},"method_name":{"kind":"string","value":"renewClaimedTasks"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"bazaarvoice/emodb\",\n \"path\": \"web/src/main/java/com/bazaarvoice/emodb/web/scanner/control/DistributedScanRangeMonitor.java\",\n \"license\": \"apache-2.0\",\n \"size\": 17252\n}"},"imports":{"kind":"list like","value":["com.google.common.collect.ImmutableList","com.google.common.collect.Lists","java.util.List"],"string":"[\n \"com.google.common.collect.ImmutableList\",\n \"com.google.common.collect.Lists\",\n \"java.util.List\"\n]"},"imports_info":{"kind":"string","value":"import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import java.util.List;"},"cluster_imports_info":{"kind":"string","value":"import com.google.common.collect.*; import java.util.*;"},"libraries":{"kind":"list like","value":["com.google.common","java.util"],"string":"[\n \"com.google.common\",\n \"java.util\"\n]"},"libraries_info":{"kind":"string","value":"com.google.common; java.util;"},"id":{"kind":"number","value":1463759,"string":"1,463,759"}}},{"rowIdx":2912511,"cells":{"method":{"kind":"string","value":"\t\n\tVersion getVersion();"},"clean_method":{"kind":"string","value":"Version getVersion();"},"doc":{"kind":"string","value":"/**\n\t * Return the version for this extension.\n\t * @return \n\t */"},"comment":{"kind":"string","value":"Return the version for this extension"},"method_name":{"kind":"string","value":"getVersion"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"Techcable/CommandHelper\",\n \"path\": \"src/main/java/com/laytonsmith/core/extensions/Extension.java\",\n \"license\": \"mit\",\n \"size\": 1845\n}"},"imports":{"kind":"list like","value":["com.laytonsmith.PureUtilities"],"string":"[\n \"com.laytonsmith.PureUtilities\"\n]"},"imports_info":{"kind":"string","value":"import com.laytonsmith.PureUtilities;"},"cluster_imports_info":{"kind":"string","value":"import com.laytonsmith.*;"},"libraries":{"kind":"list like","value":["com.laytonsmith"],"string":"[\n \"com.laytonsmith\"\n]"},"libraries_info":{"kind":"string","value":"com.laytonsmith;"},"id":{"kind":"number","value":1083253,"string":"1,083,253"}}},{"rowIdx":2912512,"cells":{"method":{"kind":"string","value":" public int executeUpdate(String sql, Object... params) throws SQLException {\n return executeUpdate(new Query(sql, params));\n }"},"clean_method":{"kind":"string","value":"int function(String sql, Object... params) throws SQLException { return executeUpdate(new Query(sql, params)); }"},"doc":{"kind":"string","value":"/**\n * Executes the update query given by a Jorm SQL statement and applicable parameters.\n *\n * @param sql\n * the Jorm SQL statement.\n * @param params\n * the applicable parameters.\n * @return the number of updated rows in the database.\n * @throws SQLException\n * if a database access error occurs or the generated SQL\n * statement does not return a result set.\n */"},"comment":{"kind":"string","value":"Executes the update query given by a Jorm SQL statement and applicable parameters"},"method_name":{"kind":"string","value":"executeUpdate"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"jajja/jorm\",\n \"path\": \"src/main/java/com/jajja/jorm/Transaction.java\",\n \"license\": \"mit\",\n \"size\": 84462\n}"},"imports":{"kind":"list like","value":["java.sql.SQLException"],"string":"[\n \"java.sql.SQLException\"\n]"},"imports_info":{"kind":"string","value":"import java.sql.SQLException;"},"cluster_imports_info":{"kind":"string","value":"import java.sql.*;"},"libraries":{"kind":"list like","value":["java.sql"],"string":"[\n \"java.sql\"\n]"},"libraries_info":{"kind":"string","value":"java.sql;"},"id":{"kind":"number","value":2420947,"string":"2,420,947"}}},{"rowIdx":2912513,"cells":{"method":{"kind":"string","value":" public ApiContractInner withSubscriptionKeyParameterNames(SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames) {\n this.subscriptionKeyParameterNames = subscriptionKeyParameterNames;\n return this;\n }"},"clean_method":{"kind":"string","value":"ApiContractInner function(SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames) { this.subscriptionKeyParameterNames = subscriptionKeyParameterNames; return this; }"},"doc":{"kind":"string","value":"/**\n * Set protocols over which API is made available.\n *\n * @param subscriptionKeyParameterNames the subscriptionKeyParameterNames value to set\n * @return the ApiContractInner object itself.\n */"},"comment":{"kind":"string","value":"Set protocols over which API is made available"},"method_name":{"kind":"string","value":"withSubscriptionKeyParameterNames"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"selvasingh/azure-sdk-for-java\",\n \"path\": \"sdk/apimanagement/mgmt-v2019_12_01/src/main/java/com/microsoft/azure/management/apimanagement/v2019_12_01/implementation/ApiContractInner.java\",\n \"license\": \"mit\",\n \"size\": 14657\n}"},"imports":{"kind":"list like","value":["com.microsoft.azure.management.apimanagement.v2019_12_01.SubscriptionKeyParameterNamesContract"],"string":"[\n \"com.microsoft.azure.management.apimanagement.v2019_12_01.SubscriptionKeyParameterNamesContract\"\n]"},"imports_info":{"kind":"string","value":"import com.microsoft.azure.management.apimanagement.v2019_12_01.SubscriptionKeyParameterNamesContract;"},"cluster_imports_info":{"kind":"string","value":"import com.microsoft.azure.management.apimanagement.v2019_12_01.*;"},"libraries":{"kind":"list like","value":["com.microsoft.azure"],"string":"[\n \"com.microsoft.azure\"\n]"},"libraries_info":{"kind":"string","value":"com.microsoft.azure;"},"id":{"kind":"number","value":53007,"string":"53,007"}}},{"rowIdx":2912514,"cells":{"method":{"kind":"string","value":" @Nonnull\n public EdgeMappingInfo findTheEdge(PortMappingInfo port) {\n for (Entry entry : this.edgeStore.entrySet()) {\n EdgeMappingInfo edge = entry.getValue();\n if (edge.getEdge().getUuid().equals(port.getPort().getEdgeId())) {\n return edge;\n }\n }\n return null;\n }"},"clean_method":{"kind":"string","value":"EdgeMappingInfo function(PortMappingInfo port) { for (Entry entry : this.edgeStore.entrySet()) { EdgeMappingInfo edge = entry.getValue(); if (edge.getEdge().getUuid().equals(port.getPort().getEdgeId())) { return edge; } } return null; }"},"doc":{"kind":"string","value":"/**\n * Find the edge connects the given port.\n * @param port - the target port.\n * @return the Endge connects the given port.\n */"},"comment":{"kind":"string","value":"Find the edge connects the given port"},"method_name":{"kind":"string","value":"findTheEdge"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"opendaylight/faas\",\n \"path\": \"fabric-mgr/uln-cache/src/main/java/org/opendaylight/faas/uln/cache/UserLogicalNetworkCache.java\",\n \"license\": \"epl-1.0\",\n \"size\": 54820\n}"},"imports":{"kind":"list like","value":["java.util.Map","org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.common.rev151013.Uuid"],"string":"[\n \"java.util.Map\",\n \"org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.common.rev151013.Uuid\"\n]"},"imports_info":{"kind":"string","value":"import java.util.Map; import org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.common.rev151013.Uuid;"},"cluster_imports_info":{"kind":"string","value":"import java.util.*; import org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.common.rev151013.*;"},"libraries":{"kind":"list like","value":["java.util","org.opendaylight.yang"],"string":"[\n \"java.util\",\n \"org.opendaylight.yang\"\n]"},"libraries_info":{"kind":"string","value":"java.util; org.opendaylight.yang;"},"id":{"kind":"number","value":826808,"string":"826,808"}}},{"rowIdx":2912515,"cells":{"method":{"kind":"string","value":" ServiceCall updateAsync(String resourceGroupName, String accountName, DataLakeAnalyticsAccountUpdateParameters parameters, final ServiceCallback serviceCallback);"},"clean_method":{"kind":"string","value":"ServiceCall updateAsync(String resourceGroupName, String accountName, DataLakeAnalyticsAccountUpdateParameters parameters, final ServiceCallback serviceCallback);"},"doc":{"kind":"string","value":"/**\n * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object.\n *\n * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account.\n * @param accountName The name of the Data Lake Analytics account to update.\n * @param parameters Parameters supplied to the update Data Lake Analytics account operation.\n * @param serviceCallback the async ServiceCallback to handle successful and failed responses.\n * @return the {@link ServiceCall} object\n */"},"comment":{"kind":"string","value":"Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object"},"method_name":{"kind":"string","value":"updateAsync"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"pomortaz/azure-sdk-for-java\",\n \"path\": \"azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/Accounts.java\",\n \"license\": \"mit\",\n \"size\": 41301\n}"},"imports":{"kind":"list like","value":["com.microsoft.azure.management.datalake.analytics.models.DataLakeAnalyticsAccount","com.microsoft.azure.management.datalake.analytics.models.DataLakeAnalyticsAccountUpdateParameters","com.microsoft.rest.ServiceCall","com.microsoft.rest.ServiceCallback"],"string":"[\n \"com.microsoft.azure.management.datalake.analytics.models.DataLakeAnalyticsAccount\",\n \"com.microsoft.azure.management.datalake.analytics.models.DataLakeAnalyticsAccountUpdateParameters\",\n \"com.microsoft.rest.ServiceCall\",\n \"com.microsoft.rest.ServiceCallback\"\n]"},"imports_info":{"kind":"string","value":"import com.microsoft.azure.management.datalake.analytics.models.DataLakeAnalyticsAccount; import com.microsoft.azure.management.datalake.analytics.models.DataLakeAnalyticsAccountUpdateParameters; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback;"},"cluster_imports_info":{"kind":"string","value":"import com.microsoft.azure.management.datalake.analytics.models.*; import com.microsoft.rest.*;"},"libraries":{"kind":"list like","value":["com.microsoft.azure","com.microsoft.rest"],"string":"[\n \"com.microsoft.azure\",\n \"com.microsoft.rest\"\n]"},"libraries_info":{"kind":"string","value":"com.microsoft.azure; com.microsoft.rest;"},"id":{"kind":"number","value":1691013,"string":"1,691,013"}}},{"rowIdx":2912516,"cells":{"method":{"kind":"string","value":"\t\n\tpublic static final void performance(String tag, String method, long time) {\n\t\tif (Cons.SHOW_LOGS) {\n\t\t\tLog.i(\"Performance:\" + tag, method + \": \" + String.valueOf(time) + \" ms\");\n\t\t}\n\t}\t"},"clean_method":{"kind":"string","value":"static final void function(String tag, String method, long time) { if (Cons.SHOW_LOGS) { Log.i(STR + tag, method + STR + String.valueOf(time) + STR); } }"},"doc":{"kind":"string","value":"/**\n\t * Send a INFO log message for performance notice.\n\t * \n\t * @param tag\n\t * Used to identify the source of a log message. It usually\n\t * identifies the class or activity where the log call occurs.\n\t * @param method\n\t * Used to identify the method of a log performance message.\n\t * @param time\n\t * The performance time in milliseconds you would like logged.\n\t */"},"comment":{"kind":"string","value":"Send a INFO log message for performance notice"},"method_name":{"kind":"string","value":"performance"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"r2bapps/TaskManager\",\n \"path\": \"TaskManagerLib/src/r2b/apps/utils/Logger.java\",\n \"license\": \"mit\",\n \"size\": 3251\n}"},"imports":{"kind":"list like","value":["android.util.Log"],"string":"[\n \"android.util.Log\"\n]"},"imports_info":{"kind":"string","value":"import android.util.Log;"},"cluster_imports_info":{"kind":"string","value":"import android.util.*;"},"libraries":{"kind":"list like","value":["android.util"],"string":"[\n \"android.util\"\n]"},"libraries_info":{"kind":"string","value":"android.util;"},"id":{"kind":"number","value":2034665,"string":"2,034,665"}}},{"rowIdx":2912517,"cells":{"method":{"kind":"string","value":" ProductResult getSinglePages() throws ServiceException;"},"clean_method":{"kind":"string","value":"ProductResult getSinglePages() throws ServiceException;"},"doc":{"kind":"string","value":"/**\n * A paging operation that finishes on the first call without a nextlink\n *\n * @return the ProductResult object if successful.\n * @throws ServiceException the exception wrapped in ServiceException if failed.\n */"},"comment":{"kind":"string","value":"A paging operation that finishes on the first call without a nextlink"},"method_name":{"kind":"string","value":"getSinglePages"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"BretJohnson/autorest\",\n \"path\": \"AutoRest/Generators/Java/Azure.Java.Tests/src/main/java/fixtures/paging/Paging.java\",\n \"license\": \"mit\",\n \"size\": 14369\n}"},"imports":{"kind":"list like","value":["com.microsoft.rest.ServiceException"],"string":"[\n \"com.microsoft.rest.ServiceException\"\n]"},"imports_info":{"kind":"string","value":"import com.microsoft.rest.ServiceException;"},"cluster_imports_info":{"kind":"string","value":"import com.microsoft.rest.*;"},"libraries":{"kind":"list like","value":["com.microsoft.rest"],"string":"[\n \"com.microsoft.rest\"\n]"},"libraries_info":{"kind":"string","value":"com.microsoft.rest;"},"id":{"kind":"number","value":1157131,"string":"1,157,131"}}},{"rowIdx":2912518,"cells":{"method":{"kind":"string","value":" protected boolean canPrintStackTrace() {\n return mostRecentElement != null && mostRecentElement.getCause() != null;\n }\n\n \n protected static final class StackTraceElement {\n private final String label;\n private final Location location;\n private final StackTraceElement cause;\n private final boolean canPrint;\n\n StackTraceElement(String label, Location location, StackTraceElement cause, boolean canPrint) {\n this.label = label;\n this.location = location;\n this.cause = cause;\n this.canPrint = canPrint;\n }"},"clean_method":{"kind":"string","value":"boolean function() { return mostRecentElement != null && mostRecentElement.getCause() != null; } protected static final class StackTraceElement { private final String label; private final Location location; private final StackTraceElement cause; private final boolean canPrint; StackTraceElement(String label, Location location, StackTraceElement cause, boolean canPrint) { this.label = label; this.location = location; this.cause = cause; this.canPrint = canPrint; }"},"doc":{"kind":"string","value":"/**\n * Returns true when there is at least one non-built-in element.\n */"},"comment":{"kind":"string","value":"Returns true when there is at least one non-built-in element"},"method_name":{"kind":"string","value":"canPrintStackTrace"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"Digas29/bazel\",\n \"path\": \"src/main/java/com/google/devtools/build/lib/syntax/EvalExceptionWithStackTrace.java\",\n \"license\": \"apache-2.0\",\n \"size\": 11527\n}"},"imports":{"kind":"list like","value":["com.google.devtools.build.lib.events.Location"],"string":"[\n \"com.google.devtools.build.lib.events.Location\"\n]"},"imports_info":{"kind":"string","value":"import com.google.devtools.build.lib.events.Location;"},"cluster_imports_info":{"kind":"string","value":"import com.google.devtools.build.lib.events.*;"},"libraries":{"kind":"list like","value":["com.google.devtools"],"string":"[\n \"com.google.devtools\"\n]"},"libraries_info":{"kind":"string","value":"com.google.devtools;"},"id":{"kind":"number","value":1093009,"string":"1,093,009"}}},{"rowIdx":2912519,"cells":{"method":{"kind":"string","value":"//-------------------------------------------------------------------------\n \n @Test\n public void testWithScheme() {\n final ObjectId test = ObjectId.of(\"id1\", \"value1\");\n assertEquals(ObjectId.of(\"newScheme\", \"value1\"), test.withScheme(\"newScheme\"));\n assertNotSame(test, test.withValue(\"value1\"));\n }"},"clean_method":{"kind":"string","value":"void function() { final ObjectId test = ObjectId.of(\"id1\", STR); assertEquals(ObjectId.of(STR, STR), test.withScheme(STR)); assertNotSame(test, test.withValue(STR)); }"},"doc":{"kind":"string","value":"/**\n * Tests the scheme replacement.\n */"},"comment":{"kind":"string","value":"Tests the scheme replacement"},"method_name":{"kind":"string","value":"testWithScheme"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"McLeodMoores/starling\",\n \"path\": \"projects/util/src/test/java/com/opengamma/id/ObjectIdTest.java\",\n \"license\": \"apache-2.0\",\n \"size\": 8234\n}"},"imports":{"kind":"list like","value":["org.testng.Assert","org.testng.AssertJUnit"],"string":"[\n \"org.testng.Assert\",\n \"org.testng.AssertJUnit\"\n]"},"imports_info":{"kind":"string","value":"import org.testng.Assert; import org.testng.AssertJUnit;"},"cluster_imports_info":{"kind":"string","value":"import org.testng.*;"},"libraries":{"kind":"list like","value":["org.testng"],"string":"[\n \"org.testng\"\n]"},"libraries_info":{"kind":"string","value":"org.testng;"},"id":{"kind":"number","value":2776444,"string":"2,776,444"}}},{"rowIdx":2912520,"cells":{"method":{"kind":"string","value":"\t\n\tpublic KeySelector getStateKeySelector() {\n\t\treturn stateKeySelector;\n\t}"},"clean_method":{"kind":"string","value":"KeySelector function() { return stateKeySelector; }"},"doc":{"kind":"string","value":"/**\n\t * Returns the {@code KeySelector} that must be used for partitioning keyed state in this\n\t * Operation.\n\t *\n\t * @see #setStateKeySelector\n\t */"},"comment":{"kind":"string","value":"Returns the KeySelector that must be used for partitioning keyed state in this Operation"},"method_name":{"kind":"string","value":"getStateKeySelector"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"greghogan/flink\",\n \"path\": \"flink-streaming-java/src/main/java/org/apache/flink/streaming/api/transformations/OneInputTransformation.java\",\n \"license\": \"apache-2.0\",\n \"size\": 4946\n}"},"imports":{"kind":"list like","value":["org.apache.flink.api.java.functions.KeySelector"],"string":"[\n \"org.apache.flink.api.java.functions.KeySelector\"\n]"},"imports_info":{"kind":"string","value":"import org.apache.flink.api.java.functions.KeySelector;"},"cluster_imports_info":{"kind":"string","value":"import org.apache.flink.api.java.functions.*;"},"libraries":{"kind":"list like","value":["org.apache.flink"],"string":"[\n \"org.apache.flink\"\n]"},"libraries_info":{"kind":"string","value":"org.apache.flink;"},"id":{"kind":"number","value":1014173,"string":"1,014,173"}}},{"rowIdx":2912521,"cells":{"method":{"kind":"string","value":" private static List mergeOSGiLibWithExistingBundlesInfo(List newBundlesInfo,\n Map> existingBundleInfo) {\n List effectiveBundlesInfo = existingBundleInfo.get(BundleLocation.NON_OSGI_LIB_BUNDLE);\n\n if (effectiveBundlesInfo != null) {\n effectiveBundlesInfo.addAll(newBundlesInfo);\n } else {\n effectiveBundlesInfo = newBundlesInfo;\n }\n\n return effectiveBundlesInfo\n .stream()\n .distinct()\n .collect(Collectors.toList());\n }"},"clean_method":{"kind":"string","value":"static List function(List newBundlesInfo, Map> existingBundleInfo) { List effectiveBundlesInfo = existingBundleInfo.get(BundleLocation.NON_OSGI_LIB_BUNDLE); if (effectiveBundlesInfo != null) { effectiveBundlesInfo.addAll(newBundlesInfo); } else { effectiveBundlesInfo = newBundlesInfo; } return effectiveBundlesInfo .stream() .distinct() .collect(Collectors.toList()); }"},"doc":{"kind":"string","value":"/**\n * Merges the existing OSGi bundle information with the newly retrieved OSGi bundle information.\n *\n * @param newBundlesInfo the new OSGi bundle information to be added\n * @param existingBundleInfo the existing OSGi bundle information\n * @return merged result of the existing OSGi bundle information with the newly retrieved OSGi bundle information\n */"},"comment":{"kind":"string","value":"Merges the existing OSGi bundle information with the newly retrieved OSGi bundle information"},"method_name":{"kind":"string","value":"mergeOSGiLibWithExistingBundlesInfo"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"nilminiwso2/carbon-kernel-1\",\n \"path\": \"launcher/src/main/java/org/wso2/carbon/launcher/extensions/OSGiLibBundleDeployerUtils.java\",\n \"license\": \"apache-2.0\",\n \"size\": 17237\n}"},"imports":{"kind":"list like","value":["java.util.List","java.util.Map","java.util.stream.Collectors","org.wso2.carbon.launcher.extensions.model.BundleInfo","org.wso2.carbon.launcher.extensions.model.BundleLocation"],"string":"[\n \"java.util.List\",\n \"java.util.Map\",\n \"java.util.stream.Collectors\",\n \"org.wso2.carbon.launcher.extensions.model.BundleInfo\",\n \"org.wso2.carbon.launcher.extensions.model.BundleLocation\"\n]"},"imports_info":{"kind":"string","value":"import java.util.List; import java.util.Map; import java.util.stream.Collectors; import org.wso2.carbon.launcher.extensions.model.BundleInfo; import org.wso2.carbon.launcher.extensions.model.BundleLocation;"},"cluster_imports_info":{"kind":"string","value":"import java.util.*; import java.util.stream.*; import org.wso2.carbon.launcher.extensions.model.*;"},"libraries":{"kind":"list like","value":["java.util","org.wso2.carbon"],"string":"[\n \"java.util\",\n \"org.wso2.carbon\"\n]"},"libraries_info":{"kind":"string","value":"java.util; org.wso2.carbon;"},"id":{"kind":"number","value":1935275,"string":"1,935,275"}}},{"rowIdx":2912522,"cells":{"method":{"kind":"string","value":" private final void add(ArrayList images, int imageId,\n int nameId, int searchTermId) {\n images.add(new GalleryImage(imageId, getString(nameId), getString(searchTermId)));\n }"},"clean_method":{"kind":"string","value":"final void function(ArrayList images, int imageId, int nameId, int searchTermId) { images.add(new GalleryImage(imageId, getString(nameId), getString(searchTermId))); }"},"doc":{"kind":"string","value":"/**\n * Adds an image to the gallery, but using an internationalized search term.\n * Note, that for this to work the internationalized name _must_ be in the\n * search index.\n */"},"comment":{"kind":"string","value":"Adds an image to the gallery, but using an internationalized search term. Note, that for this to work the internationalized name _must_ be in the search index"},"method_name":{"kind":"string","value":"add"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"jaydeetay/stardroid\",\n \"path\": \"app/src/main/java/com/google/android/stardroid/gallery/HardcodedGallery.java\",\n \"license\": \"apache-2.0\",\n \"size\": 4036\n}"},"imports":{"kind":"list like","value":["java.util.ArrayList"],"string":"[\n \"java.util.ArrayList\"\n]"},"imports_info":{"kind":"string","value":"import java.util.ArrayList;"},"cluster_imports_info":{"kind":"string","value":"import java.util.*;"},"libraries":{"kind":"list like","value":["java.util"],"string":"[\n \"java.util\"\n]"},"libraries_info":{"kind":"string","value":"java.util;"},"id":{"kind":"number","value":2580307,"string":"2,580,307"}}},{"rowIdx":2912523,"cells":{"method":{"kind":"string","value":"\t\n\tpublic static Implementation getPlugin() {\r\n\t\treturn plugin;\r\n\t}\r\n\t\r\n\t\n\tpublic static class Implementation extends EclipseUIPlugin {\r\n\t\t\n\t\tpublic Implementation() {\r\n\t\t\tsuper();\r\n\t\r\n\t\t\t// Remember the static instance.\r\n\t\t\t//\r\n\t\t\tplugin = this;\r\n\t\t}\r\n\t}\r\n\r"},"clean_method":{"kind":"string","value":"static Implementation function() { return plugin; } public static class Implementation extends EclipseUIPlugin { public Implementation() { super(); plugin = this; } }"},"doc":{"kind":"string","value":"/**\r\n\t * Returns the singleton instance of the Eclipse plugin.\r\n\t * \r\n\t * \r\n\t * @return the singleton instance.\r\n\t * @generated\r\n\t */"},"comment":{"kind":"string","value":"Returns the singleton instance of the Eclipse plugin."},"method_name":{"kind":"string","value":"getPlugin"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"FTSRG/mondo-collab-framework\",\n \"path\": \"archive/workspaceTracker/VA/ikerlanEMF.editor/src/eu/mondo/collaboration/operationtracemodel/example/WTSpec/presentation/WTSpec2EditorPlugin.java\",\n \"license\": \"epl-1.0\",\n \"size\": 1973\n}"},"imports":{"kind":"list like","value":["org.eclipse.emf.common.ui.EclipseUIPlugin"],"string":"[\n \"org.eclipse.emf.common.ui.EclipseUIPlugin\"\n]"},"imports_info":{"kind":"string","value":"import org.eclipse.emf.common.ui.EclipseUIPlugin;"},"cluster_imports_info":{"kind":"string","value":"import org.eclipse.emf.common.ui.*;"},"libraries":{"kind":"list like","value":["org.eclipse.emf"],"string":"[\n \"org.eclipse.emf\"\n]"},"libraries_info":{"kind":"string","value":"org.eclipse.emf;"},"id":{"kind":"number","value":1921872,"string":"1,921,872"}}},{"rowIdx":2912524,"cells":{"method":{"kind":"string","value":" public long getEventTime(long suggestedTime) {\n long result = suggestedTime;\n if (this.versionTag != null && getRegion().getConcurrencyChecksEnabled()) {\n if (suggestedTime != 0) {\n this.versionTag.setVersionTimeStamp(suggestedTime);\n } else {\n result = this.versionTag.getVersionTimeStamp();\n }\n }\n if (result <= 0) {\n InternalRegion region = this.getRegion();\n if (region != null) {\n result = region.cacheTimeMillis();\n } else {\n result = System.currentTimeMillis();\n }\n }\n return result;\n }\n\n public static class SerializedCacheValueImpl\n implements SerializedCacheValue, CachedDeserializable, Sendable {\n private final EntryEventImpl event;\n @Unretained\n private final CachedDeserializable cd;\n private final Region r;\n private final RegionEntry re;\n private final byte[] serializedValue;\n\n SerializedCacheValueImpl(EntryEventImpl event, Region r, RegionEntry re,\n @Unretained CachedDeserializable cd, byte[] serializedBytes) {\n if (event.isOffHeapReference(cd)) {\n this.event = event;\n } else {\n this.event = null;\n }\n this.r = r;\n this.re = re;\n this.cd = cd;\n this.serializedValue = serializedBytes;\n }"},"clean_method":{"kind":"string","value":"long function(long suggestedTime) { long result = suggestedTime; if (this.versionTag != null && getRegion().getConcurrencyChecksEnabled()) { if (suggestedTime != 0) { this.versionTag.setVersionTimeStamp(suggestedTime); } else { result = this.versionTag.getVersionTimeStamp(); } } if (result <= 0) { InternalRegion region = this.getRegion(); if (region != null) { result = region.cacheTimeMillis(); } else { result = System.currentTimeMillis(); } } return result; } public static class SerializedCacheValueImpl implements SerializedCacheValue, CachedDeserializable, Sendable { private final EntryEventImpl event; private final CachedDeserializable cd; private final Region r; private final RegionEntry re; private final byte[] serializedValue; SerializedCacheValueImpl(EntryEventImpl event, Region r, RegionEntry re, @Unretained CachedDeserializable cd, byte[] serializedBytes) { if (event.isOffHeapReference(cd)) { this.event = event; } else { this.event = null; } this.r = r; this.re = re; this.cd = cd; this.serializedValue = serializedBytes; }"},"doc":{"kind":"string","value":"/**\n * this method joins together version tag timestamps and the \"lastModified\" timestamps generated\n * and stored in entries. If a change does not already carry a lastModified timestamp\n *\n * @return the timestamp to store in the entry\n */"},"comment":{"kind":"string","value":"this method joins together version tag timestamps and the \"lastModified\" timestamps generated and stored in entries. If a change does not already carry a lastModified timestamp"},"method_name":{"kind":"string","value":"getEventTime"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"davebarnes97/geode\",\n \"path\": \"geode-core/src/main/java/org/apache/geode/internal/cache/EntryEventImpl.java\",\n \"license\": \"apache-2.0\",\n \"size\": 99239\n}"},"imports":{"kind":"list like","value":["org.apache.geode.cache.Region","org.apache.geode.cache.SerializedCacheValue","org.apache.geode.internal.Sendable","org.apache.geode.internal.offheap.annotations.Unretained"],"string":"[\n \"org.apache.geode.cache.Region\",\n \"org.apache.geode.cache.SerializedCacheValue\",\n \"org.apache.geode.internal.Sendable\",\n \"org.apache.geode.internal.offheap.annotations.Unretained\"\n]"},"imports_info":{"kind":"string","value":"import org.apache.geode.cache.Region; import org.apache.geode.cache.SerializedCacheValue; import org.apache.geode.internal.Sendable; import org.apache.geode.internal.offheap.annotations.Unretained;"},"cluster_imports_info":{"kind":"string","value":"import org.apache.geode.cache.*; import org.apache.geode.internal.*; import org.apache.geode.internal.offheap.annotations.*;"},"libraries":{"kind":"list like","value":["org.apache.geode"],"string":"[\n \"org.apache.geode\"\n]"},"libraries_info":{"kind":"string","value":"org.apache.geode;"},"id":{"kind":"number","value":67312,"string":"67,312"}}},{"rowIdx":2912525,"cells":{"method":{"kind":"string","value":" private int update(Connection conn, boolean closeConn, String sql, Object... params) throws SQLException {\n if (conn == null) {\n throw new SQLException(\"Null connection\");\n }\n\n if (sql == null) {\n if (closeConn) {\n close(conn);\n }\n throw new SQLException(\"Null SQL statement\");\n }\n\n PreparedStatement stmt = null;\n int rows = 0;\n\n try {\n stmt = this.prepareStatement(conn, sql);\n this.fillStatement(stmt, params);\n rows = stmt.executeUpdate();\n\n } catch (SQLException e) {\n this.rethrow(e, sql, params);\n\n } finally {\n close(stmt);\n if (closeConn) {\n close(conn);\n }\n }\n\n return rows;\n }"},"clean_method":{"kind":"string","value":"int function(Connection conn, boolean closeConn, String sql, Object... params) throws SQLException { if (conn == null) { throw new SQLException(STR); } if (sql == null) { if (closeConn) { close(conn); } throw new SQLException(STR); } PreparedStatement stmt = null; int rows = 0; try { stmt = this.prepareStatement(conn, sql); this.fillStatement(stmt, params); rows = stmt.executeUpdate(); } catch (SQLException e) { this.rethrow(e, sql, params); } finally { close(stmt); if (closeConn) { close(conn); } } return rows; }"},"doc":{"kind":"string","value":"/**\n * Calls update after checking the parameters to ensure nothing is null.\n * @param conn The connection to use for the update call.\n * @param closeConn True if the connection should be closed, false otherwise.\n * @param sql The SQL statement to execute.\n * @param params An array of update replacement parameters. Each row in\n * this array is one set of update replacement values.\n * @return The number of rows updated.\n * @throws SQLException If there are database or parameter errors.\n */"},"comment":{"kind":"string","value":"Calls update after checking the parameters to ensure nothing is null"},"method_name":{"kind":"string","value":"update"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"drinkjava2/jSQLBox\",\n \"path\": \"core/src/main/java/org/apache/commons/dbutils/QueryRunner.java\",\n \"license\": \"apache-2.0\",\n \"size\": 39281\n}"},"imports":{"kind":"list like","value":["java.sql.Connection","java.sql.PreparedStatement","java.sql.SQLException"],"string":"[\n \"java.sql.Connection\",\n \"java.sql.PreparedStatement\",\n \"java.sql.SQLException\"\n]"},"imports_info":{"kind":"string","value":"import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException;"},"cluster_imports_info":{"kind":"string","value":"import java.sql.*;"},"libraries":{"kind":"list like","value":["java.sql"],"string":"[\n \"java.sql\"\n]"},"libraries_info":{"kind":"string","value":"java.sql;"},"id":{"kind":"number","value":33692,"string":"33,692"}}},{"rowIdx":2912526,"cells":{"method":{"kind":"string","value":" public static void removeCreator(Model model,\n\t org.ontoware.rdf2go.model.node.Resource instanceResource,\n\t org.ontoware.rdf2go.model.node.Node value) {\n\tBase.remove(model, instanceResource, CREATOR, value);\n }"},"clean_method":{"kind":"string","value":"static void function(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) { Base.remove(model, instanceResource, CREATOR, value); }"},"doc":{"kind":"string","value":"/**\n * Removes a value of property Creator as an RDF2Go node\n * \n * @param model\n * an RDF2Go model\n * @param resource\n * an RDF2Go resource\n * @param value\n * the value to be removed\n * \n * [Generated from RDFReactor template rule #remove1static]\n */"},"comment":{"kind":"string","value":"Removes a value of property Creator as an RDF2Go node"},"method_name":{"kind":"string","value":"removeCreator"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"m0ep/master-thesis\",\n \"path\": \"source/apis/rdf2go/rdf2go-sioc/src/main/java/org/rdfs/sioc/Thing.java\",\n \"license\": \"mit\",\n \"size\": 317844\n}"},"imports":{"kind":"list like","value":["org.ontoware.rdf2go.model.Model","org.ontoware.rdfreactor.runtime.Base"],"string":"[\n \"org.ontoware.rdf2go.model.Model\",\n \"org.ontoware.rdfreactor.runtime.Base\"\n]"},"imports_info":{"kind":"string","value":"import org.ontoware.rdf2go.model.Model; import org.ontoware.rdfreactor.runtime.Base;"},"cluster_imports_info":{"kind":"string","value":"import org.ontoware.rdf2go.model.*; import org.ontoware.rdfreactor.runtime.*;"},"libraries":{"kind":"list like","value":["org.ontoware.rdf2go","org.ontoware.rdfreactor"],"string":"[\n \"org.ontoware.rdf2go\",\n \"org.ontoware.rdfreactor\"\n]"},"libraries_info":{"kind":"string","value":"org.ontoware.rdf2go; org.ontoware.rdfreactor;"},"id":{"kind":"number","value":1083638,"string":"1,083,638"}}},{"rowIdx":2912527,"cells":{"method":{"kind":"string","value":" public Object validatedDestroy(Object key, EntryEventImpl event)\n throws TimeoutException, EntryNotFoundException, CacheWriterException\n {\n try {\n if (event.getEventId() == null && generateEventID()) {\n event.setNewEventId(cache.getDistributedSystem());\n }\n basicDestroy(event, true, // cacheWrite\n null); // expectedOldValue\n if (event.isOldValueOffHeap()) {\n return null;\n } else {\n return handleNotAvailable(event.getOldValue());\n }\n } finally {\n event.release();\n }\n }"},"clean_method":{"kind":"string","value":"Object function(Object key, EntryEventImpl event) throws TimeoutException, EntryNotFoundException, CacheWriterException { try { if (event.getEventId() == null && generateEventID()) { event.setNewEventId(cache.getDistributedSystem()); } basicDestroy(event, true, null); if (event.isOldValueOffHeap()) { return null; } else { return handleNotAvailable(event.getOldValue()); } } finally { event.release(); } }"},"doc":{"kind":"string","value":"/**\n * Destroys entry without performing validations. Call this after validating\n * key, callback arg, and runtime state.\n */"},"comment":{"kind":"string","value":"Destroys entry without performing validations. Call this after validating key, callback arg, and runtime state"},"method_name":{"kind":"string","value":"validatedDestroy"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"papicella/snappy-store\",\n \"path\": \"gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java\",\n \"license\": \"apache-2.0\",\n \"size\": 506961\n}"},"imports":{"kind":"list like","value":["com.gemstone.gemfire.cache.CacheWriterException","com.gemstone.gemfire.cache.EntryNotFoundException","com.gemstone.gemfire.cache.TimeoutException"],"string":"[\n \"com.gemstone.gemfire.cache.CacheWriterException\",\n \"com.gemstone.gemfire.cache.EntryNotFoundException\",\n \"com.gemstone.gemfire.cache.TimeoutException\"\n]"},"imports_info":{"kind":"string","value":"import com.gemstone.gemfire.cache.CacheWriterException; import com.gemstone.gemfire.cache.EntryNotFoundException; import com.gemstone.gemfire.cache.TimeoutException;"},"cluster_imports_info":{"kind":"string","value":"import com.gemstone.gemfire.cache.*;"},"libraries":{"kind":"list like","value":["com.gemstone.gemfire"],"string":"[\n \"com.gemstone.gemfire\"\n]"},"libraries_info":{"kind":"string","value":"com.gemstone.gemfire;"},"id":{"kind":"number","value":2825383,"string":"2,825,383"}}},{"rowIdx":2912528,"cells":{"method":{"kind":"string","value":" public int fetchNextBatch(\n @SuppressWarnings(\"unused\") @JavaType(internalName = \"Ljava/lang/StackStreamFactory;\") StaticObject stackStream,\n long mode, long anchor,\n int batchSize, int startIndex,\n @JavaType(Object[].class) StaticObject frames,\n Meta meta) {\n assert synchronizedConstants(meta);\n FrameWalker fw = getAnchored(anchor);\n if (fw == null) {\n throw meta.throwExceptionWithMessage(meta.java_lang_InternalError, \"doStackWalk: corrupted buffers\");\n }\n if (batchSize <= 0) {\n return startIndex;\n }\n fw.next(batchSize, startIndex);\n fw.mode(mode);\n Integer decodedOrNull = fw.doStackWalk(frames);\n int decoded = decodedOrNull == null ? fw.decoded() : decodedOrNull;\n return startIndex + decoded;\n }"},"clean_method":{"kind":"string","value":"int function( @SuppressWarnings(STR) @JavaType(internalName = STR) StaticObject stackStream, long mode, long anchor, int batchSize, int startIndex, @JavaType(Object[].class) StaticObject frames, Meta meta) { assert synchronizedConstants(meta); FrameWalker fw = getAnchored(anchor); if (fw == null) { throw meta.throwExceptionWithMessage(meta.java_lang_InternalError, STR); } if (batchSize <= 0) { return startIndex; } fw.next(batchSize, startIndex); fw.mode(mode); Integer decodedOrNull = fw.doStackWalk(frames); int decoded = decodedOrNull == null ? fw.decoded() : decodedOrNull; return startIndex + decoded; }"},"doc":{"kind":"string","value":"/**\n * After {@link #fetchFirstBatch(StaticObject, long, int, int, int, StaticObject, Meta)}, this\n * method allows to continue frame walking, starting from where the previous calls left off.\n * \n * @return The position in the buffer at the end of fetching.\n */"},"comment":{"kind":"string","value":"After #fetchFirstBatch(StaticObject, long, int, int, int, StaticObject, Meta), this method allows to continue frame walking, starting from where the previous calls left off"},"method_name":{"kind":"string","value":"fetchNextBatch"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"smarr/Truffle\",\n \"path\": \"espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/vm/StackWalk.java\",\n \"license\": \"gpl-2.0\",\n \"size\": 15606\n}"},"imports":{"kind":"list like","value":["com.oracle.truffle.espresso.meta.Meta","com.oracle.truffle.espresso.runtime.StaticObject","com.oracle.truffle.espresso.substitutions.JavaType"],"string":"[\n \"com.oracle.truffle.espresso.meta.Meta\",\n \"com.oracle.truffle.espresso.runtime.StaticObject\",\n \"com.oracle.truffle.espresso.substitutions.JavaType\"\n]"},"imports_info":{"kind":"string","value":"import com.oracle.truffle.espresso.meta.Meta; import com.oracle.truffle.espresso.runtime.StaticObject; import com.oracle.truffle.espresso.substitutions.JavaType;"},"cluster_imports_info":{"kind":"string","value":"import com.oracle.truffle.espresso.meta.*; import com.oracle.truffle.espresso.runtime.*; import com.oracle.truffle.espresso.substitutions.*;"},"libraries":{"kind":"list like","value":["com.oracle.truffle"],"string":"[\n \"com.oracle.truffle\"\n]"},"libraries_info":{"kind":"string","value":"com.oracle.truffle;"},"id":{"kind":"number","value":2668195,"string":"2,668,195"}}},{"rowIdx":2912529,"cells":{"method":{"kind":"string","value":" public void removeToolBarComponent(Component component) {\n validateComponentNonNull(component);\n\n getToolbar().remove(component);\n getToolbar().validate();\n getToolbar().repaint();\n }"},"clean_method":{"kind":"string","value":"void function(Component component) { validateComponentNonNull(component); getToolbar().remove(component); getToolbar().validate(); getToolbar().repaint(); }"},"doc":{"kind":"string","value":"/**\n * Removes the given component to the tool bar.\n *\n * @param component the component to remove.\n * @throws IllegalArgumentException if the component is {@code null}.\n * @since 2.6.0\n */"},"comment":{"kind":"string","value":"Removes the given component to the tool bar"},"method_name":{"kind":"string","value":"removeToolBarComponent"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"zaproxy/zaproxy\",\n \"path\": \"zap/src/main/java/org/zaproxy/zap/view/MainToolbarPanel.java\",\n \"license\": \"apache-2.0\",\n \"size\": 18946\n}"},"imports":{"kind":"list like","value":["java.awt.Component"],"string":"[\n \"java.awt.Component\"\n]"},"imports_info":{"kind":"string","value":"import java.awt.Component;"},"cluster_imports_info":{"kind":"string","value":"import java.awt.*;"},"libraries":{"kind":"list like","value":["java.awt"],"string":"[\n \"java.awt\"\n]"},"libraries_info":{"kind":"string","value":"java.awt;"},"id":{"kind":"number","value":2072110,"string":"2,072,110"}}},{"rowIdx":2912530,"cells":{"method":{"kind":"string","value":"\t\n\t@Test(expected=TimeoutException.class)\n\tpublic void testWriteChangesErrorTimeout() throws XBeeException, IOException {\n\t\t// Throw a timeout exception when trying to set the WR parameter.\n\t\tMockito.doThrow(new TimeoutException()).when(xbeeDevice).executeParameter(PARAMETER_WR);\n\t\t\n\t\t// Write changes in the device.\n\t\txbeeDevice.writeChanges();\n\t}\n\t"},"clean_method":{"kind":"string","value":"@Test(expected=TimeoutException.class) void function() throws XBeeException, IOException { Mockito.doThrow(new TimeoutException()).when(xbeeDevice).executeParameter(PARAMETER_WR); xbeeDevice.writeChanges(); }"},"doc":{"kind":"string","value":"/**\n\t * Test method for {@link com.digi.xbee.api.XBeeDevice#writeChanges()}.\n\t * \n\t *

Verify that changes on an XBee device cannot be written if there is a timeout writing \n\t * those changes.

\n\t * \n\t * @throws XBeeException\n\t * @throws IOException \n\t */"},"comment":{"kind":"string","value":"Test method for com.digi.xbee.api.XBeeDevice#writeChanges(). Verify that changes on an XBee device cannot be written if there is a timeout writing those changes"},"method_name":{"kind":"string","value":"testWriteChangesErrorTimeout"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"digidotcom/XBeeJavaLibrary\",\n \"path\": \"library/src/test/java/com/digi/xbee/api/WriteChangesTest.java\",\n \"license\": \"mpl-2.0\",\n \"size\": 4713\n}"},"imports":{"kind":"list like","value":["com.digi.xbee.api.exceptions.TimeoutException","com.digi.xbee.api.exceptions.XBeeException","java.io.IOException","org.junit.Test","org.mockito.Mockito"],"string":"[\n \"com.digi.xbee.api.exceptions.TimeoutException\",\n \"com.digi.xbee.api.exceptions.XBeeException\",\n \"java.io.IOException\",\n \"org.junit.Test\",\n \"org.mockito.Mockito\"\n]"},"imports_info":{"kind":"string","value":"import com.digi.xbee.api.exceptions.TimeoutException; import com.digi.xbee.api.exceptions.XBeeException; import java.io.IOException; import org.junit.Test; import org.mockito.Mockito;"},"cluster_imports_info":{"kind":"string","value":"import com.digi.xbee.api.exceptions.*; import java.io.*; import org.junit.*; import org.mockito.*;"},"libraries":{"kind":"list like","value":["com.digi.xbee","java.io","org.junit","org.mockito"],"string":"[\n \"com.digi.xbee\",\n \"java.io\",\n \"org.junit\",\n \"org.mockito\"\n]"},"libraries_info":{"kind":"string","value":"com.digi.xbee; java.io; org.junit; org.mockito;"},"id":{"kind":"number","value":2064081,"string":"2,064,081"}}},{"rowIdx":2912531,"cells":{"method":{"kind":"string","value":" void deleteBlobsByPrefix(String prefix) throws IOException {\n doPrivileged(() -> {\n deleteBlobs(listBlobsByPath(bucket, prefix, null).keySet());\n return null;\n });\n }"},"clean_method":{"kind":"string","value":"void deleteBlobsByPrefix(String prefix) throws IOException { doPrivileged(() -> { deleteBlobs(listBlobsByPath(bucket, prefix, null).keySet()); return null; }); }"},"doc":{"kind":"string","value":"/**\n * Deletes multiple blobs in the bucket that have a given prefix\n *\n * @param prefix prefix of the buckets to delete\n */"},"comment":{"kind":"string","value":"Deletes multiple blobs in the bucket that have a given prefix"},"method_name":{"kind":"string","value":"deleteBlobsByPrefix"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"danielmitterdorfer/elasticsearch\",\n \"path\": \"plugins/repository-gcs/src/main/java/org/elasticsearch/common/blobstore/gcs/GoogleCloudStorageBlobStore.java\",\n \"license\": \"apache-2.0\",\n \"size\": 15637\n}"},"imports":{"kind":"list like","value":["java.io.IOException"],"string":"[\n \"java.io.IOException\"\n]"},"imports_info":{"kind":"string","value":"import java.io.IOException;"},"cluster_imports_info":{"kind":"string","value":"import java.io.*;"},"libraries":{"kind":"list like","value":["java.io"],"string":"[\n \"java.io\"\n]"},"libraries_info":{"kind":"string","value":"java.io;"},"id":{"kind":"number","value":869885,"string":"869,885"}}},{"rowIdx":2912532,"cells":{"method":{"kind":"string","value":" public static IoFuture performUpgrade(final XnioWorker worker, XnioSsl ssl, InetSocketAddress bindAddress, URI uri, final Map headers, ChannelListener openListener, ChannelListener bindListener, OptionMap optionMap, HandshakeChecker handshakeChecker) {\n return new HttpUpgradeState(worker, ssl, bindAddress, uri, headers, openListener, bindListener, optionMap, handshakeChecker).doUpgrade();\n }"},"clean_method":{"kind":"string","value":"static IoFuture function(final XnioWorker worker, XnioSsl ssl, InetSocketAddress bindAddress, URI uri, final Map headers, ChannelListener openListener, ChannelListener bindListener, OptionMap optionMap, HandshakeChecker handshakeChecker) { return new HttpUpgradeState(worker, ssl, bindAddress, uri, headers, openListener, bindListener, optionMap, handshakeChecker).doUpgrade(); }"},"doc":{"kind":"string","value":"/**\n * Perform a HTTP upgrade that results in a SSL secured connection. This method should be used if the target endpoint is using https\n *\n * @param worker The worker\n * @param ssl The XnioSsl instance\n * @param bindAddress The bind address\n * @param uri The URI to connect to\n * @param headers Any additional headers to include in the upgrade request. This must include an Upgrade header that specifies the type of upgrade being performed\n * @param openListener The open listener that is invoked once the HTTP upgrade is done\n * @param bindListener The bind listener that is invoked when the socket is bound\n * @param optionMap The option map for the connection\n * @param handshakeChecker A handshake checker that can be supplied to verify that the server returned a valid response to the upgrade request\n * @return An IoFuture of the connection\n */"},"comment":{"kind":"string","value":"Perform a HTTP upgrade that results in a SSL secured connection. This method should be used if the target endpoint is using https"},"method_name":{"kind":"string","value":"performUpgrade"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"xnio/xnio\",\n \"path\": \"api/src/main/java/org/xnio/http/HttpUpgrade.java\",\n \"license\": \"apache-2.0\",\n \"size\": 25849\n}"},"imports":{"kind":"list like","value":["java.net.InetSocketAddress","java.util.Map","org.xnio.ChannelListener","org.xnio.IoFuture","org.xnio.OptionMap","org.xnio.XnioWorker","org.xnio.channels.BoundChannel","org.xnio.ssl.SslConnection","org.xnio.ssl.XnioSsl"],"string":"[\n \"java.net.InetSocketAddress\",\n \"java.util.Map\",\n \"org.xnio.ChannelListener\",\n \"org.xnio.IoFuture\",\n \"org.xnio.OptionMap\",\n \"org.xnio.XnioWorker\",\n \"org.xnio.channels.BoundChannel\",\n \"org.xnio.ssl.SslConnection\",\n \"org.xnio.ssl.XnioSsl\"\n]"},"imports_info":{"kind":"string","value":"import java.net.InetSocketAddress; import java.util.Map; import org.xnio.ChannelListener; import org.xnio.IoFuture; import org.xnio.OptionMap; import org.xnio.XnioWorker; import org.xnio.channels.BoundChannel; import org.xnio.ssl.SslConnection; import org.xnio.ssl.XnioSsl;"},"cluster_imports_info":{"kind":"string","value":"import java.net.*; import java.util.*; import org.xnio.*; import org.xnio.channels.*; import org.xnio.ssl.*;"},"libraries":{"kind":"list like","value":["java.net","java.util","org.xnio","org.xnio.channels","org.xnio.ssl"],"string":"[\n \"java.net\",\n \"java.util\",\n \"org.xnio\",\n \"org.xnio.channels\",\n \"org.xnio.ssl\"\n]"},"libraries_info":{"kind":"string","value":"java.net; java.util; org.xnio; org.xnio.channels; org.xnio.ssl;"},"id":{"kind":"number","value":1346956,"string":"1,346,956"}}},{"rowIdx":2912533,"cells":{"method":{"kind":"string","value":" public CursorAdapter getSuggestionsAdapter() {\n return mSuggestionsAdapter;\n }"},"clean_method":{"kind":"string","value":"CursorAdapter function() { return mSuggestionsAdapter; }"},"doc":{"kind":"string","value":"/**\n * Returns the adapter used for suggestions, if any.\n * @return the suggestions adapter\n */"},"comment":{"kind":"string","value":"Returns the adapter used for suggestions, if any"},"method_name":{"kind":"string","value":"getSuggestionsAdapter"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"treasure-lau/CSipSimple\",\n \"path\": \"actionbarsherlock-library/src/main/java/com/actionbarsherlock/widget/SearchView.java\",\n \"license\": \"gpl-3.0\",\n \"size\": 71183\n}"},"imports":{"kind":"list like","value":["android.support.v4.widget.CursorAdapter"],"string":"[\n \"android.support.v4.widget.CursorAdapter\"\n]"},"imports_info":{"kind":"string","value":"import android.support.v4.widget.CursorAdapter;"},"cluster_imports_info":{"kind":"string","value":"import android.support.v4.widget.*;"},"libraries":{"kind":"list like","value":["android.support"],"string":"[\n \"android.support\"\n]"},"libraries_info":{"kind":"string","value":"android.support;"},"id":{"kind":"number","value":538094,"string":"538,094"}}},{"rowIdx":2912534,"cells":{"method":{"kind":"string","value":" @NonNull\n public @EntityType String getEntity(int index) {\n return mEntityConfidence.getEntities().get(index);\n }"},"clean_method":{"kind":"string","value":"@EntityType String function(int index) { return mEntityConfidence.getEntities().get(index); }"},"doc":{"kind":"string","value":"/**\n * Returns the entity at the specified index. Entities are ordered from high confidence\n * to low confidence.\n *\n * @throws IndexOutOfBoundsException if the specified index is out of range.\n * @see #getEntityCount() for the number of entities available.\n */"},"comment":{"kind":"string","value":"Returns the entity at the specified index. Entities are ordered from high confidence to low confidence"},"method_name":{"kind":"string","value":"getEntity"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"aosp-mirror/platform_frameworks_support\",\n \"path\": \"textclassifier/src/main/java/androidx/textclassifier/TextSelection.java\",\n \"license\": \"apache-2.0\",\n \"size\": 9395\n}"},"imports":{"kind":"list like","value":["androidx.textclassifier.TextClassifier"],"string":"[\n \"androidx.textclassifier.TextClassifier\"\n]"},"imports_info":{"kind":"string","value":"import androidx.textclassifier.TextClassifier;"},"cluster_imports_info":{"kind":"string","value":"import androidx.textclassifier.*;"},"libraries":{"kind":"list like","value":["androidx.textclassifier"],"string":"[\n \"androidx.textclassifier\"\n]"},"libraries_info":{"kind":"string","value":"androidx.textclassifier;"},"id":{"kind":"number","value":2720671,"string":"2,720,671"}}},{"rowIdx":2912535,"cells":{"method":{"kind":"string","value":" final boolean isAnnotatedAsSingleton() {\n return (type != null && type.getAnnotation(Singleton.class) != null);\n }\n\n /**\n * {@inheritDoc}"},"clean_method":{"kind":"string","value":"final boolean isAnnotatedAsSingleton() { return (type != null && type.getAnnotation(Singleton.class) != null); } /** * {@inheritDoc}"},"doc":{"kind":"string","value":"/**\n * Returns information whatever the bound type is annotated by {@link Singleton} annotation - this\n * type is always singleton.\n *\n * @return true if bound type is annotated by {@link Singleton} annotation;\n * false otherwise.\n */"},"comment":{"kind":"string","value":"Returns information whatever the bound type is annotated by Singleton annotation - this type is always singleton"},"method_name":{"kind":"string","value":"isAnnotatedAsSingleton"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"mrfranta/jop\",\n \"path\": \"jop-impl/src/main/java/cz/zcu/kiv/jop/factory/binding/BindingImpl.java\",\n \"license\": \"apache-2.0\",\n \"size\": 10747\n}"},"imports":{"kind":"list like","value":["javax.inject.Singleton"],"string":"[\n \"javax.inject.Singleton\"\n]"},"imports_info":{"kind":"string","value":"import javax.inject.Singleton;"},"cluster_imports_info":{"kind":"string","value":"import javax.inject.*;"},"libraries":{"kind":"list like","value":["javax.inject"],"string":"[\n \"javax.inject\"\n]"},"libraries_info":{"kind":"string","value":"javax.inject;"},"id":{"kind":"number","value":390983,"string":"390,983"}}},{"rowIdx":2912536,"cells":{"method":{"kind":"string","value":" protected WFSCountResponse getWfsFeatureCount(HttpRequestBase method) throws PortalServiceException {\n try (InputStream responseStream = httpServiceCaller.getMethodResponseAsStream(method)) {\n Document responseDoc = DOMUtil.buildDomFromStream(responseStream);\n OWSExceptionParser.checkForExceptionResponse(responseDoc);\n\n XPathExpression xPath = DOMUtil.compileXPathExpr(\"wfs:FeatureCollection/@numberOfFeatures\",\n new WFSNamespaceContext());\n Node numNode = (Node) xPath.evaluate(responseDoc, XPathConstants.NODE);\n int numNodeValue = Integer.parseInt(numNode.getTextContent());\n\n return new WFSCountResponse(numNodeValue);\n } catch (Exception ex) {\n throw new PortalServiceException(method, ex);\n } finally {\n if (method != null) {\n method.releaseConnection();\n }\n }\n }"},"clean_method":{"kind":"string","value":"WFSCountResponse function(HttpRequestBase method) throws PortalServiceException { try (InputStream responseStream = httpServiceCaller.getMethodResponseAsStream(method)) { Document responseDoc = DOMUtil.buildDomFromStream(responseStream); OWSExceptionParser.checkForExceptionResponse(responseDoc); XPathExpression xPath = DOMUtil.compileXPathExpr(STR, new WFSNamespaceContext()); Node numNode = (Node) xPath.evaluate(responseDoc, XPathConstants.NODE); int numNodeValue = Integer.parseInt(numNode.getTextContent()); return new WFSCountResponse(numNodeValue); } catch (Exception ex) { throw new PortalServiceException(method, ex); } finally { if (method != null) { method.releaseConnection(); } } }"},"doc":{"kind":"string","value":"/**\n * Makes a WFS GetFeature request represented by method, only the count of features will be returned\n *\n * @param method\n * @return\n * @throws PortalServiceException\n */"},"comment":{"kind":"string","value":"Makes a WFS GetFeature request represented by method, only the count of features will be returned"},"method_name":{"kind":"string","value":"getWfsFeatureCount"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"joshvote/portal-core\",\n \"path\": \"src/main/java/org/auscope/portal/core/services/BaseWFSService.java\",\n \"license\": \"gpl-3.0\",\n \"size\": 12763\n}"},"imports":{"kind":"list like","value":["java.io.InputStream","javax.xml.xpath.XPathConstants","javax.xml.xpath.XPathExpression","org.apache.http.client.methods.HttpRequestBase","org.auscope.portal.core.services.namespaces.WFSNamespaceContext","org.auscope.portal.core.services.responses.ows.OWSExceptionParser","org.auscope.portal.core.services.responses.wfs.WFSCountResponse","org.auscope.portal.core.util.DOMUtil","org.w3c.dom.Document","org.w3c.dom.Node"],"string":"[\n \"java.io.InputStream\",\n \"javax.xml.xpath.XPathConstants\",\n \"javax.xml.xpath.XPathExpression\",\n \"org.apache.http.client.methods.HttpRequestBase\",\n \"org.auscope.portal.core.services.namespaces.WFSNamespaceContext\",\n \"org.auscope.portal.core.services.responses.ows.OWSExceptionParser\",\n \"org.auscope.portal.core.services.responses.wfs.WFSCountResponse\",\n \"org.auscope.portal.core.util.DOMUtil\",\n \"org.w3c.dom.Document\",\n \"org.w3c.dom.Node\"\n]"},"imports_info":{"kind":"string","value":"import java.io.InputStream; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathExpression; import org.apache.http.client.methods.HttpRequestBase; import org.auscope.portal.core.services.namespaces.WFSNamespaceContext; import org.auscope.portal.core.services.responses.ows.OWSExceptionParser; import org.auscope.portal.core.services.responses.wfs.WFSCountResponse; import org.auscope.portal.core.util.DOMUtil; import org.w3c.dom.Document; import org.w3c.dom.Node;"},"cluster_imports_info":{"kind":"string","value":"import java.io.*; import javax.xml.xpath.*; import org.apache.http.client.methods.*; import org.auscope.portal.core.services.namespaces.*; import org.auscope.portal.core.services.responses.ows.*; import org.auscope.portal.core.services.responses.wfs.*; import org.auscope.portal.core.util.*; import org.w3c.dom.*;"},"libraries":{"kind":"list like","value":["java.io","javax.xml","org.apache.http","org.auscope.portal","org.w3c.dom"],"string":"[\n \"java.io\",\n \"javax.xml\",\n \"org.apache.http\",\n \"org.auscope.portal\",\n \"org.w3c.dom\"\n]"},"libraries_info":{"kind":"string","value":"java.io; javax.xml; org.apache.http; org.auscope.portal; org.w3c.dom;"},"id":{"kind":"number","value":194516,"string":"194,516"}}},{"rowIdx":2912537,"cells":{"method":{"kind":"string","value":" protected static OutputValueRenderer getOutputValueRenderer(Class type, RendererMetaOptions options)\n {\n if (type.isArray())\n {\n type = type.getComponentType();\n }\n if (type == String.class ||\n type == Character.class ||\n type == char.class ||\n type.isEnum() ||\n (!JavaClassHelper.isNumeric(type) && JavaClassHelper.getBoxedType(type) != Boolean.class))\n {\n if (options.isXmlOutput())\n {\n return xmlStringOutput;\n }\n else\n {\n return jsonStringOutput;\n }\n }\n else\n {\n return baseOutput;\n }\n }"},"clean_method":{"kind":"string","value":"static OutputValueRenderer function(Class type, RendererMetaOptions options) { if (type.isArray()) { type = type.getComponentType(); } if (type == String.class type == Character.class type == char.class type.isEnum() (!JavaClassHelper.isNumeric(type) && JavaClassHelper.getBoxedType(type) != Boolean.class)) { if (options.isXmlOutput()) { return xmlStringOutput; } else { return jsonStringOutput; } } else { return baseOutput; } }"},"doc":{"kind":"string","value":"/**\n * Returns a renderer for an output value.\n * @param type to render\n * @param options options\n * @return renderer\n */"},"comment":{"kind":"string","value":"Returns a renderer for an output value"},"method_name":{"kind":"string","value":"getOutputValueRenderer"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"b-cuts/esper\",\n \"path\": \"esper/src/main/java/com/espertech/esper/event/util/OutputValueRendererFactory.java\",\n \"license\": \"gpl-2.0\",\n \"size\": 2065\n}"},"imports":{"kind":"list like","value":["com.espertech.esper.util.JavaClassHelper"],"string":"[\n \"com.espertech.esper.util.JavaClassHelper\"\n]"},"imports_info":{"kind":"string","value":"import com.espertech.esper.util.JavaClassHelper;"},"cluster_imports_info":{"kind":"string","value":"import com.espertech.esper.util.*;"},"libraries":{"kind":"list like","value":["com.espertech.esper"],"string":"[\n \"com.espertech.esper\"\n]"},"libraries_info":{"kind":"string","value":"com.espertech.esper;"},"id":{"kind":"number","value":2410682,"string":"2,410,682"}}},{"rowIdx":2912538,"cells":{"method":{"kind":"string","value":" @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)\n SyncPoller, Void> beginRevert(\n String resourceGroupName, String accountName, String poolName, String volumeName, VolumeRevert body);"},"clean_method":{"kind":"string","value":"@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRevert( String resourceGroupName, String accountName, String poolName, String volumeName, VolumeRevert body);"},"doc":{"kind":"string","value":"/**\n * Revert a volume to the snapshot specified in the body.\n *\n * @param resourceGroupName The name of the resource group.\n * @param accountName The name of the NetApp account.\n * @param poolName The name of the capacity pool.\n * @param volumeName The name of the volume.\n * @param body Object for snapshot to revert supplied in the body of the operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the {@link SyncPoller} for polling of long-running operation.\n */"},"comment":{"kind":"string","value":"Revert a volume to the snapshot specified in the body"},"method_name":{"kind":"string","value":"beginRevert"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"Azure/azure-sdk-for-java\",\n \"path\": \"sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java\",\n \"license\": \"mit\",\n \"size\": 47258\n}"},"imports":{"kind":"list like","value":["com.azure.core.annotation.ReturnType","com.azure.core.annotation.ServiceMethod","com.azure.core.management.polling.PollResult","com.azure.core.util.polling.SyncPoller","com.azure.resourcemanager.netapp.models.VolumeRevert"],"string":"[\n \"com.azure.core.annotation.ReturnType\",\n \"com.azure.core.annotation.ServiceMethod\",\n \"com.azure.core.management.polling.PollResult\",\n \"com.azure.core.util.polling.SyncPoller\",\n \"com.azure.resourcemanager.netapp.models.VolumeRevert\"\n]"},"imports_info":{"kind":"string","value":"import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.netapp.models.VolumeRevert;"},"cluster_imports_info":{"kind":"string","value":"import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.netapp.models.*;"},"libraries":{"kind":"list like","value":["com.azure.core","com.azure.resourcemanager"],"string":"[\n \"com.azure.core\",\n \"com.azure.resourcemanager\"\n]"},"libraries_info":{"kind":"string","value":"com.azure.core; com.azure.resourcemanager;"},"id":{"kind":"number","value":1544444,"string":"1,544,444"}}},{"rowIdx":2912539,"cells":{"method":{"kind":"string","value":" public FeDb getDb(String dbName, Privilege privilege) throws AnalysisException {\n return getDb(dbName, privilege, true);\n }"},"clean_method":{"kind":"string","value":"FeDb function(String dbName, Privilege privilege) throws AnalysisException { return getDb(dbName, privilege, true); }"},"doc":{"kind":"string","value":"/**\n * If the database does not exist in the catalog an AnalysisError is thrown.\n * This method does not require the grant option permission.\n */"},"comment":{"kind":"string","value":"If the database does not exist in the catalog an AnalysisError is thrown. This method does not require the grant option permission"},"method_name":{"kind":"string","value":"getDb"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"cloudera/Impala\",\n \"path\": \"fe/src/main/java/org/apache/impala/analysis/Analyzer.java\",\n \"license\": \"apache-2.0\",\n \"size\": 116695\n}"},"imports":{"kind":"list like","value":["org.apache.impala.authorization.Privilege","org.apache.impala.catalog.FeDb","org.apache.impala.common.AnalysisException"],"string":"[\n \"org.apache.impala.authorization.Privilege\",\n \"org.apache.impala.catalog.FeDb\",\n \"org.apache.impala.common.AnalysisException\"\n]"},"imports_info":{"kind":"string","value":"import org.apache.impala.authorization.Privilege; import org.apache.impala.catalog.FeDb; import org.apache.impala.common.AnalysisException;"},"cluster_imports_info":{"kind":"string","value":"import org.apache.impala.authorization.*; import org.apache.impala.catalog.*; import org.apache.impala.common.*;"},"libraries":{"kind":"list like","value":["org.apache.impala"],"string":"[\n \"org.apache.impala\"\n]"},"libraries_info":{"kind":"string","value":"org.apache.impala;"},"id":{"kind":"number","value":1280552,"string":"1,280,552"}}},{"rowIdx":2912540,"cells":{"method":{"kind":"string","value":" @ServiceMethod(returns = ReturnType.SINGLE)\n public ProfileInner create(String resourceGroupName, String profileName, ProfileInner profile) {\n return createAsync(resourceGroupName, profileName, profile).block();\n }"},"clean_method":{"kind":"string","value":"@ServiceMethod(returns = ReturnType.SINGLE) ProfileInner function(String resourceGroupName, String profileName, ProfileInner profile) { return createAsync(resourceGroupName, profileName, profile).block(); }"},"doc":{"kind":"string","value":"/**\n * Creates a new CDN profile with a profile name under the specified subscription and resource group.\n *\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the CDN profile which is unique within the resource group.\n * @param profile CDN profile is a logical grouping of endpoints that share the same settings, such as CDN provider\n * and pricing tier.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return cDN profile is a logical grouping of endpoints that share the same settings, such as CDN provider and\n * pricing tier.\n */"},"comment":{"kind":"string","value":"Creates a new CDN profile with a profile name under the specified subscription and resource group"},"method_name":{"kind":"string","value":"create"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"selvasingh/azure-sdk-for-java\",\n \"path\": \"sdk/resourcemanager/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/ProfilesClientImpl.java\",\n \"license\": \"mit\",\n \"size\": 111257\n}"},"imports":{"kind":"list like","value":["com.azure.core.annotation.ReturnType","com.azure.core.annotation.ServiceMethod","com.azure.resourcemanager.cdn.fluent.models.ProfileInner"],"string":"[\n \"com.azure.core.annotation.ReturnType\",\n \"com.azure.core.annotation.ServiceMethod\",\n \"com.azure.resourcemanager.cdn.fluent.models.ProfileInner\"\n]"},"imports_info":{"kind":"string","value":"import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.cdn.fluent.models.ProfileInner;"},"cluster_imports_info":{"kind":"string","value":"import com.azure.core.annotation.*; import com.azure.resourcemanager.cdn.fluent.models.*;"},"libraries":{"kind":"list like","value":["com.azure.core","com.azure.resourcemanager"],"string":"[\n \"com.azure.core\",\n \"com.azure.resourcemanager\"\n]"},"libraries_info":{"kind":"string","value":"com.azure.core; com.azure.resourcemanager;"},"id":{"kind":"number","value":809363,"string":"809,363"}}},{"rowIdx":2912541,"cells":{"method":{"kind":"string","value":" @SimpleFunction(description=\"Set the time to be shown in the Time Picker popup. Current time is shown by default.\")\n public void SetTimeToDisplay(int hour, int minute) {\n if ((hour < 0) || (hour > 23)) {\n form.dispatchErrorOccurredEvent(this, \"SetTimeToDisplay\", ErrorMessages.ERROR_ILLEGAL_HOUR);\n } else if ((minute < 0) || (minute > 59)) {\n form.dispatchErrorOccurredEvent(this, \"SetTimeToDisplay\", ErrorMessages.ERROR_ILLEGAL_MINUTE);\n } else {\n time.updateTime(hour, minute);\n instant = Dates.TimeInstant(hour, minute);\n customTime = true;\n }\n }\n\n /**\n * Allows the instant to set the hour and minute to be displayed when the `TimePicker` opens.\n * Instants are used in [`Clock`](sensors.html#Clock), {@link DatePicker}, and {@link TimePicker}"},"clean_method":{"kind":"string","value":"@SimpleFunction(description=STR) void function(int hour, int minute) { if ((hour < 0) (hour > 23)) { form.dispatchErrorOccurredEvent(this, STR, ErrorMessages.ERROR_ILLEGAL_HOUR); } else if ((minute < 0) (minute > 59)) { form.dispatchErrorOccurredEvent(this, STR, ErrorMessages.ERROR_ILLEGAL_MINUTE); } else { time.updateTime(hour, minute); instant = Dates.TimeInstant(hour, minute); customTime = true; } } /** * Allows the instant to set the hour and minute to be displayed when the `TimePicker` opens. * Instants are used in [`Clock`](sensors.html#Clock), {@link DatePicker}, and {@link TimePicker}"},"doc":{"kind":"string","value":"/**\n * Allows the user to set the time to be displayed when the `TimePicker` opens. Valid values for\n * the hour field are 0-23 and 0-59 for the second field.\n * @param hour\n * @param minute\n */"},"comment":{"kind":"string","value":"Allows the user to set the time to be displayed when the `TimePicker` opens. Valid values for the hour field are 0-23 and 0-59 for the second field"},"method_name":{"kind":"string","value":"SetTimeToDisplay"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"kkashi01/appinventor-sources\",\n \"path\": \"appinventor/components/src/com/google/appinventor/components/runtime/TimePicker.java\",\n \"license\": \"apache-2.0\",\n \"size\": 7010\n}"},"imports":{"kind":"list like","value":["com.google.appinventor.components.annotations.SimpleFunction","com.google.appinventor.components.runtime.util.Dates","com.google.appinventor.components.runtime.util.ErrorMessages"],"string":"[\n \"com.google.appinventor.components.annotations.SimpleFunction\",\n \"com.google.appinventor.components.runtime.util.Dates\",\n \"com.google.appinventor.components.runtime.util.ErrorMessages\"\n]"},"imports_info":{"kind":"string","value":"import com.google.appinventor.components.annotations.SimpleFunction; import com.google.appinventor.components.runtime.util.Dates; import com.google.appinventor.components.runtime.util.ErrorMessages;"},"cluster_imports_info":{"kind":"string","value":"import com.google.appinventor.components.annotations.*; import com.google.appinventor.components.runtime.util.*;"},"libraries":{"kind":"list like","value":["com.google.appinventor"],"string":"[\n \"com.google.appinventor\"\n]"},"libraries_info":{"kind":"string","value":"com.google.appinventor;"},"id":{"kind":"number","value":851280,"string":"851,280"}}},{"rowIdx":2912542,"cells":{"method":{"kind":"string","value":" public String getText(Object object) {\n String label = ((MdfAssociation)object).getName();\n return label == null || label.length() == 0 ?\n getString(\"_UI_MdfAssociation_type\") : label;\n }"},"clean_method":{"kind":"string","value":"String function(Object object) { String label = ((MdfAssociation)object).getName(); return label == null label.length() == 0 ? getString(STR) : label; }"},"doc":{"kind":"string","value":"/**\n * This returns the label text for the adapted class.\n */"},"comment":{"kind":"string","value":"This returns the label text for the adapted class"},"method_name":{"kind":"string","value":"getText"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"debabratahazra/DS\",\n \"path\": \"designstudio/components/domain/ui/com.odcgroup.mdf.editor/source/com/odcgroup/mdf/editor/ui/editors/providers/MdfAssociationItemProvider.java\",\n \"license\": \"epl-1.0\",\n \"size\": 9178\n}"},"imports":{"kind":"list like","value":["com.odcgroup.mdf.metamodel.MdfAssociation"],"string":"[\n \"com.odcgroup.mdf.metamodel.MdfAssociation\"\n]"},"imports_info":{"kind":"string","value":"import com.odcgroup.mdf.metamodel.MdfAssociation;"},"cluster_imports_info":{"kind":"string","value":"import com.odcgroup.mdf.metamodel.*;"},"libraries":{"kind":"list like","value":["com.odcgroup.mdf"],"string":"[\n \"com.odcgroup.mdf\"\n]"},"libraries_info":{"kind":"string","value":"com.odcgroup.mdf;"},"id":{"kind":"number","value":2824211,"string":"2,824,211"}}},{"rowIdx":2912543,"cells":{"method":{"kind":"string","value":" public void fireEvent(String elementRef,final String type, final Map data,final Map domChanges){\n fireEvent(elementRef, type, data, domChanges, null);\n }"},"clean_method":{"kind":"string","value":"void function(String elementRef,final String type, final Map data,final Map domChanges){ fireEvent(elementRef, type, data, domChanges, null); }"},"doc":{"kind":"string","value":"/**\n * Fire event callback on a element.\n * @param elementRef\n * @param type\n * @param data\n * @param domChanges\n */"},"comment":{"kind":"string","value":"Fire event callback on a element"},"method_name":{"kind":"string","value":"fireEvent"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"xiayun200825/weex\",\n \"path\": \"android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java\",\n \"license\": \"apache-2.0\",\n \"size\": 55202\n}"},"imports":{"kind":"list like","value":["java.util.Map"],"string":"[\n \"java.util.Map\"\n]"},"imports_info":{"kind":"string","value":"import java.util.Map;"},"cluster_imports_info":{"kind":"string","value":"import java.util.*;"},"libraries":{"kind":"list like","value":["java.util"],"string":"[\n \"java.util\"\n]"},"libraries_info":{"kind":"string","value":"java.util;"},"id":{"kind":"number","value":803741,"string":"803,741"}}},{"rowIdx":2912544,"cells":{"method":{"kind":"string","value":" private UserTransaction getUserTransaction() {\n if (!cacheUserTransaction) {\n if (log.isDebugEnabled()) {\n log.debug(\"Acquiring a new UserTransaction for event adaptor : \" + eventAdaptorName);\n }\n\n try {\n context = getInitialContext();\n return\n JMSUtils.lookup(context, UserTransaction.class, getUserTransactionJNDIName());\n } catch (NamingException e) {\n handleException(\"Error looking up UserTransaction : \" + getUserTransactionJNDIName() +\n \" using JNDI properties : \" + jmsProperties, e);\n }\n }\n\n if (sharedUserTransaction == null) {\n try {\n context = getInitialContext();\n sharedUserTransaction =\n JMSUtils.lookup(context, UserTransaction.class, getUserTransactionJNDIName());\n if (log.isDebugEnabled()) {\n log.debug(\"Acquired shared UserTransaction for event adator : \" + eventAdaptorName);\n }\n } catch (NamingException e) {\n handleException(\"Error looking up UserTransaction : \" + getUserTransactionJNDIName() +\n \" using JNDI properties : \" + jmsProperties, e);\n }\n }\n return sharedUserTransaction;\n }"},"clean_method":{"kind":"string","value":"UserTransaction function() { if (!cacheUserTransaction) { if (log.isDebugEnabled()) { log.debug(STR + eventAdaptorName); } try { context = getInitialContext(); return JMSUtils.lookup(context, UserTransaction.class, getUserTransactionJNDIName()); } catch (NamingException e) { handleException(STR + getUserTransactionJNDIName() + STR + jmsProperties, e); } } if (sharedUserTransaction == null) { try { context = getInitialContext(); sharedUserTransaction = JMSUtils.lookup(context, UserTransaction.class, getUserTransactionJNDIName()); if (log.isDebugEnabled()) { log.debug(STR + eventAdaptorName); } } catch (NamingException e) { handleException(STR + getUserTransactionJNDIName() + STR + jmsProperties, e); } } return sharedUserTransaction; }"},"doc":{"kind":"string","value":"/**\n * The UserTransaction to be used, looked up from the JNDI\n *\n * @return The UserTransaction to be used, looked up from the JNDI\n */"},"comment":{"kind":"string","value":"The UserTransaction to be used, looked up from the JNDI"},"method_name":{"kind":"string","value":"getUserTransaction"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"lankavitharana/carbon-event-processing\",\n \"path\": \"components/adaptors/event-input-adaptor/org.wso2.carbon.event.input.adaptor.jms/src/main/java/org/wso2/carbon/event/input/adaptor/jms/internal/util/JMSTaskManager.java\",\n \"license\": \"apache-2.0\",\n \"size\": 49739\n}"},"imports":{"kind":"list like","value":["javax.naming.NamingException","javax.transaction.UserTransaction"],"string":"[\n \"javax.naming.NamingException\",\n \"javax.transaction.UserTransaction\"\n]"},"imports_info":{"kind":"string","value":"import javax.naming.NamingException; import javax.transaction.UserTransaction;"},"cluster_imports_info":{"kind":"string","value":"import javax.naming.*; import javax.transaction.*;"},"libraries":{"kind":"list like","value":["javax.naming","javax.transaction"],"string":"[\n \"javax.naming\",\n \"javax.transaction\"\n]"},"libraries_info":{"kind":"string","value":"javax.naming; javax.transaction;"},"id":{"kind":"number","value":1858923,"string":"1,858,923"}}},{"rowIdx":2912545,"cells":{"method":{"kind":"string","value":" public static final Function toBigInteger(final DecimalPoint decimalPoint) {\r\n return new ToBigInteger(decimalPoint);\r\n }\r\n\r\n \r"},"clean_method":{"kind":"string","value":"static final Function function(final DecimalPoint decimalPoint) { return new ToBigInteger(decimalPoint); }"},"doc":{"kind":"string","value":"/**\r\n *

\r\n * Converts a String into a BigInteger, using the specified decimal point\r\n * configuration ({@link DecimalPoint}). The target String should contain no\r\n * thousand separators.\r\n * Any fractional part of the input String will be removed.\r\n *

\r\n * \r\n * @param decimalPoint the decimal point being used by the String\r\n * @return the resulting BigInteger object\r\n */"},"comment":{"kind":"string","value":"Converts a String into a BigInteger, using the specified decimal point configuration (DecimalPoint). The target String should contain no thousand separators. Any fractional part of the input String will be removed."},"method_name":{"kind":"string","value":"toBigInteger"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"op4j/op4j\",\n \"path\": \"src/main/java/org/op4j/functions/FnString.java\",\n \"license\": \"apache-2.0\",\n \"size\": 242735\n}"},"imports":{"kind":"list like","value":["java.math.BigInteger","org.op4j.functions.FnStringAuxNumberConverters"],"string":"[\n \"java.math.BigInteger\",\n \"org.op4j.functions.FnStringAuxNumberConverters\"\n]"},"imports_info":{"kind":"string","value":"import java.math.BigInteger; import org.op4j.functions.FnStringAuxNumberConverters;"},"cluster_imports_info":{"kind":"string","value":"import java.math.*; import org.op4j.functions.*;"},"libraries":{"kind":"list like","value":["java.math","org.op4j.functions"],"string":"[\n \"java.math\",\n \"org.op4j.functions\"\n]"},"libraries_info":{"kind":"string","value":"java.math; org.op4j.functions;"},"id":{"kind":"number","value":2233713,"string":"2,233,713"}}},{"rowIdx":2912546,"cells":{"method":{"kind":"string","value":"\t\n\t@Test\n\t@Ignore\n\tpublic void testJoinAndAddToEnsemble() throws Exception {\n System.err.println(CommandSupport.executeCommand(\"fabric:create --force --clean -n\"));\n //System.out.println(executeCommand(\"shell:info\"));\n //System.out.println(executeCommand(\"fabric:info\"));\n //System.out.println(executeCommand(\"fabric:profile-list\"));\n\n BundleContext moduleContext = ServiceLocator.getSystemContext();\n ServiceProxy fabricProxy = ServiceProxy.createServiceProxy(moduleContext, FabricService.class);\n try {\n FabricService fabricService = fabricProxy.getService();\n AdminService adminService = ServiceLocator.awaitService(AdminService.class);\n String version = System.getProperty(\"fabric.version\");\n System.out.println(CommandSupport.executeCommand(\"admin:create --featureURL mvn:io.fabric8/fabric8-karaf/\" + version + \"/xml/features --feature fabric-git --feature fabric-agent --feature fabric-boot-commands basic_cnt_f\"));\n System.out.println(CommandSupport.executeCommand(\"admin:create --featureURL mvn:io.fabric8/fabric8-karaf/\" + version + \"/xml/features --feature fabric-git --feature fabric-agent --feature fabric-boot-commands basic_cnt_g\"));\n try {\n System.out.println(CommandSupport.executeCommand(\"admin:start basic_cnt_f\"));\n System.out.println(CommandSupport.executeCommand(\"admin:start basic_cnt_g\"));\n ProvisionSupport.instanceStarted(Arrays.asList(\"basic_cnt_f\", \"basic_cnt_g\"), ProvisionSupport.PROVISION_TIMEOUT);\n System.out.println(CommandSupport.executeCommand(\"admin:list\"));\n String joinCommand = \"fabric:join -f --zookeeper-password \"+ fabricService.getZookeeperPassword() +\" \" + fabricService.getZookeeperUrl();\n\n String response = \"\";\n for (int i = 0; i < 10 && !response.contains(\"true\"); i++) {\n response = CommandSupport.executeCommand(\"ssh:ssh -l karaf -P karaf -p \" + adminService.getInstance(\"basic_cnt_f\").getSshPort() + \" localhost \" + WAIT_FOR_JOIN_SERVICE);\n Thread.sleep(1000);\n }\n response = \"\";\n for (int i = 0; i < 10 && !response.contains(\"true\"); i++) {\n response = CommandSupport.executeCommand(\"ssh:ssh -l karaf -P karaf -p \" + adminService.getInstance(\"basic_cnt_g\").getSshPort() + \" localhost \" + WAIT_FOR_JOIN_SERVICE);\n Thread.sleep(1000);\n }\n\n System.err.println(CommandSupport.executeCommand(\"ssh:ssh -l karaf -P karaf -p \" + adminService.getInstance(\"basic_cnt_f\").getSshPort() + \" localhost \" + joinCommand));\n System.err.println(CommandSupport.executeCommand(\"ssh:ssh -l karaf -P karaf -p \" + adminService.getInstance(\"basic_cnt_g\").getSshPort() + \" localhost \" + joinCommand));\n ProvisionSupport.containersExist(Arrays.asList(\"basic_cnt_f\", \"basic_cnt_g\"), ProvisionSupport.PROVISION_TIMEOUT);\n Container cntF = fabricService.getContainer(\"basic_cnt_f\");\n Container cntG = fabricService.getContainer(\"basic_cnt_g\");\n ProvisionSupport.containerStatus(Arrays.asList(cntF, cntG), \"success\", ProvisionSupport.PROVISION_TIMEOUT);\n EnsembleSupport.addToEnsemble(fabricService, cntF, cntG);\n System.out.println(CommandSupport.executeCommand(\"fabric:container-list\"));\n EnsembleSupport.removeFromEnsemble(fabricService, cntF, cntG);\n System.out.println(CommandSupport.executeCommand(\"fabric:container-list\"));\n } finally {\n System.out.println(CommandSupport.executeCommand(\"admin:stop basic_cnt_f\"));\n System.out.println(CommandSupport.executeCommand(\"admin:stop basic_cnt_g\"));\n }\n } finally {\n fabricProxy.close();\n }\n\t}"},"clean_method":{"kind":"string","value":"void function() throws Exception { System.err.println(CommandSupport.executeCommand(STR)); BundleContext moduleContext = ServiceLocator.getSystemContext(); ServiceProxy fabricProxy = ServiceProxy.createServiceProxy(moduleContext, FabricService.class); try { FabricService fabricService = fabricProxy.getService(); AdminService adminService = ServiceLocator.awaitService(AdminService.class); String version = System.getProperty(STR); System.out.println(CommandSupport.executeCommand(STR + version + STR)); System.out.println(CommandSupport.executeCommand(STR + version + STR)); try { System.out.println(CommandSupport.executeCommand(STR)); System.out.println(CommandSupport.executeCommand(STR)); ProvisionSupport.instanceStarted(Arrays.asList(STR, STR), ProvisionSupport.PROVISION_TIMEOUT); System.out.println(CommandSupport.executeCommand(STR)); String joinCommand = STR+ fabricService.getZookeeperPassword() +\" \" + fabricService.getZookeeperUrl(); String response = STRtrueSTRssh:ssh -l karaf -P karaf -p \" + adminService.getInstance(STR).getSshPort() + \" localhost \" + WAIT_FOR_JOIN_SERVICE); Thread.sleep(1000); } response = STRtrueSTRssh:ssh -l karaf -P karaf -p \" + adminService.getInstance(STR).getSshPort() + \" localhost STRssh:ssh -l karaf -P karaf -p \" + adminService.getInstance(STR).getSshPort() + \" localhost STRssh:ssh -l karaf -P karaf -p \" + adminService.getInstance(STR).getSshPort() + \" localhost \" + joinCommand)); ProvisionSupport.containersExist(Arrays.asList(STR, STR), ProvisionSupport.PROVISION_TIMEOUT); Container cntF = fabricService.getContainer(STR); Container cntG = fabricService.getContainer(STR); ProvisionSupport.containerStatus(Arrays.asList(cntF, cntG), \"successSTRfabric:container-listSTRfabric:container-listSTRadmin:stop basic_cnt_fSTRadmin:stop basic_cnt_g\")); } } finally { fabricProxy.close(); } }"},"doc":{"kind":"string","value":"/**\n\t * This is a test for FABRIC-353.\n\t */"},"comment":{"kind":"string","value":"This is a test for FABRIC-353"},"method_name":{"kind":"string","value":"testJoinAndAddToEnsemble"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"jonathanchristison/fabric8\",\n \"path\": \"itests/basic/karaf/src/test/java/io/fabric8/itests/basic/karaf/ExtendedJoinTest.java\",\n \"license\": \"apache-2.0\",\n \"size\": 7130\n}"},"imports":{"kind":"list like","value":["io.fabric8.api.Container","io.fabric8.api.FabricService","io.fabric8.api.gravia.ServiceLocator","io.fabric8.itests.support.CommandSupport","io.fabric8.itests.support.ProvisionSupport","io.fabric8.itests.support.ServiceProxy","java.util.Arrays","org.apache.karaf.admin.AdminService","org.osgi.framework.BundleContext"],"string":"[\n \"io.fabric8.api.Container\",\n \"io.fabric8.api.FabricService\",\n \"io.fabric8.api.gravia.ServiceLocator\",\n \"io.fabric8.itests.support.CommandSupport\",\n \"io.fabric8.itests.support.ProvisionSupport\",\n \"io.fabric8.itests.support.ServiceProxy\",\n \"java.util.Arrays\",\n \"org.apache.karaf.admin.AdminService\",\n \"org.osgi.framework.BundleContext\"\n]"},"imports_info":{"kind":"string","value":"import io.fabric8.api.Container; import io.fabric8.api.FabricService; import io.fabric8.api.gravia.ServiceLocator; import io.fabric8.itests.support.CommandSupport; import io.fabric8.itests.support.ProvisionSupport; import io.fabric8.itests.support.ServiceProxy; import java.util.Arrays; import org.apache.karaf.admin.AdminService; import org.osgi.framework.BundleContext;"},"cluster_imports_info":{"kind":"string","value":"import io.fabric8.api.*; import io.fabric8.api.gravia.*; import io.fabric8.itests.support.*; import java.util.*; import org.apache.karaf.admin.*; import org.osgi.framework.*;"},"libraries":{"kind":"list like","value":["io.fabric8.api","io.fabric8.itests","java.util","org.apache.karaf","org.osgi.framework"],"string":"[\n \"io.fabric8.api\",\n \"io.fabric8.itests\",\n \"java.util\",\n \"org.apache.karaf\",\n \"org.osgi.framework\"\n]"},"libraries_info":{"kind":"string","value":"io.fabric8.api; io.fabric8.itests; java.util; org.apache.karaf; org.osgi.framework;"},"id":{"kind":"number","value":294286,"string":"294,286"}}},{"rowIdx":2912547,"cells":{"method":{"kind":"string","value":" @Test\n public void testGetScope_1()\n throws Exception {\n ScriptFilterAction fixture = new ScriptFilterAction();\n fixture.setKey(\"\");\n fixture.setValue(\"\");\n fixture.setAction(ScriptFilterActionType.add);\n fixture.setScope(\"\");\n\n String result = fixture.getScope();\n\n assertEquals(\"\", result);\n }"},"clean_method":{"kind":"string","value":"void function() throws Exception { ScriptFilterAction fixture = new ScriptFilterAction(); fixture.setKey(STRSTRSTR\", result); }"},"doc":{"kind":"string","value":"/**\n * Run the String getScope() method test.\n *\n * @throws Exception\n *\n * @generatedBy CodePro at 12/15/14 1:34 PM\n */"},"comment":{"kind":"string","value":"Run the String getScope() method test"},"method_name":{"kind":"string","value":"testGetScope_1"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"kevinmcgoldrick/Tank\",\n \"path\": \"data_model/src/test/java/com/intuit/tank/project/ScriptFilterActionTest.java\",\n \"license\": \"epl-1.0\",\n \"size\": 9432\n}"},"imports":{"kind":"list like","value":["com.intuit.tank.project.ScriptFilterAction"],"string":"[\n \"com.intuit.tank.project.ScriptFilterAction\"\n]"},"imports_info":{"kind":"string","value":"import com.intuit.tank.project.ScriptFilterAction;"},"cluster_imports_info":{"kind":"string","value":"import com.intuit.tank.project.*;"},"libraries":{"kind":"list like","value":["com.intuit.tank"],"string":"[\n \"com.intuit.tank\"\n]"},"libraries_info":{"kind":"string","value":"com.intuit.tank;"},"id":{"kind":"number","value":332737,"string":"332,737"}}},{"rowIdx":2912548,"cells":{"method":{"kind":"string","value":"\t\n\tprivate ECPublicKey createPublicEncryptionKey (BigInteger x, BigInteger y) \n\t{\n\t\ttry \n\t\t{\n\t\t\tjava.security.spec.ECPoint w = new java.security.spec.ECPoint(x, y);\n\t\t\tECNamedCurveParameterSpec params = ECNamedCurveTable.getParameterSpec(CURVE);\n\t\t\tKeyFactory fact = KeyFactory.getInstance(ALGORITHM_ECDSA, PROVIDER);\n\t\t\tECCurve curve = params.getCurve();\n\t\t\tjava.security.spec.EllipticCurve ellipticCurve = EC5Util.convertCurve(curve, params.getSeed());\n\t\t\tjava.security.spec.ECParameterSpec params2 = EC5Util.convertSpec(ellipticCurve, params);\n\t\t\tjava.security.spec.ECPublicKeySpec keySpec = new java.security.spec.ECPublicKeySpec(w, params2);\n\t\t\treturn (ECPublicKey) fact.generatePublic(keySpec);\n\t\t} \n\t\tcatch (InvalidKeySpecException e) \n\t\t{\n\t\t\tthrow new RuntimeException(\"InvalidKeySpecException occurred in CryptProcessor.createPublicEncryptionKey()\", e);\n\t\t}\n\t\tcatch (NoSuchAlgorithmException e) \n\t\t{\n\t\t\tthrow new RuntimeException(\"NoSuchAlgorithmException occurred in CryptProcessor.createPublicEncryptionKey()\", e);\n\t\t}\n\t\tcatch (NoSuchProviderException e) \n\t\t{\n\t\t\tthrow new RuntimeException(\"NoSuchProviderException occurred in CryptProcessor.createPublicEncryptionKey()\", e);\n\t\t}\n\t}"},"clean_method":{"kind":"string","value":"ECPublicKey function (BigInteger x, BigInteger y) { try { java.security.spec.ECPoint w = new java.security.spec.ECPoint(x, y); ECNamedCurveParameterSpec params = ECNamedCurveTable.getParameterSpec(CURVE); KeyFactory fact = KeyFactory.getInstance(ALGORITHM_ECDSA, PROVIDER); ECCurve curve = params.getCurve(); java.security.spec.EllipticCurve ellipticCurve = EC5Util.convertCurve(curve, params.getSeed()); java.security.spec.ECParameterSpec params2 = EC5Util.convertSpec(ellipticCurve, params); java.security.spec.ECPublicKeySpec keySpec = new java.security.spec.ECPublicKeySpec(w, params2); return (ECPublicKey) fact.generatePublic(keySpec); } catch (InvalidKeySpecException e) { throw new RuntimeException(STR, e); } catch (NoSuchAlgorithmException e) { throw new RuntimeException(STR, e); } catch (NoSuchProviderException e) { throw new RuntimeException(STR, e); } }"},"doc":{"kind":"string","value":"/**\n\t * Creates an ECPublicKey with the given coordinates. The key will have valid parameters.\n\t * \n\t * @param x - A BigInteger object denoting the x coordinate on the curve.\n\t * @param y -A BigInteger object denoting the y coordinate on the curve.\n\t *\n\t * @return An ECPublicKey object with the given coordinates.\n\t */"},"comment":{"kind":"string","value":"Creates an ECPublicKey with the given coordinates. The key will have valid parameters"},"method_name":{"kind":"string","value":"createPublicEncryptionKey"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"loki-sama/bitseal\",\n \"path\": \"src/org/bitseal/crypt/CryptProcessor.java\",\n \"license\": \"gpl-3.0\",\n \"size\": 12430\n}"},"imports":{"kind":"list like","value":["java.math.BigInteger","java.security.KeyFactory","java.security.NoSuchAlgorithmException","java.security.NoSuchProviderException","java.security.spec.InvalidKeySpecException","org.spongycastle.jce.ECNamedCurveTable","org.spongycastle.jce.interfaces.ECPublicKey","org.spongycastle.jce.provider.asymmetric.ec.EC5Util","org.spongycastle.jce.spec.ECNamedCurveParameterSpec","org.spongycastle.math.ec.ECCurve","org.spongycastle.math.ec.ECPoint"],"string":"[\n \"java.math.BigInteger\",\n \"java.security.KeyFactory\",\n \"java.security.NoSuchAlgorithmException\",\n \"java.security.NoSuchProviderException\",\n \"java.security.spec.InvalidKeySpecException\",\n \"org.spongycastle.jce.ECNamedCurveTable\",\n \"org.spongycastle.jce.interfaces.ECPublicKey\",\n \"org.spongycastle.jce.provider.asymmetric.ec.EC5Util\",\n \"org.spongycastle.jce.spec.ECNamedCurveParameterSpec\",\n \"org.spongycastle.math.ec.ECCurve\",\n \"org.spongycastle.math.ec.ECPoint\"\n]"},"imports_info":{"kind":"string","value":"import java.math.BigInteger; import java.security.KeyFactory; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.security.spec.InvalidKeySpecException; import org.spongycastle.jce.ECNamedCurveTable; import org.spongycastle.jce.interfaces.ECPublicKey; import org.spongycastle.jce.provider.asymmetric.ec.EC5Util; import org.spongycastle.jce.spec.ECNamedCurveParameterSpec; import org.spongycastle.math.ec.ECCurve; import org.spongycastle.math.ec.ECPoint;"},"cluster_imports_info":{"kind":"string","value":"import java.math.*; import java.security.*; import java.security.spec.*; import org.spongycastle.jce.*; import org.spongycastle.jce.interfaces.*; import org.spongycastle.jce.provider.asymmetric.ec.*; import org.spongycastle.jce.spec.*; import org.spongycastle.math.ec.*;"},"libraries":{"kind":"list like","value":["java.math","java.security","org.spongycastle.jce","org.spongycastle.math"],"string":"[\n \"java.math\",\n \"java.security\",\n \"org.spongycastle.jce\",\n \"org.spongycastle.math\"\n]"},"libraries_info":{"kind":"string","value":"java.math; java.security; org.spongycastle.jce; org.spongycastle.math;"},"id":{"kind":"number","value":2505206,"string":"2,505,206"}}},{"rowIdx":2912549,"cells":{"method":{"kind":"string","value":"\t\n\tpublic void draw(Color color) {\n\t\tif (curve == null)\n\t\t\treturn;\n\n\t\t// peppysliders\n\t\tif (Options.getSkin().getSliderStyle() == Skin.STYLE_PEPPYSLIDER || !mmsliderSupported) {\n\t\t\tImage hitCircle = GameImage.HITCIRCLE.getImage();\n\t\t\tImage hitCircleOverlay = GameImage.HITCIRCLE_OVERLAY.getImage();\n\t\t\tfor (int i = 0; i < curve.length; i++)\n\t\t\t\thitCircleOverlay.drawCentered(curve[i].x, curve[i].y, Colors.WHITE_FADE);\n\t\t\tfor (int i = 0; i < curve.length; i++)\n\t\t\t\thitCircle.drawCentered(curve[i].x, curve[i].y, color);\n\t\t}\n\n\t\t// mmsliders\n\t\telse {\n\t\t\tif (renderState == null)\n\t\t\t\trenderState = new CurveRenderState(hitObject);\n\t\t\trenderState.draw(color, borderColor, curve);\n\t\t}\n\t}"},"clean_method":{"kind":"string","value":"void function(Color color) { if (curve == null) return; if (Options.getSkin().getSliderStyle() == Skin.STYLE_PEPPYSLIDER !mmsliderSupported) { Image hitCircle = GameImage.HITCIRCLE.getImage(); Image hitCircleOverlay = GameImage.HITCIRCLE_OVERLAY.getImage(); for (int i = 0; i < curve.length; i++) hitCircleOverlay.drawCentered(curve[i].x, curve[i].y, Colors.WHITE_FADE); for (int i = 0; i < curve.length; i++) hitCircle.drawCentered(curve[i].x, curve[i].y, color); } else { if (renderState == null) renderState = new CurveRenderState(hitObject); renderState.draw(color, borderColor, curve); } }"},"doc":{"kind":"string","value":"/**\n\t * Draws the full curve to the graphics context.\n\t * @param color the color filter\n\t */"},"comment":{"kind":"string","value":"Draws the full curve to the graphics context"},"method_name":{"kind":"string","value":"draw"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"Lucki/opsu\",\n \"path\": \"src/itdelatrisu/opsu/objects/curves/Curve.java\",\n \"license\": \"gpl-3.0\",\n \"size\": 4823\n}"},"imports":{"kind":"list like","value":["org.newdawn.slick.Color","org.newdawn.slick.Image"],"string":"[\n \"org.newdawn.slick.Color\",\n \"org.newdawn.slick.Image\"\n]"},"imports_info":{"kind":"string","value":"import org.newdawn.slick.Color; import org.newdawn.slick.Image;"},"cluster_imports_info":{"kind":"string","value":"import org.newdawn.slick.*;"},"libraries":{"kind":"list like","value":["org.newdawn.slick"],"string":"[\n \"org.newdawn.slick\"\n]"},"libraries_info":{"kind":"string","value":"org.newdawn.slick;"},"id":{"kind":"number","value":488687,"string":"488,687"}}},{"rowIdx":2912550,"cells":{"method":{"kind":"string","value":"if (!registered) {\n registered = true;\n TypeRegistry.DEFAULT.register(ModelSerializer.class);\n TypeRegistry.DEFAULT.register(ModelDeserializer.class);\n }\n }"},"clean_method":{"kind":"string","value":"if (!registered) { registered = true; TypeRegistry.DEFAULT.register(ModelSerializer.class); TypeRegistry.DEFAULT.register(ModelDeserializer.class); } }"},"doc":{"kind":"string","value":"/**\n * Registers the model serialization and instantiators.\n */"},"comment":{"kind":"string","value":"Registers the model serialization and instantiators"},"method_name":{"kind":"string","value":"register"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"SSEHUB/EASyProducer\",\n \"path\": \"Plugins/Instantiation/Model.persistency/src/net/ssehub/easy/instantiation/serializer/xml/Registration.java\",\n \"license\": \"apache-2.0\",\n \"size\": 2648\n}"},"imports":{"kind":"list like","value":["net.ssehub.easy.instantiation.core.model.vilTypes.TypeRegistry"],"string":"[\n \"net.ssehub.easy.instantiation.core.model.vilTypes.TypeRegistry\"\n]"},"imports_info":{"kind":"string","value":"import net.ssehub.easy.instantiation.core.model.vilTypes.TypeRegistry;"},"cluster_imports_info":{"kind":"string","value":"import net.ssehub.easy.instantiation.core.model.*;"},"libraries":{"kind":"list like","value":["net.ssehub.easy"],"string":"[\n \"net.ssehub.easy\"\n]"},"libraries_info":{"kind":"string","value":"net.ssehub.easy;"},"id":{"kind":"number","value":875079,"string":"875,079"}}},{"rowIdx":2912551,"cells":{"method":{"kind":"string","value":" public Builder loadFromPath(Path path) throws IOException {\n // NOTE: loadFromStream will close the input stream\n return loadFromStream(path.getFileName().toString(), Files.newInputStream(path));\n }"},"clean_method":{"kind":"string","value":"Builder function(Path path) throws IOException { return loadFromStream(path.getFileName().toString(), Files.newInputStream(path)); }"},"doc":{"kind":"string","value":"/**\n * Loads settings from a url that represents them using the\n * {@link SettingsLoaderFactory#loaderFromResource(String)}.\n */"},"comment":{"kind":"string","value":"Loads settings from a url that represents them using the SettingsLoaderFactory#loaderFromResource(String)"},"method_name":{"kind":"string","value":"loadFromPath"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"fuchao01/elasticsearch\",\n \"path\": \"core/src/main/java/org/elasticsearch/common/settings/Settings.java\",\n \"license\": \"apache-2.0\",\n \"size\": 52409\n}"},"imports":{"kind":"list like","value":["java.io.IOException","java.nio.file.Files","java.nio.file.Path"],"string":"[\n \"java.io.IOException\",\n \"java.nio.file.Files\",\n \"java.nio.file.Path\"\n]"},"imports_info":{"kind":"string","value":"import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path;"},"cluster_imports_info":{"kind":"string","value":"import java.io.*; import java.nio.file.*;"},"libraries":{"kind":"list like","value":["java.io","java.nio"],"string":"[\n \"java.io\",\n \"java.nio\"\n]"},"libraries_info":{"kind":"string","value":"java.io; java.nio;"},"id":{"kind":"number","value":1345495,"string":"1,345,495"}}},{"rowIdx":2912552,"cells":{"method":{"kind":"string","value":" @Override\n public boolean equals(Object o) {\n boolean result;\n if (this == o) {\n result = true;\n } else if (o == null || getClass() != o.getClass()) {\n result = false;\n } else {\n Car car = (Car) o;\n result = id == car.id\n && Objects.equals(name, car.name);\n }\n return result;\n }"},"clean_method":{"kind":"string","value":"boolean function(Object o) { boolean result; if (this == o) { result = true; } else if (o == null getClass() != o.getClass()) { result = false; } else { Car car = (Car) o; result = id == car.id && Objects.equals(name, car.name); } return result; }"},"doc":{"kind":"string","value":"/**\n * Checks equality by id and name.\n * @param o - object to compare.\n * @return - result.\n */"},"comment":{"kind":"string","value":"Checks equality by id and name"},"method_name":{"kind":"string","value":"equals"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"wamdue/agorbunov\",\n \"path\": \"chapter_010/src/main/java/ru/job4j/mapping/carshop/entity/Car.java\",\n \"license\": \"apache-2.0\",\n \"size\": 5970\n}"},"imports":{"kind":"list like","value":["java.util.Objects"],"string":"[\n \"java.util.Objects\"\n]"},"imports_info":{"kind":"string","value":"import java.util.Objects;"},"cluster_imports_info":{"kind":"string","value":"import java.util.*;"},"libraries":{"kind":"list like","value":["java.util"],"string":"[\n \"java.util\"\n]"},"libraries_info":{"kind":"string","value":"java.util;"},"id":{"kind":"number","value":1511866,"string":"1,511,866"}}},{"rowIdx":2912553,"cells":{"method":{"kind":"string","value":" static private boolean verifyDisjunctGlobalAndStack(LogManager pLogger, CLangSMG pSmg) {\n ArrayDeque stack_frames = pSmg.getStackFrames();\n Set stack = new HashSet<>();\n\n for (CLangStackFrame frame: stack_frames) {\n stack.addAll(frame.getAllObjects());\n }\n Map globals = pSmg.getGlobalObjects();\n\n boolean toReturn = Collections.disjoint(stack, globals.values());\n\n if (! toReturn) {\n pLogger.log(Level.SEVERE, \"CLangSMG inconsistent, global and stack objects are not disjoint\");\n }\n\n return toReturn;\n }"},"clean_method":{"kind":"string","value":"static boolean function(LogManager pLogger, CLangSMG pSmg) { ArrayDeque stack_frames = pSmg.getStackFrames(); Set stack = new HashSet<>(); for (CLangStackFrame frame: stack_frames) { stack.addAll(frame.getAllObjects()); } Map globals = pSmg.getGlobalObjects(); boolean toReturn = Collections.disjoint(stack, globals.values()); if (! toReturn) { pLogger.log(Level.SEVERE, STR); } return toReturn; }"},"doc":{"kind":"string","value":"/**\n * Verifies that global and stack object sets are disjunct\n *\n * @param pLogger Logger to log the message\n * @param pSmg SMG to check\n * @return True if {@link pSmg} is consistent w.r.t. this criteria. False otherwise.\n */"},"comment":{"kind":"string","value":"Verifies that global and stack object sets are disjunct"},"method_name":{"kind":"string","value":"verifyDisjunctGlobalAndStack"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"nishanttotla/predator\",\n \"path\": \"cpachecker/src/org/sosy_lab/cpachecker/cpa/smg/CLangSMG.java\",\n \"license\": \"gpl-3.0\",\n \"size\": 23467\n}"},"imports":{"kind":"list like","value":["java.util.ArrayDeque","java.util.Collections","java.util.HashSet","java.util.Map","java.util.Set","java.util.logging.Level","org.sosy_lab.common.log.LogManager","org.sosy_lab.cpachecker.cpa.smg.objects.SMGObject","org.sosy_lab.cpachecker.cpa.smg.objects.SMGRegion"],"string":"[\n \"java.util.ArrayDeque\",\n \"java.util.Collections\",\n \"java.util.HashSet\",\n \"java.util.Map\",\n \"java.util.Set\",\n \"java.util.logging.Level\",\n \"org.sosy_lab.common.log.LogManager\",\n \"org.sosy_lab.cpachecker.cpa.smg.objects.SMGObject\",\n \"org.sosy_lab.cpachecker.cpa.smg.objects.SMGRegion\"\n]"},"imports_info":{"kind":"string","value":"import java.util.ArrayDeque; import java.util.Collections; import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.logging.Level; import org.sosy_lab.common.log.LogManager; import org.sosy_lab.cpachecker.cpa.smg.objects.SMGObject; import org.sosy_lab.cpachecker.cpa.smg.objects.SMGRegion;"},"cluster_imports_info":{"kind":"string","value":"import java.util.*; import java.util.logging.*; import org.sosy_lab.common.log.*; import org.sosy_lab.cpachecker.cpa.smg.objects.*;"},"libraries":{"kind":"list like","value":["java.util","org.sosy_lab.common","org.sosy_lab.cpachecker"],"string":"[\n \"java.util\",\n \"org.sosy_lab.common\",\n \"org.sosy_lab.cpachecker\"\n]"},"libraries_info":{"kind":"string","value":"java.util; org.sosy_lab.common; org.sosy_lab.cpachecker;"},"id":{"kind":"number","value":1718544,"string":"1,718,544"}}},{"rowIdx":2912554,"cells":{"method":{"kind":"string","value":" @ApiModelProperty(value = \"The retailerId\")\n public String getRetailerId() {\n return retailerId;\n }"},"clean_method":{"kind":"string","value":"@ApiModelProperty(value = STR) String function() { return retailerId; }"},"doc":{"kind":"string","value":"/**\n * The retailerId\n * @return retailerId\n **/"},"comment":{"kind":"string","value":"The retailerId"},"method_name":{"kind":"string","value":"getRetailerId"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"iterate-ch/cyberduck\",\n \"path\": \"storegate/src/main/java/ch/cyberduck/core/storegate/io/swagger/client/model/RegistrationInformationSubuser.java\",\n \"license\": \"gpl-3.0\",\n \"size\": 8309\n}"},"imports":{"kind":"list like","value":["io.swagger.annotations.ApiModelProperty"],"string":"[\n \"io.swagger.annotations.ApiModelProperty\"\n]"},"imports_info":{"kind":"string","value":"import io.swagger.annotations.ApiModelProperty;"},"cluster_imports_info":{"kind":"string","value":"import io.swagger.annotations.*;"},"libraries":{"kind":"list like","value":["io.swagger.annotations"],"string":"[\n \"io.swagger.annotations\"\n]"},"libraries_info":{"kind":"string","value":"io.swagger.annotations;"},"id":{"kind":"number","value":2612498,"string":"2,612,498"}}},{"rowIdx":2912555,"cells":{"method":{"kind":"string","value":" private void logRequest(HttpServletRequest req, Session session) {\n StringBuilder buf = new StringBuilder();\n buf.append(getRealClientIpAddr(req)).append(\" \");\n if (session != null && session.getUser() != null) {\n buf.append(session.getUser().getUserId()).append(\" \");\n } else {\n buf.append(\" - \").append(\" \");\n }\n\n buf.append(\"\\\"\");\n buf.append(req.getMethod()).append(\" \");\n buf.append(req.getRequestURI()).append(\" \");\n if (req.getQueryString() != null) {\n buf.append(req.getQueryString()).append(\" \");\n } else {\n buf.append(\"-\").append(\" \");\n }\n buf.append(req.getProtocol()).append(\"\\\" \");\n\n String userAgent = req.getHeader(\"User-Agent\");\n if (shouldLogRawUserAgent) {\n buf.append(userAgent);\n } else {\n // simply log a short string to indicate browser or not\n if (StringUtils.isFromBrowser(userAgent)) {\n buf.append(\"browser\");\n } else {\n buf.append(\"not-browser\");\n }\n }\n \n logger.info(buf.toString());\n }"},"clean_method":{"kind":"string","value":"void function(HttpServletRequest req, Session session) { StringBuilder buf = new StringBuilder(); buf.append(getRealClientIpAddr(req)).append(\" \"); if (session != null && session.getUser() != null) { buf.append(session.getUser().getUserId()).append(\" \"); } else { buf.append(STR).append(\" \"); } buf.append(\"\\\"STR STR STR STR-STR STR\\\" \"); String userAgent = req.getHeader(STR); if (shouldLogRawUserAgent) { buf.append(userAgent); } else { if (StringUtils.isFromBrowser(userAgent)) { buf.append(\"browserSTRnot-browser\"); } } logger.info(buf.toString()); }"},"doc":{"kind":"string","value":"/**\n * Log out request - the format should be close to Apache access log format\n * \n * @param req\n * @param session\n */"},"comment":{"kind":"string","value":"Log out request - the format should be close to Apache access log format"},"method_name":{"kind":"string","value":"logRequest"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"mariacioffi/azkaban\",\n \"path\": \"azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java\",\n \"license\": \"apache-2.0\",\n \"size\": 14577\n}"},"imports":{"kind":"list like","value":["javax.servlet.http.HttpServletRequest"],"string":"[\n \"javax.servlet.http.HttpServletRequest\"\n]"},"imports_info":{"kind":"string","value":"import javax.servlet.http.HttpServletRequest;"},"cluster_imports_info":{"kind":"string","value":"import javax.servlet.http.*;"},"libraries":{"kind":"list like","value":["javax.servlet"],"string":"[\n \"javax.servlet\"\n]"},"libraries_info":{"kind":"string","value":"javax.servlet;"},"id":{"kind":"number","value":2691291,"string":"2,691,291"}}},{"rowIdx":2912556,"cells":{"method":{"kind":"string","value":" @Nonnull\n default Promise run(@Nonnull Runnable runnable) {\n Objects.requireNonNull(runnable, \"runnable\");\n return Promise.supplying(getContext(), Delegates.runnableToSupplier(runnable));\n }"},"clean_method":{"kind":"string","value":"default Promise run(@Nonnull Runnable runnable) { Objects.requireNonNull(runnable, STR); return Promise.supplying(getContext(), Delegates.runnableToSupplier(runnable)); }"},"doc":{"kind":"string","value":"/**\n * Execute the passed runnable\n *\n * @param runnable the runnable\n * @return a Promise which will return when the runnable is complete\n */"},"comment":{"kind":"string","value":"Execute the passed runnable"},"method_name":{"kind":"string","value":"run"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"lucko/helper\",\n \"path\": \"helper/src/main/java/me/lucko/helper/scheduler/Scheduler.java\",\n \"license\": \"mit\",\n \"size\": 7378\n}"},"imports":{"kind":"list like","value":["java.util.Objects","javax.annotation.Nonnull","me.lucko.helper.promise.Promise","me.lucko.helper.utils.Delegates"],"string":"[\n \"java.util.Objects\",\n \"javax.annotation.Nonnull\",\n \"me.lucko.helper.promise.Promise\",\n \"me.lucko.helper.utils.Delegates\"\n]"},"imports_info":{"kind":"string","value":"import java.util.Objects; import javax.annotation.Nonnull; import me.lucko.helper.promise.Promise; import me.lucko.helper.utils.Delegates;"},"cluster_imports_info":{"kind":"string","value":"import java.util.*; import javax.annotation.*; import me.lucko.helper.promise.*; import me.lucko.helper.utils.*;"},"libraries":{"kind":"list like","value":["java.util","javax.annotation","me.lucko.helper"],"string":"[\n \"java.util\",\n \"javax.annotation\",\n \"me.lucko.helper\"\n]"},"libraries_info":{"kind":"string","value":"java.util; javax.annotation; me.lucko.helper;"},"id":{"kind":"number","value":2054384,"string":"2,054,384"}}},{"rowIdx":2912557,"cells":{"method":{"kind":"string","value":" public List>> getInheritedMethods()\n {\n final List>> result =\n new ArrayList>>();\n\n // Initialize the list of already seen methods\n final Set seenMethods = new HashSet();\n for (final MethodDoc method : this.getMethods())\n seenMethods.add(method.getName());\n\n for (final InterfaceDoc superInterface : getAllSuperInterfaces())\n {\n final Set methods = new TreeSet();\n for (final MethodDoc method : superInterface.getMethods())\n {\n if (seenMethods.contains(method.getName())) continue;\n methods.add(method);\n seenMethods.add(method.getName());\n }\n if (methods.isEmpty()) continue;\n result.add(\n new AbstractMap.SimpleEntry>(\n superInterface, methods));\n }\n\n return result;\n }"},"clean_method":{"kind":"string","value":"List>> function() { final List>> result = new ArrayList>>(); final Set seenMethods = new HashSet(); for (final MethodDoc method : this.getMethods()) seenMethods.add(method.getName()); for (final InterfaceDoc superInterface : getAllSuperInterfaces()) { final Set methods = new TreeSet(); for (final MethodDoc method : superInterface.getMethods()) { if (seenMethods.contains(method.getName())) continue; methods.add(method); seenMethods.add(method.getName()); } if (methods.isEmpty()) continue; result.add( new AbstractMap.SimpleEntry>( superInterface, methods)); } return result; }"},"doc":{"kind":"string","value":"/**\n * Return a list of super classes with additional methods they provide.\n *\n * @return The list of super classes and the additional methods they\n * provide.\n */"},"comment":{"kind":"string","value":"Return a list of super classes with additional methods they provide"},"method_name":{"kind":"string","value":"getInheritedMethods"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"kayahr/jasdoc\",\n \"path\": \"src/main/java/de/ailis/jasdoc/doc/InterfaceDoc.java\",\n \"license\": \"gpl-3.0\",\n \"size\": 5819\n}"},"imports":{"kind":"list like","value":["java.util.AbstractMap","java.util.ArrayList","java.util.HashSet","java.util.List","java.util.Map","java.util.Set","java.util.TreeSet"],"string":"[\n \"java.util.AbstractMap\",\n \"java.util.ArrayList\",\n \"java.util.HashSet\",\n \"java.util.List\",\n \"java.util.Map\",\n \"java.util.Set\",\n \"java.util.TreeSet\"\n]"},"imports_info":{"kind":"string","value":"import java.util.AbstractMap; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeSet;"},"cluster_imports_info":{"kind":"string","value":"import java.util.*;"},"libraries":{"kind":"list like","value":["java.util"],"string":"[\n \"java.util\"\n]"},"libraries_info":{"kind":"string","value":"java.util;"},"id":{"kind":"number","value":1451715,"string":"1,451,715"}}},{"rowIdx":2912558,"cells":{"method":{"kind":"string","value":" boolean isRsParityFile(Path p) {\n String pathStr = p.toUri().getPath();\n return isRsParityFile(pathStr);\n }"},"clean_method":{"kind":"string","value":"boolean isRsParityFile(Path p) { String pathStr = p.toUri().getPath(); return isRsParityFile(pathStr); }"},"doc":{"kind":"string","value":"/**\n * checks whether file is rs parity file\n */"},"comment":{"kind":"string","value":"checks whether file is rs parity file"},"method_name":{"kind":"string","value":"isRsParityFile"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"jchen123/hadoop-20-warehouse-fix\",\n \"path\": \"src/contrib/raid/src/java/org/apache/hadoop/raid/BlockFixer.java\",\n \"license\": \"apache-2.0\",\n \"size\": 36163\n}"},"imports":{"kind":"list like","value":["org.apache.hadoop.fs.Path"],"string":"[\n \"org.apache.hadoop.fs.Path\"\n]"},"imports_info":{"kind":"string","value":"import org.apache.hadoop.fs.Path;"},"cluster_imports_info":{"kind":"string","value":"import org.apache.hadoop.fs.*;"},"libraries":{"kind":"list like","value":["org.apache.hadoop"],"string":"[\n \"org.apache.hadoop\"\n]"},"libraries_info":{"kind":"string","value":"org.apache.hadoop;"},"id":{"kind":"number","value":1281242,"string":"1,281,242"}}},{"rowIdx":2912559,"cells":{"method":{"kind":"string","value":"zClans plugin = zClans.getInstance();\r\n \r\n ClanPlayer cpn = plugin.getClanManager().getCreateClanPlayer(player.getUniqueId());\r\n \r\n if (cpn != null && cpn.isBanned()) {\r\n ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang(\"banned\"));\r\n return;\r\n }\r\n\r\n if (plugin.getPermissionsManager().has(player, \"zclans.leader.create\"))\r\n {\r\n if (arg.length >= 2)\r\n {\r\n String tag = arg[0];\r\n String cleanTag = Helper.cleanTag(arg[0]);\r\n\r\n String name = Helper.toMessage(Helper.removeFirst(arg));\r\n\r\n boolean bypass = plugin.getPermissionsManager().has(player, \"zclans.mod.bypass\");\r\n\r\n if (bypass || cleanTag.length() <= plugin.getSettingsManager().getTagMaxLength())\r\n {\r\n if (bypass || cleanTag.length() > plugin.getSettingsManager().getTagMinLength())\r\n {\r\n if (bypass || !plugin.getSettingsManager().hasDisallowedColor(tag))\r\n {\r\n if (bypass || Helper.stripColors(name).length() <= plugin.getSettingsManager().getClanMaxLength())\r\n {\r\n if (bypass || Helper.stripColors(name).length() > plugin.getSettingsManager().getClanMinLength())\r\n {\r\n if (cleanTag.matches(\"[0-9a-zA-Z]*\"))\r\n {\r\n if (!name.contains(\"&\"))\r\n {\r\n if (bypass || !plugin.getSettingsManager().isDisallowedWord(cleanTag.toLowerCase()))\r\n {\r\n ClanPlayer cp = plugin.getClanManager().getClanPlayer(player);\r\n\r\n if (cp == null)\r\n {\r\n if (!plugin.getClanManager().isClan(cleanTag))\r\n {\r\n if (plugin.getClanManager().purchaseCreation(player))\r\n {\r\n plugin.getClanManager().createClan(player, tag, name);\r\n\r\n Clan clan = plugin.getClanManager().getClan(tag);\r\n clan.addBb(player.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang(\"clan.created\"), name));\r\n plugin.getStorageManager().updateClan(clan);\r\n\r\n if (plugin.getSettingsManager().isRequireVerification())\r\n {\r\n boolean verified = !plugin.getSettingsManager().isRequireVerification() || plugin.getPermissionsManager().has(player, \"zclans.mod.verify\");\r\n\r\n if (!verified)\r\n {\r\n ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang(\"get.your.clan.verified.to.access.advanced.features\"));\r\n }\r\n }\r\n }\r\n }\r\n else\r\n {\r\n ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang(\"clan.with.this.tag.already.exists\"));\r\n }\r\n }\r\n else\r\n {\r\n ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang(\"you.must.first.resign\"), cp.getClan().getName()));\r\n }\r\n }\r\n else\r\n {\r\n ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang(\"that.tag.name.is.disallowed\"));\r\n }\r\n }\r\n else\r\n {\r\n ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang(\"your.clan.name.cannot.contain.color.codes\"));\r\n }\r\n }\r\n else\r\n {\r\n ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang(\"your.clan.tag.can.only.contain.letters.numbers.and.color.codes\"));\r\n }\r\n }\r\n else\r\n {\r\n ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang(\"your.clan.name.must.be.longer.than.characters\"), plugin.getSettingsManager().getClanMinLength()));\r\n }\r\n }\r\n else\r\n {\r\n ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang(\"your.clan.name.cannot.be.longer.than.characters\"), plugin.getSettingsManager().getClanMaxLength()));\r\n }\r\n }\r\n else\r\n {\r\n ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang(\"your.tag.cannot.contain.the.following.colors\"), plugin.getSettingsManager().getDisallowedColorString()));\r\n }\r\n }\r\n else\r\n {\r\n ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang(\"your.clan.tag.must.be.longer.than.characters\"), plugin.getSettingsManager().getTagMinLength()));\r\n }\r\n }\r\n else\r\n {\r\n ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang(\"your.clan.tag.cannot.be.longer.than.characters\"), plugin.getSettingsManager().getTagMaxLength()));\r\n }\r\n }\r\n else\r\n {\r\n ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang(\"usage.create.tag\"), plugin.getSettingsManager().getCommandClan()));\r\n ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang(\"example.clan.create\"));\r\n }\r\n }\r\n else\r\n {\r\n ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang(\"insufficient.permissions\"));\r\n }\r\n }\r"},"clean_method":{"kind":"string","value":"zClans plugin = zClans.getInstance(); ClanPlayer cpn = plugin.getClanManager().getCreateClanPlayer(player.getUniqueId()); if (cpn != null && cpn.isBanned()) { ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang(STR)); return; } if (plugin.getPermissionsManager().has(player, STR)) { if (arg.length >= 2) { String tag = arg[0]; String cleanTag = Helper.cleanTag(arg[0]); String name = Helper.toMessage(Helper.removeFirst(arg)); boolean bypass = plugin.getPermissionsManager().has(player, STR); if (bypass cleanTag.length() <= plugin.getSettingsManager().getTagMaxLength()) { if (bypass cleanTag.length() > plugin.getSettingsManager().getTagMinLength()) { if (bypass !plugin.getSettingsManager().hasDisallowedColor(tag)) { if (bypass Helper.stripColors(name).length() <= plugin.getSettingsManager().getClanMaxLength()) { if (bypass Helper.stripColors(name).length() > plugin.getSettingsManager().getClanMinLength()) { if (cleanTag.matches(STR)) { if (!name.contains(\"&\")) { if (bypass !plugin.getSettingsManager().isDisallowedWord(cleanTag.toLowerCase())) { ClanPlayer cp = plugin.getClanManager().getClanPlayer(player); if (cp == null) { if (!plugin.getClanManager().isClan(cleanTag)) { if (plugin.getClanManager().purchaseCreation(player)) { plugin.getClanManager().createClan(player, tag, name); Clan clan = plugin.getClanManager().getClan(tag); clan.addBb(player.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang(STR), name)); plugin.getStorageManager().updateClan(clan); if (plugin.getSettingsManager().isRequireVerification()) { boolean verified = !plugin.getSettingsManager().isRequireVerification() plugin.getPermissionsManager().has(player, STR); if (!verified) { ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang(STR)); } } } } else { ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang(STR)); } } else { ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang(STR), cp.getClan().getName())); } } else { ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang(STR)); } } else { ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang(STR)); } } else { ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang(STR)); } } else { ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang(STR), plugin.getSettingsManager().getClanMinLength())); } } else { ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang(STR), plugin.getSettingsManager().getClanMaxLength())); } } else { ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang(STR), plugin.getSettingsManager().getDisallowedColorString())); } } else { ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang(STR), plugin.getSettingsManager().getTagMinLength())); } } else { ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang(STR), plugin.getSettingsManager().getTagMaxLength())); } } else { ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang(STR), plugin.getSettingsManager().getCommandClan())); ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang(STR)); } } else { ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang(STR)); } }"},"doc":{"kind":"string","value":"/**\r\n * Execute the command\r\n * @param player player executing command\r\n * @param arg command arguments\r\n */"},"comment":{"kind":"string","value":"Execute the command"},"method_name":{"kind":"string","value":"execute"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"zenith4183/SimpleClans\",\n \"path\": \"src/main/java/org/bitbucket/zenith4183/zclans/commands/CreateCommand.java\",\n \"license\": \"gpl-3.0\",\n \"size\": 8375\n}"},"imports":{"kind":"list like","value":["java.text.MessageFormat","org.bitbucket.zenith4183.zclans.ChatBlock","org.bitbucket.zenith4183.zclans.Clan","org.bitbucket.zenith4183.zclans.ClanPlayer","org.bitbucket.zenith4183.zclans.Helper","org.bukkit.ChatColor"],"string":"[\n \"java.text.MessageFormat\",\n \"org.bitbucket.zenith4183.zclans.ChatBlock\",\n \"org.bitbucket.zenith4183.zclans.Clan\",\n \"org.bitbucket.zenith4183.zclans.ClanPlayer\",\n \"org.bitbucket.zenith4183.zclans.Helper\",\n \"org.bukkit.ChatColor\"\n]"},"imports_info":{"kind":"string","value":"import java.text.MessageFormat; import org.bitbucket.zenith4183.zclans.ChatBlock; import org.bitbucket.zenith4183.zclans.Clan; import org.bitbucket.zenith4183.zclans.ClanPlayer; import org.bitbucket.zenith4183.zclans.Helper; import org.bukkit.ChatColor;"},"cluster_imports_info":{"kind":"string","value":"import java.text.*; import org.bitbucket.zenith4183.zclans.*; import org.bukkit.*;"},"libraries":{"kind":"list like","value":["java.text","org.bitbucket.zenith4183","org.bukkit"],"string":"[\n \"java.text\",\n \"org.bitbucket.zenith4183\",\n \"org.bukkit\"\n]"},"libraries_info":{"kind":"string","value":"java.text; org.bitbucket.zenith4183; org.bukkit;"},"id":{"kind":"number","value":493987,"string":"493,987"}}},{"rowIdx":2912560,"cells":{"method":{"kind":"string","value":" @Test\n public void testSnapshotsOnErasureCodingDirAfterECPolicyChanges()\n throws Exception {\n final Path ecDir = new Path(\"/ecdir\");\n fs.mkdirs(ecDir);\n fs.allowSnapshot(ecDir);\n\n final Path snap1 = fs.createSnapshot(ecDir, \"snap1\");\n assertNull(\"Expected null erasure coding policy\",\n fs.getErasureCodingPolicy(snap1));\n\n // Set erasure coding policy\n final ErasureCodingPolicy ec63Policy = SystemErasureCodingPolicies\n .getByID(SystemErasureCodingPolicies.RS_6_3_POLICY_ID);\n fs.setErasureCodingPolicy(ecDir, ec63Policy.getName());\n final Path snap2 = fs.createSnapshot(ecDir, \"snap2\");\n assertEquals(\"Got unexpected erasure coding policy\", ec63Policy,\n fs.getErasureCodingPolicy(snap2));\n\n // Verify the EC policy correctness after the unset operation\n fs.unsetErasureCodingPolicy(ecDir);\n final Path snap3 = fs.createSnapshot(ecDir, \"snap3\");\n assertNull(\"Expected null erasure coding policy\",\n fs.getErasureCodingPolicy(snap3));\n\n // Change the erasure coding policy and take another snapshot\n final ErasureCodingPolicy ec32Policy = SystemErasureCodingPolicies\n .getByID(SystemErasureCodingPolicies.RS_3_2_POLICY_ID);\n fs.enableErasureCodingPolicy(ec32Policy.getName());\n fs.setErasureCodingPolicy(ecDir, ec32Policy.getName());\n final Path snap4 = fs.createSnapshot(ecDir, \"snap4\");\n assertEquals(\"Got unexpected erasure coding policy\", ec32Policy,\n fs.getErasureCodingPolicy(snap4));\n\n // Check that older snapshot still have the old ECPolicy settings\n assertNull(\"Expected null erasure coding policy\",\n fs.getErasureCodingPolicy(snap1));\n assertEquals(\"Got unexpected erasure coding policy\", ec63Policy,\n fs.getErasureCodingPolicy(snap2));\n assertNull(\"Expected null erasure coding policy\",\n fs.getErasureCodingPolicy(snap3));\n }"},"clean_method":{"kind":"string","value":"void function() throws Exception { final Path ecDir = new Path(STR); fs.mkdirs(ecDir); fs.allowSnapshot(ecDir); final Path snap1 = fs.createSnapshot(ecDir, \"snap1\"); assertNull(STR, fs.getErasureCodingPolicy(snap1)); final ErasureCodingPolicy ec63Policy = SystemErasureCodingPolicies .getByID(SystemErasureCodingPolicies.RS_6_3_POLICY_ID); fs.setErasureCodingPolicy(ecDir, ec63Policy.getName()); final Path snap2 = fs.createSnapshot(ecDir, \"snap2\"); assertEquals(STR, ec63Policy, fs.getErasureCodingPolicy(snap2)); fs.unsetErasureCodingPolicy(ecDir); final Path snap3 = fs.createSnapshot(ecDir, \"snap3\"); assertNull(STR, fs.getErasureCodingPolicy(snap3)); final ErasureCodingPolicy ec32Policy = SystemErasureCodingPolicies .getByID(SystemErasureCodingPolicies.RS_3_2_POLICY_ID); fs.enableErasureCodingPolicy(ec32Policy.getName()); fs.setErasureCodingPolicy(ecDir, ec32Policy.getName()); final Path snap4 = fs.createSnapshot(ecDir, \"snap4\"); assertEquals(STR, ec32Policy, fs.getErasureCodingPolicy(snap4)); assertNull(STR, fs.getErasureCodingPolicy(snap1)); assertEquals(STR, ec63Policy, fs.getErasureCodingPolicy(snap2)); assertNull(STR, fs.getErasureCodingPolicy(snap3)); }"},"doc":{"kind":"string","value":"/**\n * Test creation of snapshot on directory which changes its\n * erasure coding policy.\n */"},"comment":{"kind":"string","value":"Test creation of snapshot on directory which changes its erasure coding policy"},"method_name":{"kind":"string","value":"testSnapshotsOnErasureCodingDirAfterECPolicyChanges"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"dennishuo/hadoop\",\n \"path\": \"hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestErasureCodingPolicyWithSnapshot.java\",\n \"license\": \"apache-2.0\",\n \"size\": 11888\n}"},"imports":{"kind":"list like","value":["org.apache.hadoop.fs.Path","org.apache.hadoop.hdfs.protocol.ErasureCodingPolicy","org.apache.hadoop.hdfs.protocol.SystemErasureCodingPolicies","org.junit.Assert"],"string":"[\n \"org.apache.hadoop.fs.Path\",\n \"org.apache.hadoop.hdfs.protocol.ErasureCodingPolicy\",\n \"org.apache.hadoop.hdfs.protocol.SystemErasureCodingPolicies\",\n \"org.junit.Assert\"\n]"},"imports_info":{"kind":"string","value":"import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.protocol.ErasureCodingPolicy; import org.apache.hadoop.hdfs.protocol.SystemErasureCodingPolicies; import org.junit.Assert;"},"cluster_imports_info":{"kind":"string","value":"import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.protocol.*; import org.junit.*;"},"libraries":{"kind":"list like","value":["org.apache.hadoop","org.junit"],"string":"[\n \"org.apache.hadoop\",\n \"org.junit\"\n]"},"libraries_info":{"kind":"string","value":"org.apache.hadoop; org.junit;"},"id":{"kind":"number","value":64310,"string":"64,310"}}},{"rowIdx":2912561,"cells":{"method":{"kind":"string","value":" @Override\n protected void setUpdateStatisticsParameters(FileInfo file) throws SQLException {\n this.stUpdateFileStatistics.setInt(1, file.getRating());\n this.stUpdateFileStatistics.setFloat(2, file.getBPM());\n this.stUpdateFileStatistics.setString(3, file.getFormattedAddedDate());\n this.stUpdateFileStatistics.setInt(4, file.getPlayCounter());\n this.stUpdateFileStatistics.setString(5, this.getRootPath()+getPath(file.getRelativeFullPath())); \n this.stUpdateFileStatistics.addBatch();\n }\n\t"},"clean_method":{"kind":"string","value":"void function(FileInfo file) throws SQLException { this.stUpdateFileStatistics.setInt(1, file.getRating()); this.stUpdateFileStatistics.setFloat(2, file.getBPM()); this.stUpdateFileStatistics.setString(3, file.getFormattedAddedDate()); this.stUpdateFileStatistics.setInt(4, file.getPlayCounter()); this.stUpdateFileStatistics.setString(5, this.getRootPath()+getPath(file.getRelativeFullPath())); this.stUpdateFileStatistics.addBatch(); }"},"doc":{"kind":"string","value":"/**\n * Set update statistics parameters\n * @param file\n * @throws SQLException\n */"},"comment":{"kind":"string","value":"Set update statistics parameters"},"method_name":{"kind":"string","value":"setUpdateStatisticsParameters"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"phramusca/JaMuz\",\n \"path\": \"src/jamuz/process/merge/StatSourceMixxx.java\",\n \"license\": \"gpl-3.0\",\n \"size\": 12250\n}"},"imports":{"kind":"list like","value":["java.sql.SQLException"],"string":"[\n \"java.sql.SQLException\"\n]"},"imports_info":{"kind":"string","value":"import java.sql.SQLException;"},"cluster_imports_info":{"kind":"string","value":"import java.sql.*;"},"libraries":{"kind":"list like","value":["java.sql"],"string":"[\n \"java.sql\"\n]"},"libraries_info":{"kind":"string","value":"java.sql;"},"id":{"kind":"number","value":2895724,"string":"2,895,724"}}},{"rowIdx":2912562,"cells":{"method":{"kind":"string","value":" public static int min(int... array) {\n checkArgument(array.length > 0);\n int min = array[0];\n for (int i = 1; i < array.length; i++) {\n if (array[i] < min) {\n min = array[i];\n }\n }\n return min;\n }"},"clean_method":{"kind":"string","value":"static int function(int... array) { checkArgument(array.length > 0); int min = array[0]; for (int i = 1; i < array.length; i++) { if (array[i] < min) { min = array[i]; } } return min; }"},"doc":{"kind":"string","value":"/**\n * Returns the least value present in {@code array}.\n *\n * @param array a nonempty array of {@code int} values\n * @return the value present in {@code array} that is less than or equal to every other value in\n * the array\n * @throws IllegalArgumentException if {@code array} is empty\n */"},"comment":{"kind":"string","value":"Returns the least value present in array"},"method_name":{"kind":"string","value":"min"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"tli2/guava\",\n \"path\": \"guava/src/com/google/common/primitives/Ints.java\",\n \"license\": \"apache-2.0\",\n \"size\": 22882\n}"},"imports":{"kind":"list like","value":["com.google.common.base.Preconditions"],"string":"[\n \"com.google.common.base.Preconditions\"\n]"},"imports_info":{"kind":"string","value":"import com.google.common.base.Preconditions;"},"cluster_imports_info":{"kind":"string","value":"import com.google.common.base.*;"},"libraries":{"kind":"list like","value":["com.google.common"],"string":"[\n \"com.google.common\"\n]"},"libraries_info":{"kind":"string","value":"com.google.common;"},"id":{"kind":"number","value":467090,"string":"467,090"}}},{"rowIdx":2912563,"cells":{"method":{"kind":"string","value":"\t\n\tpublic static String getClassPath() {\n\t\trefreshClassPath();\n\t\tStringBuffer classPath = new StringBuffer(originalClassPath);\n\t\tclassPath.append(File.pathSeparatorChar);\n\t\tString libDirs = JSystemProperties.getInstance().getPreference(FrameworkOptions.LIB_DIRS);\n\t\tif (libDirs != null) {\n\t\t\tStringTokenizer st = new StringTokenizer(libDirs, \";\");\n\t\t\twhile (st.hasMoreElements()) {\n\t\t\t\tclassPath.append(findJars(st.nextToken()));\n\t\t\t}\n\t\t}\n\t\t// append tests project jars\n\t\tFile testProjectLibFile = new File(JSystemProperties.getCurrentTestsPath() + \"/../lib\");\n\t\tif (testProjectLibFile.exists()) {\n\t\t\tclassPath.append(findJars(FileUtils.getCannonicalPath(testProjectLibFile)));\n\t\t}\n\t\t// ITAI: If our project is in Maven structure then we need to travel up\n\t\t// another folder\n\t\tFile mavenTestProjectLibFile = new File(JSystemProperties.getCurrentTestsPath() + \"/../../lib\");\n\t\tif (mavenTestProjectLibFile.exists()) {\n\t\t\tclassPath.append(findJars(FileUtils.getCannonicalPath(mavenTestProjectLibFile)));\n\t\t}\n\t\tclassPath.append(JSystemProperties.getCurrentTestsPath());\n\t\tSystem.setProperty(\"java.class.path\", classPath.toString());\n\t\treturn classPath.toString();\n\t}"},"clean_method":{"kind":"string","value":"static String function() { refreshClassPath(); StringBuffer classPath = new StringBuffer(originalClassPath); classPath.append(File.pathSeparatorChar); String libDirs = JSystemProperties.getInstance().getPreference(FrameworkOptions.LIB_DIRS); if (libDirs != null) { StringTokenizer st = new StringTokenizer(libDirs, \";\"); while (st.hasMoreElements()) { classPath.append(findJars(st.nextToken())); } } File testProjectLibFile = new File(JSystemProperties.getCurrentTestsPath() + STR); if (testProjectLibFile.exists()) { classPath.append(findJars(FileUtils.getCannonicalPath(testProjectLibFile))); } File mavenTestProjectLibFile = new File(JSystemProperties.getCurrentTestsPath() + STR); if (mavenTestProjectLibFile.exists()) { classPath.append(findJars(FileUtils.getCannonicalPath(mavenTestProjectLibFile))); } classPath.append(JSystemProperties.getCurrentTestsPath()); System.setProperty(STR, classPath.toString()); return classPath.toString(); }"},"doc":{"kind":"string","value":"/**\n\t * Order of classes in the classpath:\n\t * \n\t * 1. Thirdparty ant/lib 2. Thirdparty commonLib 3. Thirdparty lib 4.\n\t * Thirdparty/selenium 5. runner/customer_lib 6. runner/so_lib 7. runner/lib\n\t * 8. user additional libs 9. automation project lib file 10. automation\n\t * project tests\n\t */"},"comment":{"kind":"string","value":"Order of classes in the classpath: 1. Thirdparty ant/lib 2. Thirdparty commonLib 3. Thirdparty lib 4. Thirdparty/selenium 5. runner/customer_lib 6. runner/so_lib 7. runner/lib 8. user additional libs 9. automation project lib file 10. automation project tests"},"method_name":{"kind":"string","value":"getClassPath"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"Top-Q/jsystem\",\n \"path\": \"jsystem-core-projects/jsystemCore/src/main/java/jsystem/runner/loader/ClassPathBuilder.java\",\n \"license\": \"apache-2.0\",\n \"size\": 2734\n}"},"imports":{"kind":"list like","value":["java.io.File","java.util.StringTokenizer"],"string":"[\n \"java.io.File\",\n \"java.util.StringTokenizer\"\n]"},"imports_info":{"kind":"string","value":"import java.io.File; import java.util.StringTokenizer;"},"cluster_imports_info":{"kind":"string","value":"import java.io.*; import java.util.*;"},"libraries":{"kind":"list like","value":["java.io","java.util"],"string":"[\n \"java.io\",\n \"java.util\"\n]"},"libraries_info":{"kind":"string","value":"java.io; java.util;"},"id":{"kind":"number","value":1529833,"string":"1,529,833"}}},{"rowIdx":2912564,"cells":{"method":{"kind":"string","value":" @Override\n public final void setLabel(String labelResource) {\n this.mLabel.setText(JMeterUtils.getResString(labelResource));\n }"},"clean_method":{"kind":"string","value":"final void function(String labelResource) { this.mLabel.setText(JMeterUtils.getResString(labelResource)); }"},"doc":{"kind":"string","value":"/**\n * Set the group label from the resource name.\n *\n * @param labelResource The text to be looked up and set\n */"},"comment":{"kind":"string","value":"Set the group label from the resource name"},"method_name":{"kind":"string","value":"setLabel"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"apache/jmeter\",\n \"path\": \"src/core/src/main/java/org/apache/jmeter/gui/util/JLabeledRadioI18N.java\",\n \"license\": \"apache-2.0\",\n \"size\": 7674\n}"},"imports":{"kind":"list like","value":["org.apache.jmeter.util.JMeterUtils"],"string":"[\n \"org.apache.jmeter.util.JMeterUtils\"\n]"},"imports_info":{"kind":"string","value":"import org.apache.jmeter.util.JMeterUtils;"},"cluster_imports_info":{"kind":"string","value":"import org.apache.jmeter.util.*;"},"libraries":{"kind":"list like","value":["org.apache.jmeter"],"string":"[\n \"org.apache.jmeter\"\n]"},"libraries_info":{"kind":"string","value":"org.apache.jmeter;"},"id":{"kind":"number","value":2621819,"string":"2,621,819"}}},{"rowIdx":2912565,"cells":{"method":{"kind":"string","value":" public static MetricResult fromMap(Map values) {\n return new MapMetricResult(values);\n }"},"clean_method":{"kind":"string","value":"static MetricResult function(Map values) { return new MapMetricResult(values); }"},"doc":{"kind":"string","value":"/**\n * Create an empty metric result.\n * @return An empty metric result.\n */"},"comment":{"kind":"string","value":"Create an empty metric result"},"method_name":{"kind":"string","value":"fromMap"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"amaliujia/lenskit\",\n \"path\": \"lenskit-eval/src/main/java/org/lenskit/eval/traintest/metrics/MetricResult.java\",\n \"license\": \"lgpl-2.1\",\n \"size\": 2593\n}"},"imports":{"kind":"list like","value":["java.util.Map"],"string":"[\n \"java.util.Map\"\n]"},"imports_info":{"kind":"string","value":"import java.util.Map;"},"cluster_imports_info":{"kind":"string","value":"import java.util.*;"},"libraries":{"kind":"list like","value":["java.util"],"string":"[\n \"java.util\"\n]"},"libraries_info":{"kind":"string","value":"java.util;"},"id":{"kind":"number","value":153745,"string":"153,745"}}},{"rowIdx":2912566,"cells":{"method":{"kind":"string","value":"\t\n\tpublic static String serializeToString(Node node, String encoding) throws IOException {\n\t\tTransformerFactory tFactory = TransformerFactory.newInstance();\n\t\tTransformer transformer = null;\n\t\ttry {\n\t\t\ttransformer = tFactory.newTransformer();\n\t\t} catch (TransformerConfigurationException e) {\n\t\t\tthrow new IOException(\"Unable to serialize XML document\");\n\t\t}\n\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"no\");\n\t\ttransformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"yes\");\n\t\ttransformer.setOutputProperty(OutputKeys.ENCODING, encoding);\n\t\tDOMSource source = new DOMSource(node);\n\t\tStringWriter writer = new StringWriter();\n Result result = new StreamResult(writer);\n\t\ttry {\n\t\t\ttransformer.transform(source, result);\n\t\t} catch (TransformerException e) {\n\t\t\tthrow new IOException(\"Unable to serialize XML document\");\n\t\t}\t\t\n\t writer.flush();\n\t \n return writer.toString();\n\t}\n\t"},"clean_method":{"kind":"string","value":"static String function(Node node, String encoding) throws IOException { TransformerFactory tFactory = TransformerFactory.newInstance(); Transformer transformer = null; try { transformer = tFactory.newTransformer(); } catch (TransformerConfigurationException e) { throw new IOException(STR); } transformer.setOutputProperty(OutputKeys.INDENT, \"no\"); transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"yes\"); transformer.setOutputProperty(OutputKeys.ENCODING, encoding); DOMSource source = new DOMSource(node); StringWriter writer = new StringWriter(); Result result = new StreamResult(writer); try { transformer.transform(source, result); } catch (TransformerException e) { throw new IOException(STR); } writer.flush(); return writer.toString(); }"},"doc":{"kind":"string","value":"/**\n\t * Serialize XML Document to string using Transformer\n\t * \n\t * @param node the XML node (and the subtree rooted at this node) to be serialized\n\t * @param encoding encoding for the XML document\n\t * @return String representation of the Document\n\t * @throws IOException\n\t */"},"comment":{"kind":"string","value":"Serialize XML Document to string using Transformer"},"method_name":{"kind":"string","value":"serializeToString"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"k3b/pixymeta-android\",\n \"path\": \"pixymeta-lib/src/main/java/pixy/string/XMLUtils.java\",\n \"license\": \"epl-1.0\",\n \"size\": 13804\n}"},"imports":{"kind":"list like","value":["java.io.IOException","java.io.StringWriter","javax.xml.transform.OutputKeys","javax.xml.transform.Result","javax.xml.transform.Transformer","javax.xml.transform.TransformerConfigurationException","javax.xml.transform.TransformerException","javax.xml.transform.TransformerFactory","javax.xml.transform.dom.DOMSource","javax.xml.transform.stream.StreamResult","org.w3c.dom.Node"],"string":"[\n \"java.io.IOException\",\n \"java.io.StringWriter\",\n \"javax.xml.transform.OutputKeys\",\n \"javax.xml.transform.Result\",\n \"javax.xml.transform.Transformer\",\n \"javax.xml.transform.TransformerConfigurationException\",\n \"javax.xml.transform.TransformerException\",\n \"javax.xml.transform.TransformerFactory\",\n \"javax.xml.transform.dom.DOMSource\",\n \"javax.xml.transform.stream.StreamResult\",\n \"org.w3c.dom.Node\"\n]"},"imports_info":{"kind":"string","value":"import java.io.IOException; import java.io.StringWriter; import javax.xml.transform.OutputKeys; import javax.xml.transform.Result; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import org.w3c.dom.Node;"},"cluster_imports_info":{"kind":"string","value":"import java.io.*; import javax.xml.transform.*; import javax.xml.transform.dom.*; import javax.xml.transform.stream.*; import org.w3c.dom.*;"},"libraries":{"kind":"list like","value":["java.io","javax.xml","org.w3c.dom"],"string":"[\n \"java.io\",\n \"javax.xml\",\n \"org.w3c.dom\"\n]"},"libraries_info":{"kind":"string","value":"java.io; javax.xml; org.w3c.dom;"},"id":{"kind":"number","value":1566751,"string":"1,566,751"}}},{"rowIdx":2912567,"cells":{"method":{"kind":"string","value":" public Locator getDocumentLocator() {\n return this.locator;\n }"},"clean_method":{"kind":"string","value":"Locator function() { return this.locator; }"},"doc":{"kind":"string","value":"/**\n * Retrieves the Locator.

\n * @return the Locator\n */"},"comment":{"kind":"string","value":"Retrieves the Locator."},"method_name":{"kind":"string","value":"getDocumentLocator"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"RabadanLab/Pegasus\",\n \"path\": \"resources/hsqldb-2.2.7/hsqldb/src/org/hsqldb/jdbc/JDBCSQLXML.java\",\n \"license\": \"mit\",\n \"size\": 120115\n}"},"imports":{"kind":"list like","value":["org.xml.sax.Locator"],"string":"[\n \"org.xml.sax.Locator\"\n]"},"imports_info":{"kind":"string","value":"import org.xml.sax.Locator;"},"cluster_imports_info":{"kind":"string","value":"import org.xml.sax.*;"},"libraries":{"kind":"list like","value":["org.xml.sax"],"string":"[\n \"org.xml.sax\"\n]"},"libraries_info":{"kind":"string","value":"org.xml.sax;"},"id":{"kind":"number","value":2379476,"string":"2,379,476"}}},{"rowIdx":2912568,"cells":{"method":{"kind":"string","value":"\t\n\tprivate void grade_submission_option(RunData data, String gradeOption)\n\t{\n\t\tSessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid());\n\n\t\tboolean withGrade = state.getAttribute(WITH_GRADES) != null ? ((Boolean) state.getAttribute(WITH_GRADES)).booleanValue(): false;\n\n\t\tString sId = (String) state.getAttribute(GRADE_SUBMISSION_SUBMISSION_ID);\n\t\tString assignmentId = (String) state.getAttribute(GRADE_SUBMISSION_ASSIGNMENT_ID);\n\n\t\t// for points grading, one have to enter number as the points\n\t\tString grade = (String) state.getAttribute(GRADE_SUBMISSION_GRADE);\n\n\t\tAssignmentSubmissionEdit sEdit = editSubmission(sId, \"grade_submission_option\", state);\n\t\tif (sEdit != null)\n\t\t{\n\t\t\t//This logic could be done in one line, but would be harder to read, so break it out to make it easier to follow\n\t\t\tboolean gradeChanged = false;\n\t\t\tif((sEdit.getGrade() == null || \"\".equals(sEdit.getGrade().trim()))\n\t\t\t\t\t&& (grade == null || \"\".equals(grade.trim()))){\n\t\t\t\t//both are null, keep grade changed = false\n\t\t\t}else if((sEdit.getGrade() == null || \"\".equals(sEdit.getGrade().trim())\n\t\t\t\t\t|| (grade == null || \"\".equals(grade.trim())))){\n\t\t\t\t//one is null the other isn't\n\t\t\t\tgradeChanged = true;\n\t\t\t}else if(!grade.trim().equals(sEdit.getGrade().trim())){\n\t\t\t\tgradeChanged = true;\n\t\t\t}\n\t\t\tAssignment a = sEdit.getAssignment();\n\t\t\tint typeOfGrade = a.getContent().getTypeOfGrade();\n\n\t\t\tif (!withGrade)\n\t\t\t{\n\t\t\t\t// no grade input needed for the without-grade version of assignment tool\n\t\t\t\tsEdit.setGraded(true);\n\t\t\t\tif(gradeChanged){\n\t\t\t\t\tsEdit.setGradedBy(UserDirectoryService.getCurrentUser() == null ? null : UserDirectoryService.getCurrentUser().getId());\n\t\t\t\t}\n\t\t\t\tif (\"return\".equals(gradeOption) || \"release\".equals(gradeOption))\n\t\t\t\t{\n\t\t\t\t\tsEdit.setGradeReleased(true);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (grade == null)\n\t\t\t{\n\t\t\t\tsEdit.setGrade(\"\");\n\t\t\t\tsEdit.setGraded(false);\n\t\t\t\tif(gradeChanged){\n\t\t\t\t\tsEdit.setGradedBy(null);\n\t\t\t\t}\n\t\t\t\tsEdit.setGradeReleased(false);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsEdit.setGrade(grade);\n\n\t\t\t\tif (grade.length() != 0)\n\t\t\t\t{\n\t\t\t\t\tsEdit.setGraded(true);\n\t\t\t\t\tif(gradeChanged){\n\t\t\t\t\t\tsEdit.setGradedBy(UserDirectoryService.getCurrentUser() == null ? null : UserDirectoryService.getCurrentUser().getId());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tsEdit.setGraded(false);\n\t\t\t\t\tif(gradeChanged){\n\t\t\t\t\t\tsEdit.setGradedBy(null);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// iterate through submitters and look for grade overrides...\n\t\t\tif (withGrade && a.isGroup()) {\n\t\t\t User[] _users = sEdit.getSubmitters();\n\t\t\t for (int i=0; _users != null && i < _users.length; i++) {\n\t\t\t String _gr = (String)state.getAttribute(GRADE_SUBMISSION_GRADE + \"_\" + _users[i].getId());\n\t\t\t sEdit.addGradeForUser(_users[i].getId(), _gr);\n\t\t\t }\n\t\t\t}\n\n\t\t\tif (\"release\".equals(gradeOption))\n\t\t\t{\n\t\t\t\tsEdit.setGradeReleased(true);\n\t\t\t\tsEdit.setGraded(true);\n\t\t\t\tif(gradeChanged){\n\t\t\t\t\tsEdit.setGradedBy(UserDirectoryService.getCurrentUser() == null ? null : UserDirectoryService.getCurrentUser().getId());\n\t\t\t\t}\n\t\t\t\t// clear the returned flag\n\t\t\t\tsEdit.setReturned(false);\n\t\t\t\tsEdit.setTimeReturned(null);\n\t\t\t}\n\t\t\telse if (\"return\".equals(gradeOption))\n\t\t\t{\n\t\t\t\tsEdit.setGradeReleased(true);\n\t\t\t\tsEdit.setGraded(true);\n\t\t\t\tif(gradeChanged){\n\t\t\t\t\tsEdit.setGradedBy(UserDirectoryService.getCurrentUser() == null ? null : UserDirectoryService.getCurrentUser().getId());\n\t\t\t\t}\n\t\t\t\tsEdit.setReturned(true);\n\t\t\t\tsEdit.setTimeReturned(TimeService.newTime());\n\t\t\t\tsEdit.setHonorPledgeFlag(Boolean.FALSE.booleanValue());\n\t\t\t}\n\t\t\telse if (\"save\".equals(gradeOption))\n\t\t\t{\n\t\t\t\tsEdit.setGradeReleased(false);\n\t\t\t\tsEdit.setReturned(false);\n\t\t\t\tsEdit.setTimeReturned(null);\n\t\t\t}\n\n\t\t\tResourcePropertiesEdit pEdit = sEdit.getPropertiesEdit();\n\t\t\tif (state.getAttribute(AssignmentSubmission.ALLOW_RESUBMIT_NUMBER) != null)\n\t\t\t{\n\t\t\t\t// get resubmit number\n\t\t\t\tpEdit.addProperty(AssignmentSubmission.ALLOW_RESUBMIT_NUMBER, (String) state.getAttribute(AssignmentSubmission.ALLOW_RESUBMIT_NUMBER));\n\t\t\t\n\t\t\t\tif (state.getAttribute(ALLOW_RESUBMIT_CLOSEYEAR) != null)\n\t\t\t\t{\n\t\t\t\t\t// get resubmit time\n\t\t\t\t\tTime closeTime = getTimeFromState(state, ALLOW_RESUBMIT_CLOSEMONTH, ALLOW_RESUBMIT_CLOSEDAY, ALLOW_RESUBMIT_CLOSEYEAR, ALLOW_RESUBMIT_CLOSEHOUR, ALLOW_RESUBMIT_CLOSEMIN);\n\t\t\t\t\tpEdit.addProperty(AssignmentSubmission.ALLOW_RESUBMIT_CLOSETIME, String.valueOf(closeTime.getTime()));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tpEdit.removeProperty(AssignmentSubmission.ALLOW_RESUBMIT_CLOSETIME);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// clean resubmission property\n\t\t\t\tpEdit.removeProperty(AssignmentSubmission.ALLOW_RESUBMIT_CLOSETIME);\n\t\t\t\tpEdit.removeProperty(AssignmentSubmission.ALLOW_RESUBMIT_NUMBER);\n\t\t\t}\n\n\t\t\t// the instructor comment\n\t\t\tString feedbackCommentString = StringUtils\n\t\t\t\t\t.trimToNull((String) state.getAttribute(GRADE_SUBMISSION_FEEDBACK_COMMENT));\n\t\t\tif (feedbackCommentString != null)\n\t\t\t{\n\t\t\t\tsEdit.setFeedbackComment(feedbackCommentString);\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\tsEdit.setFeedbackComment(\"\");\n\t\t\t}\n\n\t\t\t// the instructor inline feedback\n\t\t\tString feedbackTextString = (String) state.getAttribute(GRADE_SUBMISSION_FEEDBACK_TEXT);\n\t\t\tif (feedbackTextString != null)\n\t\t\t{\n\t\t\t\tsEdit.setFeedbackText(feedbackTextString);\n\t\t\t}\n\n\t\t\tList v = (List) state.getAttribute(GRADE_SUBMISSION_FEEDBACK_ATTACHMENT);\n\t\t\tif (v != null)\n\t\t\t{\n\t\t\t\t\n\t\t\t\t// clear the old attachments first\n\t\t\t\tsEdit.clearFeedbackAttachments();\n\n\t\t\t\tfor (int i = 0; i < v.size(); i++)\n\t\t\t\t{\n\t\t\t\t\tsEdit.addFeedbackAttachment((Reference) v.get(i));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tString sReference = sEdit.getReference();\n\t\t\t\n\t\t\t// save a timestamp for this grading process\n\t\t\tsEdit.getPropertiesEdit().addProperty(AssignmentConstants.PROP_LAST_GRADED_DATE, TimeService.newTime().toStringLocalFull());\n\n\t\t\tAssignmentService.commitEdit(sEdit);\n\n\t\t\t// update grades in gradebook\n\t\t\tString aReference = a.getReference();\n\t\t\tString associateGradebookAssignment = StringUtils.trimToNull(a.getProperties().getProperty(AssignmentService.PROP_ASSIGNMENT_ASSOCIATE_GRADEBOOK_ASSIGNMENT));\n\n\t\t\tif (!\"remove\".equals(gradeOption))\n\t\t\t{\n\t\t\t\t// update grade in gradebook\n\t\t\t\tintegrateGradebook(state, aReference, associateGradebookAssignment, null, null, null, -1, null, sReference, \"update\", -1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//remove grade from gradebook\n\t\t\t\tintegrateGradebook(state, aReference, associateGradebookAssignment, null, null, null, -1, null, sReference, \"remove\", -1);\n\t\t\t}\n\t\t}\n\n\t\tif (state.getAttribute(STATE_MESSAGE) == null)\n\t\t{\n\t\t\t// SAK-29314 - put submission information into state\n\t\t\tboolean viewSubsOnlySelected = stringToBool((String)data.getParameters().getString(PARAMS_VIEW_SUBS_ONLY_CHECKBOX));\n\t\t\tputSubmissionInfoIntoState(state, assignmentId, sId, viewSubsOnlySelected);\n\n\t\t\tstate.setAttribute(STATE_MODE, MODE_INSTRUCTOR_GRADE_SUBMISSION);\n\t\t\tstate.setAttribute(GRADE_SUBMISSION_DONE, Boolean.TRUE);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tstate.removeAttribute(GRADE_SUBMISSION_DONE);\n\t\t}\n\n\t\t// SAK-29314 - update the list being iterated over\n\t\tsizeResources(state);\n\n\t} // grade_submission_option"},"clean_method":{"kind":"string","value":"void function(RunData data, String gradeOption) { SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid()); boolean withGrade = state.getAttribute(WITH_GRADES) != null ? ((Boolean) state.getAttribute(WITH_GRADES)).booleanValue(): false; String sId = (String) state.getAttribute(GRADE_SUBMISSION_SUBMISSION_ID); String assignmentId = (String) state.getAttribute(GRADE_SUBMISSION_ASSIGNMENT_ID); String grade = (String) state.getAttribute(GRADE_SUBMISSION_GRADE); AssignmentSubmissionEdit sEdit = editSubmission(sId, STR, state); if (sEdit != null) { boolean gradeChanged = false; if((sEdit.getGrade() == null STRSTRSTRSTRreturnSTRreleaseSTRSTR_STRreleaseSTRreturnSTRsaveSTRSTRremoveSTRupdateSTRremove\", -1); } } if (state.getAttribute(STATE_MESSAGE) == null) { boolean viewSubsOnlySelected = stringToBool((String)data.getParameters().getString(PARAMS_VIEW_SUBS_ONLY_CHECKBOX)); putSubmissionInfoIntoState(state, assignmentId, sId, viewSubsOnlySelected); state.setAttribute(STATE_MODE, MODE_INSTRUCTOR_GRADE_SUBMISSION); state.setAttribute(GRADE_SUBMISSION_DONE, Boolean.TRUE); } else { state.removeAttribute(GRADE_SUBMISSION_DONE); } sizeResources(state); }"},"doc":{"kind":"string","value":"/**\n\t * Common grading routine plus specific operation to differenciate cases when saving, releasing or returning grade.\n\t */"},"comment":{"kind":"string","value":"Common grading routine plus specific operation to differenciate cases when saving, releasing or returning grade"},"method_name":{"kind":"string","value":"grade_submission_option"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"tl-its-umich-edu/sakai\",\n \"path\": \"assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java\",\n \"license\": \"apache-2.0\",\n \"size\": 671846\n}"},"imports":{"kind":"list like","value":["org.sakaiproject.assignment.api.AssignmentSubmissionEdit","org.sakaiproject.cheftool.JetspeedRunData","org.sakaiproject.cheftool.RunData","org.sakaiproject.event.api.SessionState"],"string":"[\n \"org.sakaiproject.assignment.api.AssignmentSubmissionEdit\",\n \"org.sakaiproject.cheftool.JetspeedRunData\",\n \"org.sakaiproject.cheftool.RunData\",\n \"org.sakaiproject.event.api.SessionState\"\n]"},"imports_info":{"kind":"string","value":"import org.sakaiproject.assignment.api.AssignmentSubmissionEdit; import org.sakaiproject.cheftool.JetspeedRunData; import org.sakaiproject.cheftool.RunData; import org.sakaiproject.event.api.SessionState;"},"cluster_imports_info":{"kind":"string","value":"import org.sakaiproject.assignment.api.*; import org.sakaiproject.cheftool.*; import org.sakaiproject.event.api.*;"},"libraries":{"kind":"list like","value":["org.sakaiproject.assignment","org.sakaiproject.cheftool","org.sakaiproject.event"],"string":"[\n \"org.sakaiproject.assignment\",\n \"org.sakaiproject.cheftool\",\n \"org.sakaiproject.event\"\n]"},"libraries_info":{"kind":"string","value":"org.sakaiproject.assignment; org.sakaiproject.cheftool; org.sakaiproject.event;"},"id":{"kind":"number","value":909021,"string":"909,021"}}},{"rowIdx":2912569,"cells":{"method":{"kind":"string","value":" public void addComplex() {\r\n //add constants to Symbol Table\r\n symTab.addConstant(\"i\", new Complex(0, 1));\r\n funTab.put(\"re\", new Real());\r\n funTab.put(\"im\", new Imaginary());\r\n funTab.put(\"arg\", new Arg());\r\n funTab.put(\"cmod\", new Abs());\r\n funTab.put(\"complex\", new ComplexPFMC());\r\n funTab.put(\"polar\", new Polar());\r\n funTab.put(\"conj\", new Conjugate());\r\n }\r\n\r"},"clean_method":{"kind":"string","value":"void function() { symTab.addConstant(\"i\", new Complex(0, 1)); funTab.put(\"re\", new Real()); funTab.put(\"im\", new Imaginary()); funTab.put(\"arg\", new Arg()); funTab.put(\"cmod\", new Abs()); funTab.put(STR, new ComplexPFMC()); funTab.put(\"polar\", new Polar()); funTab.put(\"conj\", new Conjugate()); }"},"doc":{"kind":"string","value":"/**\r\n * Call this function if you want to parse expressions which involve\r\n * complex numbers. This method specifies \"i\" as the imaginary unit\r\n * (0,1). Two functions re() and im() are also added for extracting the\r\n * real or imaginary components of a complex number respectively.\r\n *

\r\n * @since 2.3.0 alpha The functions cmod and arg are added to get the modulus and argument. \r\n * @since 2.3.0 beta 1 The functions complex and polar to convert x,y and r,theta to Complex.\r\n * @since Feb 05 added complex conjugate conj. \r\n */"},"comment":{"kind":"string","value":"Call this function if you want to parse expressions which involve complex numbers. This method specifies \"i\" as the imaginary unit (0,1). Two functions re() and im() are also added for extracting the real or imaginary components of a complex number respectively."},"method_name":{"kind":"string","value":"addComplex"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"dbunibas/spicy\",\n \"path\": \"jep-2.4.1/src/org/nfunk/jep/JEP.java\",\n \"license\": \"gpl-3.0\",\n \"size\": 28068\n}"},"imports":{"kind":"list like","value":["org.nfunk.jep.function.Abs","org.nfunk.jep.function.Arg","org.nfunk.jep.function.ComplexPFMC","org.nfunk.jep.function.Conjugate","org.nfunk.jep.function.Imaginary","org.nfunk.jep.function.Polar","org.nfunk.jep.function.Real","org.nfunk.jep.type.Complex"],"string":"[\n \"org.nfunk.jep.function.Abs\",\n \"org.nfunk.jep.function.Arg\",\n \"org.nfunk.jep.function.ComplexPFMC\",\n \"org.nfunk.jep.function.Conjugate\",\n \"org.nfunk.jep.function.Imaginary\",\n \"org.nfunk.jep.function.Polar\",\n \"org.nfunk.jep.function.Real\",\n \"org.nfunk.jep.type.Complex\"\n]"},"imports_info":{"kind":"string","value":"import org.nfunk.jep.function.Abs; import org.nfunk.jep.function.Arg; import org.nfunk.jep.function.ComplexPFMC; import org.nfunk.jep.function.Conjugate; import org.nfunk.jep.function.Imaginary; import org.nfunk.jep.function.Polar; import org.nfunk.jep.function.Real; import org.nfunk.jep.type.Complex;"},"cluster_imports_info":{"kind":"string","value":"import org.nfunk.jep.function.*; import org.nfunk.jep.type.*;"},"libraries":{"kind":"list like","value":["org.nfunk.jep"],"string":"[\n \"org.nfunk.jep\"\n]"},"libraries_info":{"kind":"string","value":"org.nfunk.jep;"},"id":{"kind":"number","value":1414342,"string":"1,414,342"}}},{"rowIdx":2912570,"cells":{"method":{"kind":"string","value":" public static Mixin mixin(Class[] ics, Class[] dcs) {\r\n return mixin(ics, dcs, ClassHelper.getCallerClassLoader(Mixin.class));\r\n }\r\n\r"},"clean_method":{"kind":"string","value":"static Mixin function(Class[] ics, Class[] dcs) { return mixin(ics, dcs, ClassHelper.getCallerClassLoader(Mixin.class)); }"},"doc":{"kind":"string","value":"/**\r\n * mixin interface and delegates.\r\n * all class must be public.\r\n *\r\n * @param ics interface class array.\r\n * @param dcs delegate class array.\r\n * @return Mixin instance.\r\n */"},"comment":{"kind":"string","value":"mixin interface and delegates. all class must be public"},"method_name":{"kind":"string","value":"mixin"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"JasonHZXie/dubbo\",\n \"path\": \"dubbo-common/src/main/java/org/apache/dubbo/common/bytecode/Mixin.java\",\n \"license\": \"apache-2.0\",\n \"size\": 7907\n}"},"imports":{"kind":"list like","value":["org.apache.dubbo.common.utils.ClassHelper"],"string":"[\n \"org.apache.dubbo.common.utils.ClassHelper\"\n]"},"imports_info":{"kind":"string","value":"import org.apache.dubbo.common.utils.ClassHelper;"},"cluster_imports_info":{"kind":"string","value":"import org.apache.dubbo.common.utils.*;"},"libraries":{"kind":"list like","value":["org.apache.dubbo"],"string":"[\n \"org.apache.dubbo\"\n]"},"libraries_info":{"kind":"string","value":"org.apache.dubbo;"},"id":{"kind":"number","value":1650352,"string":"1,650,352"}}},{"rowIdx":2912571,"cells":{"method":{"kind":"string","value":"\t\n\tpublic void setBuilderCustomizers(\n\t\t\tCollection customizers) {\n\t\tAssert.notNull(customizers, \"Customizers must not be null\");\n\t\tthis.builderCustomizers = new ArrayList<>(customizers);\n\t}"},"clean_method":{"kind":"string","value":"void function( Collection customizers) { Assert.notNull(customizers, STR); this.builderCustomizers = new ArrayList<>(customizers); }"},"doc":{"kind":"string","value":"/**\n\t * Set {@link UndertowBuilderCustomizer}s that should be applied to the Undertow\n\t * {@link io.undertow.Undertow.Builder Builder}. Calling this method will replace any\n\t * existing customizers.\n\t * @param customizers the customizers to set\n\t */"},"comment":{"kind":"string","value":"Set UndertowBuilderCustomizers that should be applied to the Undertow io.undertow.Undertow.Builder Builder. Calling this method will replace any existing customizers"},"method_name":{"kind":"string","value":"setBuilderCustomizers"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"hello2009chen/spring-boot\",\n \"path\": \"spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/undertow/UndertowReactiveWebServerFactory.java\",\n \"license\": \"apache-2.0\",\n \"size\": 10085\n}"},"imports":{"kind":"list like","value":["java.util.ArrayList","java.util.Collection","org.springframework.util.Assert"],"string":"[\n \"java.util.ArrayList\",\n \"java.util.Collection\",\n \"org.springframework.util.Assert\"\n]"},"imports_info":{"kind":"string","value":"import java.util.ArrayList; import java.util.Collection; import org.springframework.util.Assert;"},"cluster_imports_info":{"kind":"string","value":"import java.util.*; import org.springframework.util.*;"},"libraries":{"kind":"list like","value":["java.util","org.springframework.util"],"string":"[\n \"java.util\",\n \"org.springframework.util\"\n]"},"libraries_info":{"kind":"string","value":"java.util; org.springframework.util;"},"id":{"kind":"number","value":997532,"string":"997,532"}}},{"rowIdx":2912572,"cells":{"method":{"kind":"string","value":" public static OGCWebServiceException create( Document doc ) {\r\n Element root = doc.getDocumentElement();\r\n return create( root );\r\n }\r\n\r"},"clean_method":{"kind":"string","value":"static OGCWebServiceException function( Document doc ) { Element root = doc.getDocumentElement(); return create( root ); }"},"doc":{"kind":"string","value":"/**\r\n * creates an OGCWebServiceException from a DOM object as defined in the OGC common\r\n * implementation specification\r\n *\r\n * @param doc\r\n * @return an {@link OGCWebServiceException} with the message, code and locator set to the xml\r\n * inside the document.\r\n */"},"comment":{"kind":"string","value":"creates an OGCWebServiceException from a DOM object as defined in the OGC common implementation specification"},"method_name":{"kind":"string","value":"create"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"lat-lon/deegree2-base\",\n \"path\": \"deegree2-core/src/main/java/org/deegree/ogcwebservices/OGCWebServiceException.java\",\n \"license\": \"lgpl-2.1\",\n \"size\": 4343\n}"},"imports":{"kind":"list like","value":["org.w3c.dom.Document","org.w3c.dom.Element"],"string":"[\n \"org.w3c.dom.Document\",\n \"org.w3c.dom.Element\"\n]"},"imports_info":{"kind":"string","value":"import org.w3c.dom.Document; import org.w3c.dom.Element;"},"cluster_imports_info":{"kind":"string","value":"import org.w3c.dom.*;"},"libraries":{"kind":"list like","value":["org.w3c.dom"],"string":"[\n \"org.w3c.dom\"\n]"},"libraries_info":{"kind":"string","value":"org.w3c.dom;"},"id":{"kind":"number","value":1200079,"string":"1,200,079"}}},{"rowIdx":2912573,"cells":{"method":{"kind":"string","value":" private void checkDatabaseBooted(Database database,\n String operation, \n String dbname) throws SQLException {\n if (database == null) {\n // Do not clear the TransactionResource context. It will\n // be restored as part of the finally clause of the constructor.\n this.setInactive();\n throw newSQLException(SQLState.REPLICATION_DB_NOT_BOOTED, \n operation, dbname);\n }\n }\n\n\t/**\n\t Examine the attributes set provided for illegal boot\n\t combinations and determine if this is a create boot.\n\n\t @return true iff the attribute create=true is provided. This\n\t means create a standard database. In other cases, returns\n\t false.\n\n\t @param p the attribute set.\n\n\t @exception SQLException Throw if more than one of\n\t create, createFrom, restoreFrom and\n\t rollForwardRecoveryFrom is used simultaneously.
\n\n\t Also, throw if (re)encryption is attempted with one of\n\t createFrom, restoreFrom and\n\t rollForwardRecoveryFrom."},"clean_method":{"kind":"string","value":"void function(Database database, String operation, String dbname) throws SQLException { if (database == null) { this.setInactive(); throw newSQLException(SQLState.REPLICATION_DB_NOT_BOOTED, operation, dbname); } } /** Examine the attributes set provided for illegal boot combinations and determine if this is a create boot. @return true iff the attribute create=true is provided. This means create a standard database. In other cases, returns false. @param p the attribute set. @exception SQLException Throw if more than one of create, createFrom, restoreFrom and rollForwardRecoveryFrom is used simultaneously.
Also, throw if (re)encryption is attempted with one of createFrom, restoreFrom and rollForwardRecoveryFrom."},"doc":{"kind":"string","value":"/**\n * Check that a database has already been booted. Throws an exception \n * otherwise\n *\n * @param database The database that should have been booted\n * @param operation The operation that requires that the database has \n * already been booted, used in the exception message if not booted\n * @param dbname The name of the database that should have been booted, \n * used in the exception message if not booted\n * @throws java.sql.SQLException thrown if database is not booted\n */"},"comment":{"kind":"string","value":"Check that a database has already been booted. Throws an exception otherwise"},"method_name":{"kind":"string","value":"checkDatabaseBooted"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"viaper/DBPlus\",\n \"path\": \"DerbyHodgepodge/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java\",\n \"license\": \"apache-2.0\",\n \"size\": 128383\n}"},"imports":{"kind":"list like","value":["java.sql.SQLException","org.apache.derby.iapi.db.Database","org.apache.derby.iapi.reference.SQLState"],"string":"[\n \"java.sql.SQLException\",\n \"org.apache.derby.iapi.db.Database\",\n \"org.apache.derby.iapi.reference.SQLState\"\n]"},"imports_info":{"kind":"string","value":"import java.sql.SQLException; import org.apache.derby.iapi.db.Database; import org.apache.derby.iapi.reference.SQLState;"},"cluster_imports_info":{"kind":"string","value":"import java.sql.*; import org.apache.derby.iapi.db.*; import org.apache.derby.iapi.reference.*;"},"libraries":{"kind":"list like","value":["java.sql","org.apache.derby"],"string":"[\n \"java.sql\",\n \"org.apache.derby\"\n]"},"libraries_info":{"kind":"string","value":"java.sql; org.apache.derby;"},"id":{"kind":"number","value":711639,"string":"711,639"}}},{"rowIdx":2912574,"cells":{"method":{"kind":"string","value":"\t\n\tEAttribute getArrayTypeSpecifier_Size();"},"clean_method":{"kind":"string","value":"EAttribute getArrayTypeSpecifier_Size();"},"doc":{"kind":"string","value":"/**\n\t * Returns the meta object for the attribute '{@link org.yakindu.base.types.ArrayTypeSpecifier#getSize Size}'.\n\t * \n\t * \n\t * @return the meta object for the attribute 'Size'.\n\t * @see org.yakindu.base.types.ArrayTypeSpecifier#getSize()\n\t * @see #getArrayTypeSpecifier()\n\t * @generated\n\t */"},"comment":{"kind":"string","value":"Returns the meta object for the attribute 'org.yakindu.base.types.ArrayTypeSpecifier#getSize Size'."},"method_name":{"kind":"string","value":"getArrayTypeSpecifier_Size"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"Yakindu/statecharts\",\n \"path\": \"plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/TypesPackage.java\",\n \"license\": \"epl-1.0\",\n \"size\": 91972\n}"},"imports":{"kind":"list like","value":["org.eclipse.emf.ecore.EAttribute"],"string":"[\n \"org.eclipse.emf.ecore.EAttribute\"\n]"},"imports_info":{"kind":"string","value":"import org.eclipse.emf.ecore.EAttribute;"},"cluster_imports_info":{"kind":"string","value":"import org.eclipse.emf.ecore.*;"},"libraries":{"kind":"list like","value":["org.eclipse.emf"],"string":"[\n \"org.eclipse.emf\"\n]"},"libraries_info":{"kind":"string","value":"org.eclipse.emf;"},"id":{"kind":"number","value":722116,"string":"722,116"}}},{"rowIdx":2912575,"cells":{"method":{"kind":"string","value":" private void validateRoleURIs(final Role[] userRoles) {\n final List invalidRoles = new ArrayList<>();\n for(Role role: userRoles) {\n if(role.getUri() == null) {\n invalidRoles.add(role.getIdentifier());\n }\n }\n if (!invalidRoles.isEmpty()) {\n throw new IllegalArgumentException(\"Roles with URI not specified found: \" + invalidRoles);\n }\n }"},"clean_method":{"kind":"string","value":"void function(final Role[] userRoles) { final List invalidRoles = new ArrayList<>(); for(Role role: userRoles) { if(role.getUri() == null) { invalidRoles.add(role.getIdentifier()); } } if (!invalidRoles.isEmpty()) { throw new IllegalArgumentException(STR + invalidRoles); } }"},"doc":{"kind":"string","value":"/**\n * Checks whether all the roles have URI specified.\n */"},"comment":{"kind":"string","value":"Checks whether all the roles have URI specified"},"method_name":{"kind":"string","value":"validateRoleURIs"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"martiner/gooddata-java\",\n \"path\": \"gooddata-java/src/main/java/com/gooddata/sdk/service/project/ProjectService.java\",\n \"license\": \"bsd-3-clause\",\n \"size\": 25129\n}"},"imports":{"kind":"list like","value":["com.gooddata.sdk.model.project.Role","java.util.ArrayList","java.util.List"],"string":"[\n \"com.gooddata.sdk.model.project.Role\",\n \"java.util.ArrayList\",\n \"java.util.List\"\n]"},"imports_info":{"kind":"string","value":"import com.gooddata.sdk.model.project.Role; import java.util.ArrayList; import java.util.List;"},"cluster_imports_info":{"kind":"string","value":"import com.gooddata.sdk.model.project.*; import java.util.*;"},"libraries":{"kind":"list like","value":["com.gooddata.sdk","java.util"],"string":"[\n \"com.gooddata.sdk\",\n \"java.util\"\n]"},"libraries_info":{"kind":"string","value":"com.gooddata.sdk; java.util;"},"id":{"kind":"number","value":1190102,"string":"1,190,102"}}},{"rowIdx":2912576,"cells":{"method":{"kind":"string","value":" private static Locale getWindowsLocale(int lcid)\n {\n \n switch (lcid)\n {\n case 0x0407: return Locale.GERMAN;\n case 0x0408: return new Locale(\"el\", \"GR\");\n case 0x0409: return Locale.ENGLISH;\n case 0x040b: return new Locale(\"fi\");\n case 0x040c: return Locale.FRENCH;\n case 0x0416: return new Locale(\"pt\");\n case 0x0807: return new Locale(\"de\", \"CH\");\n case 0x0809: return new Locale(\"en\", \"UK\");\n case 0x080c: return new Locale(\"fr\", \"BE\");\n case 0x0816: return new Locale(\"pt\", \"BR\");\n case 0x0c07: return new Locale(\"de\", \"AT\");\n case 0x0c09: return new Locale(\"en\", \"AU\");\n case 0x0c0c: return new Locale(\"fr\", \"CA\");\n case 0x1007: return new Locale(\"de\", \"LU\");\n case 0x1009: return new Locale(\"en\", \"CA\");\n case 0x100c: return new Locale(\"fr\", \"CH\");\n case 0x1407: return new Locale(\"de\", \"LI\");\n case 0x1409: return new Locale(\"en\", \"NZ\");\n case 0x140c: return new Locale(\"fr\", \"LU\");\n case 0x1809: return new Locale(\"en\", \"IE\");\n\n default:\n return null;\n }\n }"},"clean_method":{"kind":"string","value":"static Locale function(int lcid) { switch (lcid) { case 0x0407: return Locale.GERMAN; case 0x0408: return new Locale(\"el\", \"GR\"); case 0x0409: return Locale.ENGLISH; case 0x040b: return new Locale(\"fi\"); case 0x040c: return Locale.FRENCH; case 0x0416: return new Locale(\"pt\"); case 0x0807: return new Locale(\"de\", \"CH\"); case 0x0809: return new Locale(\"en\", \"UK\"); case 0x080c: return new Locale(\"fr\", \"BE\"); case 0x0816: return new Locale(\"pt\", \"BR\"); case 0x0c07: return new Locale(\"de\", \"AT\"); case 0x0c09: return new Locale(\"en\", \"AU\"); case 0x0c0c: return new Locale(\"fr\", \"CA\"); case 0x1007: return new Locale(\"de\", \"LU\"); case 0x1009: return new Locale(\"en\", \"CA\"); case 0x100c: return new Locale(\"fr\", \"CH\"); case 0x1407: return new Locale(\"de\", \"LI\"); case 0x1409: return new Locale(\"en\", \"NZ\"); case 0x140c: return new Locale(\"fr\", \"LU\"); case 0x1809: return new Locale(\"en\", \"IE\"); default: return null; } }"},"doc":{"kind":"string","value":"/**\n * Maps a Windows LCID into a Java Locale.\n *\n * @param lcid the Windows language ID whose Java locale\n * is to be retrieved.\n *\n * @return an suitable Locale, or null if\n * the mapping cannot be performed.\n */"},"comment":{"kind":"string","value":"Maps a Windows LCID into a Java Locale"},"method_name":{"kind":"string","value":"getWindowsLocale"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"SanDisk-Open-Source/SSD_Dashboard\",\n \"path\": \"uefi/gcc/gcc-4.6.3/libjava/classpath/gnu/java/awt/font/opentype/NameDecoder.java\",\n \"license\": \"gpl-2.0\",\n \"size\": 21736\n}"},"imports":{"kind":"list like","value":["java.util.Locale"],"string":"[\n \"java.util.Locale\"\n]"},"imports_info":{"kind":"string","value":"import java.util.Locale;"},"cluster_imports_info":{"kind":"string","value":"import java.util.*;"},"libraries":{"kind":"list like","value":["java.util"],"string":"[\n \"java.util\"\n]"},"libraries_info":{"kind":"string","value":"java.util;"},"id":{"kind":"number","value":1522292,"string":"1,522,292"}}},{"rowIdx":2912577,"cells":{"method":{"kind":"string","value":"\t\n\tprotected static InputStream getResponseStream(HttpWebRequest request)\n\t\t\tthrows EWSHttpException, IOException {\n\t\tString contentEncoding = \"\";\n\n\t\tif (null != request.getContentEncoding()) {\n\t\t\tcontentEncoding = request.getContentEncoding().toLowerCase();\n\t\t}\n\n\t\tInputStream responseStream;\n\n\t\tif (contentEncoding.contains(\"gzip\")) {\n\t\t\tresponseStream = new GZIPInputStream(request.getInputStream());\n\t\t} else if (contentEncoding.contains(\"deflate\")) {\n\t\t\tresponseStream = new InflaterInputStream(request.getInputStream());\n\t\t} else {\n\t\t\tresponseStream = request.getInputStream();\n\t\t}\n\t\treturn responseStream;\n\t}"},"clean_method":{"kind":"string","value":"static InputStream function(HttpWebRequest request) throws EWSHttpException, IOException { String contentEncoding = STRgzipSTRdeflate\")) { responseStream = new InflaterInputStream(request.getInputStream()); } else { responseStream = request.getInputStream(); } return responseStream; }"},"doc":{"kind":"string","value":"/**\n\t * Gets the response stream (may be wrapped with GZip/Deflate stream to\n\t * decompress content).\n\t * \n\t * @param request\n\t * the request\n\t * @return ResponseStream\n\t * @throws microsoft.exchange.webservices.data.EWSHttpException\n\t * the eWS http exception\n\t * @throws java.io.IOException\n\t * Signals that an I/O exception has occurred.\n\t */"},"comment":{"kind":"string","value":"Gets the response stream (may be wrapped with GZip/Deflate stream to decompress content)"},"method_name":{"kind":"string","value":"getResponseStream"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"kaaaaang/ews-java-api\",\n \"path\": \"src/main/java/microsoft/exchange/webservices/data/AutodiscoverRequest.java\",\n \"license\": \"mit\",\n \"size\": 23379\n}"},"imports":{"kind":"list like","value":["java.io.IOException","java.io.InputStream","java.util.zip.InflaterInputStream"],"string":"[\n \"java.io.IOException\",\n \"java.io.InputStream\",\n \"java.util.zip.InflaterInputStream\"\n]"},"imports_info":{"kind":"string","value":"import java.io.IOException; import java.io.InputStream; import java.util.zip.InflaterInputStream;"},"cluster_imports_info":{"kind":"string","value":"import java.io.*; import java.util.zip.*;"},"libraries":{"kind":"list like","value":["java.io","java.util"],"string":"[\n \"java.io\",\n \"java.util\"\n]"},"libraries_info":{"kind":"string","value":"java.io; java.util;"},"id":{"kind":"number","value":573719,"string":"573,719"}}},{"rowIdx":2912578,"cells":{"method":{"kind":"string","value":"\t\n\tpublic void testValueWhenNameBlank() throws Exception {\n\t\tValueSerialization ser = createMock(ValueSerialization.class);\n\t\treplay(ser);\n\t\twriter.writeValue(ser, null, \"John Doé\", ctx);\n\t\tverify(ser);\n\t\tassertEquals(\"John Do&#233;\", os.toString());\n\t\tassertEquals(StringUtils.EMPTY, ctx.getPath());\n\t}\n\t"},"clean_method":{"kind":"string","value":"void function() throws Exception { ValueSerialization ser = createMock(ValueSerialization.class); replay(ser); writer.writeValue(ser, null, STR, ctx); verify(ser); assertEquals(STR, os.toString()); assertEquals(StringUtils.EMPTY, ctx.getPath()); }"},"doc":{"kind":"string","value":"/**\n\t * Tests serializing a non-null or empty value but with an empty name\n\t */"},"comment":{"kind":"string","value":"Tests serializing a non-null or empty value but with an empty name"},"method_name":{"kind":"string","value":"testValueWhenNameBlank"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"localmatters/object-serializer\",\n \"path\": \"src/test/java/org/localmatters/serializer/writer/XMLWriterTest.java\",\n \"license\": \"apache-2.0\",\n \"size\": 25219\n}"},"imports":{"kind":"list like","value":["org.apache.commons.lang.StringUtils","org.easymock.classextension.EasyMock","org.localmatters.serializer.serialization.ValueSerialization"],"string":"[\n \"org.apache.commons.lang.StringUtils\",\n \"org.easymock.classextension.EasyMock\",\n \"org.localmatters.serializer.serialization.ValueSerialization\"\n]"},"imports_info":{"kind":"string","value":"import org.apache.commons.lang.StringUtils; import org.easymock.classextension.EasyMock; import org.localmatters.serializer.serialization.ValueSerialization;"},"cluster_imports_info":{"kind":"string","value":"import org.apache.commons.lang.*; import org.easymock.classextension.*; import org.localmatters.serializer.serialization.*;"},"libraries":{"kind":"list like","value":["org.apache.commons","org.easymock.classextension","org.localmatters.serializer"],"string":"[\n \"org.apache.commons\",\n \"org.easymock.classextension\",\n \"org.localmatters.serializer\"\n]"},"libraries_info":{"kind":"string","value":"org.apache.commons; org.easymock.classextension; org.localmatters.serializer;"},"id":{"kind":"number","value":1236801,"string":"1,236,801"}}},{"rowIdx":2912579,"cells":{"method":{"kind":"string","value":" // TODO: Customize helper method\n \n public void sendtoUI(int code, String res) {\n if(null != intent2) {\n Intent result = new Intent();\n result.putExtra(\"error\", res);\n try {\n intent2.send(this, code, result);\n } catch (PendingIntent.CanceledException e) {\n e.printStackTrace();\n }\n }\n }"},"clean_method":{"kind":"string","value":"void function(int code, String res) { if(null != intent2) { Intent result = new Intent(); result.putExtra(\"error\", res); try { intent2.send(this, code, result); } catch (PendingIntent.CanceledException e) { e.printStackTrace(); } } }"},"doc":{"kind":"string","value":"/**\n * Starts this service to perform action Foo with the given parameters. If\n * the service is already performing a task this action will be queued.\n *\n * @see IntentService\n */"},"comment":{"kind":"string","value":"Starts this service to perform action Foo with the given parameters. If the service is already performing a task this action will be queued"},"method_name":{"kind":"string","value":"sendtoUI"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"inv2004/cycle-computer\",\n \"path\": \"app/src/main/java/com/example/unknoqn/cc/CCDataServiceAsync_disabled.java\",\n \"license\": \"apache-2.0\",\n \"size\": 5414\n}"},"imports":{"kind":"list like","value":["android.app.PendingIntent","android.content.Intent"],"string":"[\n \"android.app.PendingIntent\",\n \"android.content.Intent\"\n]"},"imports_info":{"kind":"string","value":"import android.app.PendingIntent; import android.content.Intent;"},"cluster_imports_info":{"kind":"string","value":"import android.app.*; import android.content.*;"},"libraries":{"kind":"list like","value":["android.app","android.content"],"string":"[\n \"android.app\",\n \"android.content\"\n]"},"libraries_info":{"kind":"string","value":"android.app; android.content;"},"id":{"kind":"number","value":1000892,"string":"1,000,892"}}},{"rowIdx":2912580,"cells":{"method":{"kind":"string","value":" public void showShareFile(OCFile file){\n Intent intent = new Intent(mFileActivity, ShareActivity.class);\n intent.putExtra(mFileActivity.EXTRA_FILE, file);\n intent.putExtra(mFileActivity.EXTRA_ACCOUNT, mFileActivity.getAccount());\n mFileActivity.startActivity(intent);\n\n }"},"clean_method":{"kind":"string","value":"void function(OCFile file){ Intent intent = new Intent(mFileActivity, ShareActivity.class); intent.putExtra(mFileActivity.EXTRA_FILE, file); intent.putExtra(mFileActivity.EXTRA_ACCOUNT, mFileActivity.getAccount()); mFileActivity.startActivity(intent); }"},"doc":{"kind":"string","value":"/**\n * Show an instance of {@link ShareType} for sharing or unsharing the {@OCFile} received as parameter.\n *\n * @param file File to share or unshare.\n */"},"comment":{"kind":"string","value":"Show an instance of ShareType for sharing or unsharing the received as parameter"},"method_name":{"kind":"string","value":"showShareFile"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"rishabh7m/android-1\",\n \"path\": \"src/com/owncloud/android/files/FileOperationsHelper.java\",\n \"license\": \"gpl-2.0\",\n \"size\": 20946\n}"},"imports":{"kind":"list like","value":["android.content.Intent","com.owncloud.android.datamodel.OCFile","com.owncloud.android.ui.activity.ShareActivity"],"string":"[\n \"android.content.Intent\",\n \"com.owncloud.android.datamodel.OCFile\",\n \"com.owncloud.android.ui.activity.ShareActivity\"\n]"},"imports_info":{"kind":"string","value":"import android.content.Intent; import com.owncloud.android.datamodel.OCFile; import com.owncloud.android.ui.activity.ShareActivity;"},"cluster_imports_info":{"kind":"string","value":"import android.content.*; import com.owncloud.android.datamodel.*; import com.owncloud.android.ui.activity.*;"},"libraries":{"kind":"list like","value":["android.content","com.owncloud.android"],"string":"[\n \"android.content\",\n \"com.owncloud.android\"\n]"},"libraries_info":{"kind":"string","value":"android.content; com.owncloud.android;"},"id":{"kind":"number","value":2517376,"string":"2,517,376"}}},{"rowIdx":2912581,"cells":{"method":{"kind":"string","value":" private void setUpExtrinsics() {\n // Get device to imu matrix.\n TangoPoseData device2IMUPose = new TangoPoseData();\n TangoCoordinateFramePair framePair = new TangoCoordinateFramePair();\n framePair.baseFrame = TangoPoseData.COORDINATE_FRAME_IMU;\n framePair.targetFrame = TangoPoseData.COORDINATE_FRAME_DEVICE;\n device2IMUPose = mTango.getPoseAtTime(0.0, framePair);\n mRenderer.getModelMatCalculator().SetDevice2IMUMatrix(\n device2IMUPose.getTranslationAsFloats(), device2IMUPose.getRotationAsFloats());\n\n // Get color camera to imu matrix.\n TangoPoseData color2IMUPose = new TangoPoseData();\n framePair.baseFrame = TangoPoseData.COORDINATE_FRAME_IMU;\n framePair.targetFrame = TangoPoseData.COORDINATE_FRAME_CAMERA_COLOR;\n color2IMUPose = mTango.getPoseAtTime(0.0, framePair);\n\n mRenderer.getModelMatCalculator().SetColorCamera2IMUMatrix(\n color2IMUPose.getTranslationAsFloats(), color2IMUPose.getRotationAsFloats());\n }"},"clean_method":{"kind":"string","value":"void function() { TangoPoseData device2IMUPose = new TangoPoseData(); TangoCoordinateFramePair framePair = new TangoCoordinateFramePair(); framePair.baseFrame = TangoPoseData.COORDINATE_FRAME_IMU; framePair.targetFrame = TangoPoseData.COORDINATE_FRAME_DEVICE; device2IMUPose = mTango.getPoseAtTime(0.0, framePair); mRenderer.getModelMatCalculator().SetDevice2IMUMatrix( device2IMUPose.getTranslationAsFloats(), device2IMUPose.getRotationAsFloats()); TangoPoseData color2IMUPose = new TangoPoseData(); framePair.baseFrame = TangoPoseData.COORDINATE_FRAME_IMU; framePair.targetFrame = TangoPoseData.COORDINATE_FRAME_CAMERA_COLOR; color2IMUPose = mTango.getPoseAtTime(0.0, framePair); mRenderer.getModelMatCalculator().SetColorCamera2IMUMatrix( color2IMUPose.getTranslationAsFloats(), color2IMUPose.getRotationAsFloats()); }"},"doc":{"kind":"string","value":"/**\n * Setup the extrinsics of the device.\n */"},"comment":{"kind":"string","value":"Setup the extrinsics of the device"},"method_name":{"kind":"string","value":"setUpExtrinsics"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"UNH-Android-Development-Lab/tango-examples-java\",\n \"path\": \"MotionTrackingJava/app/src/main/java/com/projecttango/experiments/javamotiontracking/MotionTrackingActivity.java\",\n \"license\": \"apache-2.0\",\n \"size\": 20320\n}"},"imports":{"kind":"list like","value":["com.google.atap.tangoservice.TangoCoordinateFramePair","com.google.atap.tangoservice.TangoPoseData"],"string":"[\n \"com.google.atap.tangoservice.TangoCoordinateFramePair\",\n \"com.google.atap.tangoservice.TangoPoseData\"\n]"},"imports_info":{"kind":"string","value":"import com.google.atap.tangoservice.TangoCoordinateFramePair; import com.google.atap.tangoservice.TangoPoseData;"},"cluster_imports_info":{"kind":"string","value":"import com.google.atap.tangoservice.*;"},"libraries":{"kind":"list like","value":["com.google.atap"],"string":"[\n \"com.google.atap\"\n]"},"libraries_info":{"kind":"string","value":"com.google.atap;"},"id":{"kind":"number","value":859649,"string":"859,649"}}},{"rowIdx":2912582,"cells":{"method":{"kind":"string","value":" @Test\n public void testGetPolyfillsSourceCustomServiceConfigQueryUseDefault() {\n Query query = new Query.Builder().build();\n String actual = service.getPolyfillsSource(\"chrome/30\", query);\n String expected = \"(function(undefined) {c.minb.mind.mina.min}).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});\";\n assertEquals(expected, actual);\n }"},"clean_method":{"kind":"string","value":"void function() { Query query = new Query.Builder().build(); String actual = service.getPolyfillsSource(STR, query); String expected = STR; assertEquals(expected, actual); }"},"doc":{"kind":"string","value":"/**\n * Polyfill service should fill the empty query object with default values\n * So this should behave the same as if query is not supplied at all\n */"},"comment":{"kind":"string","value":"Polyfill service should fill the empty query object with default values So this should behave the same as if query is not supplied at all"},"method_name":{"kind":"string","value":"testGetPolyfillsSourceCustomServiceConfigQueryUseDefault"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"reiniergs/polyfill-service\",\n \"path\": \"polyfill-service-api/src/test/java/org/polyfillservice/api/services/PreSortPolyfillServiceCustomServiceConfig.java\",\n \"license\": \"mit\",\n \"size\": 3320\n}"},"imports":{"kind":"list like","value":["junit.framework.TestCase","org.polyfillservice.api.components.Query"],"string":"[\n \"junit.framework.TestCase\",\n \"org.polyfillservice.api.components.Query\"\n]"},"imports_info":{"kind":"string","value":"import junit.framework.TestCase; import org.polyfillservice.api.components.Query;"},"cluster_imports_info":{"kind":"string","value":"import junit.framework.*; import org.polyfillservice.api.components.*;"},"libraries":{"kind":"list like","value":["junit.framework","org.polyfillservice.api"],"string":"[\n \"junit.framework\",\n \"org.polyfillservice.api\"\n]"},"libraries_info":{"kind":"string","value":"junit.framework; org.polyfillservice.api;"},"id":{"kind":"number","value":1674555,"string":"1,674,555"}}},{"rowIdx":2912583,"cells":{"method":{"kind":"string","value":" public SiteLink getSiteLink() {\n return siteLink;\n }"},"clean_method":{"kind":"string","value":"SiteLink function() { return siteLink; }"},"doc":{"kind":"string","value":"/**\n * Gets the sitelink.\n */"},"comment":{"kind":"string","value":"Gets the sitelink"},"method_name":{"kind":"string","value":"getSiteLink"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"JeffRisberg/BING01\",\n \"path\": \"src/main/java/com/microsoft/bingads/v10/bulk/entities/BulkSiteLink.java\",\n \"license\": \"mit\",\n \"size\": 14302\n}"},"imports":{"kind":"list like","value":["com.microsoft.bingads.v10.campaignmanagement.SiteLink"],"string":"[\n \"com.microsoft.bingads.v10.campaignmanagement.SiteLink\"\n]"},"imports_info":{"kind":"string","value":"import com.microsoft.bingads.v10.campaignmanagement.SiteLink;"},"cluster_imports_info":{"kind":"string","value":"import com.microsoft.bingads.v10.campaignmanagement.*;"},"libraries":{"kind":"list like","value":["com.microsoft.bingads"],"string":"[\n \"com.microsoft.bingads\"\n]"},"libraries_info":{"kind":"string","value":"com.microsoft.bingads;"},"id":{"kind":"number","value":1432599,"string":"1,432,599"}}},{"rowIdx":2912584,"cells":{"method":{"kind":"string","value":" public ConnectPoint controlPlaneConnectPoint() {\n return connectPoint;\n }"},"clean_method":{"kind":"string","value":"ConnectPoint function() { return connectPoint; }"},"doc":{"kind":"string","value":"/**\n * Returns the routing control plane connect point.\n *\n * @return control plane connect point\n */"},"comment":{"kind":"string","value":"Returns the routing control plane connect point"},"method_name":{"kind":"string","value":"controlPlaneConnectPoint"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"kuujo/onos\",\n \"path\": \"apps/routing-api/src/main/java/org/onosproject/routing/config/RoutersConfig.java\",\n \"license\": \"apache-2.0\",\n \"size\": 4434\n}"},"imports":{"kind":"list like","value":["org.onosproject.net.ConnectPoint"],"string":"[\n \"org.onosproject.net.ConnectPoint\"\n]"},"imports_info":{"kind":"string","value":"import org.onosproject.net.ConnectPoint;"},"cluster_imports_info":{"kind":"string","value":"import org.onosproject.net.*;"},"libraries":{"kind":"list like","value":["org.onosproject.net"],"string":"[\n \"org.onosproject.net\"\n]"},"libraries_info":{"kind":"string","value":"org.onosproject.net;"},"id":{"kind":"number","value":381064,"string":"381,064"}}},{"rowIdx":2912585,"cells":{"method":{"kind":"string","value":" public void rangeExpressionEvaluatorMapBased() {\n // The algorithm :\n // Get all the nodes of the Expression Tree and fill it into a MAP.\n // The Map structure will be currentNode, ColumnName, LessThanOrGreaterThan, Value, ParentNode\n // Group the rows in MAP according to the columns and then evaluate if it can be transformed\n // into a RANGE or not.\n //\n // AND AND\n // | |\n // / \\ / \\\n // / \\ / \\\n // Less Greater => TRUE Range\n // / \\ / \\ / \\\n // / \\ / \\ / \\\n // a 10 a 5 Less greater\n // /\\ /\\\n // / \\ / \\\n // a 10 a 5\n //\n\n Map> filterExpressionMap;\n filterExpressionMap = convertFilterTreeToMap();\n replaceWithRangeExpression(filterExpressionMap);\n filterExpressionMap.clear();\n }"},"clean_method":{"kind":"string","value":"void function() { Map> filterExpressionMap; filterExpressionMap = convertFilterTreeToMap(); replaceWithRangeExpression(filterExpressionMap); filterExpressionMap.clear(); }"},"doc":{"kind":"string","value":"/**\n * This method evaluates is any greater than or less than expression can be transformed\n * into a single RANGE filter.\n */"},"comment":{"kind":"string","value":"This method evaluates is any greater than or less than expression can be transformed into a single RANGE filter"},"method_name":{"kind":"string","value":"rangeExpressionEvaluatorMapBased"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"zzcclp/carbondata\",\n \"path\": \"core/src/main/java/org/apache/carbondata/core/scan/expression/RangeExpressionEvaluator.java\",\n \"license\": \"apache-2.0\",\n \"size\": 18482\n}"},"imports":{"kind":"list like","value":["java.util.List","java.util.Map"],"string":"[\n \"java.util.List\",\n \"java.util.Map\"\n]"},"imports_info":{"kind":"string","value":"import java.util.List; import java.util.Map;"},"cluster_imports_info":{"kind":"string","value":"import java.util.*;"},"libraries":{"kind":"list like","value":["java.util"],"string":"[\n \"java.util\"\n]"},"libraries_info":{"kind":"string","value":"java.util;"},"id":{"kind":"number","value":2693439,"string":"2,693,439"}}},{"rowIdx":2912586,"cells":{"method":{"kind":"string","value":"\t\n\tpublic default List subrules() {\r\n\t\treturn children();\r\n\t}\r\n\r"},"clean_method":{"kind":"string","value":"default List function() { return children(); }"},"doc":{"kind":"string","value":"/**\r\n\t * Gets the subrules of this grammar rule. Alias for\r\n\t * {@link GrammarRule#children()}.\r\n\t * \r\n\t * @return the subrules of this grammar rule.\r\n\t */"},"comment":{"kind":"string","value":"Gets the subrules of this grammar rule. Alias for GrammarRule#children()"},"method_name":{"kind":"string","value":"subrules"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"NoodleOfDeath/PastaParser\",\n \"path\": \"runtime/java/src/com/noodleofdeath/grammarkit/model/grammar/rule/GrammarRule.java\",\n \"license\": \"mit\",\n \"size\": 8079\n}"},"imports":{"kind":"list like","value":["java.util.List"],"string":"[\n \"java.util.List\"\n]"},"imports_info":{"kind":"string","value":"import java.util.List;"},"cluster_imports_info":{"kind":"string","value":"import java.util.*;"},"libraries":{"kind":"list like","value":["java.util"],"string":"[\n \"java.util\"\n]"},"libraries_info":{"kind":"string","value":"java.util;"},"id":{"kind":"number","value":912360,"string":"912,360"}}},{"rowIdx":2912587,"cells":{"method":{"kind":"string","value":" @Nullable\n public Uri getTokenEndpoint() {\n return get(TOKEN_ENDPOINT);\n }"},"clean_method":{"kind":"string","value":"Uri function() { return get(TOKEN_ENDPOINT); }"},"doc":{"kind":"string","value":"/**\n * The OAuth 2 token endpoint URI. Not specified if only the implicit flow is used.\n *\n * @see \n * \"OpenID Connect Dynamic Client Registration 1.0\"\n */"},"comment":{"kind":"string","value":"The OAuth 2 token endpoint URI. Not specified if only the implicit flow is used"},"method_name":{"kind":"string","value":"getTokenEndpoint"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"StudienprojektUniTrier/Client\",\n \"path\": \"library/java/net/openid/appauth/AuthorizationServiceDiscovery.java\",\n \"license\": \"apache-2.0\",\n \"size\": 21556\n}"},"imports":{"kind":"list like","value":["android.net.Uri"],"string":"[\n \"android.net.Uri\"\n]"},"imports_info":{"kind":"string","value":"import android.net.Uri;"},"cluster_imports_info":{"kind":"string","value":"import android.net.*;"},"libraries":{"kind":"list like","value":["android.net"],"string":"[\n \"android.net\"\n]"},"libraries_info":{"kind":"string","value":"android.net;"},"id":{"kind":"number","value":1091576,"string":"1,091,576"}}},{"rowIdx":2912588,"cells":{"method":{"kind":"string","value":" public ActionInstance deleteActionInstance(String actionInstanceId) throws ActionInstanceNotFoundException {\n checkInitialized();\n return actionOperationsDelegate.delete(actionInstanceId);\n }"},"clean_method":{"kind":"string","value":"ActionInstance function(String actionInstanceId) throws ActionInstanceNotFoundException { checkInitialized(); return actionOperationsDelegate.delete(actionInstanceId); }"},"doc":{"kind":"string","value":"/**\n * Deletes/Removes the {@code ActionInstance} associated with this actionInstanceId.\n * If it has a {@code CronTrigger} then it is also un-scheduled from scheduler\n * @throws ActionInstanceNotFoundException\n * @throws com.netflix.scheduledactions.exceptions.ActionOperationException\n */"},"comment":{"kind":"string","value":"Deletes/Removes the ActionInstance associated with this actionInstanceId. If it has a CronTrigger then it is also un-scheduled from scheduler"},"method_name":{"kind":"string","value":"deleteActionInstance"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"spinnaker/scheduled-actions\",\n \"path\": \"scheduled-actions-core/src/main/java/com/netflix/scheduledactions/ActionsOperator.java\",\n \"license\": \"apache-2.0\",\n \"size\": 11259\n}"},"imports":{"kind":"list like","value":["com.netflix.scheduledactions.exceptions.ActionInstanceNotFoundException"],"string":"[\n \"com.netflix.scheduledactions.exceptions.ActionInstanceNotFoundException\"\n]"},"imports_info":{"kind":"string","value":"import com.netflix.scheduledactions.exceptions.ActionInstanceNotFoundException;"},"cluster_imports_info":{"kind":"string","value":"import com.netflix.scheduledactions.exceptions.*;"},"libraries":{"kind":"list like","value":["com.netflix.scheduledactions"],"string":"[\n \"com.netflix.scheduledactions\"\n]"},"libraries_info":{"kind":"string","value":"com.netflix.scheduledactions;"},"id":{"kind":"number","value":435758,"string":"435,758"}}},{"rowIdx":2912589,"cells":{"method":{"kind":"string","value":" @ServiceMethod(returns = ReturnType.SINGLE)\n PolicyDefinitionInner get(String policyDefinitionName);"},"clean_method":{"kind":"string","value":"@ServiceMethod(returns = ReturnType.SINGLE) PolicyDefinitionInner get(String policyDefinitionName);"},"doc":{"kind":"string","value":"/**\n * Gets the policy definition.\n *\n * @param policyDefinitionName The name of the policy definition to get.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the policy definition.\n */"},"comment":{"kind":"string","value":"Gets the policy definition"},"method_name":{"kind":"string","value":"get"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"Azure/azure-sdk-for-java\",\n \"path\": \"sdk/resourcemanagerhybrid/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyDefinitionsClient.java\",\n \"license\": \"mit\",\n \"size\": 26040\n}"},"imports":{"kind":"list like","value":["com.azure.core.annotation.ReturnType","com.azure.core.annotation.ServiceMethod","com.azure.resourcemanager.resources.fluent.models.PolicyDefinitionInner"],"string":"[\n \"com.azure.core.annotation.ReturnType\",\n \"com.azure.core.annotation.ServiceMethod\",\n \"com.azure.resourcemanager.resources.fluent.models.PolicyDefinitionInner\"\n]"},"imports_info":{"kind":"string","value":"import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.resources.fluent.models.PolicyDefinitionInner;"},"cluster_imports_info":{"kind":"string","value":"import com.azure.core.annotation.*; import com.azure.resourcemanager.resources.fluent.models.*;"},"libraries":{"kind":"list like","value":["com.azure.core","com.azure.resourcemanager"],"string":"[\n \"com.azure.core\",\n \"com.azure.resourcemanager\"\n]"},"libraries_info":{"kind":"string","value":"com.azure.core; com.azure.resourcemanager;"},"id":{"kind":"number","value":2510727,"string":"2,510,727"}}},{"rowIdx":2912590,"cells":{"method":{"kind":"string","value":"\t\n\tpublic void identifyNode(int nodeId) throws SerialInterfaceException {\n\t\tSerialMessage newMessage = new SerialMessage(nodeId, SerialMessageClass.IdentifyNode, SerialMessageType.Request, SerialMessageClass.IdentifyNode, SerialMessagePriority.High);\n \tbyte[] newPayload = { (byte) nodeId };\n \tnewMessage.setMessagePayload(newPayload);\n \tthis.enqueue(newMessage);\n\t}\n\t"},"clean_method":{"kind":"string","value":"void function(int nodeId) throws SerialInterfaceException { SerialMessage newMessage = new SerialMessage(nodeId, SerialMessageClass.IdentifyNode, SerialMessageType.Request, SerialMessageClass.IdentifyNode, SerialMessagePriority.High); byte[] newPayload = { (byte) nodeId }; newMessage.setMessagePayload(newPayload); this.enqueue(newMessage); }"},"doc":{"kind":"string","value":"/**\n\t * Send Identify Node message to the controller.\n\t * @param nodeId the nodeId of the node to identify\n\t * @throws SerialInterfaceException when timing out or getting an invalid response.\n\t */"},"comment":{"kind":"string","value":"Send Identify Node message to the controller"},"method_name":{"kind":"string","value":"identifyNode"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"dereulenspiegel/openhab\",\n \"path\": \"bundles/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/protocol/ZWaveController.java\",\n \"license\": \"epl-1.0\",\n \"size\": 53059\n}"},"imports":{"kind":"list like","value":["org.openhab.binding.zwave.internal.protocol.SerialMessage"],"string":"[\n \"org.openhab.binding.zwave.internal.protocol.SerialMessage\"\n]"},"imports_info":{"kind":"string","value":"import org.openhab.binding.zwave.internal.protocol.SerialMessage;"},"cluster_imports_info":{"kind":"string","value":"import org.openhab.binding.zwave.internal.protocol.*;"},"libraries":{"kind":"list like","value":["org.openhab.binding"],"string":"[\n \"org.openhab.binding\"\n]"},"libraries_info":{"kind":"string","value":"org.openhab.binding;"},"id":{"kind":"number","value":2880949,"string":"2,880,949"}}},{"rowIdx":2912591,"cells":{"method":{"kind":"string","value":" void register(Object object, Set services);"},"clean_method":{"kind":"string","value":"void register(Object object, Set services);"},"doc":{"kind":"string","value":"/**\n * Register an object as providing a set of services\n * \n * @param object object providing services\n * @param services services provided by object\n */"},"comment":{"kind":"string","value":"Register an object as providing a set of services"},"method_name":{"kind":"string","value":"register"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"mjameson-se/foundation\",\n \"path\": \"org.f8n.inject/src/org/f8n/inject/ServiceRegistry.java\",\n \"license\": \"unlicense\",\n \"size\": 695\n}"},"imports":{"kind":"list like","value":["java.util.Set","org.f8n.reflect.TypeInfo"],"string":"[\n \"java.util.Set\",\n \"org.f8n.reflect.TypeInfo\"\n]"},"imports_info":{"kind":"string","value":"import java.util.Set; import org.f8n.reflect.TypeInfo;"},"cluster_imports_info":{"kind":"string","value":"import java.util.*; import org.f8n.reflect.*;"},"libraries":{"kind":"list like","value":["java.util","org.f8n.reflect"],"string":"[\n \"java.util\",\n \"org.f8n.reflect\"\n]"},"libraries_info":{"kind":"string","value":"java.util; org.f8n.reflect;"},"id":{"kind":"number","value":1257167,"string":"1,257,167"}}},{"rowIdx":2912592,"cells":{"method":{"kind":"string","value":" public static ScalarFunction createUnsafe(Method method) {\n CallImplementor implementor = createImplementor(method);\n return new ScalarFunctionImpl(method, implementor);\n }"},"clean_method":{"kind":"string","value":"static ScalarFunction function(Method method) { CallImplementor implementor = createImplementor(method); return new ScalarFunctionImpl(method, implementor); }"},"doc":{"kind":"string","value":"/**\n * Creates unsafe version of {@link ScalarFunction} from any method. The method\n * does not need to be static or belong to a class with default constructor. It is\n * the responsibility of the underlying engine to initialize the UDF object that\n * contain the method.\n *\n * @param method method that is used to implement the function\n */"},"comment":{"kind":"string","value":"Creates unsafe version of ScalarFunction from any method. The method does not need to be static or belong to a class with default constructor. It is the responsibility of the underlying engine to initialize the UDF object that contain the method"},"method_name":{"kind":"string","value":"createUnsafe"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"vlsi/calcite\",\n \"path\": \"core/src/main/java/org/apache/calcite/schema/impl/ScalarFunctionImpl.java\",\n \"license\": \"apache-2.0\",\n \"size\": 7472\n}"},"imports":{"kind":"list like","value":["java.lang.reflect.Method","org.apache.calcite.adapter.enumerable.CallImplementor","org.apache.calcite.schema.ScalarFunction"],"string":"[\n \"java.lang.reflect.Method\",\n \"org.apache.calcite.adapter.enumerable.CallImplementor\",\n \"org.apache.calcite.schema.ScalarFunction\"\n]"},"imports_info":{"kind":"string","value":"import java.lang.reflect.Method; import org.apache.calcite.adapter.enumerable.CallImplementor; import org.apache.calcite.schema.ScalarFunction;"},"cluster_imports_info":{"kind":"string","value":"import java.lang.reflect.*; import org.apache.calcite.adapter.enumerable.*; import org.apache.calcite.schema.*;"},"libraries":{"kind":"list like","value":["java.lang","org.apache.calcite"],"string":"[\n \"java.lang\",\n \"org.apache.calcite\"\n]"},"libraries_info":{"kind":"string","value":"java.lang; org.apache.calcite;"},"id":{"kind":"number","value":2685165,"string":"2,685,165"}}},{"rowIdx":2912593,"cells":{"method":{"kind":"string","value":" public void setRectangle(Rectangle rectangle) {\n this.rectangle.set(rectangle);\n }"},"clean_method":{"kind":"string","value":"void function(Rectangle rectangle) { this.rectangle.set(rectangle); }"},"doc":{"kind":"string","value":"/**\n * Set menu rectangle\n *\n * @param rectangle to set\n */"},"comment":{"kind":"string","value":"Set menu rectangle"},"method_name":{"kind":"string","value":"setRectangle"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"IonAgorria/Ouroboros\",\n \"path\": \"src/com/agorria/ouroboros/ui/panel/Panel.java\",\n \"license\": \"gpl-3.0\",\n \"size\": 7026\n}"},"imports":{"kind":"list like","value":["com.agorria.ouroboros.core.Rectangle"],"string":"[\n \"com.agorria.ouroboros.core.Rectangle\"\n]"},"imports_info":{"kind":"string","value":"import com.agorria.ouroboros.core.Rectangle;"},"cluster_imports_info":{"kind":"string","value":"import com.agorria.ouroboros.core.*;"},"libraries":{"kind":"list like","value":["com.agorria.ouroboros"],"string":"[\n \"com.agorria.ouroboros\"\n]"},"libraries_info":{"kind":"string","value":"com.agorria.ouroboros;"},"id":{"kind":"number","value":252680,"string":"252,680"}}},{"rowIdx":2912594,"cells":{"method":{"kind":"string","value":" public E nextElement() {\n if (element == null) {\n throw new NoSuchElementException(Messages.getString(\"security.17\")); //$NON-NLS-1$\n }\n E last = element;\n element = null;\n return last;\n }\n }"},"clean_method":{"kind":"string","value":"E function() { if (element == null) { throw new NoSuchElementException(Messages.getString(STR)); } E last = element; element = null; return last; } }"},"doc":{"kind":"string","value":"/**\n * Returns the element and clears internal reference to it.\n */"},"comment":{"kind":"string","value":"Returns the element and clears internal reference to it"},"method_name":{"kind":"string","value":"nextElement"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"freeVM/freeVM\",\n \"path\": \"enhanced/archive/classlib/java6/modules/security/src/main/java/common/java/security/AllPermissionCollection.java\",\n \"license\": \"apache-2.0\",\n \"size\": 4478\n}"},"imports":{"kind":"list like","value":["java.util.NoSuchElementException","org.apache.harmony.security.internal.nls.Messages"],"string":"[\n \"java.util.NoSuchElementException\",\n \"org.apache.harmony.security.internal.nls.Messages\"\n]"},"imports_info":{"kind":"string","value":"import java.util.NoSuchElementException; import org.apache.harmony.security.internal.nls.Messages;"},"cluster_imports_info":{"kind":"string","value":"import java.util.*; import org.apache.harmony.security.internal.nls.*;"},"libraries":{"kind":"list like","value":["java.util","org.apache.harmony"],"string":"[\n \"java.util\",\n \"org.apache.harmony\"\n]"},"libraries_info":{"kind":"string","value":"java.util; org.apache.harmony;"},"id":{"kind":"number","value":2367025,"string":"2,367,025"}}},{"rowIdx":2912595,"cells":{"method":{"kind":"string","value":" @Test\n public void codecSimpleFlowTest() throws IOException {\n FlowRule rule = getRule(\"simple-flow.json\");\n\n checkCommonData(rule);\n\n assertThat(rule.selector().criteria().size(), is(1));\n Criterion criterion1 = rule.selector().criteria().iterator().next();\n assertThat(criterion1.type(), is(Criterion.Type.ETH_TYPE));\n assertThat(((EthTypeCriterion) criterion1).ethType(), is(2054));\n\n assertThat(rule.treatment().allInstructions().size(), is(1));\n Instruction instruction1 = rule.treatment().allInstructions().get(0);\n assertThat(instruction1.type(), is(Instruction.Type.OUTPUT));\n assertThat(((Instructions.OutputInstruction) instruction1).port(), is(PortNumber.CONTROLLER));\n }\n\n SortedMap instructions = new TreeMap<>();"},"clean_method":{"kind":"string","value":"void function() throws IOException { FlowRule rule = getRule(STR); checkCommonData(rule); assertThat(rule.selector().criteria().size(), is(1)); Criterion criterion1 = rule.selector().criteria().iterator().next(); assertThat(criterion1.type(), is(Criterion.Type.ETH_TYPE)); assertThat(((EthTypeCriterion) criterion1).ethType(), is(2054)); assertThat(rule.treatment().allInstructions().size(), is(1)); Instruction instruction1 = rule.treatment().allInstructions().get(0); assertThat(instruction1.type(), is(Instruction.Type.OUTPUT)); assertThat(((Instructions.OutputInstruction) instruction1).port(), is(PortNumber.CONTROLLER)); } SortedMap instructions = new TreeMap<>();"},"doc":{"kind":"string","value":"/**\n * Checks that a simple rule decodes properly.\n *\n * @throws IOException if the resource cannot be processed\n */"},"comment":{"kind":"string","value":"Checks that a simple rule decodes properly"},"method_name":{"kind":"string","value":"codecSimpleFlowTest"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"maxkondr/onos-porta\",\n \"path\": \"core/common/src/test/java/org/onosproject/codec/impl/FlowRuleCodecTest.java\",\n \"license\": \"apache-2.0\",\n \"size\": 22038\n}"},"imports":{"kind":"list like","value":["java.io.IOException","java.util.SortedMap","java.util.TreeMap","org.hamcrest.MatcherAssert","org.hamcrest.Matchers","org.onosproject.net.PortNumber","org.onosproject.net.flow.FlowRule","org.onosproject.net.flow.criteria.Criterion","org.onosproject.net.flow.criteria.EthTypeCriterion","org.onosproject.net.flow.instructions.Instruction","org.onosproject.net.flow.instructions.Instructions"],"string":"[\n \"java.io.IOException\",\n \"java.util.SortedMap\",\n \"java.util.TreeMap\",\n \"org.hamcrest.MatcherAssert\",\n \"org.hamcrest.Matchers\",\n \"org.onosproject.net.PortNumber\",\n \"org.onosproject.net.flow.FlowRule\",\n \"org.onosproject.net.flow.criteria.Criterion\",\n \"org.onosproject.net.flow.criteria.EthTypeCriterion\",\n \"org.onosproject.net.flow.instructions.Instruction\",\n \"org.onosproject.net.flow.instructions.Instructions\"\n]"},"imports_info":{"kind":"string","value":"import java.io.IOException; import java.util.SortedMap; import java.util.TreeMap; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.onosproject.net.PortNumber; import org.onosproject.net.flow.FlowRule; import org.onosproject.net.flow.criteria.Criterion; import org.onosproject.net.flow.criteria.EthTypeCriterion; import org.onosproject.net.flow.instructions.Instruction; import org.onosproject.net.flow.instructions.Instructions;"},"cluster_imports_info":{"kind":"string","value":"import java.io.*; import java.util.*; import org.hamcrest.*; import org.onosproject.net.*; import org.onosproject.net.flow.*; import org.onosproject.net.flow.criteria.*; import org.onosproject.net.flow.instructions.*;"},"libraries":{"kind":"list like","value":["java.io","java.util","org.hamcrest","org.onosproject.net"],"string":"[\n \"java.io\",\n \"java.util\",\n \"org.hamcrest\",\n \"org.onosproject.net\"\n]"},"libraries_info":{"kind":"string","value":"java.io; java.util; org.hamcrest; org.onosproject.net;"},"id":{"kind":"number","value":2157177,"string":"2,157,177"}}},{"rowIdx":2912596,"cells":{"method":{"kind":"string","value":" default AdvancedNitriteEndpointConsumerBuilder exchangePattern(\n ExchangePattern exchangePattern) {\n doSetProperty(\"exchangePattern\", exchangePattern);\n return this;\n }"},"clean_method":{"kind":"string","value":"default AdvancedNitriteEndpointConsumerBuilder exchangePattern( ExchangePattern exchangePattern) { doSetProperty(STR, exchangePattern); return this; }"},"doc":{"kind":"string","value":"/**\n * Sets the exchange pattern when the consumer creates an exchange.\n * \n * The option is a: org.apache.camel.ExchangePattern type.\n * \n * Group: consumer (advanced)\n */"},"comment":{"kind":"string","value":"Sets the exchange pattern when the consumer creates an exchange. The option is a: org.apache.camel.ExchangePattern type. Group: consumer (advanced)"},"method_name":{"kind":"string","value":"exchangePattern"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"CodeSmell/camel\",\n \"path\": \"core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/NitriteEndpointBuilderFactory.java\",\n \"license\": \"apache-2.0\",\n \"size\": 25276\n}"},"imports":{"kind":"list like","value":["org.apache.camel.ExchangePattern"],"string":"[\n \"org.apache.camel.ExchangePattern\"\n]"},"imports_info":{"kind":"string","value":"import org.apache.camel.ExchangePattern;"},"cluster_imports_info":{"kind":"string","value":"import org.apache.camel.*;"},"libraries":{"kind":"list like","value":["org.apache.camel"],"string":"[\n \"org.apache.camel\"\n]"},"libraries_info":{"kind":"string","value":"org.apache.camel;"},"id":{"kind":"number","value":2544151,"string":"2,544,151"}}},{"rowIdx":2912597,"cells":{"method":{"kind":"string","value":" public List getBirthdays() {\n return birthdays;\n }"},"clean_method":{"kind":"string","value":"List function() { return birthdays; }"},"doc":{"kind":"string","value":"/**\n * Will need https://www.googleapis.com/auth/user.birthday.read scope\n * @return list of birthdays\n */"},"comment":{"kind":"string","value":"Will need HREF scope"},"method_name":{"kind":"string","value":"getBirthdays"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"spring-social/spring-social-google\",\n \"path\": \"src/main/java/org/springframework/social/google/api/people/PeoplePerson.java\",\n \"license\": \"apache-2.0\",\n \"size\": 3025\n}"},"imports":{"kind":"list like","value":["java.util.List"],"string":"[\n \"java.util.List\"\n]"},"imports_info":{"kind":"string","value":"import java.util.List;"},"cluster_imports_info":{"kind":"string","value":"import java.util.*;"},"libraries":{"kind":"list like","value":["java.util"],"string":"[\n \"java.util\"\n]"},"libraries_info":{"kind":"string","value":"java.util;"},"id":{"kind":"number","value":767424,"string":"767,424"}}},{"rowIdx":2912598,"cells":{"method":{"kind":"string","value":"\t\n\tpublic DataNode setTypeScalar(String type);"},"clean_method":{"kind":"string","value":"DataNode function(String type);"},"doc":{"kind":"string","value":"/**\n\t * Type of the disk-chopper: only one from the enumerated list (match text exactly)\n\t *

\n\t *

Enumeration:

    \n\t *
  • Chopper type single
  • \n\t *
  • contra_rotating_pair
  • \n\t *
  • synchro_pair

\n\t *

\n\t * \n\t * @param type the type\n\t */"},"comment":{"kind":"string","value":"Type of the disk-chopper: only one from the enumerated list (match text exactly) Enumeration: Chopper type single contra_rotating_pair synchro_pair"},"method_name":{"kind":"string","value":"setTypeScalar"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"colinpalmer/dawnsci\",\n \"path\": \"org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXdisk_chopper.java\",\n \"license\": \"epl-1.0\",\n \"size\": 11747\n}"},"imports":{"kind":"list like","value":["org.eclipse.dawnsci.analysis.api.tree.DataNode"],"string":"[\n \"org.eclipse.dawnsci.analysis.api.tree.DataNode\"\n]"},"imports_info":{"kind":"string","value":"import org.eclipse.dawnsci.analysis.api.tree.DataNode;"},"cluster_imports_info":{"kind":"string","value":"import org.eclipse.dawnsci.analysis.api.tree.*;"},"libraries":{"kind":"list like","value":["org.eclipse.dawnsci"],"string":"[\n \"org.eclipse.dawnsci\"\n]"},"libraries_info":{"kind":"string","value":"org.eclipse.dawnsci;"},"id":{"kind":"number","value":2880889,"string":"2,880,889"}}},{"rowIdx":2912599,"cells":{"method":{"kind":"string","value":"\t\n\tEReference getOclFeature_Definition();"},"clean_method":{"kind":"string","value":"EReference getOclFeature_Definition();"},"doc":{"kind":"string","value":"/**\n\t * Returns the meta object for the container reference '{@link anatlyzer.atlext.OCL.OclFeature#getDefinition Definition}'.\n\t * \n\t * \n\t * @return the meta object for the container reference 'Definition'.\n\t * @see anatlyzer.atlext.OCL.OclFeature#getDefinition()\n\t * @see #getOclFeature()\n\t * @generated\n\t */"},"comment":{"kind":"string","value":"Returns the meta object for the container reference 'anatlyzer.atlext.OCL.OclFeature#getDefinition Definition'."},"method_name":{"kind":"string","value":"getOclFeature_Definition"},"extra":{"kind":"string","value":"{\n \"repo_name\": \"jesusc/anatlyzer\",\n \"path\": \"plugins/anatlyzer.atl.typing/src-gen/anatlyzer/atlext/OCL/OCLPackage.java\",\n \"license\": \"epl-1.0\",\n \"size\": 484377\n}"},"imports":{"kind":"list like","value":["org.eclipse.emf.ecore.EReference"],"string":"[\n \"org.eclipse.emf.ecore.EReference\"\n]"},"imports_info":{"kind":"string","value":"import org.eclipse.emf.ecore.EReference;"},"cluster_imports_info":{"kind":"string","value":"import org.eclipse.emf.ecore.*;"},"libraries":{"kind":"list like","value":["org.eclipse.emf"],"string":"[\n \"org.eclipse.emf\"\n]"},"libraries_info":{"kind":"string","value":"org.eclipse.emf;"},"id":{"kind":"number","value":1621653,"string":"1,621,653"}}}],"truncated":false,"partial":false},"paginationData":{"pageIndex":29125,"numItemsPerPage":100,"numTotalItems":2916582,"offset":2912500,"length":100}},"jwt":"eyJhbGciOiJFZERTQSJ9.eyJyZWFkIjp0cnVlLCJwZXJtaXNzaW9ucyI6eyJyZXBvLmNvbnRlbnQucmVhZCI6dHJ1ZX0sImlhdCI6MTc1Nzc4MTAxNiwic3ViIjoiL2RhdGFzZXRzL0Z1ZGFuU0VMYWIvQ29kZUdlbjRMaWJzX1JldHJpZXZhbENvZGVMaWIiLCJleHAiOjE3NTc3ODQ2MTYsImlzcyI6Imh0dHBzOi8vaHVnZ2luZ2ZhY2UuY28ifQ.aKXV3RSsBcDyKUaIrhKh_FAR1DWamUbF_q_NqHtUff_4PRJu08O6GJMiljolimnuaGnLL9P8DPFnjjTlxmalAA","displayUrls":true},"discussionsStats":{"closed":0,"open":1,"total":1},"fullWidth":true,"hasGatedAccess":true,"hasFullAccess":true,"isEmbedded":false,"savedQueries":{"community":[],"user":[]}}">
method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public CompressDirectoryWithStubZipImpl andUnicodeExtraFieldPolicy(UnicodeExtraFieldPolicy unicodeExtraFieldPolicy) { this.unicodeExtraFieldPolicy = unicodeExtraFieldPolicy; return this; }
CompressDirectoryWithStubZipImpl function(UnicodeExtraFieldPolicy unicodeExtraFieldPolicy) { this.unicodeExtraFieldPolicy = unicodeExtraFieldPolicy; return this; }
/** * Sets the policy for creating unicode extra fields. By default, it is set to * {@link UnicodeExtraFieldPolicy#NEVER}. See * {@link ZipArchiveOutputStream#setCreateUnicodeExtraFields(UnicodeExtraFieldPolicy)}. */
Sets the policy for creating unicode extra fields. By default, it is set to <code>UnicodeExtraFieldPolicy#NEVER</code>. See <code>ZipArchiveOutputStream#setCreateUnicodeExtraFields(UnicodeExtraFieldPolicy)</code>
andUnicodeExtraFieldPolicy
{ "repo_name": "alanbuttars/commons-java", "path": "commons-compress/src/main/java/com/alanbuttars/commons/compress/stub/compress/CompressDirectoryWithStubZipImpl.java", "license": "apache-2.0", "size": 7126 }
[ "org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream" ]
import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
import org.apache.commons.compress.archivers.zip.*;
[ "org.apache.commons" ]
org.apache.commons;
16,635
@Override public void defineItem() { BodyDef bdef = new BodyDef(); bdef.position.set(getX(), getY()); bdef.type = BodyDef.BodyType.DynamicBody; body = world.createBody(bdef); FixtureDef fdef = new FixtureDef(); CircleShape shape = new CircleShape(); shape.setRadius(7/ Seeker.PPM); fdef.filter.categoryBits = Seeker.ITEM_BIT; fdef.filter.maskBits = Seeker.JAAP_BIT | Seeker.OBJECT_BIT | Seeker.GROUND_BIT | Seeker.COIN_BIT | Seeker.BRICK_BIT; fdef.shape = shape; body.createFixture(fdef).setUserData(this); setBounds(getX(), getY(), 24 / Seeker.PPM, 24 / Seeker.PPM); }
void function() { BodyDef bdef = new BodyDef(); bdef.position.set(getX(), getY()); bdef.type = BodyDef.BodyType.DynamicBody; body = world.createBody(bdef); FixtureDef fdef = new FixtureDef(); CircleShape shape = new CircleShape(); shape.setRadius(7/ Seeker.PPM); fdef.filter.categoryBits = Seeker.ITEM_BIT; fdef.filter.maskBits = Seeker.JAAP_BIT Seeker.OBJECT_BIT Seeker.GROUND_BIT Seeker.COIN_BIT Seeker.BRICK_BIT; fdef.shape = shape; body.createFixture(fdef).setUserData(this); setBounds(getX(), getY(), 24 / Seeker.PPM, 24 / Seeker.PPM); }
/** * Defines the hulkifier, giving it a body and attaching a fixture, setting a bit and telling it what it can collide with. */
Defines the hulkifier, giving it a body and attaching a fixture, setting a bit and telling it what it can collide with
defineItem
{ "repo_name": "fjodor-rs/Project", "path": "core/src/nl/mprog/com/seeker/game/sprites/items/Hulkifier.java", "license": "mit", "size": 2191 }
[ "com.badlogic.gdx.physics.box2d.BodyDef", "com.badlogic.gdx.physics.box2d.CircleShape", "com.badlogic.gdx.physics.box2d.FixtureDef", "nl.mprog.com.seeker.game.Seeker" ]
import com.badlogic.gdx.physics.box2d.BodyDef; import com.badlogic.gdx.physics.box2d.CircleShape; import com.badlogic.gdx.physics.box2d.FixtureDef; import nl.mprog.com.seeker.game.Seeker;
import com.badlogic.gdx.physics.box2d.*; import nl.mprog.com.seeker.game.*;
[ "com.badlogic.gdx", "nl.mprog.com" ]
com.badlogic.gdx; nl.mprog.com;
867,917
public void closeIfNotShared(Object rcpt) throws IgniteCheckedException { assert isDone(); synchronized (recipients) { if (recipients.isEmpty()) return; recipients.remove(rcpt); if (recipients.isEmpty()) get().close(); } }
void function(Object rcpt) throws IgniteCheckedException { assert isDone(); synchronized (recipients) { if (recipients.isEmpty()) return; recipients.remove(rcpt); if (recipients.isEmpty()) get().close(); } }
/** * Close if this result does not have any other recipients. * * @param rcpt ID of the recipient. * @throws IgniteCheckedException If failed. */
Close if this result does not have any other recipients
closeIfNotShared
{ "repo_name": "dlnufox/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java", "license": "apache-2.0", "size": 100876 }
[ "org.apache.ignite.IgniteCheckedException" ]
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,452,210
PagedIterable<SharedAccessAuthorizationRuleResource> listAuthorizationRules( String resourceGroupName, String namespaceName);
PagedIterable<SharedAccessAuthorizationRuleResource> listAuthorizationRules( String resourceGroupName, String namespaceName);
/** * Gets the authorization rules for a namespace. * * @param resourceGroupName The name of the resource group. * @param namespaceName The namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the authorization rules for a namespace. */
Gets the authorization rules for a namespace
listAuthorizationRules
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/models/Namespaces.java", "license": "mit", "size": 20638 }
[ "com.azure.core.http.rest.PagedIterable" ]
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.*;
[ "com.azure.core" ]
com.azure.core;
2,533,513
public void writeRatingTable(String dest) { try { PrintWriter out = new PrintWriter(dest); out.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<html><body>\n\n"); out.write("\n\n\n<!-- light -->\n\n"); out.write(buildSingleRatingTable(TankType.LightTank, FieldDef.rating)); out.write("\n\n\n<!-- medium -->\n\n"); out.write(buildSingleRatingTable(TankType.MediumTank, FieldDef.rating)); out.write("\n\n\n<!-- heavy -->\n\n"); out.write(buildSingleRatingTable(TankType.HeavyTank, FieldDef.rating)); out.write("\n\n\n<!-- td -->\n\n"); out.write(buildSingleRatingTable(TankType.TankDestroyer, FieldDef.rating)); out.write("\n\n\n<!-- spg -->\n\n"); out.write(buildSingleRatingTable(TankType.SelfPropelledGun, FieldDef.rating)); out.write("\n\n\n</body></html>"); out.flush(); out.close(); } catch (FileNotFoundException ex) { log.error("Could not write to local file: Not found!", ex); } } // -------------------- tables only --------------------
void function(String dest) { try { PrintWriter out = new PrintWriter(dest); out.write(STR1.0\STRUTF-8\STR); out.write(STR); out.write(buildSingleRatingTable(TankType.LightTank, FieldDef.rating)); out.write(STR); out.write(buildSingleRatingTable(TankType.MediumTank, FieldDef.rating)); out.write(STR); out.write(buildSingleRatingTable(TankType.HeavyTank, FieldDef.rating)); out.write(STR); out.write(buildSingleRatingTable(TankType.TankDestroyer, FieldDef.rating)); out.write(STR); out.write(buildSingleRatingTable(TankType.SelfPropelledGun, FieldDef.rating)); out.write(STR); out.flush(); out.close(); } catch (FileNotFoundException ex) { log.error(STR, ex); } }
/** * Writes a table for each tank type, containing the ratings for each tank, * as defined by the TankRating class. * @param dest the file where the tables shall be stored in */
Writes a table for each tank type, containing the ratings for each tank, as defined by the TankRating class
writeRatingTable
{ "repo_name": "Klamann/WotCrawler", "path": "src/main/java/de/nx42/wotcrawler/xml/Transformer.java", "license": "gpl-3.0", "size": 14097 }
[ "de.nx42.wotcrawler.db.tank.Tank", "de.nx42.wotcrawler.ext.FieldDef", "java.io.FileNotFoundException", "java.io.PrintWriter" ]
import de.nx42.wotcrawler.db.tank.Tank; import de.nx42.wotcrawler.ext.FieldDef; import java.io.FileNotFoundException; import java.io.PrintWriter;
import de.nx42.wotcrawler.db.tank.*; import de.nx42.wotcrawler.ext.*; import java.io.*;
[ "de.nx42.wotcrawler", "java.io" ]
de.nx42.wotcrawler; java.io;
1,661,297
public FacesConfigFactoryType<WebFacesConfigDescriptor> getOrCreateFactory() { List<Node> nodeList = model.get("factory"); if (nodeList != null && nodeList.size() > 0) { return new FacesConfigFactoryTypeImpl<WebFacesConfigDescriptor>(this, "factory", model, nodeList.get(0)); } return createFactory(); }
FacesConfigFactoryType<WebFacesConfigDescriptor> function() { List<Node> nodeList = model.get(STR); if (nodeList != null && nodeList.size() > 0) { return new FacesConfigFactoryTypeImpl<WebFacesConfigDescriptor>(this, STR, model, nodeList.get(0)); } return createFactory(); }
/** * If not already created, a new <code>factory</code> element will be created and returned. * Otherwise, the first existing <code>factory</code> element will be returned. * @return the instance defined for the element <code>factory</code> */
If not already created, a new <code>factory</code> element will be created and returned. Otherwise, the first existing <code>factory</code> element will be returned
getOrCreateFactory
{ "repo_name": "forge/javaee-descriptors", "path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/facesconfig20/WebFacesConfigDescriptorImpl.java", "license": "epl-1.0", "size": 44350 }
[ "java.util.List", "org.jboss.shrinkwrap.descriptor.api.facesconfig20.FacesConfigFactoryType", "org.jboss.shrinkwrap.descriptor.api.facesconfig20.WebFacesConfigDescriptor", "org.jboss.shrinkwrap.descriptor.spi.node.Node" ]
import java.util.List; import org.jboss.shrinkwrap.descriptor.api.facesconfig20.FacesConfigFactoryType; import org.jboss.shrinkwrap.descriptor.api.facesconfig20.WebFacesConfigDescriptor; import org.jboss.shrinkwrap.descriptor.spi.node.Node;
import java.util.*; import org.jboss.shrinkwrap.descriptor.api.facesconfig20.*; import org.jboss.shrinkwrap.descriptor.spi.node.*;
[ "java.util", "org.jboss.shrinkwrap" ]
java.util; org.jboss.shrinkwrap;
1,225,452
@FIXVersion(introduced="5.0SP1") @TagNumRef(tagNum=TagNum.UnderlyingLegOptAttribute) public void setUnderlyingLegOptAttribute(Character underlyingLegOptAttribute) { this.underlyingLegOptAttribute = underlyingLegOptAttribute; }
@FIXVersion(introduced=STR) @TagNumRef(tagNum=TagNum.UnderlyingLegOptAttribute) void function(Character underlyingLegOptAttribute) { this.underlyingLegOptAttribute = underlyingLegOptAttribute; }
/** * Message field setter. * @param underlyingLegOptAttribute field value */
Message field setter
setUnderlyingLegOptAttribute
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/comp/UnderlyingLegInstrument.java", "license": "gpl-3.0", "size": 27982 }
[ "net.hades.fix.message.anno.FIXVersion", "net.hades.fix.message.anno.TagNumRef", "net.hades.fix.message.type.TagNum" ]
import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum;
import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*;
[ "net.hades.fix" ]
net.hades.fix;
1,046,797
public void write(NetInterfaceConfig<? extends NetInterfaceAddressConfig> netConfig) throws KuraException;
void function(NetInterfaceConfig<? extends NetInterfaceAddressConfig> netConfig) throws KuraException;
/** * Persists the network configuration received as argument. Throws a {@link KuraException} if the persist operation * fails. * * @param netConfig * @throws KuraException */
Persists the network configuration received as argument. Throws a <code>KuraException</code> if the persist operation fails
write
{ "repo_name": "darionct/kura", "path": "kura/org.eclipse.kura.linux.net/src/main/java/org/eclipse/kura/internal/linux/net/NetInterfaceConfigSerializationService.java", "license": "epl-1.0", "size": 1457 }
[ "org.eclipse.kura.KuraException", "org.eclipse.kura.net.NetInterfaceAddressConfig", "org.eclipse.kura.net.NetInterfaceConfig" ]
import org.eclipse.kura.KuraException; import org.eclipse.kura.net.NetInterfaceAddressConfig; import org.eclipse.kura.net.NetInterfaceConfig;
import org.eclipse.kura.*; import org.eclipse.kura.net.*;
[ "org.eclipse.kura" ]
org.eclipse.kura;
834,728
private Object readResolve() { wakeUpQueue = new ArrayBlockingQueue<SerialMessage>(MAX_BUFFFER_SIZE, true); timer = new Timer(); return this; } /** * {@inheritDoc}
Object function() { wakeUpQueue = new ArrayBlockingQueue<SerialMessage>(MAX_BUFFFER_SIZE, true); timer = new Timer(); return this; } /** * {@inheritDoc}
/** * Resolves uninitialized fields after XML Deserialization. * * @return The current {@link ZWaveWakeUpCommandClass} instance. */
Resolves uninitialized fields after XML Deserialization
readResolve
{ "repo_name": "Greblys/openhab", "path": "bundles/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/protocol/commandclass/ZWaveWakeUpCommandClass.java", "license": "epl-1.0", "size": 20107 }
[ "java.util.Timer", "java.util.concurrent.ArrayBlockingQueue", "org.openhab.binding.zwave.internal.protocol.SerialMessage" ]
import java.util.Timer; import java.util.concurrent.ArrayBlockingQueue; import org.openhab.binding.zwave.internal.protocol.SerialMessage;
import java.util.*; import java.util.concurrent.*; import org.openhab.binding.zwave.internal.protocol.*;
[ "java.util", "org.openhab.binding" ]
java.util; org.openhab.binding;
1,635,370
private void createLabel(final Composite parent, final String text) { Label label = new Label(parent, SWT.WRAP); label.setText(text); label.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1)); }
void function(final Composite parent, final String text) { Label label = new Label(parent, SWT.WRAP); label.setText(text); label.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1)); }
/** * Creates a label with the given text. * * @param parent * The parent for the label * @param text * The text for the label */
Creates a label with the given text
createLabel
{ "repo_name": "fqqb/yamcs-studio", "path": "bundles/org.csstudio.opibuilder/src/org/csstudio/opibuilder/visualparts/OPIColorDialog.java", "license": "epl-1.0", "size": 13030 }
[ "org.eclipse.swt.layout.GridData", "org.eclipse.swt.widgets.Composite", "org.eclipse.swt.widgets.Label" ]
import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,190,943
private void renewClaimedTasks() { try { List<ClaimedTask> claimedTasks = ImmutableList.copyOf(_claimedTasks.values()); List<ScanRangeTask> tasks = Lists.newArrayList(); for (ClaimedTask claimedTask : claimedTasks) { if (claimedTask.isComplete()) { // Task is likely being removed in another thread. However, go ahead and remove it now // to allow other tasks to start sooner. _log.info("Complete claimed task found during renew: id={}", claimedTask.getTaskId()); _claimedTasks.remove(claimedTask.getTaskId()); } else if (claimedTask.isStarted()) { // Task has started and is not complete. Renew it. tasks.add(claimedTask.getTask()); } } if (!tasks.isEmpty()) { _scanWorkflow.renewScanRangeTasks(tasks, QUEUE_RENEW_TTL); for (ScanRangeTask task : tasks) { _log.info("Renewed scan range task: {}", task); } } } catch (Exception e) { _log.error("Failed to renew scan ranges", e); } }
void function() { try { List<ClaimedTask> claimedTasks = ImmutableList.copyOf(_claimedTasks.values()); List<ScanRangeTask> tasks = Lists.newArrayList(); for (ClaimedTask claimedTask : claimedTasks) { if (claimedTask.isComplete()) { _log.info(STR, claimedTask.getTaskId()); _claimedTasks.remove(claimedTask.getTaskId()); } else if (claimedTask.isStarted()) { tasks.add(claimedTask.getTask()); } } if (!tasks.isEmpty()) { _scanWorkflow.renewScanRangeTasks(tasks, QUEUE_RENEW_TTL); for (ScanRangeTask task : tasks) { _log.info(STR, task); } } } catch (Exception e) { _log.error(STR, e); } }
/** * Renews all claimed scan range tasks that have not been released. Unless this is called periodically the * scan workflow will make this task available to be claimed again. */
Renews all claimed scan range tasks that have not been released. Unless this is called periodically the scan workflow will make this task available to be claimed again
renewClaimedTasks
{ "repo_name": "bazaarvoice/emodb", "path": "web/src/main/java/com/bazaarvoice/emodb/web/scanner/control/DistributedScanRangeMonitor.java", "license": "apache-2.0", "size": 17252 }
[ "com.google.common.collect.ImmutableList", "com.google.common.collect.Lists", "java.util.List" ]
import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import java.util.List;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,463,759
Version getVersion();
Version getVersion();
/** * Return the version for this extension. * @return */
Return the version for this extension
getVersion
{ "repo_name": "Techcable/CommandHelper", "path": "src/main/java/com/laytonsmith/core/extensions/Extension.java", "license": "mit", "size": 1845 }
[ "com.laytonsmith.PureUtilities" ]
import com.laytonsmith.PureUtilities;
import com.laytonsmith.*;
[ "com.laytonsmith" ]
com.laytonsmith;
1,083,253
public int executeUpdate(String sql, Object... params) throws SQLException { return executeUpdate(new Query(sql, params)); }
int function(String sql, Object... params) throws SQLException { return executeUpdate(new Query(sql, params)); }
/** * Executes the update query given by a Jorm SQL statement and applicable parameters. * * @param sql * the Jorm SQL statement. * @param params * the applicable parameters. * @return the number of updated rows in the database. * @throws SQLException * if a database access error occurs or the generated SQL * statement does not return a result set. */
Executes the update query given by a Jorm SQL statement and applicable parameters
executeUpdate
{ "repo_name": "jajja/jorm", "path": "src/main/java/com/jajja/jorm/Transaction.java", "license": "mit", "size": 84462 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,420,947
public ApiContractInner withSubscriptionKeyParameterNames(SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames) { this.subscriptionKeyParameterNames = subscriptionKeyParameterNames; return this; }
ApiContractInner function(SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames) { this.subscriptionKeyParameterNames = subscriptionKeyParameterNames; return this; }
/** * Set protocols over which API is made available. * * @param subscriptionKeyParameterNames the subscriptionKeyParameterNames value to set * @return the ApiContractInner object itself. */
Set protocols over which API is made available
withSubscriptionKeyParameterNames
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/apimanagement/mgmt-v2019_12_01/src/main/java/com/microsoft/azure/management/apimanagement/v2019_12_01/implementation/ApiContractInner.java", "license": "mit", "size": 14657 }
[ "com.microsoft.azure.management.apimanagement.v2019_12_01.SubscriptionKeyParameterNamesContract" ]
import com.microsoft.azure.management.apimanagement.v2019_12_01.SubscriptionKeyParameterNamesContract;
import com.microsoft.azure.management.apimanagement.v2019_12_01.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
53,007
@Nonnull public EdgeMappingInfo findTheEdge(PortMappingInfo port) { for (Entry<Uuid, EdgeMappingInfo> entry : this.edgeStore.entrySet()) { EdgeMappingInfo edge = entry.getValue(); if (edge.getEdge().getUuid().equals(port.getPort().getEdgeId())) { return edge; } } return null; }
EdgeMappingInfo function(PortMappingInfo port) { for (Entry<Uuid, EdgeMappingInfo> entry : this.edgeStore.entrySet()) { EdgeMappingInfo edge = entry.getValue(); if (edge.getEdge().getUuid().equals(port.getPort().getEdgeId())) { return edge; } } return null; }
/** * Find the edge connects the given port. * @param port - the target port. * @return the Endge connects the given port. */
Find the edge connects the given port
findTheEdge
{ "repo_name": "opendaylight/faas", "path": "fabric-mgr/uln-cache/src/main/java/org/opendaylight/faas/uln/cache/UserLogicalNetworkCache.java", "license": "epl-1.0", "size": 54820 }
[ "java.util.Map", "org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.common.rev151013.Uuid" ]
import java.util.Map; import org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.common.rev151013.Uuid;
import java.util.*; import org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.common.rev151013.*;
[ "java.util", "org.opendaylight.yang" ]
java.util; org.opendaylight.yang;
826,808
ServiceCall<DataLakeAnalyticsAccount> updateAsync(String resourceGroupName, String accountName, DataLakeAnalyticsAccountUpdateParameters parameters, final ServiceCallback<DataLakeAnalyticsAccount> serviceCallback);
ServiceCall<DataLakeAnalyticsAccount> updateAsync(String resourceGroupName, String accountName, DataLakeAnalyticsAccountUpdateParameters parameters, final ServiceCallback<DataLakeAnalyticsAccount> serviceCallback);
/** * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object. * * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. * @param accountName The name of the Data Lake Analytics account to update. * @param parameters Parameters supplied to the update Data Lake Analytics account operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */
Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object
updateAsync
{ "repo_name": "pomortaz/azure-sdk-for-java", "path": "azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/Accounts.java", "license": "mit", "size": 41301 }
[ "com.microsoft.azure.management.datalake.analytics.models.DataLakeAnalyticsAccount", "com.microsoft.azure.management.datalake.analytics.models.DataLakeAnalyticsAccountUpdateParameters", "com.microsoft.rest.ServiceCall", "com.microsoft.rest.ServiceCallback" ]
import com.microsoft.azure.management.datalake.analytics.models.DataLakeAnalyticsAccount; import com.microsoft.azure.management.datalake.analytics.models.DataLakeAnalyticsAccountUpdateParameters; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback;
import com.microsoft.azure.management.datalake.analytics.models.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
1,691,013
public static final void performance(String tag, String method, long time) { if (Cons.SHOW_LOGS) { Log.i("Performance:" + tag, method + ": " + String.valueOf(time) + " ms"); } }
static final void function(String tag, String method, long time) { if (Cons.SHOW_LOGS) { Log.i(STR + tag, method + STR + String.valueOf(time) + STR); } }
/** * Send a INFO log message for performance notice. * * @param tag * Used to identify the source of a log message. It usually * identifies the class or activity where the log call occurs. * @param method * Used to identify the method of a log performance message. * @param time * The performance time in milliseconds you would like logged. */
Send a INFO log message for performance notice
performance
{ "repo_name": "r2bapps/TaskManager", "path": "TaskManagerLib/src/r2b/apps/utils/Logger.java", "license": "mit", "size": 3251 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
2,034,665
ProductResult getSinglePages() throws ServiceException;
ProductResult getSinglePages() throws ServiceException;
/** * A paging operation that finishes on the first call without a nextlink * * @return the ProductResult object if successful. * @throws ServiceException the exception wrapped in ServiceException if failed. */
A paging operation that finishes on the first call without a nextlink
getSinglePages
{ "repo_name": "BretJohnson/autorest", "path": "AutoRest/Generators/Java/Azure.Java.Tests/src/main/java/fixtures/paging/Paging.java", "license": "mit", "size": 14369 }
[ "com.microsoft.rest.ServiceException" ]
import com.microsoft.rest.ServiceException;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,157,131
protected boolean canPrintStackTrace() { return mostRecentElement != null && mostRecentElement.getCause() != null; } protected static final class StackTraceElement { private final String label; private final Location location; private final StackTraceElement cause; private final boolean canPrint; StackTraceElement(String label, Location location, StackTraceElement cause, boolean canPrint) { this.label = label; this.location = location; this.cause = cause; this.canPrint = canPrint; }
boolean function() { return mostRecentElement != null && mostRecentElement.getCause() != null; } protected static final class StackTraceElement { private final String label; private final Location location; private final StackTraceElement cause; private final boolean canPrint; StackTraceElement(String label, Location location, StackTraceElement cause, boolean canPrint) { this.label = label; this.location = location; this.cause = cause; this.canPrint = canPrint; }
/** * Returns true when there is at least one non-built-in element. */
Returns true when there is at least one non-built-in element
canPrintStackTrace
{ "repo_name": "Digas29/bazel", "path": "src/main/java/com/google/devtools/build/lib/syntax/EvalExceptionWithStackTrace.java", "license": "apache-2.0", "size": 11527 }
[ "com.google.devtools.build.lib.events.Location" ]
import com.google.devtools.build.lib.events.Location;
import com.google.devtools.build.lib.events.*;
[ "com.google.devtools" ]
com.google.devtools;
1,093,009
//------------------------------------------------------------------------- @Test public void testWithScheme() { final ObjectId test = ObjectId.of("id1", "value1"); assertEquals(ObjectId.of("newScheme", "value1"), test.withScheme("newScheme")); assertNotSame(test, test.withValue("value1")); }
void function() { final ObjectId test = ObjectId.of("id1", STR); assertEquals(ObjectId.of(STR, STR), test.withScheme(STR)); assertNotSame(test, test.withValue(STR)); }
/** * Tests the scheme replacement. */
Tests the scheme replacement
testWithScheme
{ "repo_name": "McLeodMoores/starling", "path": "projects/util/src/test/java/com/opengamma/id/ObjectIdTest.java", "license": "apache-2.0", "size": 8234 }
[ "org.testng.Assert", "org.testng.AssertJUnit" ]
import org.testng.Assert; import org.testng.AssertJUnit;
import org.testng.*;
[ "org.testng" ]
org.testng;
2,776,444
public KeySelector<IN, ?> getStateKeySelector() { return stateKeySelector; }
KeySelector<IN, ?> function() { return stateKeySelector; }
/** * Returns the {@code KeySelector} that must be used for partitioning keyed state in this * Operation. * * @see #setStateKeySelector */
Returns the KeySelector that must be used for partitioning keyed state in this Operation
getStateKeySelector
{ "repo_name": "greghogan/flink", "path": "flink-streaming-java/src/main/java/org/apache/flink/streaming/api/transformations/OneInputTransformation.java", "license": "apache-2.0", "size": 4946 }
[ "org.apache.flink.api.java.functions.KeySelector" ]
import org.apache.flink.api.java.functions.KeySelector;
import org.apache.flink.api.java.functions.*;
[ "org.apache.flink" ]
org.apache.flink;
1,014,173
private static List<BundleInfo> mergeOSGiLibWithExistingBundlesInfo(List<BundleInfo> newBundlesInfo, Map<BundleLocation, List<BundleInfo>> existingBundleInfo) { List<BundleInfo> effectiveBundlesInfo = existingBundleInfo.get(BundleLocation.NON_OSGI_LIB_BUNDLE); if (effectiveBundlesInfo != null) { effectiveBundlesInfo.addAll(newBundlesInfo); } else { effectiveBundlesInfo = newBundlesInfo; } return effectiveBundlesInfo .stream() .distinct() .collect(Collectors.toList()); }
static List<BundleInfo> function(List<BundleInfo> newBundlesInfo, Map<BundleLocation, List<BundleInfo>> existingBundleInfo) { List<BundleInfo> effectiveBundlesInfo = existingBundleInfo.get(BundleLocation.NON_OSGI_LIB_BUNDLE); if (effectiveBundlesInfo != null) { effectiveBundlesInfo.addAll(newBundlesInfo); } else { effectiveBundlesInfo = newBundlesInfo; } return effectiveBundlesInfo .stream() .distinct() .collect(Collectors.toList()); }
/** * Merges the existing OSGi bundle information with the newly retrieved OSGi bundle information. * * @param newBundlesInfo the new OSGi bundle information to be added * @param existingBundleInfo the existing OSGi bundle information * @return merged result of the existing OSGi bundle information with the newly retrieved OSGi bundle information */
Merges the existing OSGi bundle information with the newly retrieved OSGi bundle information
mergeOSGiLibWithExistingBundlesInfo
{ "repo_name": "nilminiwso2/carbon-kernel-1", "path": "launcher/src/main/java/org/wso2/carbon/launcher/extensions/OSGiLibBundleDeployerUtils.java", "license": "apache-2.0", "size": 17237 }
[ "java.util.List", "java.util.Map", "java.util.stream.Collectors", "org.wso2.carbon.launcher.extensions.model.BundleInfo", "org.wso2.carbon.launcher.extensions.model.BundleLocation" ]
import java.util.List; import java.util.Map; import java.util.stream.Collectors; import org.wso2.carbon.launcher.extensions.model.BundleInfo; import org.wso2.carbon.launcher.extensions.model.BundleLocation;
import java.util.*; import java.util.stream.*; import org.wso2.carbon.launcher.extensions.model.*;
[ "java.util", "org.wso2.carbon" ]
java.util; org.wso2.carbon;
1,935,275
private final void add(ArrayList<GalleryImage> images, int imageId, int nameId, int searchTermId) { images.add(new GalleryImage(imageId, getString(nameId), getString(searchTermId))); }
final void function(ArrayList<GalleryImage> images, int imageId, int nameId, int searchTermId) { images.add(new GalleryImage(imageId, getString(nameId), getString(searchTermId))); }
/** * Adds an image to the gallery, but using an internationalized search term. * Note, that for this to work the internationalized name _must_ be in the * search index. */
Adds an image to the gallery, but using an internationalized search term. Note, that for this to work the internationalized name _must_ be in the search index
add
{ "repo_name": "jaydeetay/stardroid", "path": "app/src/main/java/com/google/android/stardroid/gallery/HardcodedGallery.java", "license": "apache-2.0", "size": 4036 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,580,307
public static Implementation getPlugin() { return plugin; } public static class Implementation extends EclipseUIPlugin { public Implementation() { super(); // Remember the static instance. // plugin = this; } }
static Implementation function() { return plugin; } public static class Implementation extends EclipseUIPlugin { public Implementation() { super(); plugin = this; } }
/** * Returns the singleton instance of the Eclipse plugin. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the singleton instance. * @generated */
Returns the singleton instance of the Eclipse plugin.
getPlugin
{ "repo_name": "FTSRG/mondo-collab-framework", "path": "archive/workspaceTracker/VA/ikerlanEMF.editor/src/eu/mondo/collaboration/operationtracemodel/example/WTSpec/presentation/WTSpec2EditorPlugin.java", "license": "epl-1.0", "size": 1973 }
[ "org.eclipse.emf.common.ui.EclipseUIPlugin" ]
import org.eclipse.emf.common.ui.EclipseUIPlugin;
import org.eclipse.emf.common.ui.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,921,872
public long getEventTime(long suggestedTime) { long result = suggestedTime; if (this.versionTag != null && getRegion().getConcurrencyChecksEnabled()) { if (suggestedTime != 0) { this.versionTag.setVersionTimeStamp(suggestedTime); } else { result = this.versionTag.getVersionTimeStamp(); } } if (result <= 0) { InternalRegion region = this.getRegion(); if (region != null) { result = region.cacheTimeMillis(); } else { result = System.currentTimeMillis(); } } return result; } public static class SerializedCacheValueImpl implements SerializedCacheValue, CachedDeserializable, Sendable { private final EntryEventImpl event; @Unretained private final CachedDeserializable cd; private final Region r; private final RegionEntry re; private final byte[] serializedValue; SerializedCacheValueImpl(EntryEventImpl event, Region r, RegionEntry re, @Unretained CachedDeserializable cd, byte[] serializedBytes) { if (event.isOffHeapReference(cd)) { this.event = event; } else { this.event = null; } this.r = r; this.re = re; this.cd = cd; this.serializedValue = serializedBytes; }
long function(long suggestedTime) { long result = suggestedTime; if (this.versionTag != null && getRegion().getConcurrencyChecksEnabled()) { if (suggestedTime != 0) { this.versionTag.setVersionTimeStamp(suggestedTime); } else { result = this.versionTag.getVersionTimeStamp(); } } if (result <= 0) { InternalRegion region = this.getRegion(); if (region != null) { result = region.cacheTimeMillis(); } else { result = System.currentTimeMillis(); } } return result; } public static class SerializedCacheValueImpl implements SerializedCacheValue, CachedDeserializable, Sendable { private final EntryEventImpl event; private final CachedDeserializable cd; private final Region r; private final RegionEntry re; private final byte[] serializedValue; SerializedCacheValueImpl(EntryEventImpl event, Region r, RegionEntry re, @Unretained CachedDeserializable cd, byte[] serializedBytes) { if (event.isOffHeapReference(cd)) { this.event = event; } else { this.event = null; } this.r = r; this.re = re; this.cd = cd; this.serializedValue = serializedBytes; }
/** * this method joins together version tag timestamps and the "lastModified" timestamps generated * and stored in entries. If a change does not already carry a lastModified timestamp * * @return the timestamp to store in the entry */
this method joins together version tag timestamps and the "lastModified" timestamps generated and stored in entries. If a change does not already carry a lastModified timestamp
getEventTime
{ "repo_name": "davebarnes97/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/EntryEventImpl.java", "license": "apache-2.0", "size": 99239 }
[ "org.apache.geode.cache.Region", "org.apache.geode.cache.SerializedCacheValue", "org.apache.geode.internal.Sendable", "org.apache.geode.internal.offheap.annotations.Unretained" ]
import org.apache.geode.cache.Region; import org.apache.geode.cache.SerializedCacheValue; import org.apache.geode.internal.Sendable; import org.apache.geode.internal.offheap.annotations.Unretained;
import org.apache.geode.cache.*; import org.apache.geode.internal.*; import org.apache.geode.internal.offheap.annotations.*;
[ "org.apache.geode" ]
org.apache.geode;
67,312
private int update(Connection conn, boolean closeConn, String sql, Object... params) throws SQLException { if (conn == null) { throw new SQLException("Null connection"); } if (sql == null) { if (closeConn) { close(conn); } throw new SQLException("Null SQL statement"); } PreparedStatement stmt = null; int rows = 0; try { stmt = this.prepareStatement(conn, sql); this.fillStatement(stmt, params); rows = stmt.executeUpdate(); } catch (SQLException e) { this.rethrow(e, sql, params); } finally { close(stmt); if (closeConn) { close(conn); } } return rows; }
int function(Connection conn, boolean closeConn, String sql, Object... params) throws SQLException { if (conn == null) { throw new SQLException(STR); } if (sql == null) { if (closeConn) { close(conn); } throw new SQLException(STR); } PreparedStatement stmt = null; int rows = 0; try { stmt = this.prepareStatement(conn, sql); this.fillStatement(stmt, params); rows = stmt.executeUpdate(); } catch (SQLException e) { this.rethrow(e, sql, params); } finally { close(stmt); if (closeConn) { close(conn); } } return rows; }
/** * Calls update after checking the parameters to ensure nothing is null. * @param conn The connection to use for the update call. * @param closeConn True if the connection should be closed, false otherwise. * @param sql The SQL statement to execute. * @param params An array of update replacement parameters. Each row in * this array is one set of update replacement values. * @return The number of rows updated. * @throws SQLException If there are database or parameter errors. */
Calls update after checking the parameters to ensure nothing is null
update
{ "repo_name": "drinkjava2/jSQLBox", "path": "core/src/main/java/org/apache/commons/dbutils/QueryRunner.java", "license": "apache-2.0", "size": 39281 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.SQLException" ]
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
33,692
public static void removeCreator(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) { Base.remove(model, instanceResource, CREATOR, value); }
static void function(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) { Base.remove(model, instanceResource, CREATOR, value); }
/** * Removes a value of property Creator as an RDF2Go node * * @param model * an RDF2Go model * @param resource * an RDF2Go resource * @param value * the value to be removed * * [Generated from RDFReactor template rule #remove1static] */
Removes a value of property Creator as an RDF2Go node
removeCreator
{ "repo_name": "m0ep/master-thesis", "path": "source/apis/rdf2go/rdf2go-sioc/src/main/java/org/rdfs/sioc/Thing.java", "license": "mit", "size": 317844 }
[ "org.ontoware.rdf2go.model.Model", "org.ontoware.rdfreactor.runtime.Base" ]
import org.ontoware.rdf2go.model.Model; import org.ontoware.rdfreactor.runtime.Base;
import org.ontoware.rdf2go.model.*; import org.ontoware.rdfreactor.runtime.*;
[ "org.ontoware.rdf2go", "org.ontoware.rdfreactor" ]
org.ontoware.rdf2go; org.ontoware.rdfreactor;
1,083,638
public Object validatedDestroy(Object key, EntryEventImpl event) throws TimeoutException, EntryNotFoundException, CacheWriterException { try { if (event.getEventId() == null && generateEventID()) { event.setNewEventId(cache.getDistributedSystem()); } basicDestroy(event, true, // cacheWrite null); // expectedOldValue if (event.isOldValueOffHeap()) { return null; } else { return handleNotAvailable(event.getOldValue()); } } finally { event.release(); } }
Object function(Object key, EntryEventImpl event) throws TimeoutException, EntryNotFoundException, CacheWriterException { try { if (event.getEventId() == null && generateEventID()) { event.setNewEventId(cache.getDistributedSystem()); } basicDestroy(event, true, null); if (event.isOldValueOffHeap()) { return null; } else { return handleNotAvailable(event.getOldValue()); } } finally { event.release(); } }
/** * Destroys entry without performing validations. Call this after validating * key, callback arg, and runtime state. */
Destroys entry without performing validations. Call this after validating key, callback arg, and runtime state
validatedDestroy
{ "repo_name": "papicella/snappy-store", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java", "license": "apache-2.0", "size": 506961 }
[ "com.gemstone.gemfire.cache.CacheWriterException", "com.gemstone.gemfire.cache.EntryNotFoundException", "com.gemstone.gemfire.cache.TimeoutException" ]
import com.gemstone.gemfire.cache.CacheWriterException; import com.gemstone.gemfire.cache.EntryNotFoundException; import com.gemstone.gemfire.cache.TimeoutException;
import com.gemstone.gemfire.cache.*;
[ "com.gemstone.gemfire" ]
com.gemstone.gemfire;
2,825,383
public int fetchNextBatch( @SuppressWarnings("unused") @JavaType(internalName = "Ljava/lang/StackStreamFactory;") StaticObject stackStream, long mode, long anchor, int batchSize, int startIndex, @JavaType(Object[].class) StaticObject frames, Meta meta) { assert synchronizedConstants(meta); FrameWalker fw = getAnchored(anchor); if (fw == null) { throw meta.throwExceptionWithMessage(meta.java_lang_InternalError, "doStackWalk: corrupted buffers"); } if (batchSize <= 0) { return startIndex; } fw.next(batchSize, startIndex); fw.mode(mode); Integer decodedOrNull = fw.doStackWalk(frames); int decoded = decodedOrNull == null ? fw.decoded() : decodedOrNull; return startIndex + decoded; }
int function( @SuppressWarnings(STR) @JavaType(internalName = STR) StaticObject stackStream, long mode, long anchor, int batchSize, int startIndex, @JavaType(Object[].class) StaticObject frames, Meta meta) { assert synchronizedConstants(meta); FrameWalker fw = getAnchored(anchor); if (fw == null) { throw meta.throwExceptionWithMessage(meta.java_lang_InternalError, STR); } if (batchSize <= 0) { return startIndex; } fw.next(batchSize, startIndex); fw.mode(mode); Integer decodedOrNull = fw.doStackWalk(frames); int decoded = decodedOrNull == null ? fw.decoded() : decodedOrNull; return startIndex + decoded; }
/** * After {@link #fetchFirstBatch(StaticObject, long, int, int, int, StaticObject, Meta)}, this * method allows to continue frame walking, starting from where the previous calls left off. * * @return The position in the buffer at the end of fetching. */
After <code>#fetchFirstBatch(StaticObject, long, int, int, int, StaticObject, Meta)</code>, this method allows to continue frame walking, starting from where the previous calls left off
fetchNextBatch
{ "repo_name": "smarr/Truffle", "path": "espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/vm/StackWalk.java", "license": "gpl-2.0", "size": 15606 }
[ "com.oracle.truffle.espresso.meta.Meta", "com.oracle.truffle.espresso.runtime.StaticObject", "com.oracle.truffle.espresso.substitutions.JavaType" ]
import com.oracle.truffle.espresso.meta.Meta; import com.oracle.truffle.espresso.runtime.StaticObject; import com.oracle.truffle.espresso.substitutions.JavaType;
import com.oracle.truffle.espresso.meta.*; import com.oracle.truffle.espresso.runtime.*; import com.oracle.truffle.espresso.substitutions.*;
[ "com.oracle.truffle" ]
com.oracle.truffle;
2,668,195
public void removeToolBarComponent(Component component) { validateComponentNonNull(component); getToolbar().remove(component); getToolbar().validate(); getToolbar().repaint(); }
void function(Component component) { validateComponentNonNull(component); getToolbar().remove(component); getToolbar().validate(); getToolbar().repaint(); }
/** * Removes the given component to the tool bar. * * @param component the component to remove. * @throws IllegalArgumentException if the component is {@code null}. * @since 2.6.0 */
Removes the given component to the tool bar
removeToolBarComponent
{ "repo_name": "zaproxy/zaproxy", "path": "zap/src/main/java/org/zaproxy/zap/view/MainToolbarPanel.java", "license": "apache-2.0", "size": 18946 }
[ "java.awt.Component" ]
import java.awt.Component;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,072,110
@Test(expected=TimeoutException.class) public void testWriteChangesErrorTimeout() throws XBeeException, IOException { // Throw a timeout exception when trying to set the WR parameter. Mockito.doThrow(new TimeoutException()).when(xbeeDevice).executeParameter(PARAMETER_WR); // Write changes in the device. xbeeDevice.writeChanges(); }
@Test(expected=TimeoutException.class) void function() throws XBeeException, IOException { Mockito.doThrow(new TimeoutException()).when(xbeeDevice).executeParameter(PARAMETER_WR); xbeeDevice.writeChanges(); }
/** * Test method for {@link com.digi.xbee.api.XBeeDevice#writeChanges()}. * * <p>Verify that changes on an XBee device cannot be written if there is a timeout writing * those changes.</p> * * @throws XBeeException * @throws IOException */
Test method for <code>com.digi.xbee.api.XBeeDevice#writeChanges()</code>. Verify that changes on an XBee device cannot be written if there is a timeout writing those changes
testWriteChangesErrorTimeout
{ "repo_name": "digidotcom/XBeeJavaLibrary", "path": "library/src/test/java/com/digi/xbee/api/WriteChangesTest.java", "license": "mpl-2.0", "size": 4713 }
[ "com.digi.xbee.api.exceptions.TimeoutException", "com.digi.xbee.api.exceptions.XBeeException", "java.io.IOException", "org.junit.Test", "org.mockito.Mockito" ]
import com.digi.xbee.api.exceptions.TimeoutException; import com.digi.xbee.api.exceptions.XBeeException; import java.io.IOException; import org.junit.Test; import org.mockito.Mockito;
import com.digi.xbee.api.exceptions.*; import java.io.*; import org.junit.*; import org.mockito.*;
[ "com.digi.xbee", "java.io", "org.junit", "org.mockito" ]
com.digi.xbee; java.io; org.junit; org.mockito;
2,064,081
void deleteBlobsByPrefix(String prefix) throws IOException { doPrivileged(() -> { deleteBlobs(listBlobsByPath(bucket, prefix, null).keySet()); return null; }); }
void deleteBlobsByPrefix(String prefix) throws IOException { doPrivileged(() -> { deleteBlobs(listBlobsByPath(bucket, prefix, null).keySet()); return null; }); }
/** * Deletes multiple blobs in the bucket that have a given prefix * * @param prefix prefix of the buckets to delete */
Deletes multiple blobs in the bucket that have a given prefix
deleteBlobsByPrefix
{ "repo_name": "danielmitterdorfer/elasticsearch", "path": "plugins/repository-gcs/src/main/java/org/elasticsearch/common/blobstore/gcs/GoogleCloudStorageBlobStore.java", "license": "apache-2.0", "size": 15637 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
869,885
public static IoFuture<SslConnection> performUpgrade(final XnioWorker worker, XnioSsl ssl, InetSocketAddress bindAddress, URI uri, final Map<String, String> headers, ChannelListener<? super SslConnection> openListener, ChannelListener<? super BoundChannel> bindListener, OptionMap optionMap, HandshakeChecker handshakeChecker) { return new HttpUpgradeState<SslConnection>(worker, ssl, bindAddress, uri, headers, openListener, bindListener, optionMap, handshakeChecker).doUpgrade(); }
static IoFuture<SslConnection> function(final XnioWorker worker, XnioSsl ssl, InetSocketAddress bindAddress, URI uri, final Map<String, String> headers, ChannelListener<? super SslConnection> openListener, ChannelListener<? super BoundChannel> bindListener, OptionMap optionMap, HandshakeChecker handshakeChecker) { return new HttpUpgradeState<SslConnection>(worker, ssl, bindAddress, uri, headers, openListener, bindListener, optionMap, handshakeChecker).doUpgrade(); }
/** * Perform a HTTP upgrade that results in a SSL secured connection. This method should be used if the target endpoint is using https * * @param worker The worker * @param ssl The XnioSsl instance * @param bindAddress The bind address * @param uri The URI to connect to * @param headers Any additional headers to include in the upgrade request. This must include an <code>Upgrade</code> header that specifies the type of upgrade being performed * @param openListener The open listener that is invoked once the HTTP upgrade is done * @param bindListener The bind listener that is invoked when the socket is bound * @param optionMap The option map for the connection * @param handshakeChecker A handshake checker that can be supplied to verify that the server returned a valid response to the upgrade request * @return An IoFuture of the connection */
Perform a HTTP upgrade that results in a SSL secured connection. This method should be used if the target endpoint is using https
performUpgrade
{ "repo_name": "xnio/xnio", "path": "api/src/main/java/org/xnio/http/HttpUpgrade.java", "license": "apache-2.0", "size": 25849 }
[ "java.net.InetSocketAddress", "java.util.Map", "org.xnio.ChannelListener", "org.xnio.IoFuture", "org.xnio.OptionMap", "org.xnio.XnioWorker", "org.xnio.channels.BoundChannel", "org.xnio.ssl.SslConnection", "org.xnio.ssl.XnioSsl" ]
import java.net.InetSocketAddress; import java.util.Map; import org.xnio.ChannelListener; import org.xnio.IoFuture; import org.xnio.OptionMap; import org.xnio.XnioWorker; import org.xnio.channels.BoundChannel; import org.xnio.ssl.SslConnection; import org.xnio.ssl.XnioSsl;
import java.net.*; import java.util.*; import org.xnio.*; import org.xnio.channels.*; import org.xnio.ssl.*;
[ "java.net", "java.util", "org.xnio", "org.xnio.channels", "org.xnio.ssl" ]
java.net; java.util; org.xnio; org.xnio.channels; org.xnio.ssl;
1,346,956
public CursorAdapter getSuggestionsAdapter() { return mSuggestionsAdapter; }
CursorAdapter function() { return mSuggestionsAdapter; }
/** * Returns the adapter used for suggestions, if any. * @return the suggestions adapter */
Returns the adapter used for suggestions, if any
getSuggestionsAdapter
{ "repo_name": "treasure-lau/CSipSimple", "path": "actionbarsherlock-library/src/main/java/com/actionbarsherlock/widget/SearchView.java", "license": "gpl-3.0", "size": 71183 }
[ "android.support.v4.widget.CursorAdapter" ]
import android.support.v4.widget.CursorAdapter;
import android.support.v4.widget.*;
[ "android.support" ]
android.support;
538,094
@NonNull public @EntityType String getEntity(int index) { return mEntityConfidence.getEntities().get(index); }
@EntityType String function(int index) { return mEntityConfidence.getEntities().get(index); }
/** * Returns the entity at the specified index. Entities are ordered from high confidence * to low confidence. * * @throws IndexOutOfBoundsException if the specified index is out of range. * @see #getEntityCount() for the number of entities available. */
Returns the entity at the specified index. Entities are ordered from high confidence to low confidence
getEntity
{ "repo_name": "aosp-mirror/platform_frameworks_support", "path": "textclassifier/src/main/java/androidx/textclassifier/TextSelection.java", "license": "apache-2.0", "size": 9395 }
[ "androidx.textclassifier.TextClassifier" ]
import androidx.textclassifier.TextClassifier;
import androidx.textclassifier.*;
[ "androidx.textclassifier" ]
androidx.textclassifier;
2,720,671
final boolean isAnnotatedAsSingleton() { return (type != null && type.getAnnotation(Singleton.class) != null); } /** * {@inheritDoc}
final boolean isAnnotatedAsSingleton() { return (type != null && type.getAnnotation(Singleton.class) != null); } /** * {@inheritDoc}
/** * Returns information whatever the bound type is annotated by {@link Singleton} annotation - this * type is always singleton. * * @return <code>true</code> if bound type is annotated by {@link Singleton} annotation; * <code>false</code> otherwise. */
Returns information whatever the bound type is annotated by <code>Singleton</code> annotation - this type is always singleton
isAnnotatedAsSingleton
{ "repo_name": "mrfranta/jop", "path": "jop-impl/src/main/java/cz/zcu/kiv/jop/factory/binding/BindingImpl.java", "license": "apache-2.0", "size": 10747 }
[ "javax.inject.Singleton" ]
import javax.inject.Singleton;
import javax.inject.*;
[ "javax.inject" ]
javax.inject;
390,983
protected WFSCountResponse getWfsFeatureCount(HttpRequestBase method) throws PortalServiceException { try (InputStream responseStream = httpServiceCaller.getMethodResponseAsStream(method)) { Document responseDoc = DOMUtil.buildDomFromStream(responseStream); OWSExceptionParser.checkForExceptionResponse(responseDoc); XPathExpression xPath = DOMUtil.compileXPathExpr("wfs:FeatureCollection/@numberOfFeatures", new WFSNamespaceContext()); Node numNode = (Node) xPath.evaluate(responseDoc, XPathConstants.NODE); int numNodeValue = Integer.parseInt(numNode.getTextContent()); return new WFSCountResponse(numNodeValue); } catch (Exception ex) { throw new PortalServiceException(method, ex); } finally { if (method != null) { method.releaseConnection(); } } }
WFSCountResponse function(HttpRequestBase method) throws PortalServiceException { try (InputStream responseStream = httpServiceCaller.getMethodResponseAsStream(method)) { Document responseDoc = DOMUtil.buildDomFromStream(responseStream); OWSExceptionParser.checkForExceptionResponse(responseDoc); XPathExpression xPath = DOMUtil.compileXPathExpr(STR, new WFSNamespaceContext()); Node numNode = (Node) xPath.evaluate(responseDoc, XPathConstants.NODE); int numNodeValue = Integer.parseInt(numNode.getTextContent()); return new WFSCountResponse(numNodeValue); } catch (Exception ex) { throw new PortalServiceException(method, ex); } finally { if (method != null) { method.releaseConnection(); } } }
/** * Makes a WFS GetFeature request represented by method, only the count of features will be returned * * @param method * @return * @throws PortalServiceException */
Makes a WFS GetFeature request represented by method, only the count of features will be returned
getWfsFeatureCount
{ "repo_name": "joshvote/portal-core", "path": "src/main/java/org/auscope/portal/core/services/BaseWFSService.java", "license": "gpl-3.0", "size": 12763 }
[ "java.io.InputStream", "javax.xml.xpath.XPathConstants", "javax.xml.xpath.XPathExpression", "org.apache.http.client.methods.HttpRequestBase", "org.auscope.portal.core.services.namespaces.WFSNamespaceContext", "org.auscope.portal.core.services.responses.ows.OWSExceptionParser", "org.auscope.portal.core.services.responses.wfs.WFSCountResponse", "org.auscope.portal.core.util.DOMUtil", "org.w3c.dom.Document", "org.w3c.dom.Node" ]
import java.io.InputStream; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathExpression; import org.apache.http.client.methods.HttpRequestBase; import org.auscope.portal.core.services.namespaces.WFSNamespaceContext; import org.auscope.portal.core.services.responses.ows.OWSExceptionParser; import org.auscope.portal.core.services.responses.wfs.WFSCountResponse; import org.auscope.portal.core.util.DOMUtil; import org.w3c.dom.Document; import org.w3c.dom.Node;
import java.io.*; import javax.xml.xpath.*; import org.apache.http.client.methods.*; import org.auscope.portal.core.services.namespaces.*; import org.auscope.portal.core.services.responses.ows.*; import org.auscope.portal.core.services.responses.wfs.*; import org.auscope.portal.core.util.*; import org.w3c.dom.*;
[ "java.io", "javax.xml", "org.apache.http", "org.auscope.portal", "org.w3c.dom" ]
java.io; javax.xml; org.apache.http; org.auscope.portal; org.w3c.dom;
194,516
protected static OutputValueRenderer getOutputValueRenderer(Class type, RendererMetaOptions options) { if (type.isArray()) { type = type.getComponentType(); } if (type == String.class || type == Character.class || type == char.class || type.isEnum() || (!JavaClassHelper.isNumeric(type) && JavaClassHelper.getBoxedType(type) != Boolean.class)) { if (options.isXmlOutput()) { return xmlStringOutput; } else { return jsonStringOutput; } } else { return baseOutput; } }
static OutputValueRenderer function(Class type, RendererMetaOptions options) { if (type.isArray()) { type = type.getComponentType(); } if (type == String.class type == Character.class type == char.class type.isEnum() (!JavaClassHelper.isNumeric(type) && JavaClassHelper.getBoxedType(type) != Boolean.class)) { if (options.isXmlOutput()) { return xmlStringOutput; } else { return jsonStringOutput; } } else { return baseOutput; } }
/** * Returns a renderer for an output value. * @param type to render * @param options options * @return renderer */
Returns a renderer for an output value
getOutputValueRenderer
{ "repo_name": "b-cuts/esper", "path": "esper/src/main/java/com/espertech/esper/event/util/OutputValueRendererFactory.java", "license": "gpl-2.0", "size": 2065 }
[ "com.espertech.esper.util.JavaClassHelper" ]
import com.espertech.esper.util.JavaClassHelper;
import com.espertech.esper.util.*;
[ "com.espertech.esper" ]
com.espertech.esper;
2,410,682
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<Void>, Void> beginRevert( String resourceGroupName, String accountName, String poolName, String volumeName, VolumeRevert body);
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<Void>, Void> beginRevert( String resourceGroupName, String accountName, String poolName, String volumeName, VolumeRevert body);
/** * Revert a volume to the snapshot specified in the body. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @param volumeName The name of the volume. * @param body Object for snapshot to revert supplied in the body of the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */
Revert a volume to the snapshot specified in the body
beginRevert
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java", "license": "mit", "size": 47258 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.management.polling.PollResult", "com.azure.core.util.polling.SyncPoller", "com.azure.resourcemanager.netapp.models.VolumeRevert" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.netapp.models.VolumeRevert;
import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.netapp.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,544,444
public FeDb getDb(String dbName, Privilege privilege) throws AnalysisException { return getDb(dbName, privilege, true); }
FeDb function(String dbName, Privilege privilege) throws AnalysisException { return getDb(dbName, privilege, true); }
/** * If the database does not exist in the catalog an AnalysisError is thrown. * This method does not require the grant option permission. */
If the database does not exist in the catalog an AnalysisError is thrown. This method does not require the grant option permission
getDb
{ "repo_name": "cloudera/Impala", "path": "fe/src/main/java/org/apache/impala/analysis/Analyzer.java", "license": "apache-2.0", "size": 116695 }
[ "org.apache.impala.authorization.Privilege", "org.apache.impala.catalog.FeDb", "org.apache.impala.common.AnalysisException" ]
import org.apache.impala.authorization.Privilege; import org.apache.impala.catalog.FeDb; import org.apache.impala.common.AnalysisException;
import org.apache.impala.authorization.*; import org.apache.impala.catalog.*; import org.apache.impala.common.*;
[ "org.apache.impala" ]
org.apache.impala;
1,280,552
@ServiceMethod(returns = ReturnType.SINGLE) public ProfileInner create(String resourceGroupName, String profileName, ProfileInner profile) { return createAsync(resourceGroupName, profileName, profile).block(); }
@ServiceMethod(returns = ReturnType.SINGLE) ProfileInner function(String resourceGroupName, String profileName, ProfileInner profile) { return createAsync(resourceGroupName, profileName, profile).block(); }
/** * Creates a new CDN profile with a profile name under the specified subscription and resource group. * * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param profileName Name of the CDN profile which is unique within the resource group. * @param profile CDN profile is a logical grouping of endpoints that share the same settings, such as CDN provider * and pricing tier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return cDN profile is a logical grouping of endpoints that share the same settings, such as CDN provider and * pricing tier. */
Creates a new CDN profile with a profile name under the specified subscription and resource group
create
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/ProfilesClientImpl.java", "license": "mit", "size": 111257 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.cdn.fluent.models.ProfileInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.cdn.fluent.models.ProfileInner;
import com.azure.core.annotation.*; import com.azure.resourcemanager.cdn.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
809,363
@SimpleFunction(description="Set the time to be shown in the Time Picker popup. Current time is shown by default.") public void SetTimeToDisplay(int hour, int minute) { if ((hour < 0) || (hour > 23)) { form.dispatchErrorOccurredEvent(this, "SetTimeToDisplay", ErrorMessages.ERROR_ILLEGAL_HOUR); } else if ((minute < 0) || (minute > 59)) { form.dispatchErrorOccurredEvent(this, "SetTimeToDisplay", ErrorMessages.ERROR_ILLEGAL_MINUTE); } else { time.updateTime(hour, minute); instant = Dates.TimeInstant(hour, minute); customTime = true; } } /** * Allows the instant to set the hour and minute to be displayed when the `TimePicker` opens. * Instants are used in [`Clock`](sensors.html#Clock), {@link DatePicker}, and {@link TimePicker}
@SimpleFunction(description=STR) void function(int hour, int minute) { if ((hour < 0) (hour > 23)) { form.dispatchErrorOccurredEvent(this, STR, ErrorMessages.ERROR_ILLEGAL_HOUR); } else if ((minute < 0) (minute > 59)) { form.dispatchErrorOccurredEvent(this, STR, ErrorMessages.ERROR_ILLEGAL_MINUTE); } else { time.updateTime(hour, minute); instant = Dates.TimeInstant(hour, minute); customTime = true; } } /** * Allows the instant to set the hour and minute to be displayed when the `TimePicker` opens. * Instants are used in [`Clock`](sensors.html#Clock), {@link DatePicker}, and {@link TimePicker}
/** * Allows the user to set the time to be displayed when the `TimePicker` opens. Valid values for * the hour field are 0-23 and 0-59 for the second field. * @param hour * @param minute */
Allows the user to set the time to be displayed when the `TimePicker` opens. Valid values for the hour field are 0-23 and 0-59 for the second field
SetTimeToDisplay
{ "repo_name": "kkashi01/appinventor-sources", "path": "appinventor/components/src/com/google/appinventor/components/runtime/TimePicker.java", "license": "apache-2.0", "size": 7010 }
[ "com.google.appinventor.components.annotations.SimpleFunction", "com.google.appinventor.components.runtime.util.Dates", "com.google.appinventor.components.runtime.util.ErrorMessages" ]
import com.google.appinventor.components.annotations.SimpleFunction; import com.google.appinventor.components.runtime.util.Dates; import com.google.appinventor.components.runtime.util.ErrorMessages;
import com.google.appinventor.components.annotations.*; import com.google.appinventor.components.runtime.util.*;
[ "com.google.appinventor" ]
com.google.appinventor;
851,280
public String getText(Object object) { String label = ((MdfAssociation)object).getName(); return label == null || label.length() == 0 ? getString("_UI_MdfAssociation_type") : label; }
String function(Object object) { String label = ((MdfAssociation)object).getName(); return label == null label.length() == 0 ? getString(STR) : label; }
/** * This returns the label text for the adapted class. */
This returns the label text for the adapted class
getText
{ "repo_name": "debabratahazra/DS", "path": "designstudio/components/domain/ui/com.odcgroup.mdf.editor/source/com/odcgroup/mdf/editor/ui/editors/providers/MdfAssociationItemProvider.java", "license": "epl-1.0", "size": 9178 }
[ "com.odcgroup.mdf.metamodel.MdfAssociation" ]
import com.odcgroup.mdf.metamodel.MdfAssociation;
import com.odcgroup.mdf.metamodel.*;
[ "com.odcgroup.mdf" ]
com.odcgroup.mdf;
2,824,211
public void fireEvent(String elementRef,final String type, final Map<String, Object> data,final Map<String, Object> domChanges){ fireEvent(elementRef, type, data, domChanges, null); }
void function(String elementRef,final String type, final Map<String, Object> data,final Map<String, Object> domChanges){ fireEvent(elementRef, type, data, domChanges, null); }
/** * Fire event callback on a element. * @param elementRef * @param type * @param data * @param domChanges */
Fire event callback on a element
fireEvent
{ "repo_name": "xiayun200825/weex", "path": "android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java", "license": "apache-2.0", "size": 55202 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
803,741
private UserTransaction getUserTransaction() { if (!cacheUserTransaction) { if (log.isDebugEnabled()) { log.debug("Acquiring a new UserTransaction for event adaptor : " + eventAdaptorName); } try { context = getInitialContext(); return JMSUtils.lookup(context, UserTransaction.class, getUserTransactionJNDIName()); } catch (NamingException e) { handleException("Error looking up UserTransaction : " + getUserTransactionJNDIName() + " using JNDI properties : " + jmsProperties, e); } } if (sharedUserTransaction == null) { try { context = getInitialContext(); sharedUserTransaction = JMSUtils.lookup(context, UserTransaction.class, getUserTransactionJNDIName()); if (log.isDebugEnabled()) { log.debug("Acquired shared UserTransaction for event adator : " + eventAdaptorName); } } catch (NamingException e) { handleException("Error looking up UserTransaction : " + getUserTransactionJNDIName() + " using JNDI properties : " + jmsProperties, e); } } return sharedUserTransaction; }
UserTransaction function() { if (!cacheUserTransaction) { if (log.isDebugEnabled()) { log.debug(STR + eventAdaptorName); } try { context = getInitialContext(); return JMSUtils.lookup(context, UserTransaction.class, getUserTransactionJNDIName()); } catch (NamingException e) { handleException(STR + getUserTransactionJNDIName() + STR + jmsProperties, e); } } if (sharedUserTransaction == null) { try { context = getInitialContext(); sharedUserTransaction = JMSUtils.lookup(context, UserTransaction.class, getUserTransactionJNDIName()); if (log.isDebugEnabled()) { log.debug(STR + eventAdaptorName); } } catch (NamingException e) { handleException(STR + getUserTransactionJNDIName() + STR + jmsProperties, e); } } return sharedUserTransaction; }
/** * The UserTransaction to be used, looked up from the JNDI * * @return The UserTransaction to be used, looked up from the JNDI */
The UserTransaction to be used, looked up from the JNDI
getUserTransaction
{ "repo_name": "lankavitharana/carbon-event-processing", "path": "components/adaptors/event-input-adaptor/org.wso2.carbon.event.input.adaptor.jms/src/main/java/org/wso2/carbon/event/input/adaptor/jms/internal/util/JMSTaskManager.java", "license": "apache-2.0", "size": 49739 }
[ "javax.naming.NamingException", "javax.transaction.UserTransaction" ]
import javax.naming.NamingException; import javax.transaction.UserTransaction;
import javax.naming.*; import javax.transaction.*;
[ "javax.naming", "javax.transaction" ]
javax.naming; javax.transaction;
1,858,923
public static final Function<String,BigInteger> toBigInteger(final DecimalPoint decimalPoint) { return new ToBigInteger(decimalPoint); }
static final Function<String,BigInteger> function(final DecimalPoint decimalPoint) { return new ToBigInteger(decimalPoint); }
/** * <p> * Converts a String into a BigInteger, using the specified decimal point * configuration ({@link DecimalPoint}). The target String should contain no * thousand separators. * Any fractional part of the input String will be removed. * </p> * * @param decimalPoint the decimal point being used by the String * @return the resulting BigInteger object */
Converts a String into a BigInteger, using the specified decimal point configuration (<code>DecimalPoint</code>). The target String should contain no thousand separators. Any fractional part of the input String will be removed.
toBigInteger
{ "repo_name": "op4j/op4j", "path": "src/main/java/org/op4j/functions/FnString.java", "license": "apache-2.0", "size": 242735 }
[ "java.math.BigInteger", "org.op4j.functions.FnStringAuxNumberConverters" ]
import java.math.BigInteger; import org.op4j.functions.FnStringAuxNumberConverters;
import java.math.*; import org.op4j.functions.*;
[ "java.math", "org.op4j.functions" ]
java.math; org.op4j.functions;
2,233,713
@Test @Ignore public void testJoinAndAddToEnsemble() throws Exception { System.err.println(CommandSupport.executeCommand("fabric:create --force --clean -n")); //System.out.println(executeCommand("shell:info")); //System.out.println(executeCommand("fabric:info")); //System.out.println(executeCommand("fabric:profile-list")); BundleContext moduleContext = ServiceLocator.getSystemContext(); ServiceProxy<FabricService> fabricProxy = ServiceProxy.createServiceProxy(moduleContext, FabricService.class); try { FabricService fabricService = fabricProxy.getService(); AdminService adminService = ServiceLocator.awaitService(AdminService.class); String version = System.getProperty("fabric.version"); System.out.println(CommandSupport.executeCommand("admin:create --featureURL mvn:io.fabric8/fabric8-karaf/" + version + "/xml/features --feature fabric-git --feature fabric-agent --feature fabric-boot-commands basic_cnt_f")); System.out.println(CommandSupport.executeCommand("admin:create --featureURL mvn:io.fabric8/fabric8-karaf/" + version + "/xml/features --feature fabric-git --feature fabric-agent --feature fabric-boot-commands basic_cnt_g")); try { System.out.println(CommandSupport.executeCommand("admin:start basic_cnt_f")); System.out.println(CommandSupport.executeCommand("admin:start basic_cnt_g")); ProvisionSupport.instanceStarted(Arrays.asList("basic_cnt_f", "basic_cnt_g"), ProvisionSupport.PROVISION_TIMEOUT); System.out.println(CommandSupport.executeCommand("admin:list")); String joinCommand = "fabric:join -f --zookeeper-password "+ fabricService.getZookeeperPassword() +" " + fabricService.getZookeeperUrl(); String response = ""; for (int i = 0; i < 10 && !response.contains("true"); i++) { response = CommandSupport.executeCommand("ssh:ssh -l karaf -P karaf -p " + adminService.getInstance("basic_cnt_f").getSshPort() + " localhost " + WAIT_FOR_JOIN_SERVICE); Thread.sleep(1000); } response = ""; for (int i = 0; i < 10 && !response.contains("true"); i++) { response = CommandSupport.executeCommand("ssh:ssh -l karaf -P karaf -p " + adminService.getInstance("basic_cnt_g").getSshPort() + " localhost " + WAIT_FOR_JOIN_SERVICE); Thread.sleep(1000); } System.err.println(CommandSupport.executeCommand("ssh:ssh -l karaf -P karaf -p " + adminService.getInstance("basic_cnt_f").getSshPort() + " localhost " + joinCommand)); System.err.println(CommandSupport.executeCommand("ssh:ssh -l karaf -P karaf -p " + adminService.getInstance("basic_cnt_g").getSshPort() + " localhost " + joinCommand)); ProvisionSupport.containersExist(Arrays.asList("basic_cnt_f", "basic_cnt_g"), ProvisionSupport.PROVISION_TIMEOUT); Container cntF = fabricService.getContainer("basic_cnt_f"); Container cntG = fabricService.getContainer("basic_cnt_g"); ProvisionSupport.containerStatus(Arrays.asList(cntF, cntG), "success", ProvisionSupport.PROVISION_TIMEOUT); EnsembleSupport.addToEnsemble(fabricService, cntF, cntG); System.out.println(CommandSupport.executeCommand("fabric:container-list")); EnsembleSupport.removeFromEnsemble(fabricService, cntF, cntG); System.out.println(CommandSupport.executeCommand("fabric:container-list")); } finally { System.out.println(CommandSupport.executeCommand("admin:stop basic_cnt_f")); System.out.println(CommandSupport.executeCommand("admin:stop basic_cnt_g")); } } finally { fabricProxy.close(); } }
void function() throws Exception { System.err.println(CommandSupport.executeCommand(STR)); BundleContext moduleContext = ServiceLocator.getSystemContext(); ServiceProxy<FabricService> fabricProxy = ServiceProxy.createServiceProxy(moduleContext, FabricService.class); try { FabricService fabricService = fabricProxy.getService(); AdminService adminService = ServiceLocator.awaitService(AdminService.class); String version = System.getProperty(STR); System.out.println(CommandSupport.executeCommand(STR + version + STR)); System.out.println(CommandSupport.executeCommand(STR + version + STR)); try { System.out.println(CommandSupport.executeCommand(STR)); System.out.println(CommandSupport.executeCommand(STR)); ProvisionSupport.instanceStarted(Arrays.asList(STR, STR), ProvisionSupport.PROVISION_TIMEOUT); System.out.println(CommandSupport.executeCommand(STR)); String joinCommand = STR+ fabricService.getZookeeperPassword() +" " + fabricService.getZookeeperUrl(); String response = STRtrueSTRssh:ssh -l karaf -P karaf -p " + adminService.getInstance(STR).getSshPort() + " localhost " + WAIT_FOR_JOIN_SERVICE); Thread.sleep(1000); } response = STRtrueSTRssh:ssh -l karaf -P karaf -p " + adminService.getInstance(STR).getSshPort() + " localhost STRssh:ssh -l karaf -P karaf -p " + adminService.getInstance(STR).getSshPort() + " localhost STRssh:ssh -l karaf -P karaf -p " + adminService.getInstance(STR).getSshPort() + " localhost " + joinCommand)); ProvisionSupport.containersExist(Arrays.asList(STR, STR), ProvisionSupport.PROVISION_TIMEOUT); Container cntF = fabricService.getContainer(STR); Container cntG = fabricService.getContainer(STR); ProvisionSupport.containerStatus(Arrays.asList(cntF, cntG), "successSTRfabric:container-listSTRfabric:container-listSTRadmin:stop basic_cnt_fSTRadmin:stop basic_cnt_g")); } } finally { fabricProxy.close(); } }
/** * This is a test for FABRIC-353. */
This is a test for FABRIC-353
testJoinAndAddToEnsemble
{ "repo_name": "jonathanchristison/fabric8", "path": "itests/basic/karaf/src/test/java/io/fabric8/itests/basic/karaf/ExtendedJoinTest.java", "license": "apache-2.0", "size": 7130 }
[ "io.fabric8.api.Container", "io.fabric8.api.FabricService", "io.fabric8.api.gravia.ServiceLocator", "io.fabric8.itests.support.CommandSupport", "io.fabric8.itests.support.ProvisionSupport", "io.fabric8.itests.support.ServiceProxy", "java.util.Arrays", "org.apache.karaf.admin.AdminService", "org.osgi.framework.BundleContext" ]
import io.fabric8.api.Container; import io.fabric8.api.FabricService; import io.fabric8.api.gravia.ServiceLocator; import io.fabric8.itests.support.CommandSupport; import io.fabric8.itests.support.ProvisionSupport; import io.fabric8.itests.support.ServiceProxy; import java.util.Arrays; import org.apache.karaf.admin.AdminService; import org.osgi.framework.BundleContext;
import io.fabric8.api.*; import io.fabric8.api.gravia.*; import io.fabric8.itests.support.*; import java.util.*; import org.apache.karaf.admin.*; import org.osgi.framework.*;
[ "io.fabric8.api", "io.fabric8.itests", "java.util", "org.apache.karaf", "org.osgi.framework" ]
io.fabric8.api; io.fabric8.itests; java.util; org.apache.karaf; org.osgi.framework;
294,286
@Test public void testGetScope_1() throws Exception { ScriptFilterAction fixture = new ScriptFilterAction(); fixture.setKey(""); fixture.setValue(""); fixture.setAction(ScriptFilterActionType.add); fixture.setScope(""); String result = fixture.getScope(); assertEquals("", result); }
void function() throws Exception { ScriptFilterAction fixture = new ScriptFilterAction(); fixture.setKey(STRSTRSTR", result); }
/** * Run the String getScope() method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 1:34 PM */
Run the String getScope() method test
testGetScope_1
{ "repo_name": "kevinmcgoldrick/Tank", "path": "data_model/src/test/java/com/intuit/tank/project/ScriptFilterActionTest.java", "license": "epl-1.0", "size": 9432 }
[ "com.intuit.tank.project.ScriptFilterAction" ]
import com.intuit.tank.project.ScriptFilterAction;
import com.intuit.tank.project.*;
[ "com.intuit.tank" ]
com.intuit.tank;
332,737
private ECPublicKey createPublicEncryptionKey (BigInteger x, BigInteger y) { try { java.security.spec.ECPoint w = new java.security.spec.ECPoint(x, y); ECNamedCurveParameterSpec params = ECNamedCurveTable.getParameterSpec(CURVE); KeyFactory fact = KeyFactory.getInstance(ALGORITHM_ECDSA, PROVIDER); ECCurve curve = params.getCurve(); java.security.spec.EllipticCurve ellipticCurve = EC5Util.convertCurve(curve, params.getSeed()); java.security.spec.ECParameterSpec params2 = EC5Util.convertSpec(ellipticCurve, params); java.security.spec.ECPublicKeySpec keySpec = new java.security.spec.ECPublicKeySpec(w, params2); return (ECPublicKey) fact.generatePublic(keySpec); } catch (InvalidKeySpecException e) { throw new RuntimeException("InvalidKeySpecException occurred in CryptProcessor.createPublicEncryptionKey()", e); } catch (NoSuchAlgorithmException e) { throw new RuntimeException("NoSuchAlgorithmException occurred in CryptProcessor.createPublicEncryptionKey()", e); } catch (NoSuchProviderException e) { throw new RuntimeException("NoSuchProviderException occurred in CryptProcessor.createPublicEncryptionKey()", e); } }
ECPublicKey function (BigInteger x, BigInteger y) { try { java.security.spec.ECPoint w = new java.security.spec.ECPoint(x, y); ECNamedCurveParameterSpec params = ECNamedCurveTable.getParameterSpec(CURVE); KeyFactory fact = KeyFactory.getInstance(ALGORITHM_ECDSA, PROVIDER); ECCurve curve = params.getCurve(); java.security.spec.EllipticCurve ellipticCurve = EC5Util.convertCurve(curve, params.getSeed()); java.security.spec.ECParameterSpec params2 = EC5Util.convertSpec(ellipticCurve, params); java.security.spec.ECPublicKeySpec keySpec = new java.security.spec.ECPublicKeySpec(w, params2); return (ECPublicKey) fact.generatePublic(keySpec); } catch (InvalidKeySpecException e) { throw new RuntimeException(STR, e); } catch (NoSuchAlgorithmException e) { throw new RuntimeException(STR, e); } catch (NoSuchProviderException e) { throw new RuntimeException(STR, e); } }
/** * Creates an ECPublicKey with the given coordinates. The key will have valid parameters. * * @param x - A BigInteger object denoting the x coordinate on the curve. * @param y -A BigInteger object denoting the y coordinate on the curve. * * @return An ECPublicKey object with the given coordinates. */
Creates an ECPublicKey with the given coordinates. The key will have valid parameters
createPublicEncryptionKey
{ "repo_name": "loki-sama/bitseal", "path": "src/org/bitseal/crypt/CryptProcessor.java", "license": "gpl-3.0", "size": 12430 }
[ "java.math.BigInteger", "java.security.KeyFactory", "java.security.NoSuchAlgorithmException", "java.security.NoSuchProviderException", "java.security.spec.InvalidKeySpecException", "org.spongycastle.jce.ECNamedCurveTable", "org.spongycastle.jce.interfaces.ECPublicKey", "org.spongycastle.jce.provider.asymmetric.ec.EC5Util", "org.spongycastle.jce.spec.ECNamedCurveParameterSpec", "org.spongycastle.math.ec.ECCurve", "org.spongycastle.math.ec.ECPoint" ]
import java.math.BigInteger; import java.security.KeyFactory; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.security.spec.InvalidKeySpecException; import org.spongycastle.jce.ECNamedCurveTable; import org.spongycastle.jce.interfaces.ECPublicKey; import org.spongycastle.jce.provider.asymmetric.ec.EC5Util; import org.spongycastle.jce.spec.ECNamedCurveParameterSpec; import org.spongycastle.math.ec.ECCurve; import org.spongycastle.math.ec.ECPoint;
import java.math.*; import java.security.*; import java.security.spec.*; import org.spongycastle.jce.*; import org.spongycastle.jce.interfaces.*; import org.spongycastle.jce.provider.asymmetric.ec.*; import org.spongycastle.jce.spec.*; import org.spongycastle.math.ec.*;
[ "java.math", "java.security", "org.spongycastle.jce", "org.spongycastle.math" ]
java.math; java.security; org.spongycastle.jce; org.spongycastle.math;
2,505,206
public void draw(Color color) { if (curve == null) return; // peppysliders if (Options.getSkin().getSliderStyle() == Skin.STYLE_PEPPYSLIDER || !mmsliderSupported) { Image hitCircle = GameImage.HITCIRCLE.getImage(); Image hitCircleOverlay = GameImage.HITCIRCLE_OVERLAY.getImage(); for (int i = 0; i < curve.length; i++) hitCircleOverlay.drawCentered(curve[i].x, curve[i].y, Colors.WHITE_FADE); for (int i = 0; i < curve.length; i++) hitCircle.drawCentered(curve[i].x, curve[i].y, color); } // mmsliders else { if (renderState == null) renderState = new CurveRenderState(hitObject); renderState.draw(color, borderColor, curve); } }
void function(Color color) { if (curve == null) return; if (Options.getSkin().getSliderStyle() == Skin.STYLE_PEPPYSLIDER !mmsliderSupported) { Image hitCircle = GameImage.HITCIRCLE.getImage(); Image hitCircleOverlay = GameImage.HITCIRCLE_OVERLAY.getImage(); for (int i = 0; i < curve.length; i++) hitCircleOverlay.drawCentered(curve[i].x, curve[i].y, Colors.WHITE_FADE); for (int i = 0; i < curve.length; i++) hitCircle.drawCentered(curve[i].x, curve[i].y, color); } else { if (renderState == null) renderState = new CurveRenderState(hitObject); renderState.draw(color, borderColor, curve); } }
/** * Draws the full curve to the graphics context. * @param color the color filter */
Draws the full curve to the graphics context
draw
{ "repo_name": "Lucki/opsu", "path": "src/itdelatrisu/opsu/objects/curves/Curve.java", "license": "gpl-3.0", "size": 4823 }
[ "org.newdawn.slick.Color", "org.newdawn.slick.Image" ]
import org.newdawn.slick.Color; import org.newdawn.slick.Image;
import org.newdawn.slick.*;
[ "org.newdawn.slick" ]
org.newdawn.slick;
488,687
if (!registered) { registered = true; TypeRegistry.DEFAULT.register(ModelSerializer.class); TypeRegistry.DEFAULT.register(ModelDeserializer.class); } }
if (!registered) { registered = true; TypeRegistry.DEFAULT.register(ModelSerializer.class); TypeRegistry.DEFAULT.register(ModelDeserializer.class); } }
/** * Registers the model serialization and instantiators. */
Registers the model serialization and instantiators
register
{ "repo_name": "SSEHUB/EASyProducer", "path": "Plugins/Instantiation/Model.persistency/src/net/ssehub/easy/instantiation/serializer/xml/Registration.java", "license": "apache-2.0", "size": 2648 }
[ "net.ssehub.easy.instantiation.core.model.vilTypes.TypeRegistry" ]
import net.ssehub.easy.instantiation.core.model.vilTypes.TypeRegistry;
import net.ssehub.easy.instantiation.core.model.*;
[ "net.ssehub.easy" ]
net.ssehub.easy;
875,079
public Builder loadFromPath(Path path) throws IOException { // NOTE: loadFromStream will close the input stream return loadFromStream(path.getFileName().toString(), Files.newInputStream(path)); }
Builder function(Path path) throws IOException { return loadFromStream(path.getFileName().toString(), Files.newInputStream(path)); }
/** * Loads settings from a url that represents them using the * {@link SettingsLoaderFactory#loaderFromResource(String)}. */
Loads settings from a url that represents them using the <code>SettingsLoaderFactory#loaderFromResource(String)</code>
loadFromPath
{ "repo_name": "fuchao01/elasticsearch", "path": "core/src/main/java/org/elasticsearch/common/settings/Settings.java", "license": "apache-2.0", "size": 52409 }
[ "java.io.IOException", "java.nio.file.Files", "java.nio.file.Path" ]
import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path;
import java.io.*; import java.nio.file.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
1,345,495
@Override public boolean equals(Object o) { boolean result; if (this == o) { result = true; } else if (o == null || getClass() != o.getClass()) { result = false; } else { Car car = (Car) o; result = id == car.id && Objects.equals(name, car.name); } return result; }
boolean function(Object o) { boolean result; if (this == o) { result = true; } else if (o == null getClass() != o.getClass()) { result = false; } else { Car car = (Car) o; result = id == car.id && Objects.equals(name, car.name); } return result; }
/** * Checks equality by id and name. * @param o - object to compare. * @return - result. */
Checks equality by id and name
equals
{ "repo_name": "wamdue/agorbunov", "path": "chapter_010/src/main/java/ru/job4j/mapping/carshop/entity/Car.java", "license": "apache-2.0", "size": 5970 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
1,511,866
static private boolean verifyDisjunctGlobalAndStack(LogManager pLogger, CLangSMG pSmg) { ArrayDeque<CLangStackFrame> stack_frames = pSmg.getStackFrames(); Set<SMGObject> stack = new HashSet<>(); for (CLangStackFrame frame: stack_frames) { stack.addAll(frame.getAllObjects()); } Map<String, SMGRegion> globals = pSmg.getGlobalObjects(); boolean toReturn = Collections.disjoint(stack, globals.values()); if (! toReturn) { pLogger.log(Level.SEVERE, "CLangSMG inconsistent, global and stack objects are not disjoint"); } return toReturn; }
static boolean function(LogManager pLogger, CLangSMG pSmg) { ArrayDeque<CLangStackFrame> stack_frames = pSmg.getStackFrames(); Set<SMGObject> stack = new HashSet<>(); for (CLangStackFrame frame: stack_frames) { stack.addAll(frame.getAllObjects()); } Map<String, SMGRegion> globals = pSmg.getGlobalObjects(); boolean toReturn = Collections.disjoint(stack, globals.values()); if (! toReturn) { pLogger.log(Level.SEVERE, STR); } return toReturn; }
/** * Verifies that global and stack object sets are disjunct * * @param pLogger Logger to log the message * @param pSmg SMG to check * @return True if {@link pSmg} is consistent w.r.t. this criteria. False otherwise. */
Verifies that global and stack object sets are disjunct
verifyDisjunctGlobalAndStack
{ "repo_name": "nishanttotla/predator", "path": "cpachecker/src/org/sosy_lab/cpachecker/cpa/smg/CLangSMG.java", "license": "gpl-3.0", "size": 23467 }
[ "java.util.ArrayDeque", "java.util.Collections", "java.util.HashSet", "java.util.Map", "java.util.Set", "java.util.logging.Level", "org.sosy_lab.common.log.LogManager", "org.sosy_lab.cpachecker.cpa.smg.objects.SMGObject", "org.sosy_lab.cpachecker.cpa.smg.objects.SMGRegion" ]
import java.util.ArrayDeque; import java.util.Collections; import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.logging.Level; import org.sosy_lab.common.log.LogManager; import org.sosy_lab.cpachecker.cpa.smg.objects.SMGObject; import org.sosy_lab.cpachecker.cpa.smg.objects.SMGRegion;
import java.util.*; import java.util.logging.*; import org.sosy_lab.common.log.*; import org.sosy_lab.cpachecker.cpa.smg.objects.*;
[ "java.util", "org.sosy_lab.common", "org.sosy_lab.cpachecker" ]
java.util; org.sosy_lab.common; org.sosy_lab.cpachecker;
1,718,544
@ApiModelProperty(value = "The retailerId") public String getRetailerId() { return retailerId; }
@ApiModelProperty(value = STR) String function() { return retailerId; }
/** * The retailerId * @return retailerId **/
The retailerId
getRetailerId
{ "repo_name": "iterate-ch/cyberduck", "path": "storegate/src/main/java/ch/cyberduck/core/storegate/io/swagger/client/model/RegistrationInformationSubuser.java", "license": "gpl-3.0", "size": 8309 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
2,612,498
private void logRequest(HttpServletRequest req, Session session) { StringBuilder buf = new StringBuilder(); buf.append(getRealClientIpAddr(req)).append(" "); if (session != null && session.getUser() != null) { buf.append(session.getUser().getUserId()).append(" "); } else { buf.append(" - ").append(" "); } buf.append("\""); buf.append(req.getMethod()).append(" "); buf.append(req.getRequestURI()).append(" "); if (req.getQueryString() != null) { buf.append(req.getQueryString()).append(" "); } else { buf.append("-").append(" "); } buf.append(req.getProtocol()).append("\" "); String userAgent = req.getHeader("User-Agent"); if (shouldLogRawUserAgent) { buf.append(userAgent); } else { // simply log a short string to indicate browser or not if (StringUtils.isFromBrowser(userAgent)) { buf.append("browser"); } else { buf.append("not-browser"); } } logger.info(buf.toString()); }
void function(HttpServletRequest req, Session session) { StringBuilder buf = new StringBuilder(); buf.append(getRealClientIpAddr(req)).append(" "); if (session != null && session.getUser() != null) { buf.append(session.getUser().getUserId()).append(" "); } else { buf.append(STR).append(" "); } buf.append("\"STR STR STR STR-STR STR\" "); String userAgent = req.getHeader(STR); if (shouldLogRawUserAgent) { buf.append(userAgent); } else { if (StringUtils.isFromBrowser(userAgent)) { buf.append("browserSTRnot-browser"); } } logger.info(buf.toString()); }
/** * Log out request - the format should be close to Apache access log format * * @param req * @param session */
Log out request - the format should be close to Apache access log format
logRequest
{ "repo_name": "mariacioffi/azkaban", "path": "azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java", "license": "apache-2.0", "size": 14577 }
[ "javax.servlet.http.HttpServletRequest" ]
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
2,691,291
@Nonnull default Promise<Void> run(@Nonnull Runnable runnable) { Objects.requireNonNull(runnable, "runnable"); return Promise.supplying(getContext(), Delegates.runnableToSupplier(runnable)); }
default Promise<Void> run(@Nonnull Runnable runnable) { Objects.requireNonNull(runnable, STR); return Promise.supplying(getContext(), Delegates.runnableToSupplier(runnable)); }
/** * Execute the passed runnable * * @param runnable the runnable * @return a Promise which will return when the runnable is complete */
Execute the passed runnable
run
{ "repo_name": "lucko/helper", "path": "helper/src/main/java/me/lucko/helper/scheduler/Scheduler.java", "license": "mit", "size": 7378 }
[ "java.util.Objects", "javax.annotation.Nonnull", "me.lucko.helper.promise.Promise", "me.lucko.helper.utils.Delegates" ]
import java.util.Objects; import javax.annotation.Nonnull; import me.lucko.helper.promise.Promise; import me.lucko.helper.utils.Delegates;
import java.util.*; import javax.annotation.*; import me.lucko.helper.promise.*; import me.lucko.helper.utils.*;
[ "java.util", "javax.annotation", "me.lucko.helper" ]
java.util; javax.annotation; me.lucko.helper;
2,054,384
public List<Map.Entry<InterfaceDoc, Set<MethodDoc>>> getInheritedMethods() { final List<Map.Entry<InterfaceDoc, Set<MethodDoc>>> result = new ArrayList<Map.Entry<InterfaceDoc, Set<MethodDoc>>>(); // Initialize the list of already seen methods final Set<String> seenMethods = new HashSet<String>(); for (final MethodDoc method : this.getMethods()) seenMethods.add(method.getName()); for (final InterfaceDoc superInterface : getAllSuperInterfaces()) { final Set<MethodDoc> methods = new TreeSet<MethodDoc>(); for (final MethodDoc method : superInterface.getMethods()) { if (seenMethods.contains(method.getName())) continue; methods.add(method); seenMethods.add(method.getName()); } if (methods.isEmpty()) continue; result.add( new AbstractMap.SimpleEntry<InterfaceDoc, Set<MethodDoc>>( superInterface, methods)); } return result; }
List<Map.Entry<InterfaceDoc, Set<MethodDoc>>> function() { final List<Map.Entry<InterfaceDoc, Set<MethodDoc>>> result = new ArrayList<Map.Entry<InterfaceDoc, Set<MethodDoc>>>(); final Set<String> seenMethods = new HashSet<String>(); for (final MethodDoc method : this.getMethods()) seenMethods.add(method.getName()); for (final InterfaceDoc superInterface : getAllSuperInterfaces()) { final Set<MethodDoc> methods = new TreeSet<MethodDoc>(); for (final MethodDoc method : superInterface.getMethods()) { if (seenMethods.contains(method.getName())) continue; methods.add(method); seenMethods.add(method.getName()); } if (methods.isEmpty()) continue; result.add( new AbstractMap.SimpleEntry<InterfaceDoc, Set<MethodDoc>>( superInterface, methods)); } return result; }
/** * Return a list of super classes with additional methods they provide. * * @return The list of super classes and the additional methods they * provide. */
Return a list of super classes with additional methods they provide
getInheritedMethods
{ "repo_name": "kayahr/jasdoc", "path": "src/main/java/de/ailis/jasdoc/doc/InterfaceDoc.java", "license": "gpl-3.0", "size": 5819 }
[ "java.util.AbstractMap", "java.util.ArrayList", "java.util.HashSet", "java.util.List", "java.util.Map", "java.util.Set", "java.util.TreeSet" ]
import java.util.AbstractMap; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeSet;
import java.util.*;
[ "java.util" ]
java.util;
1,451,715
boolean isRsParityFile(Path p) { String pathStr = p.toUri().getPath(); return isRsParityFile(pathStr); }
boolean isRsParityFile(Path p) { String pathStr = p.toUri().getPath(); return isRsParityFile(pathStr); }
/** * checks whether file is rs parity file */
checks whether file is rs parity file
isRsParityFile
{ "repo_name": "jchen123/hadoop-20-warehouse-fix", "path": "src/contrib/raid/src/java/org/apache/hadoop/raid/BlockFixer.java", "license": "apache-2.0", "size": 36163 }
[ "org.apache.hadoop.fs.Path" ]
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,281,242
zClans plugin = zClans.getInstance(); ClanPlayer cpn = plugin.getClanManager().getCreateClanPlayer(player.getUniqueId()); if (cpn != null && cpn.isBanned()) { ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("banned")); return; } if (plugin.getPermissionsManager().has(player, "zclans.leader.create")) { if (arg.length >= 2) { String tag = arg[0]; String cleanTag = Helper.cleanTag(arg[0]); String name = Helper.toMessage(Helper.removeFirst(arg)); boolean bypass = plugin.getPermissionsManager().has(player, "zclans.mod.bypass"); if (bypass || cleanTag.length() <= plugin.getSettingsManager().getTagMaxLength()) { if (bypass || cleanTag.length() > plugin.getSettingsManager().getTagMinLength()) { if (bypass || !plugin.getSettingsManager().hasDisallowedColor(tag)) { if (bypass || Helper.stripColors(name).length() <= plugin.getSettingsManager().getClanMaxLength()) { if (bypass || Helper.stripColors(name).length() > plugin.getSettingsManager().getClanMinLength()) { if (cleanTag.matches("[0-9a-zA-Z]*")) { if (!name.contains("&")) { if (bypass || !plugin.getSettingsManager().isDisallowedWord(cleanTag.toLowerCase())) { ClanPlayer cp = plugin.getClanManager().getClanPlayer(player); if (cp == null) { if (!plugin.getClanManager().isClan(cleanTag)) { if (plugin.getClanManager().purchaseCreation(player)) { plugin.getClanManager().createClan(player, tag, name); Clan clan = plugin.getClanManager().getClan(tag); clan.addBb(player.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang("clan.created"), name)); plugin.getStorageManager().updateClan(clan); if (plugin.getSettingsManager().isRequireVerification()) { boolean verified = !plugin.getSettingsManager().isRequireVerification() || plugin.getPermissionsManager().has(player, "zclans.mod.verify"); if (!verified) { ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang("get.your.clan.verified.to.access.advanced.features")); } } } } else { ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("clan.with.this.tag.already.exists")); } } else { ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("you.must.first.resign"), cp.getClan().getName())); } } else { ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("that.tag.name.is.disallowed")); } } else { ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("your.clan.name.cannot.contain.color.codes")); } } else { ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("your.clan.tag.can.only.contain.letters.numbers.and.color.codes")); } } else { ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("your.clan.name.must.be.longer.than.characters"), plugin.getSettingsManager().getClanMinLength())); } } else { ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("your.clan.name.cannot.be.longer.than.characters"), plugin.getSettingsManager().getClanMaxLength())); } } else { ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("your.tag.cannot.contain.the.following.colors"), plugin.getSettingsManager().getDisallowedColorString())); } } else { ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("your.clan.tag.must.be.longer.than.characters"), plugin.getSettingsManager().getTagMinLength())); } } else { ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("your.clan.tag.cannot.be.longer.than.characters"), plugin.getSettingsManager().getTagMaxLength())); } } else { ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang("usage.create.tag"), plugin.getSettingsManager().getCommandClan())); ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("example.clan.create")); } } else { ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang("insufficient.permissions")); } }
zClans plugin = zClans.getInstance(); ClanPlayer cpn = plugin.getClanManager().getCreateClanPlayer(player.getUniqueId()); if (cpn != null && cpn.isBanned()) { ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang(STR)); return; } if (plugin.getPermissionsManager().has(player, STR)) { if (arg.length >= 2) { String tag = arg[0]; String cleanTag = Helper.cleanTag(arg[0]); String name = Helper.toMessage(Helper.removeFirst(arg)); boolean bypass = plugin.getPermissionsManager().has(player, STR); if (bypass cleanTag.length() <= plugin.getSettingsManager().getTagMaxLength()) { if (bypass cleanTag.length() > plugin.getSettingsManager().getTagMinLength()) { if (bypass !plugin.getSettingsManager().hasDisallowedColor(tag)) { if (bypass Helper.stripColors(name).length() <= plugin.getSettingsManager().getClanMaxLength()) { if (bypass Helper.stripColors(name).length() > plugin.getSettingsManager().getClanMinLength()) { if (cleanTag.matches(STR)) { if (!name.contains("&")) { if (bypass !plugin.getSettingsManager().isDisallowedWord(cleanTag.toLowerCase())) { ClanPlayer cp = plugin.getClanManager().getClanPlayer(player); if (cp == null) { if (!plugin.getClanManager().isClan(cleanTag)) { if (plugin.getClanManager().purchaseCreation(player)) { plugin.getClanManager().createClan(player, tag, name); Clan clan = plugin.getClanManager().getClan(tag); clan.addBb(player.getName(), ChatColor.AQUA + MessageFormat.format(plugin.getLang(STR), name)); plugin.getStorageManager().updateClan(clan); if (plugin.getSettingsManager().isRequireVerification()) { boolean verified = !plugin.getSettingsManager().isRequireVerification() plugin.getPermissionsManager().has(player, STR); if (!verified) { ChatBlock.sendMessage(player, ChatColor.AQUA + plugin.getLang(STR)); } } } } else { ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang(STR)); } } else { ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang(STR), cp.getClan().getName())); } } else { ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang(STR)); } } else { ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang(STR)); } } else { ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang(STR)); } } else { ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang(STR), plugin.getSettingsManager().getClanMinLength())); } } else { ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang(STR), plugin.getSettingsManager().getClanMaxLength())); } } else { ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang(STR), plugin.getSettingsManager().getDisallowedColorString())); } } else { ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang(STR), plugin.getSettingsManager().getTagMinLength())); } } else { ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang(STR), plugin.getSettingsManager().getTagMaxLength())); } } else { ChatBlock.sendMessage(player, ChatColor.RED + MessageFormat.format(plugin.getLang(STR), plugin.getSettingsManager().getCommandClan())); ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang(STR)); } } else { ChatBlock.sendMessage(player, ChatColor.RED + plugin.getLang(STR)); } }
/** * Execute the command * @param player player executing command * @param arg command arguments */
Execute the command
execute
{ "repo_name": "zenith4183/SimpleClans", "path": "src/main/java/org/bitbucket/zenith4183/zclans/commands/CreateCommand.java", "license": "gpl-3.0", "size": 8375 }
[ "java.text.MessageFormat", "org.bitbucket.zenith4183.zclans.ChatBlock", "org.bitbucket.zenith4183.zclans.Clan", "org.bitbucket.zenith4183.zclans.ClanPlayer", "org.bitbucket.zenith4183.zclans.Helper", "org.bukkit.ChatColor" ]
import java.text.MessageFormat; import org.bitbucket.zenith4183.zclans.ChatBlock; import org.bitbucket.zenith4183.zclans.Clan; import org.bitbucket.zenith4183.zclans.ClanPlayer; import org.bitbucket.zenith4183.zclans.Helper; import org.bukkit.ChatColor;
import java.text.*; import org.bitbucket.zenith4183.zclans.*; import org.bukkit.*;
[ "java.text", "org.bitbucket.zenith4183", "org.bukkit" ]
java.text; org.bitbucket.zenith4183; org.bukkit;
493,987
@Test public void testSnapshotsOnErasureCodingDirAfterECPolicyChanges() throws Exception { final Path ecDir = new Path("/ecdir"); fs.mkdirs(ecDir); fs.allowSnapshot(ecDir); final Path snap1 = fs.createSnapshot(ecDir, "snap1"); assertNull("Expected null erasure coding policy", fs.getErasureCodingPolicy(snap1)); // Set erasure coding policy final ErasureCodingPolicy ec63Policy = SystemErasureCodingPolicies .getByID(SystemErasureCodingPolicies.RS_6_3_POLICY_ID); fs.setErasureCodingPolicy(ecDir, ec63Policy.getName()); final Path snap2 = fs.createSnapshot(ecDir, "snap2"); assertEquals("Got unexpected erasure coding policy", ec63Policy, fs.getErasureCodingPolicy(snap2)); // Verify the EC policy correctness after the unset operation fs.unsetErasureCodingPolicy(ecDir); final Path snap3 = fs.createSnapshot(ecDir, "snap3"); assertNull("Expected null erasure coding policy", fs.getErasureCodingPolicy(snap3)); // Change the erasure coding policy and take another snapshot final ErasureCodingPolicy ec32Policy = SystemErasureCodingPolicies .getByID(SystemErasureCodingPolicies.RS_3_2_POLICY_ID); fs.enableErasureCodingPolicy(ec32Policy.getName()); fs.setErasureCodingPolicy(ecDir, ec32Policy.getName()); final Path snap4 = fs.createSnapshot(ecDir, "snap4"); assertEquals("Got unexpected erasure coding policy", ec32Policy, fs.getErasureCodingPolicy(snap4)); // Check that older snapshot still have the old ECPolicy settings assertNull("Expected null erasure coding policy", fs.getErasureCodingPolicy(snap1)); assertEquals("Got unexpected erasure coding policy", ec63Policy, fs.getErasureCodingPolicy(snap2)); assertNull("Expected null erasure coding policy", fs.getErasureCodingPolicy(snap3)); }
void function() throws Exception { final Path ecDir = new Path(STR); fs.mkdirs(ecDir); fs.allowSnapshot(ecDir); final Path snap1 = fs.createSnapshot(ecDir, "snap1"); assertNull(STR, fs.getErasureCodingPolicy(snap1)); final ErasureCodingPolicy ec63Policy = SystemErasureCodingPolicies .getByID(SystemErasureCodingPolicies.RS_6_3_POLICY_ID); fs.setErasureCodingPolicy(ecDir, ec63Policy.getName()); final Path snap2 = fs.createSnapshot(ecDir, "snap2"); assertEquals(STR, ec63Policy, fs.getErasureCodingPolicy(snap2)); fs.unsetErasureCodingPolicy(ecDir); final Path snap3 = fs.createSnapshot(ecDir, "snap3"); assertNull(STR, fs.getErasureCodingPolicy(snap3)); final ErasureCodingPolicy ec32Policy = SystemErasureCodingPolicies .getByID(SystemErasureCodingPolicies.RS_3_2_POLICY_ID); fs.enableErasureCodingPolicy(ec32Policy.getName()); fs.setErasureCodingPolicy(ecDir, ec32Policy.getName()); final Path snap4 = fs.createSnapshot(ecDir, "snap4"); assertEquals(STR, ec32Policy, fs.getErasureCodingPolicy(snap4)); assertNull(STR, fs.getErasureCodingPolicy(snap1)); assertEquals(STR, ec63Policy, fs.getErasureCodingPolicy(snap2)); assertNull(STR, fs.getErasureCodingPolicy(snap3)); }
/** * Test creation of snapshot on directory which changes its * erasure coding policy. */
Test creation of snapshot on directory which changes its erasure coding policy
testSnapshotsOnErasureCodingDirAfterECPolicyChanges
{ "repo_name": "dennishuo/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestErasureCodingPolicyWithSnapshot.java", "license": "apache-2.0", "size": 11888 }
[ "org.apache.hadoop.fs.Path", "org.apache.hadoop.hdfs.protocol.ErasureCodingPolicy", "org.apache.hadoop.hdfs.protocol.SystemErasureCodingPolicies", "org.junit.Assert" ]
import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.protocol.ErasureCodingPolicy; import org.apache.hadoop.hdfs.protocol.SystemErasureCodingPolicies; import org.junit.Assert;
import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.protocol.*; import org.junit.*;
[ "org.apache.hadoop", "org.junit" ]
org.apache.hadoop; org.junit;
64,310
@Override protected void setUpdateStatisticsParameters(FileInfo file) throws SQLException { this.stUpdateFileStatistics.setInt(1, file.getRating()); this.stUpdateFileStatistics.setFloat(2, file.getBPM()); this.stUpdateFileStatistics.setString(3, file.getFormattedAddedDate()); this.stUpdateFileStatistics.setInt(4, file.getPlayCounter()); this.stUpdateFileStatistics.setString(5, this.getRootPath()+getPath(file.getRelativeFullPath())); this.stUpdateFileStatistics.addBatch(); }
void function(FileInfo file) throws SQLException { this.stUpdateFileStatistics.setInt(1, file.getRating()); this.stUpdateFileStatistics.setFloat(2, file.getBPM()); this.stUpdateFileStatistics.setString(3, file.getFormattedAddedDate()); this.stUpdateFileStatistics.setInt(4, file.getPlayCounter()); this.stUpdateFileStatistics.setString(5, this.getRootPath()+getPath(file.getRelativeFullPath())); this.stUpdateFileStatistics.addBatch(); }
/** * Set update statistics parameters * @param file * @throws SQLException */
Set update statistics parameters
setUpdateStatisticsParameters
{ "repo_name": "phramusca/JaMuz", "path": "src/jamuz/process/merge/StatSourceMixxx.java", "license": "gpl-3.0", "size": 12250 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,895,724
public static int min(int... array) { checkArgument(array.length > 0); int min = array[0]; for (int i = 1; i < array.length; i++) { if (array[i] < min) { min = array[i]; } } return min; }
static int function(int... array) { checkArgument(array.length > 0); int min = array[0]; for (int i = 1; i < array.length; i++) { if (array[i] < min) { min = array[i]; } } return min; }
/** * Returns the least value present in {@code array}. * * @param array a <i>nonempty</i> array of {@code int} values * @return the value present in {@code array} that is less than or equal to every other value in * the array * @throws IllegalArgumentException if {@code array} is empty */
Returns the least value present in array
min
{ "repo_name": "tli2/guava", "path": "guava/src/com/google/common/primitives/Ints.java", "license": "apache-2.0", "size": 22882 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
467,090
public static String getClassPath() { refreshClassPath(); StringBuffer classPath = new StringBuffer(originalClassPath); classPath.append(File.pathSeparatorChar); String libDirs = JSystemProperties.getInstance().getPreference(FrameworkOptions.LIB_DIRS); if (libDirs != null) { StringTokenizer st = new StringTokenizer(libDirs, ";"); while (st.hasMoreElements()) { classPath.append(findJars(st.nextToken())); } } // append tests project jars File testProjectLibFile = new File(JSystemProperties.getCurrentTestsPath() + "/../lib"); if (testProjectLibFile.exists()) { classPath.append(findJars(FileUtils.getCannonicalPath(testProjectLibFile))); } // ITAI: If our project is in Maven structure then we need to travel up // another folder File mavenTestProjectLibFile = new File(JSystemProperties.getCurrentTestsPath() + "/../../lib"); if (mavenTestProjectLibFile.exists()) { classPath.append(findJars(FileUtils.getCannonicalPath(mavenTestProjectLibFile))); } classPath.append(JSystemProperties.getCurrentTestsPath()); System.setProperty("java.class.path", classPath.toString()); return classPath.toString(); }
static String function() { refreshClassPath(); StringBuffer classPath = new StringBuffer(originalClassPath); classPath.append(File.pathSeparatorChar); String libDirs = JSystemProperties.getInstance().getPreference(FrameworkOptions.LIB_DIRS); if (libDirs != null) { StringTokenizer st = new StringTokenizer(libDirs, ";"); while (st.hasMoreElements()) { classPath.append(findJars(st.nextToken())); } } File testProjectLibFile = new File(JSystemProperties.getCurrentTestsPath() + STR); if (testProjectLibFile.exists()) { classPath.append(findJars(FileUtils.getCannonicalPath(testProjectLibFile))); } File mavenTestProjectLibFile = new File(JSystemProperties.getCurrentTestsPath() + STR); if (mavenTestProjectLibFile.exists()) { classPath.append(findJars(FileUtils.getCannonicalPath(mavenTestProjectLibFile))); } classPath.append(JSystemProperties.getCurrentTestsPath()); System.setProperty(STR, classPath.toString()); return classPath.toString(); }
/** * Order of classes in the classpath: * * 1. Thirdparty ant/lib 2. Thirdparty commonLib 3. Thirdparty lib 4. * Thirdparty/selenium 5. runner/customer_lib 6. runner/so_lib 7. runner/lib * 8. user additional libs 9. automation project lib file 10. automation * project tests */
Order of classes in the classpath: 1. Thirdparty ant/lib 2. Thirdparty commonLib 3. Thirdparty lib 4. Thirdparty/selenium 5. runner/customer_lib 6. runner/so_lib 7. runner/lib 8. user additional libs 9. automation project lib file 10. automation project tests
getClassPath
{ "repo_name": "Top-Q/jsystem", "path": "jsystem-core-projects/jsystemCore/src/main/java/jsystem/runner/loader/ClassPathBuilder.java", "license": "apache-2.0", "size": 2734 }
[ "java.io.File", "java.util.StringTokenizer" ]
import java.io.File; import java.util.StringTokenizer;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,529,833
@Override public final void setLabel(String labelResource) { this.mLabel.setText(JMeterUtils.getResString(labelResource)); }
final void function(String labelResource) { this.mLabel.setText(JMeterUtils.getResString(labelResource)); }
/** * Set the group label from the resource name. * * @param labelResource The text to be looked up and set */
Set the group label from the resource name
setLabel
{ "repo_name": "apache/jmeter", "path": "src/core/src/main/java/org/apache/jmeter/gui/util/JLabeledRadioI18N.java", "license": "apache-2.0", "size": 7674 }
[ "org.apache.jmeter.util.JMeterUtils" ]
import org.apache.jmeter.util.JMeterUtils;
import org.apache.jmeter.util.*;
[ "org.apache.jmeter" ]
org.apache.jmeter;
2,621,819
public static MetricResult fromMap(Map<String,?> values) { return new MapMetricResult(values); }
static MetricResult function(Map<String,?> values) { return new MapMetricResult(values); }
/** * Create an empty metric result. * @return An empty metric result. */
Create an empty metric result
fromMap
{ "repo_name": "amaliujia/lenskit", "path": "lenskit-eval/src/main/java/org/lenskit/eval/traintest/metrics/MetricResult.java", "license": "lgpl-2.1", "size": 2593 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
153,745
public static String serializeToString(Node node, String encoding) throws IOException { TransformerFactory tFactory = TransformerFactory.newInstance(); Transformer transformer = null; try { transformer = tFactory.newTransformer(); } catch (TransformerConfigurationException e) { throw new IOException("Unable to serialize XML document"); } transformer.setOutputProperty(OutputKeys.INDENT, "no"); transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); transformer.setOutputProperty(OutputKeys.ENCODING, encoding); DOMSource source = new DOMSource(node); StringWriter writer = new StringWriter(); Result result = new StreamResult(writer); try { transformer.transform(source, result); } catch (TransformerException e) { throw new IOException("Unable to serialize XML document"); } writer.flush(); return writer.toString(); }
static String function(Node node, String encoding) throws IOException { TransformerFactory tFactory = TransformerFactory.newInstance(); Transformer transformer = null; try { transformer = tFactory.newTransformer(); } catch (TransformerConfigurationException e) { throw new IOException(STR); } transformer.setOutputProperty(OutputKeys.INDENT, "no"); transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); transformer.setOutputProperty(OutputKeys.ENCODING, encoding); DOMSource source = new DOMSource(node); StringWriter writer = new StringWriter(); Result result = new StreamResult(writer); try { transformer.transform(source, result); } catch (TransformerException e) { throw new IOException(STR); } writer.flush(); return writer.toString(); }
/** * Serialize XML Document to string using Transformer * * @param node the XML node (and the subtree rooted at this node) to be serialized * @param encoding encoding for the XML document * @return String representation of the Document * @throws IOException */
Serialize XML Document to string using Transformer
serializeToString
{ "repo_name": "k3b/pixymeta-android", "path": "pixymeta-lib/src/main/java/pixy/string/XMLUtils.java", "license": "epl-1.0", "size": 13804 }
[ "java.io.IOException", "java.io.StringWriter", "javax.xml.transform.OutputKeys", "javax.xml.transform.Result", "javax.xml.transform.Transformer", "javax.xml.transform.TransformerConfigurationException", "javax.xml.transform.TransformerException", "javax.xml.transform.TransformerFactory", "javax.xml.transform.dom.DOMSource", "javax.xml.transform.stream.StreamResult", "org.w3c.dom.Node" ]
import java.io.IOException; import java.io.StringWriter; import javax.xml.transform.OutputKeys; import javax.xml.transform.Result; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import org.w3c.dom.Node;
import java.io.*; import javax.xml.transform.*; import javax.xml.transform.dom.*; import javax.xml.transform.stream.*; import org.w3c.dom.*;
[ "java.io", "javax.xml", "org.w3c.dom" ]
java.io; javax.xml; org.w3c.dom;
1,566,751
public Locator getDocumentLocator() { return this.locator; }
Locator function() { return this.locator; }
/** * Retrieves the Locator. <p> * @return the Locator */
Retrieves the Locator.
getDocumentLocator
{ "repo_name": "RabadanLab/Pegasus", "path": "resources/hsqldb-2.2.7/hsqldb/src/org/hsqldb/jdbc/JDBCSQLXML.java", "license": "mit", "size": 120115 }
[ "org.xml.sax.Locator" ]
import org.xml.sax.Locator;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
2,379,476
private void grade_submission_option(RunData data, String gradeOption) { SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid()); boolean withGrade = state.getAttribute(WITH_GRADES) != null ? ((Boolean) state.getAttribute(WITH_GRADES)).booleanValue(): false; String sId = (String) state.getAttribute(GRADE_SUBMISSION_SUBMISSION_ID); String assignmentId = (String) state.getAttribute(GRADE_SUBMISSION_ASSIGNMENT_ID); // for points grading, one have to enter number as the points String grade = (String) state.getAttribute(GRADE_SUBMISSION_GRADE); AssignmentSubmissionEdit sEdit = editSubmission(sId, "grade_submission_option", state); if (sEdit != null) { //This logic could be done in one line, but would be harder to read, so break it out to make it easier to follow boolean gradeChanged = false; if((sEdit.getGrade() == null || "".equals(sEdit.getGrade().trim())) && (grade == null || "".equals(grade.trim()))){ //both are null, keep grade changed = false }else if((sEdit.getGrade() == null || "".equals(sEdit.getGrade().trim()) || (grade == null || "".equals(grade.trim())))){ //one is null the other isn't gradeChanged = true; }else if(!grade.trim().equals(sEdit.getGrade().trim())){ gradeChanged = true; } Assignment a = sEdit.getAssignment(); int typeOfGrade = a.getContent().getTypeOfGrade(); if (!withGrade) { // no grade input needed for the without-grade version of assignment tool sEdit.setGraded(true); if(gradeChanged){ sEdit.setGradedBy(UserDirectoryService.getCurrentUser() == null ? null : UserDirectoryService.getCurrentUser().getId()); } if ("return".equals(gradeOption) || "release".equals(gradeOption)) { sEdit.setGradeReleased(true); } } else if (grade == null) { sEdit.setGrade(""); sEdit.setGraded(false); if(gradeChanged){ sEdit.setGradedBy(null); } sEdit.setGradeReleased(false); } else { sEdit.setGrade(grade); if (grade.length() != 0) { sEdit.setGraded(true); if(gradeChanged){ sEdit.setGradedBy(UserDirectoryService.getCurrentUser() == null ? null : UserDirectoryService.getCurrentUser().getId()); } } else { sEdit.setGraded(false); if(gradeChanged){ sEdit.setGradedBy(null); } } } // iterate through submitters and look for grade overrides... if (withGrade && a.isGroup()) { User[] _users = sEdit.getSubmitters(); for (int i=0; _users != null && i < _users.length; i++) { String _gr = (String)state.getAttribute(GRADE_SUBMISSION_GRADE + "_" + _users[i].getId()); sEdit.addGradeForUser(_users[i].getId(), _gr); } } if ("release".equals(gradeOption)) { sEdit.setGradeReleased(true); sEdit.setGraded(true); if(gradeChanged){ sEdit.setGradedBy(UserDirectoryService.getCurrentUser() == null ? null : UserDirectoryService.getCurrentUser().getId()); } // clear the returned flag sEdit.setReturned(false); sEdit.setTimeReturned(null); } else if ("return".equals(gradeOption)) { sEdit.setGradeReleased(true); sEdit.setGraded(true); if(gradeChanged){ sEdit.setGradedBy(UserDirectoryService.getCurrentUser() == null ? null : UserDirectoryService.getCurrentUser().getId()); } sEdit.setReturned(true); sEdit.setTimeReturned(TimeService.newTime()); sEdit.setHonorPledgeFlag(Boolean.FALSE.booleanValue()); } else if ("save".equals(gradeOption)) { sEdit.setGradeReleased(false); sEdit.setReturned(false); sEdit.setTimeReturned(null); } ResourcePropertiesEdit pEdit = sEdit.getPropertiesEdit(); if (state.getAttribute(AssignmentSubmission.ALLOW_RESUBMIT_NUMBER) != null) { // get resubmit number pEdit.addProperty(AssignmentSubmission.ALLOW_RESUBMIT_NUMBER, (String) state.getAttribute(AssignmentSubmission.ALLOW_RESUBMIT_NUMBER)); if (state.getAttribute(ALLOW_RESUBMIT_CLOSEYEAR) != null) { // get resubmit time Time closeTime = getTimeFromState(state, ALLOW_RESUBMIT_CLOSEMONTH, ALLOW_RESUBMIT_CLOSEDAY, ALLOW_RESUBMIT_CLOSEYEAR, ALLOW_RESUBMIT_CLOSEHOUR, ALLOW_RESUBMIT_CLOSEMIN); pEdit.addProperty(AssignmentSubmission.ALLOW_RESUBMIT_CLOSETIME, String.valueOf(closeTime.getTime())); } else { pEdit.removeProperty(AssignmentSubmission.ALLOW_RESUBMIT_CLOSETIME); } } else { // clean resubmission property pEdit.removeProperty(AssignmentSubmission.ALLOW_RESUBMIT_CLOSETIME); pEdit.removeProperty(AssignmentSubmission.ALLOW_RESUBMIT_NUMBER); } // the instructor comment String feedbackCommentString = StringUtils .trimToNull((String) state.getAttribute(GRADE_SUBMISSION_FEEDBACK_COMMENT)); if (feedbackCommentString != null) { sEdit.setFeedbackComment(feedbackCommentString); } else { sEdit.setFeedbackComment(""); } // the instructor inline feedback String feedbackTextString = (String) state.getAttribute(GRADE_SUBMISSION_FEEDBACK_TEXT); if (feedbackTextString != null) { sEdit.setFeedbackText(feedbackTextString); } List v = (List) state.getAttribute(GRADE_SUBMISSION_FEEDBACK_ATTACHMENT); if (v != null) { // clear the old attachments first sEdit.clearFeedbackAttachments(); for (int i = 0; i < v.size(); i++) { sEdit.addFeedbackAttachment((Reference) v.get(i)); } } String sReference = sEdit.getReference(); // save a timestamp for this grading process sEdit.getPropertiesEdit().addProperty(AssignmentConstants.PROP_LAST_GRADED_DATE, TimeService.newTime().toStringLocalFull()); AssignmentService.commitEdit(sEdit); // update grades in gradebook String aReference = a.getReference(); String associateGradebookAssignment = StringUtils.trimToNull(a.getProperties().getProperty(AssignmentService.PROP_ASSIGNMENT_ASSOCIATE_GRADEBOOK_ASSIGNMENT)); if (!"remove".equals(gradeOption)) { // update grade in gradebook integrateGradebook(state, aReference, associateGradebookAssignment, null, null, null, -1, null, sReference, "update", -1); } else { //remove grade from gradebook integrateGradebook(state, aReference, associateGradebookAssignment, null, null, null, -1, null, sReference, "remove", -1); } } if (state.getAttribute(STATE_MESSAGE) == null) { // SAK-29314 - put submission information into state boolean viewSubsOnlySelected = stringToBool((String)data.getParameters().getString(PARAMS_VIEW_SUBS_ONLY_CHECKBOX)); putSubmissionInfoIntoState(state, assignmentId, sId, viewSubsOnlySelected); state.setAttribute(STATE_MODE, MODE_INSTRUCTOR_GRADE_SUBMISSION); state.setAttribute(GRADE_SUBMISSION_DONE, Boolean.TRUE); } else { state.removeAttribute(GRADE_SUBMISSION_DONE); } // SAK-29314 - update the list being iterated over sizeResources(state); } // grade_submission_option
void function(RunData data, String gradeOption) { SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid()); boolean withGrade = state.getAttribute(WITH_GRADES) != null ? ((Boolean) state.getAttribute(WITH_GRADES)).booleanValue(): false; String sId = (String) state.getAttribute(GRADE_SUBMISSION_SUBMISSION_ID); String assignmentId = (String) state.getAttribute(GRADE_SUBMISSION_ASSIGNMENT_ID); String grade = (String) state.getAttribute(GRADE_SUBMISSION_GRADE); AssignmentSubmissionEdit sEdit = editSubmission(sId, STR, state); if (sEdit != null) { boolean gradeChanged = false; if((sEdit.getGrade() == null STRSTRSTRSTRreturnSTRreleaseSTRSTR_STRreleaseSTRreturnSTRsaveSTRSTRremoveSTRupdateSTRremove", -1); } } if (state.getAttribute(STATE_MESSAGE) == null) { boolean viewSubsOnlySelected = stringToBool((String)data.getParameters().getString(PARAMS_VIEW_SUBS_ONLY_CHECKBOX)); putSubmissionInfoIntoState(state, assignmentId, sId, viewSubsOnlySelected); state.setAttribute(STATE_MODE, MODE_INSTRUCTOR_GRADE_SUBMISSION); state.setAttribute(GRADE_SUBMISSION_DONE, Boolean.TRUE); } else { state.removeAttribute(GRADE_SUBMISSION_DONE); } sizeResources(state); }
/** * Common grading routine plus specific operation to differenciate cases when saving, releasing or returning grade. */
Common grading routine plus specific operation to differenciate cases when saving, releasing or returning grade
grade_submission_option
{ "repo_name": "tl-its-umich-edu/sakai", "path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java", "license": "apache-2.0", "size": 671846 }
[ "org.sakaiproject.assignment.api.AssignmentSubmissionEdit", "org.sakaiproject.cheftool.JetspeedRunData", "org.sakaiproject.cheftool.RunData", "org.sakaiproject.event.api.SessionState" ]
import org.sakaiproject.assignment.api.AssignmentSubmissionEdit; import org.sakaiproject.cheftool.JetspeedRunData; import org.sakaiproject.cheftool.RunData; import org.sakaiproject.event.api.SessionState;
import org.sakaiproject.assignment.api.*; import org.sakaiproject.cheftool.*; import org.sakaiproject.event.api.*;
[ "org.sakaiproject.assignment", "org.sakaiproject.cheftool", "org.sakaiproject.event" ]
org.sakaiproject.assignment; org.sakaiproject.cheftool; org.sakaiproject.event;
909,021
public void addComplex() { //add constants to Symbol Table symTab.addConstant("i", new Complex(0, 1)); funTab.put("re", new Real()); funTab.put("im", new Imaginary()); funTab.put("arg", new Arg()); funTab.put("cmod", new Abs()); funTab.put("complex", new ComplexPFMC()); funTab.put("polar", new Polar()); funTab.put("conj", new Conjugate()); }
void function() { symTab.addConstant("i", new Complex(0, 1)); funTab.put("re", new Real()); funTab.put("im", new Imaginary()); funTab.put("arg", new Arg()); funTab.put("cmod", new Abs()); funTab.put(STR, new ComplexPFMC()); funTab.put("polar", new Polar()); funTab.put("conj", new Conjugate()); }
/** * Call this function if you want to parse expressions which involve * complex numbers. This method specifies "i" as the imaginary unit * (0,1). Two functions re() and im() are also added for extracting the * real or imaginary components of a complex number respectively. *<p> * @since 2.3.0 alpha The functions cmod and arg are added to get the modulus and argument. * @since 2.3.0 beta 1 The functions complex and polar to convert x,y and r,theta to Complex. * @since Feb 05 added complex conjugate conj. */
Call this function if you want to parse expressions which involve complex numbers. This method specifies "i" as the imaginary unit (0,1). Two functions re() and im() are also added for extracting the real or imaginary components of a complex number respectively.
addComplex
{ "repo_name": "dbunibas/spicy", "path": "jep-2.4.1/src/org/nfunk/jep/JEP.java", "license": "gpl-3.0", "size": 28068 }
[ "org.nfunk.jep.function.Abs", "org.nfunk.jep.function.Arg", "org.nfunk.jep.function.ComplexPFMC", "org.nfunk.jep.function.Conjugate", "org.nfunk.jep.function.Imaginary", "org.nfunk.jep.function.Polar", "org.nfunk.jep.function.Real", "org.nfunk.jep.type.Complex" ]
import org.nfunk.jep.function.Abs; import org.nfunk.jep.function.Arg; import org.nfunk.jep.function.ComplexPFMC; import org.nfunk.jep.function.Conjugate; import org.nfunk.jep.function.Imaginary; import org.nfunk.jep.function.Polar; import org.nfunk.jep.function.Real; import org.nfunk.jep.type.Complex;
import org.nfunk.jep.function.*; import org.nfunk.jep.type.*;
[ "org.nfunk.jep" ]
org.nfunk.jep;
1,414,342
public static Mixin mixin(Class<?>[] ics, Class<?>[] dcs) { return mixin(ics, dcs, ClassHelper.getCallerClassLoader(Mixin.class)); }
static Mixin function(Class<?>[] ics, Class<?>[] dcs) { return mixin(ics, dcs, ClassHelper.getCallerClassLoader(Mixin.class)); }
/** * mixin interface and delegates. * all class must be public. * * @param ics interface class array. * @param dcs delegate class array. * @return Mixin instance. */
mixin interface and delegates. all class must be public
mixin
{ "repo_name": "JasonHZXie/dubbo", "path": "dubbo-common/src/main/java/org/apache/dubbo/common/bytecode/Mixin.java", "license": "apache-2.0", "size": 7907 }
[ "org.apache.dubbo.common.utils.ClassHelper" ]
import org.apache.dubbo.common.utils.ClassHelper;
import org.apache.dubbo.common.utils.*;
[ "org.apache.dubbo" ]
org.apache.dubbo;
1,650,352
public void setBuilderCustomizers( Collection<? extends UndertowBuilderCustomizer> customizers) { Assert.notNull(customizers, "Customizers must not be null"); this.builderCustomizers = new ArrayList<>(customizers); }
void function( Collection<? extends UndertowBuilderCustomizer> customizers) { Assert.notNull(customizers, STR); this.builderCustomizers = new ArrayList<>(customizers); }
/** * Set {@link UndertowBuilderCustomizer}s that should be applied to the Undertow * {@link io.undertow.Undertow.Builder Builder}. Calling this method will replace any * existing customizers. * @param customizers the customizers to set */
Set <code>UndertowBuilderCustomizer</code>s that should be applied to the Undertow <code>io.undertow.Undertow.Builder Builder</code>. Calling this method will replace any existing customizers
setBuilderCustomizers
{ "repo_name": "hello2009chen/spring-boot", "path": "spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/undertow/UndertowReactiveWebServerFactory.java", "license": "apache-2.0", "size": 10085 }
[ "java.util.ArrayList", "java.util.Collection", "org.springframework.util.Assert" ]
import java.util.ArrayList; import java.util.Collection; import org.springframework.util.Assert;
import java.util.*; import org.springframework.util.*;
[ "java.util", "org.springframework.util" ]
java.util; org.springframework.util;
997,532
public static OGCWebServiceException create( Document doc ) { Element root = doc.getDocumentElement(); return create( root ); }
static OGCWebServiceException function( Document doc ) { Element root = doc.getDocumentElement(); return create( root ); }
/** * creates an OGCWebServiceException from a DOM object as defined in the OGC common * implementation specification * * @param doc * @return an {@link OGCWebServiceException} with the message, code and locator set to the xml * inside the document. */
creates an OGCWebServiceException from a DOM object as defined in the OGC common implementation specification
create
{ "repo_name": "lat-lon/deegree2-base", "path": "deegree2-core/src/main/java/org/deegree/ogcwebservices/OGCWebServiceException.java", "license": "lgpl-2.1", "size": 4343 }
[ "org.w3c.dom.Document", "org.w3c.dom.Element" ]
import org.w3c.dom.Document; import org.w3c.dom.Element;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,200,079
private void checkDatabaseBooted(Database database, String operation, String dbname) throws SQLException { if (database == null) { // Do not clear the TransactionResource context. It will // be restored as part of the finally clause of the constructor. this.setInactive(); throw newSQLException(SQLState.REPLICATION_DB_NOT_BOOTED, operation, dbname); } } /** Examine the attributes set provided for illegal boot combinations and determine if this is a create boot. @return true iff the attribute <em>create=true</em> is provided. This means create a standard database. In other cases, returns false. @param p the attribute set. @exception SQLException Throw if more than one of <em>create</em>, <em>createFrom</em>, <em>restoreFrom</em> and <em>rollForwardRecoveryFrom</em> is used simultaneously. <br> Also, throw if (re)encryption is attempted with one of <em>createFrom</em>, <em>restoreFrom</em> and <em>rollForwardRecoveryFrom</em>.
void function(Database database, String operation, String dbname) throws SQLException { if (database == null) { this.setInactive(); throw newSQLException(SQLState.REPLICATION_DB_NOT_BOOTED, operation, dbname); } } /** Examine the attributes set provided for illegal boot combinations and determine if this is a create boot. @return true iff the attribute <em>create=true</em> is provided. This means create a standard database. In other cases, returns false. @param p the attribute set. @exception SQLException Throw if more than one of <em>create</em>, <em>createFrom</em>, <em>restoreFrom</em> and <em>rollForwardRecoveryFrom</em> is used simultaneously. <br> Also, throw if (re)encryption is attempted with one of <em>createFrom</em>, <em>restoreFrom</em> and <em>rollForwardRecoveryFrom</em>.
/** * Check that a database has already been booted. Throws an exception * otherwise * * @param database The database that should have been booted * @param operation The operation that requires that the database has * already been booted, used in the exception message if not booted * @param dbname The name of the database that should have been booted, * used in the exception message if not booted * @throws java.sql.SQLException thrown if database is not booted */
Check that a database has already been booted. Throws an exception otherwise
checkDatabaseBooted
{ "repo_name": "viaper/DBPlus", "path": "DerbyHodgepodge/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java", "license": "apache-2.0", "size": 128383 }
[ "java.sql.SQLException", "org.apache.derby.iapi.db.Database", "org.apache.derby.iapi.reference.SQLState" ]
import java.sql.SQLException; import org.apache.derby.iapi.db.Database; import org.apache.derby.iapi.reference.SQLState;
import java.sql.*; import org.apache.derby.iapi.db.*; import org.apache.derby.iapi.reference.*;
[ "java.sql", "org.apache.derby" ]
java.sql; org.apache.derby;
711,639
EAttribute getArrayTypeSpecifier_Size();
EAttribute getArrayTypeSpecifier_Size();
/** * Returns the meta object for the attribute '{@link org.yakindu.base.types.ArrayTypeSpecifier#getSize <em>Size</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Size</em>'. * @see org.yakindu.base.types.ArrayTypeSpecifier#getSize() * @see #getArrayTypeSpecifier() * @generated */
Returns the meta object for the attribute '<code>org.yakindu.base.types.ArrayTypeSpecifier#getSize Size</code>'.
getArrayTypeSpecifier_Size
{ "repo_name": "Yakindu/statecharts", "path": "plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/TypesPackage.java", "license": "epl-1.0", "size": 91972 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
722,116
private void validateRoleURIs(final Role[] userRoles) { final List<String> invalidRoles = new ArrayList<>(); for(Role role: userRoles) { if(role.getUri() == null) { invalidRoles.add(role.getIdentifier()); } } if (!invalidRoles.isEmpty()) { throw new IllegalArgumentException("Roles with URI not specified found: " + invalidRoles); } }
void function(final Role[] userRoles) { final List<String> invalidRoles = new ArrayList<>(); for(Role role: userRoles) { if(role.getUri() == null) { invalidRoles.add(role.getIdentifier()); } } if (!invalidRoles.isEmpty()) { throw new IllegalArgumentException(STR + invalidRoles); } }
/** * Checks whether all the roles have URI specified. */
Checks whether all the roles have URI specified
validateRoleURIs
{ "repo_name": "martiner/gooddata-java", "path": "gooddata-java/src/main/java/com/gooddata/sdk/service/project/ProjectService.java", "license": "bsd-3-clause", "size": 25129 }
[ "com.gooddata.sdk.model.project.Role", "java.util.ArrayList", "java.util.List" ]
import com.gooddata.sdk.model.project.Role; import java.util.ArrayList; import java.util.List;
import com.gooddata.sdk.model.project.*; import java.util.*;
[ "com.gooddata.sdk", "java.util" ]
com.gooddata.sdk; java.util;
1,190,102
private static Locale getWindowsLocale(int lcid) { switch (lcid) { case 0x0407: return Locale.GERMAN; case 0x0408: return new Locale("el", "GR"); case 0x0409: return Locale.ENGLISH; case 0x040b: return new Locale("fi"); case 0x040c: return Locale.FRENCH; case 0x0416: return new Locale("pt"); case 0x0807: return new Locale("de", "CH"); case 0x0809: return new Locale("en", "UK"); case 0x080c: return new Locale("fr", "BE"); case 0x0816: return new Locale("pt", "BR"); case 0x0c07: return new Locale("de", "AT"); case 0x0c09: return new Locale("en", "AU"); case 0x0c0c: return new Locale("fr", "CA"); case 0x1007: return new Locale("de", "LU"); case 0x1009: return new Locale("en", "CA"); case 0x100c: return new Locale("fr", "CH"); case 0x1407: return new Locale("de", "LI"); case 0x1409: return new Locale("en", "NZ"); case 0x140c: return new Locale("fr", "LU"); case 0x1809: return new Locale("en", "IE"); default: return null; } }
static Locale function(int lcid) { switch (lcid) { case 0x0407: return Locale.GERMAN; case 0x0408: return new Locale("el", "GR"); case 0x0409: return Locale.ENGLISH; case 0x040b: return new Locale("fi"); case 0x040c: return Locale.FRENCH; case 0x0416: return new Locale("pt"); case 0x0807: return new Locale("de", "CH"); case 0x0809: return new Locale("en", "UK"); case 0x080c: return new Locale("fr", "BE"); case 0x0816: return new Locale("pt", "BR"); case 0x0c07: return new Locale("de", "AT"); case 0x0c09: return new Locale("en", "AU"); case 0x0c0c: return new Locale("fr", "CA"); case 0x1007: return new Locale("de", "LU"); case 0x1009: return new Locale("en", "CA"); case 0x100c: return new Locale("fr", "CH"); case 0x1407: return new Locale("de", "LI"); case 0x1409: return new Locale("en", "NZ"); case 0x140c: return new Locale("fr", "LU"); case 0x1809: return new Locale("en", "IE"); default: return null; } }
/** * Maps a Windows LCID into a Java Locale. * * @param lcid the Windows language ID whose Java locale * is to be retrieved. * * @return an suitable Locale, or <code>null</code> if * the mapping cannot be performed. */
Maps a Windows LCID into a Java Locale
getWindowsLocale
{ "repo_name": "SanDisk-Open-Source/SSD_Dashboard", "path": "uefi/gcc/gcc-4.6.3/libjava/classpath/gnu/java/awt/font/opentype/NameDecoder.java", "license": "gpl-2.0", "size": 21736 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
1,522,292
protected static InputStream getResponseStream(HttpWebRequest request) throws EWSHttpException, IOException { String contentEncoding = ""; if (null != request.getContentEncoding()) { contentEncoding = request.getContentEncoding().toLowerCase(); } InputStream responseStream; if (contentEncoding.contains("gzip")) { responseStream = new GZIPInputStream(request.getInputStream()); } else if (contentEncoding.contains("deflate")) { responseStream = new InflaterInputStream(request.getInputStream()); } else { responseStream = request.getInputStream(); } return responseStream; }
static InputStream function(HttpWebRequest request) throws EWSHttpException, IOException { String contentEncoding = STRgzipSTRdeflate")) { responseStream = new InflaterInputStream(request.getInputStream()); } else { responseStream = request.getInputStream(); } return responseStream; }
/** * Gets the response stream (may be wrapped with GZip/Deflate stream to * decompress content). * * @param request * the request * @return ResponseStream * @throws microsoft.exchange.webservices.data.EWSHttpException * the eWS http exception * @throws java.io.IOException * Signals that an I/O exception has occurred. */
Gets the response stream (may be wrapped with GZip/Deflate stream to decompress content)
getResponseStream
{ "repo_name": "kaaaaang/ews-java-api", "path": "src/main/java/microsoft/exchange/webservices/data/AutodiscoverRequest.java", "license": "mit", "size": 23379 }
[ "java.io.IOException", "java.io.InputStream", "java.util.zip.InflaterInputStream" ]
import java.io.IOException; import java.io.InputStream; import java.util.zip.InflaterInputStream;
import java.io.*; import java.util.zip.*;
[ "java.io", "java.util" ]
java.io; java.util;
573,719
public void testValueWhenNameBlank() throws Exception { ValueSerialization ser = createMock(ValueSerialization.class); replay(ser); writer.writeValue(ser, null, "John Doé", ctx); verify(ser); assertEquals("John Do&#233;", os.toString()); assertEquals(StringUtils.EMPTY, ctx.getPath()); }
void function() throws Exception { ValueSerialization ser = createMock(ValueSerialization.class); replay(ser); writer.writeValue(ser, null, STR, ctx); verify(ser); assertEquals(STR, os.toString()); assertEquals(StringUtils.EMPTY, ctx.getPath()); }
/** * Tests serializing a non-null or empty value but with an empty name */
Tests serializing a non-null or empty value but with an empty name
testValueWhenNameBlank
{ "repo_name": "localmatters/object-serializer", "path": "src/test/java/org/localmatters/serializer/writer/XMLWriterTest.java", "license": "apache-2.0", "size": 25219 }
[ "org.apache.commons.lang.StringUtils", "org.easymock.classextension.EasyMock", "org.localmatters.serializer.serialization.ValueSerialization" ]
import org.apache.commons.lang.StringUtils; import org.easymock.classextension.EasyMock; import org.localmatters.serializer.serialization.ValueSerialization;
import org.apache.commons.lang.*; import org.easymock.classextension.*; import org.localmatters.serializer.serialization.*;
[ "org.apache.commons", "org.easymock.classextension", "org.localmatters.serializer" ]
org.apache.commons; org.easymock.classextension; org.localmatters.serializer;
1,236,801
// TODO: Customize helper method public void sendtoUI(int code, String res) { if(null != intent2) { Intent result = new Intent(); result.putExtra("error", res); try { intent2.send(this, code, result); } catch (PendingIntent.CanceledException e) { e.printStackTrace(); } } }
void function(int code, String res) { if(null != intent2) { Intent result = new Intent(); result.putExtra("error", res); try { intent2.send(this, code, result); } catch (PendingIntent.CanceledException e) { e.printStackTrace(); } } }
/** * Starts this service to perform action Foo with the given parameters. If * the service is already performing a task this action will be queued. * * @see IntentService */
Starts this service to perform action Foo with the given parameters. If the service is already performing a task this action will be queued
sendtoUI
{ "repo_name": "inv2004/cycle-computer", "path": "app/src/main/java/com/example/unknoqn/cc/CCDataServiceAsync_disabled.java", "license": "apache-2.0", "size": 5414 }
[ "android.app.PendingIntent", "android.content.Intent" ]
import android.app.PendingIntent; import android.content.Intent;
import android.app.*; import android.content.*;
[ "android.app", "android.content" ]
android.app; android.content;
1,000,892
public void showShareFile(OCFile file){ Intent intent = new Intent(mFileActivity, ShareActivity.class); intent.putExtra(mFileActivity.EXTRA_FILE, file); intent.putExtra(mFileActivity.EXTRA_ACCOUNT, mFileActivity.getAccount()); mFileActivity.startActivity(intent); }
void function(OCFile file){ Intent intent = new Intent(mFileActivity, ShareActivity.class); intent.putExtra(mFileActivity.EXTRA_FILE, file); intent.putExtra(mFileActivity.EXTRA_ACCOUNT, mFileActivity.getAccount()); mFileActivity.startActivity(intent); }
/** * Show an instance of {@link ShareType} for sharing or unsharing the {@OCFile} received as parameter. * * @param file File to share or unshare. */
Show an instance of <code>ShareType</code> for sharing or unsharing the received as parameter
showShareFile
{ "repo_name": "rishabh7m/android-1", "path": "src/com/owncloud/android/files/FileOperationsHelper.java", "license": "gpl-2.0", "size": 20946 }
[ "android.content.Intent", "com.owncloud.android.datamodel.OCFile", "com.owncloud.android.ui.activity.ShareActivity" ]
import android.content.Intent; import com.owncloud.android.datamodel.OCFile; import com.owncloud.android.ui.activity.ShareActivity;
import android.content.*; import com.owncloud.android.datamodel.*; import com.owncloud.android.ui.activity.*;
[ "android.content", "com.owncloud.android" ]
android.content; com.owncloud.android;
2,517,376
private void setUpExtrinsics() { // Get device to imu matrix. TangoPoseData device2IMUPose = new TangoPoseData(); TangoCoordinateFramePair framePair = new TangoCoordinateFramePair(); framePair.baseFrame = TangoPoseData.COORDINATE_FRAME_IMU; framePair.targetFrame = TangoPoseData.COORDINATE_FRAME_DEVICE; device2IMUPose = mTango.getPoseAtTime(0.0, framePair); mRenderer.getModelMatCalculator().SetDevice2IMUMatrix( device2IMUPose.getTranslationAsFloats(), device2IMUPose.getRotationAsFloats()); // Get color camera to imu matrix. TangoPoseData color2IMUPose = new TangoPoseData(); framePair.baseFrame = TangoPoseData.COORDINATE_FRAME_IMU; framePair.targetFrame = TangoPoseData.COORDINATE_FRAME_CAMERA_COLOR; color2IMUPose = mTango.getPoseAtTime(0.0, framePair); mRenderer.getModelMatCalculator().SetColorCamera2IMUMatrix( color2IMUPose.getTranslationAsFloats(), color2IMUPose.getRotationAsFloats()); }
void function() { TangoPoseData device2IMUPose = new TangoPoseData(); TangoCoordinateFramePair framePair = new TangoCoordinateFramePair(); framePair.baseFrame = TangoPoseData.COORDINATE_FRAME_IMU; framePair.targetFrame = TangoPoseData.COORDINATE_FRAME_DEVICE; device2IMUPose = mTango.getPoseAtTime(0.0, framePair); mRenderer.getModelMatCalculator().SetDevice2IMUMatrix( device2IMUPose.getTranslationAsFloats(), device2IMUPose.getRotationAsFloats()); TangoPoseData color2IMUPose = new TangoPoseData(); framePair.baseFrame = TangoPoseData.COORDINATE_FRAME_IMU; framePair.targetFrame = TangoPoseData.COORDINATE_FRAME_CAMERA_COLOR; color2IMUPose = mTango.getPoseAtTime(0.0, framePair); mRenderer.getModelMatCalculator().SetColorCamera2IMUMatrix( color2IMUPose.getTranslationAsFloats(), color2IMUPose.getRotationAsFloats()); }
/** * Setup the extrinsics of the device. */
Setup the extrinsics of the device
setUpExtrinsics
{ "repo_name": "UNH-Android-Development-Lab/tango-examples-java", "path": "MotionTrackingJava/app/src/main/java/com/projecttango/experiments/javamotiontracking/MotionTrackingActivity.java", "license": "apache-2.0", "size": 20320 }
[ "com.google.atap.tangoservice.TangoCoordinateFramePair", "com.google.atap.tangoservice.TangoPoseData" ]
import com.google.atap.tangoservice.TangoCoordinateFramePair; import com.google.atap.tangoservice.TangoPoseData;
import com.google.atap.tangoservice.*;
[ "com.google.atap" ]
com.google.atap;
859,649
@Test public void testGetPolyfillsSourceCustomServiceConfigQueryUseDefault() { Query query = new Query.Builder().build(); String actual = service.getPolyfillsSource("chrome/30", query); String expected = "(function(undefined) {c.minb.mind.mina.min}).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});"; assertEquals(expected, actual); }
void function() { Query query = new Query.Builder().build(); String actual = service.getPolyfillsSource(STR, query); String expected = STR; assertEquals(expected, actual); }
/** * Polyfill service should fill the empty query object with default values * So this should behave the same as if query is not supplied at all */
Polyfill service should fill the empty query object with default values So this should behave the same as if query is not supplied at all
testGetPolyfillsSourceCustomServiceConfigQueryUseDefault
{ "repo_name": "reiniergs/polyfill-service", "path": "polyfill-service-api/src/test/java/org/polyfillservice/api/services/PreSortPolyfillServiceCustomServiceConfig.java", "license": "mit", "size": 3320 }
[ "junit.framework.TestCase", "org.polyfillservice.api.components.Query" ]
import junit.framework.TestCase; import org.polyfillservice.api.components.Query;
import junit.framework.*; import org.polyfillservice.api.components.*;
[ "junit.framework", "org.polyfillservice.api" ]
junit.framework; org.polyfillservice.api;
1,674,555
public SiteLink getSiteLink() { return siteLink; }
SiteLink function() { return siteLink; }
/** * Gets the sitelink. */
Gets the sitelink
getSiteLink
{ "repo_name": "JeffRisberg/BING01", "path": "src/main/java/com/microsoft/bingads/v10/bulk/entities/BulkSiteLink.java", "license": "mit", "size": 14302 }
[ "com.microsoft.bingads.v10.campaignmanagement.SiteLink" ]
import com.microsoft.bingads.v10.campaignmanagement.SiteLink;
import com.microsoft.bingads.v10.campaignmanagement.*;
[ "com.microsoft.bingads" ]
com.microsoft.bingads;
1,432,599
public ConnectPoint controlPlaneConnectPoint() { return connectPoint; }
ConnectPoint function() { return connectPoint; }
/** * Returns the routing control plane connect point. * * @return control plane connect point */
Returns the routing control plane connect point
controlPlaneConnectPoint
{ "repo_name": "kuujo/onos", "path": "apps/routing-api/src/main/java/org/onosproject/routing/config/RoutersConfig.java", "license": "apache-2.0", "size": 4434 }
[ "org.onosproject.net.ConnectPoint" ]
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.*;
[ "org.onosproject.net" ]
org.onosproject.net;
381,064
public void rangeExpressionEvaluatorMapBased() { // The algorithm : // Get all the nodes of the Expression Tree and fill it into a MAP. // The Map structure will be currentNode, ColumnName, LessThanOrGreaterThan, Value, ParentNode // Group the rows in MAP according to the columns and then evaluate if it can be transformed // into a RANGE or not. // // AND AND // | | // / \ / \ // / \ / \ // Less Greater => TRUE Range // / \ / \ / \ // / \ / \ / \ // a 10 a 5 Less greater // /\ /\ // / \ / \ // a 10 a 5 // Map<String, List<FilterModificationNode>> filterExpressionMap; filterExpressionMap = convertFilterTreeToMap(); replaceWithRangeExpression(filterExpressionMap); filterExpressionMap.clear(); }
void function() { Map<String, List<FilterModificationNode>> filterExpressionMap; filterExpressionMap = convertFilterTreeToMap(); replaceWithRangeExpression(filterExpressionMap); filterExpressionMap.clear(); }
/** * This method evaluates is any greater than or less than expression can be transformed * into a single RANGE filter. */
This method evaluates is any greater than or less than expression can be transformed into a single RANGE filter
rangeExpressionEvaluatorMapBased
{ "repo_name": "zzcclp/carbondata", "path": "core/src/main/java/org/apache/carbondata/core/scan/expression/RangeExpressionEvaluator.java", "license": "apache-2.0", "size": 18482 }
[ "java.util.List", "java.util.Map" ]
import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,693,439
public default List<GrammarRule> subrules() { return children(); }
default List<GrammarRule> function() { return children(); }
/** * Gets the subrules of this grammar rule. Alias for * {@link GrammarRule#children()}. * * @return the subrules of this grammar rule. */
Gets the subrules of this grammar rule. Alias for <code>GrammarRule#children()</code>
subrules
{ "repo_name": "NoodleOfDeath/PastaParser", "path": "runtime/java/src/com/noodleofdeath/grammarkit/model/grammar/rule/GrammarRule.java", "license": "mit", "size": 8079 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
912,360
@Nullable public Uri getTokenEndpoint() { return get(TOKEN_ENDPOINT); }
Uri function() { return get(TOKEN_ENDPOINT); }
/** * The OAuth 2 token endpoint URI. Not specified if only the implicit flow is used. * * @see <a href="http://openid.net/specs/openid-connect-core-1_0.html#TokenEndpoint"> * "OpenID Connect Dynamic Client Registration 1.0"</a> */
The OAuth 2 token endpoint URI. Not specified if only the implicit flow is used
getTokenEndpoint
{ "repo_name": "StudienprojektUniTrier/Client", "path": "library/java/net/openid/appauth/AuthorizationServiceDiscovery.java", "license": "apache-2.0", "size": 21556 }
[ "android.net.Uri" ]
import android.net.Uri;
import android.net.*;
[ "android.net" ]
android.net;
1,091,576
public ActionInstance deleteActionInstance(String actionInstanceId) throws ActionInstanceNotFoundException { checkInitialized(); return actionOperationsDelegate.delete(actionInstanceId); }
ActionInstance function(String actionInstanceId) throws ActionInstanceNotFoundException { checkInitialized(); return actionOperationsDelegate.delete(actionInstanceId); }
/** * Deletes/Removes the {@code ActionInstance} associated with this actionInstanceId. * If it has a {@code CronTrigger} then it is also un-scheduled from scheduler * @throws ActionInstanceNotFoundException * @throws com.netflix.scheduledactions.exceptions.ActionOperationException */
Deletes/Removes the ActionInstance associated with this actionInstanceId. If it has a CronTrigger then it is also un-scheduled from scheduler
deleteActionInstance
{ "repo_name": "spinnaker/scheduled-actions", "path": "scheduled-actions-core/src/main/java/com/netflix/scheduledactions/ActionsOperator.java", "license": "apache-2.0", "size": 11259 }
[ "com.netflix.scheduledactions.exceptions.ActionInstanceNotFoundException" ]
import com.netflix.scheduledactions.exceptions.ActionInstanceNotFoundException;
import com.netflix.scheduledactions.exceptions.*;
[ "com.netflix.scheduledactions" ]
com.netflix.scheduledactions;
435,758
@ServiceMethod(returns = ReturnType.SINGLE) PolicyDefinitionInner get(String policyDefinitionName);
@ServiceMethod(returns = ReturnType.SINGLE) PolicyDefinitionInner get(String policyDefinitionName);
/** * Gets the policy definition. * * @param policyDefinitionName The name of the policy definition to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the policy definition. */
Gets the policy definition
get
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/PolicyDefinitionsClient.java", "license": "mit", "size": 26040 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.resources.fluent.models.PolicyDefinitionInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.resources.fluent.models.PolicyDefinitionInner;
import com.azure.core.annotation.*; import com.azure.resourcemanager.resources.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,510,727
public void identifyNode(int nodeId) throws SerialInterfaceException { SerialMessage newMessage = new SerialMessage(nodeId, SerialMessageClass.IdentifyNode, SerialMessageType.Request, SerialMessageClass.IdentifyNode, SerialMessagePriority.High); byte[] newPayload = { (byte) nodeId }; newMessage.setMessagePayload(newPayload); this.enqueue(newMessage); }
void function(int nodeId) throws SerialInterfaceException { SerialMessage newMessage = new SerialMessage(nodeId, SerialMessageClass.IdentifyNode, SerialMessageType.Request, SerialMessageClass.IdentifyNode, SerialMessagePriority.High); byte[] newPayload = { (byte) nodeId }; newMessage.setMessagePayload(newPayload); this.enqueue(newMessage); }
/** * Send Identify Node message to the controller. * @param nodeId the nodeId of the node to identify * @throws SerialInterfaceException when timing out or getting an invalid response. */
Send Identify Node message to the controller
identifyNode
{ "repo_name": "dereulenspiegel/openhab", "path": "bundles/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/protocol/ZWaveController.java", "license": "epl-1.0", "size": 53059 }
[ "org.openhab.binding.zwave.internal.protocol.SerialMessage" ]
import org.openhab.binding.zwave.internal.protocol.SerialMessage;
import org.openhab.binding.zwave.internal.protocol.*;
[ "org.openhab.binding" ]
org.openhab.binding;
2,880,949
void register(Object object, Set<TypeInfo> services);
void register(Object object, Set<TypeInfo> services);
/** * Register an object as providing a set of services * * @param object object providing services * @param services services provided by object */
Register an object as providing a set of services
register
{ "repo_name": "mjameson-se/foundation", "path": "org.f8n.inject/src/org/f8n/inject/ServiceRegistry.java", "license": "unlicense", "size": 695 }
[ "java.util.Set", "org.f8n.reflect.TypeInfo" ]
import java.util.Set; import org.f8n.reflect.TypeInfo;
import java.util.*; import org.f8n.reflect.*;
[ "java.util", "org.f8n.reflect" ]
java.util; org.f8n.reflect;
1,257,167
public static ScalarFunction createUnsafe(Method method) { CallImplementor implementor = createImplementor(method); return new ScalarFunctionImpl(method, implementor); }
static ScalarFunction function(Method method) { CallImplementor implementor = createImplementor(method); return new ScalarFunctionImpl(method, implementor); }
/** * Creates unsafe version of {@link ScalarFunction} from any method. The method * does not need to be static or belong to a class with default constructor. It is * the responsibility of the underlying engine to initialize the UDF object that * contain the method. * * @param method method that is used to implement the function */
Creates unsafe version of <code>ScalarFunction</code> from any method. The method does not need to be static or belong to a class with default constructor. It is the responsibility of the underlying engine to initialize the UDF object that contain the method
createUnsafe
{ "repo_name": "vlsi/calcite", "path": "core/src/main/java/org/apache/calcite/schema/impl/ScalarFunctionImpl.java", "license": "apache-2.0", "size": 7472 }
[ "java.lang.reflect.Method", "org.apache.calcite.adapter.enumerable.CallImplementor", "org.apache.calcite.schema.ScalarFunction" ]
import java.lang.reflect.Method; import org.apache.calcite.adapter.enumerable.CallImplementor; import org.apache.calcite.schema.ScalarFunction;
import java.lang.reflect.*; import org.apache.calcite.adapter.enumerable.*; import org.apache.calcite.schema.*;
[ "java.lang", "org.apache.calcite" ]
java.lang; org.apache.calcite;
2,685,165
public void setRectangle(Rectangle rectangle) { this.rectangle.set(rectangle); }
void function(Rectangle rectangle) { this.rectangle.set(rectangle); }
/** * Set menu rectangle * * @param rectangle to set */
Set menu rectangle
setRectangle
{ "repo_name": "IonAgorria/Ouroboros", "path": "src/com/agorria/ouroboros/ui/panel/Panel.java", "license": "gpl-3.0", "size": 7026 }
[ "com.agorria.ouroboros.core.Rectangle" ]
import com.agorria.ouroboros.core.Rectangle;
import com.agorria.ouroboros.core.*;
[ "com.agorria.ouroboros" ]
com.agorria.ouroboros;
252,680
public E nextElement() { if (element == null) { throw new NoSuchElementException(Messages.getString("security.17")); //$NON-NLS-1$ } E last = element; element = null; return last; } }
E function() { if (element == null) { throw new NoSuchElementException(Messages.getString(STR)); } E last = element; element = null; return last; } }
/** * Returns the element and clears internal reference to it. */
Returns the element and clears internal reference to it
nextElement
{ "repo_name": "freeVM/freeVM", "path": "enhanced/archive/classlib/java6/modules/security/src/main/java/common/java/security/AllPermissionCollection.java", "license": "apache-2.0", "size": 4478 }
[ "java.util.NoSuchElementException", "org.apache.harmony.security.internal.nls.Messages" ]
import java.util.NoSuchElementException; import org.apache.harmony.security.internal.nls.Messages;
import java.util.*; import org.apache.harmony.security.internal.nls.*;
[ "java.util", "org.apache.harmony" ]
java.util; org.apache.harmony;
2,367,025
@Test public void codecSimpleFlowTest() throws IOException { FlowRule rule = getRule("simple-flow.json"); checkCommonData(rule); assertThat(rule.selector().criteria().size(), is(1)); Criterion criterion1 = rule.selector().criteria().iterator().next(); assertThat(criterion1.type(), is(Criterion.Type.ETH_TYPE)); assertThat(((EthTypeCriterion) criterion1).ethType(), is(2054)); assertThat(rule.treatment().allInstructions().size(), is(1)); Instruction instruction1 = rule.treatment().allInstructions().get(0); assertThat(instruction1.type(), is(Instruction.Type.OUTPUT)); assertThat(((Instructions.OutputInstruction) instruction1).port(), is(PortNumber.CONTROLLER)); } SortedMap<String, Instruction> instructions = new TreeMap<>();
void function() throws IOException { FlowRule rule = getRule(STR); checkCommonData(rule); assertThat(rule.selector().criteria().size(), is(1)); Criterion criterion1 = rule.selector().criteria().iterator().next(); assertThat(criterion1.type(), is(Criterion.Type.ETH_TYPE)); assertThat(((EthTypeCriterion) criterion1).ethType(), is(2054)); assertThat(rule.treatment().allInstructions().size(), is(1)); Instruction instruction1 = rule.treatment().allInstructions().get(0); assertThat(instruction1.type(), is(Instruction.Type.OUTPUT)); assertThat(((Instructions.OutputInstruction) instruction1).port(), is(PortNumber.CONTROLLER)); } SortedMap<String, Instruction> instructions = new TreeMap<>();
/** * Checks that a simple rule decodes properly. * * @throws IOException if the resource cannot be processed */
Checks that a simple rule decodes properly
codecSimpleFlowTest
{ "repo_name": "maxkondr/onos-porta", "path": "core/common/src/test/java/org/onosproject/codec/impl/FlowRuleCodecTest.java", "license": "apache-2.0", "size": 22038 }
[ "java.io.IOException", "java.util.SortedMap", "java.util.TreeMap", "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers", "org.onosproject.net.PortNumber", "org.onosproject.net.flow.FlowRule", "org.onosproject.net.flow.criteria.Criterion", "org.onosproject.net.flow.criteria.EthTypeCriterion", "org.onosproject.net.flow.instructions.Instruction", "org.onosproject.net.flow.instructions.Instructions" ]
import java.io.IOException; import java.util.SortedMap; import java.util.TreeMap; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.onosproject.net.PortNumber; import org.onosproject.net.flow.FlowRule; import org.onosproject.net.flow.criteria.Criterion; import org.onosproject.net.flow.criteria.EthTypeCriterion; import org.onosproject.net.flow.instructions.Instruction; import org.onosproject.net.flow.instructions.Instructions;
import java.io.*; import java.util.*; import org.hamcrest.*; import org.onosproject.net.*; import org.onosproject.net.flow.*; import org.onosproject.net.flow.criteria.*; import org.onosproject.net.flow.instructions.*;
[ "java.io", "java.util", "org.hamcrest", "org.onosproject.net" ]
java.io; java.util; org.hamcrest; org.onosproject.net;
2,157,177
default AdvancedNitriteEndpointConsumerBuilder exchangePattern( ExchangePattern exchangePattern) { doSetProperty("exchangePattern", exchangePattern); return this; }
default AdvancedNitriteEndpointConsumerBuilder exchangePattern( ExchangePattern exchangePattern) { doSetProperty(STR, exchangePattern); return this; }
/** * Sets the exchange pattern when the consumer creates an exchange. * * The option is a: <code>org.apache.camel.ExchangePattern</code> type. * * Group: consumer (advanced) */
Sets the exchange pattern when the consumer creates an exchange. The option is a: <code>org.apache.camel.ExchangePattern</code> type. Group: consumer (advanced)
exchangePattern
{ "repo_name": "CodeSmell/camel", "path": "core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/NitriteEndpointBuilderFactory.java", "license": "apache-2.0", "size": 25276 }
[ "org.apache.camel.ExchangePattern" ]
import org.apache.camel.ExchangePattern;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
2,544,151
public List<Birthday> getBirthdays() { return birthdays; }
List<Birthday> function() { return birthdays; }
/** * Will need https://www.googleapis.com/auth/user.birthday.read scope * @return list of birthdays */
Will need HREF scope
getBirthdays
{ "repo_name": "spring-social/spring-social-google", "path": "src/main/java/org/springframework/social/google/api/people/PeoplePerson.java", "license": "apache-2.0", "size": 3025 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
767,424
public DataNode setTypeScalar(String type);
DataNode function(String type);
/** * Type of the disk-chopper: only one from the enumerated list (match text exactly) * <p> * <p><b>Enumeration:</b><ul> * <li><b>Chopper type single</b> </li> * <li><b>contra_rotating_pair</b> </li> * <li><b>synchro_pair</b> </li></ul></p> * </p> * * @param type the type */
Type of the disk-chopper: only one from the enumerated list (match text exactly) Enumeration: Chopper type single contra_rotating_pair synchro_pair
setTypeScalar
{ "repo_name": "colinpalmer/dawnsci", "path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXdisk_chopper.java", "license": "epl-1.0", "size": 11747 }
[ "org.eclipse.dawnsci.analysis.api.tree.DataNode" ]
import org.eclipse.dawnsci.analysis.api.tree.DataNode;
import org.eclipse.dawnsci.analysis.api.tree.*;
[ "org.eclipse.dawnsci" ]
org.eclipse.dawnsci;
2,880,889
EReference getOclFeature_Definition();
EReference getOclFeature_Definition();
/** * Returns the meta object for the container reference '{@link anatlyzer.atlext.OCL.OclFeature#getDefinition <em>Definition</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the container reference '<em>Definition</em>'. * @see anatlyzer.atlext.OCL.OclFeature#getDefinition() * @see #getOclFeature() * @generated */
Returns the meta object for the container reference '<code>anatlyzer.atlext.OCL.OclFeature#getDefinition Definition</code>'.
getOclFeature_Definition
{ "repo_name": "jesusc/anatlyzer", "path": "plugins/anatlyzer.atl.typing/src-gen/anatlyzer/atlext/OCL/OCLPackage.java", "license": "epl-1.0", "size": 484377 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,621,653