id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
32377028_140 | {
"fields": [
{
"declarator": "builder = new LogDataBuilder()",
"modifier": "private",
"original_string": "private LogDataBuilder builder = new LogDataBuilder();",
"type": "LogDataBuilder",
"var_name": "builder"
}
],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/... | {
"body": "@Test\n public void testAddMarker() throws Exception {\n //given\n final Marker marker = new BasicMarkerFactory().getMarker(\"some marker\");\n\n //when\n LogbackUtil.addMarker(marker, new HashMap<>(), builder);\n\n //then\n assertEquals(builder.build().getMarkerColors(), MarkerColors.Aq... | {
"fields": [],
"file": "OtrosLogViewer-app/src/main/java/pl/otros/logview/importer/logback/LogbackUtil.java",
"identifier": "LogbackUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "LogbackUtil.translate(ILoggingEvent ev)",
"constructor": false,
"full_signature": "publi... | {
"body": "public static void addMarker(Marker marker, Map<String, String> mdcMap, LogDataBuilder builder) {\n if (marker != null) {\n builder.withMarked(true);\n builder.withMarkerColors(MarkerColors.Aqua);\n HashMap<String, String> mdc = new HashMap<>(mdcMap);\n mdc.put(\"marker\", marker.toS... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_117 | {
"fields": [
{
"declarator": "LOG_EVENT_COUNT = 1000",
"modifier": "public static final",
"original_string": "public static final int LOG_EVENT_COUNT = 1000;",
"type": "int",
"var_name": "LOG_EVENT_COUNT"
},
{
"declarator": "TEST_THREAD_POOL_NAME = \"TestThreadPoolName... | {
"body": "@Test\n public void testAdd() throws Exception {\n String testMessage = \"testAdd\";\n LogData ld = new LogDataBuilder().withDate(new Date()).withMessage(testMessage).build();\n store.add(ld);\n AssertJUnit.assertEquals(LOG_EVENT_COUNT + 1, store.getCount());\n AssertJUnit.assertEquals(test... | {
"fields": [
{
"declarator": "logDataStore",
"modifier": "private final",
"original_string": "private final LogDataStore logDataStore;",
"type": "LogDataStore",
"var_name": "logDataStore"
},
{
"declarator": "service",
"modifier": "private final",
"original_... | {
"body": "@Override\n public void add(final LogData... logDatas) {\n service.submit(() -> logDataStore.add(logDatas));\n }",
"class_method_signature": "MemoryAsyncLogDataStore.add(final LogData... logDatas)",
"constructor": false,
"full_signature": "@Override public void add(final LogData... logDatas)",
... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_51 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/accept/query/org/apache/log4j/rule/NotEqualsRuleTest.java",
"identifier": "NotEqualsRuleTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test public void test1() {\n Stack<Object> stack = new Stack<>();\n stack.push(\"Hello\");\n try {\n NotEqualsRule.getRule(stack);\n Assert.fail(\"Should have thrown IllegalArgumentException\");\n } catch (IllegalArgumentException ignored) {\n }\n ... | {
"fields": [
{
"declarator": "serialVersionUID = -1135478467213793211L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -1135478467213793211L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "RES... | {
"body": "public static Rule getRule(final String field, final String value) {\n if (field.equalsIgnoreCase(LoggingEventFieldResolver.LEVEL_FIELD)) {\n return NotLevelEqualsRule.getRule(value);\n } else {\n return new NotEqualsRule(field, value);\n }\n }",
"class_method_signature": "NotEqualsRu... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_101 | {
"fields": [
{
"declarator": "dataTableModel",
"modifier": "public",
"original_string": "public LogDataTableModel dataTableModel;",
"type": "LogDataTableModel",
"var_name": "dataTableModel"
},
{
"declarator": "logDatas",
"modifier": "public",
"original_stri... | {
"body": "@Test\n public void testAddNoteToRow() {\n dataTableModel.addNoteToRow(1, new Note(\"a\"));\n String note = dataTableModel.getNote(1).getNote();\n AssertJUnit.assertEquals(\"a\", note);\n }",
"class_method_signature": "LogDataTableModelTest.testAddNoteToRow()",
"constructor": false,
"full_... | {
"fields": [
{
"declarator": "EMPTY_STRING = \"\"",
"modifier": "private static final",
"original_string": "private static final String EMPTY_STRING = \"\";",
"type": "String",
"var_name": "EMPTY_STRING"
},
{
"declarator": "LOGGER = LoggerFactory.getLogger(LogDataTable... | {
"body": "@Override\n public void addNoteToRow(int row, Note note) {\n logDataStore.addNoteToRow(row, note);\n NoteEvent event = new NoteEvent(EventType.REMOVE, this, note, row);\n notifyAllNoteObservers(event);\n fireTableRowsUpdated(row, row);\n }",
"class_method_signature": "LogDataTableModel.addN... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_6 | {
"fields": [],
"file": "OtrosVfsBrowser/src/test/java/pl/otros/vfs/browser/table/VfsTableModelHiddenFileRowFilterTest.java",
"identifier": "VfsTableModelHiddenFileRowFilterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"candidateFiles\")\n public void testCheckIfInclude(String path, boolean hiddenAttribute, boolean showHidden, boolean expected) throws Exception {\n //given\n VfsTableModelHiddenFileRowFilter rowFilter = new VfsTableModelHiddenFileRowFilter(showHidden);\n FileObject fileObje... | {
"fields": [
{
"declarator": "showHidden",
"modifier": "private",
"original_string": "private boolean showHidden;",
"type": "boolean",
"var_name": "showHidden"
}
],
"file": "OtrosVfsBrowser/src/main/java/pl/otros/vfs/browser/table/VfsTableModelHiddenFileRowFilter.java",
"i... | {
"body": "protected boolean checkIfInclude(FileObject fileObject) {\n if (!showHidden) {\n try {\n if (fileObject.getName().getBaseName().startsWith(\".\") || fileObject.isHidden()) {\n return false;\n }\n } catch (FileSystemException e) {\n\n }\n }\n return true;\n }"... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_47 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/accept/query/org/apache/log4j/rule/PartialTextMatchRuleTest.java",
"identifier": "PartialTextMatchRuleTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test2() {\n\tStack<Object> stack = new Stack<>();\n\tstack.push(\"Hello\");\n\tstack.push(\"World\");\n\ttry {\n\t PartialTextMatchRule.getRule(stack);\n\t Assert.fail(\"Should have thrown IllegalArgumentException\");\n\t} catch (IllegalArgumentException ignored) {\n\t}\n }"... | {
"fields": [
{
"declarator": "serialVersionUID = 6963284773637727558L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 6963284773637727558L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "RESOL... | {
"body": "public static Rule getRule(final String field, final String value) {\n return new PartialTextMatchRule(field, value);\n }",
"class_method_signature": "PartialTextMatchRule.getRule(final String field, final String value)",
"constructor": false,
"full_signature": "public static Rule getRule(final S... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_156 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/gui/message/SoapFinderTest.java",
"identifier": "SoapFinderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testFindSoap() throws Exception {\n\n String stringWithSoaps = IOUtils.toString(this.getClass().getClassLoader().getResourceAsStream(\"soap/stringWithSoap.txt\"));\n SoapFinder finder = new SoapFinder();\n SortedSet<SubText> findSoaps = finder.findSoaps(stringWithSoaps);\n ... | {
"fields": [
{
"declarator": "p1 = Pattern.compile(\"xmlns:(.+?)=\\\"http://schemas\\\\.xmlsoap\\\\.org/soap/envelope/\\\"\", Pattern.MULTILINE)",
"modifier": "private static",
"original_string": "private static Pattern p1 = Pattern.compile(\"xmlns:(.+?)=\\\"http://schemas\\\\.xmlsoap\\\\.org/s... | {
"body": "public SortedSet<SubText> findSoaps(String text) {\n SortedSet<SubText> set = new TreeSet<>();\n String tag = findSoapTag(text);\n if (tag == null) {\n return set;\n }\n String soapStartTag = \"<\" + tag + \":Envelope\";\n String soapEndTag = \"</\" + tag + \":Envelope>\";\n int e... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_10 | {
"fields": [
{
"declarator": "LOGGER = java.util.logging.Logger.getLogger(AuthStoreUtilsTest.class.getName())",
"modifier": "private static final",
"original_string": "private static final java.util.logging.Logger LOGGER = java.util.logging.Logger.getLogger(AuthStoreUtilsTest.class.getName());"... | {
"body": "@Test(enabled = false)\n public void testSave() throws Exception {\n //given\n AuthStore authStore = new MemoryAuthStore();\n UserAuthenticationDataWrapper authenticationData1 = new UserAuthenticationDataWrapper();\n authenticationData1.setData(UserAuthenticationData.USERNAME, \"Stefan\".toCha... | {
"fields": [
{
"declarator": "LOGGER = java.util.logging.Logger.getLogger(AuthStoreUtils.class.getName())",
"modifier": "private static final",
"original_string": "private static final java.util.logging.Logger LOGGER = java.util.logging.Logger.getLogger(AuthStoreUtils.class.getName());",
... | {
"body": "public void save(AuthStore authStore, OutputStream out) throws IOException {\n Collection<UserAuthenticationInfo> all = authStore.getAll();\n for (UserAuthenticationInfo userAuthenticationInfo : all) {\n UserAuthenticationData userAuthenticationData = authStore.getUserAuthenticationData(userAuth... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_84 | {
"fields": [
{
"declarator": "container",
"modifier": "public",
"original_string": "public PluginableElementsContainer<PluginableClass> container;",
"type": "PluginableElementsContainer<PluginableClass>",
"var_name": "container"
}
],
"file": "OtrosLogViewer-app/src/test/java... | {
"body": "@Test\n public void testRemoveElement() {\n PluginableListener listener = new PluginableListener();\n container.addListener(listener);\n\n PluginableClass p1 = new PluginableClass();\n container.addElement(p1);\n AssertJUnit.assertTrue(listener.added);\n Collection<PluginableClass> eleme... | {
"fields": [
{
"declarator": "listeners",
"modifier": "private final",
"original_string": "private final HashSet<PluginableElementEventListener<T>> listeners;",
"type": "HashSet<PluginableElementEventListener<T>>",
"var_name": "listeners"
},
{
"declarator": "elements",... | {
"body": "public void removeElement(T element) {\n synchronized (elements) {\n elements.remove(element.getPluginableId());\n }\n synchronized (listeners) {\n for (PluginableElementEventListener l : listeners) {\n l.elementRemoved(element);\n }\n }\n }",
"class_method_signature": ... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_204 | {
"fields": [
{
"declarator": "xpaths = new HashSet<>(Arrays.asList(\"ala\", \"aba\", \"all\"))",
"modifier": "private final",
"original_string": "private final HashSet<String> xpaths = new HashSet<>(Arrays.asList(\"ala\", \"aba\", \"all\"));",
"type": "HashSet<String>",
"var_name": ... | {
"body": "@Test(dataProvider = \"suggestions\")\n public void testGetSuggestions(String name,\n String text,\n Collection<String> xpaths,\n int caretPosition,\n List<BasicSuggestion> expec... | {
"fields": [
{
"declarator": "JSON = \"json\"",
"modifier": "public static final",
"original_string": "public static final String JSON = \"json\";",
"type": "String",
"var_name": "JSON"
},
{
"declarator": "keys",
"modifier": "private final",
"original_strin... | {
"body": "@Override\n public List<BasicSuggestion> getSuggestions(SuggestionQuery query) {\n final String text = query.getValue();\n //Get last line\n final int caretLocation = query.getCaretLocation();\n String line = lineForPosition(text, caretLocation);\n final boolean matches = line.matches(\"\\\... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_195 | {
"fields": [
{
"declarator": "underTest = new RegexSearchSuggestionSource(new ArrayList<>())",
"modifier": "private",
"original_string": "private RegexSearchSuggestionSource underTest = new RegexSearchSuggestionSource(new ArrayList<>());",
"type": "RegexSearchSuggestionSource",
"var... | {
"body": "@Test(dataProvider = \"data\")\n public void testGetSuggestions(String text,String suggestionsNewLined) throws Exception {\n final List<SearchSuggestion> suggestions = underTest.getSuggestions(new SuggestionQuery(text,text.length()));\n final String result = suggestions.stream().map(s -> s.getFullCo... | {
"fields": [
{
"declarator": "COUNT_N_M = \"^.*\\\\{(\\\\d+),(\\\\d+)$\"",
"modifier": "private static final",
"original_string": "private static final String COUNT_N_M = \"^.*\\\\{(\\\\d+),(\\\\d+)$\";",
"type": "String",
"var_name": "COUNT_N_M"
},
{
"declarator": "CO... | {
"body": "@Override\n public List<SearchSuggestion> getSuggestions(SuggestionQuery query) {\n String queryString = query.getValue();\n ArrayList<SearchSuggestion> result = new ArrayList<>();\n if (queryString.length() > 1) {\n final String last2 = queryString.substring(queryString.length() - 2);\n ... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_183 | {
"fields": [
{
"declarator": "singleFilesToOpen = Collections.singletonList(new FileToOpen(\"file:///tmp/a.txt\", OpenMode.FROM_END, Level.FINEST, Optional.of(\"logImporter\")))",
"modifier": "private",
"original_string": "private List<FileToOpen> singleFilesToOpen = Collections.singletonList(n... | {
"body": "@Test(dataProvider = \"serialize\")\n public void testDeserialize(String testName, List<Session> sessionList, String jsonFileName) throws Exception {\n String json = IOUtils.toString(this.getClass().getResourceAsStream(jsonFileName), \"UTF-8\");\n Optional<List<Session>> actual = new SessionDeserial... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(SessionDeserializer.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SessionDeserializer.class.getName());",
"type": "Logger",
"var_n... | {
"body": "@Override\n public Optional<List<Session>> deserialize(String data) {\n final ArrayList<Session> sessions = new ArrayList<>();\n try {\n final JSONArray array = new JSONArray(data);\n for (int i = 0; i < array.length(); i++) {\n final JSONObject jsonObject = array.getJSONObject(i);\... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_212 | {
"fields": [
{
"declarator": "logData",
"modifier": "private",
"original_string": "private LogData logData;",
"type": "LogData",
"var_name": "logData"
},
{
"declarator": "logDataUpperCase",
"modifier": "private",
"original_string": "private LogData logDataU... | {
"body": "@Test\n public void testMatches() {\n assertEquals(true, matcher.matches(logData));\n }",
"class_method_signature": "StringContainsSearchMatcherTest.testMatches()",
"constructor": false,
"full_signature": "@Test public void testMatches()",
"identifier": "testMatches",
"invocations": [
"a... | {
"fields": [
{
"declarator": "searchChar",
"modifier": "private final",
"original_string": "private final String searchChar;",
"type": "String",
"var_name": "searchChar"
}
],
"file": "OtrosLogViewer-app/src/main/java/pl/otros/logview/gui/actions/search/StringContainsSearchMa... | {
"body": "@Override\n public boolean matches(LogData logData) {\n return StringUtils.contains(StringUtils.lowerCase(logData.getMessage()), searchChar);\n }",
"class_method_signature": "StringContainsSearchMatcher.matches(LogData logData)",
"constructor": false,
"full_signature": "@Override public boolean ... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_92 | {
"fields": [
{
"declarator": "ver2 = new LogDataListPersistanceVer2()",
"modifier": "private",
"original_string": "private LogDataListPersistanceVer2 ver2 = new LogDataListPersistanceVer2();",
"type": "LogDataListPersistanceVer2",
"var_name": "ver2"
}
],
"file": "OtrosLogVie... | {
"body": "@Test\n public void testEscpageStringNewLine() {\n String escpageString = ver2.escapedString(\"String\\nwith\\nnewline\");\n AssertJUnit.assertEquals(\"String\\\\nwith\\\\nnewline\", escpageString);\n }",
"class_method_signature": "LogDataListPersistanceVer2Test.testEscpageStringNewLine()",
"co... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(LogDataListPersistanceVer2.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(LogDataListPersistanceVer2.class.getName());",
"type": "Logger"... | {
"body": "protected String escapedString(String string) {\n return string\n .replace(\"\\\\\", \"\\\\S\")// \"\\\" -> \"\\S\"\n .replace(\"|\", \"\\\\P\") // \"|\" -> \"\\P\"\n .replace(\"\\n\", \"\\\\n\")\n .replace(\"\\r\", \"\\\\r\");\n }",
"class_method_signature": "LogDataListPersistan... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_224 | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(LoadingRunnableTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(LoadingRunnableTest.class);",
"type": "Logger",
"var_name": "LOGGER"
}... | {
"body": "@Test(invocationCount = 5)\n public void testLoadStatisticAfterFullReadWithLogParser() throws Exception {\n underTest = createLoadingRunnable(getJulLogParser());\n saveLines(Range.closed(0, julSimpleLogLines.size()), julSimpleLogLines, outputStream);\n\n executorService.submit(underTest);\n\n ... | {
"fields": [
{
"declarator": "LOGGER = org.slf4j.LoggerFactory.getLogger(LoadingRunnable.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = org.slf4j.LoggerFactory.getLogger(LoadingRunnable.class);",
"type": "Logger",
"var_name": "L... | {
"body": "public synchronized LoadStatistic getLoadStatistic() {\n final Long position = obserableInputStreamImpl.map(ObservableInputStreamImpl::getCurrentRead).orElse(0L);\n return new LoadStatistic(source, position, lastFileSize);\n }",
"class_method_signature": "LoadingRunnable.getLoadStatistic()",
"co... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_208 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/gui/actions/ConnectToSocketHubAppenderActionTest.java",
"identifier": "ConnectToSocketHubAppenderActionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void tryToConnectFail() throws IOException {\n OtrosApplication otrosApplication = new OtrosApplication();\n ConnectToSocketHubAppenderAction action = new ConnectToSocketHubAppenderAction(otrosApplication);\n DataConfiguration dc = new DataConfiguration(new BaseConfiguration());\n ... | {
"fields": [
{
"declarator": "RECONNECT_TIME = 20 * 1000",
"modifier": "private static final",
"original_string": "private static final int RECONNECT_TIME = 20 * 1000;",
"type": "int",
"var_name": "RECONNECT_TIME"
},
{
"declarator": "LOGGER = LoggerFactory.getLogger(Co... | {
"body": "Socket tryToConnectToSocket(DataConfiguration configuration, String hostAndPortString, SocketFactory socketFactory) throws IOException {\n List<Object> list1 = configuration.getList(ConfKeys.SOCKET_HUB_APPENDER_ADDRESSES);\n String[] hostPort = hostAndPortString.split(\":\");\n host = hostPort[0];... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_88 | {
"fields": [
{
"declarator": "logDatas",
"modifier": "private",
"original_string": "private LogData[] logDatas;",
"type": "LogData[]",
"var_name": "logDatas"
},
{
"declarator": "dataStore",
"modifier": "private",
"original_string": "private FileLogDataStore... | {
"body": "@Test\n public void testClear() {\n // given\n dataStore.add(logDatas);\n\n assertEquals(logDatas.length, dataStore.getCount());\n\n // when\n dataStore.clear();\n\n // then\n assertEquals(0, dataStore.getCount());\n assertEquals(0, dataStore.getLogData().length);\n }",
"class_m... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(FileLogDataStore.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(FileLogDataStore.class.getName());",
"type": "Logger",
"var_name": ... | {
"body": "@Override\n public int clear() {\n int size = logDatasId.size();\n RandomAccessFile old = randomAccessFile;\n storeIdFilePositionMapping.clear();\n logDatasId.clear();\n try {\n init();\n } catch (IOException e) {\n LOGGER.info(\"Can't initialize new log file after clear: \" + ... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_67 | {
"fields": [
{
"declarator": "runtimeInfoERDC",
"modifier": "private",
"original_string": "private RuntimeInfoERDC runtimeInfoERDC;",
"type": "RuntimeInfoERDC",
"var_name": "runtimeInfoERDC"
}
],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/exceptionshandler/er... | {
"body": "@Test\n public void testFullPatternLong() {\n AssertJUnit.assertEquals(\"144:02:10\", runtimeInfoERDC.formatTimeDuration(((144 * 60 + 2) * 60 + 10) * 1000l));\n }",
"class_method_signature": "RuntimeInfoERDCTest.testFullPatternLong()",
"constructor": false,
"full_signature": "@Test publi... | {
"fields": [
{
"declarator": "MEMORY_MAX = \"RUNTIME:memory.max\"",
"modifier": "private static final",
"original_string": "private static final String MEMORY_MAX = \"RUNTIME:memory.max\";",
"type": "String",
"var_name": "MEMORY_MAX"
},
{
"declarator": "MEMORY_FREE = \... | {
"body": "protected String formatTimeDuration(final long timeInMs) {\n long timeInS = timeInMs / 1000;\n String upTimeFormatted = String.format(\"%d:%02d:%02d\", timeInS / 3600, (timeInS % 3600) / 60, (timeInS % 60));\n return upTimeFormatted;\n }",
"class_method_signature": "RuntimeInfoERDC.formatTimeDu... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_121 | {
"fields": [
{
"declarator": "LOG_EVENT_COUNT = 1000",
"modifier": "public static final",
"original_string": "public static final int LOG_EVENT_COUNT = 1000;",
"type": "int",
"var_name": "LOG_EVENT_COUNT"
},
{
"declarator": "TEST_THREAD_POOL_NAME = \"TestThreadPoolName... | {
"body": "@Test\n public void testRemoveNote() throws Exception {\n store.removeNote(10);\n AssertJUnit.assertEquals(null, store.getNote(10));\n\n }",
"class_method_signature": "MemoryAsyncLogDataStoreTest.testRemoveNote()",
"constructor": false,
"full_signature": "@Test public void testRemoveNote()",
... | {
"fields": [
{
"declarator": "logDataStore",
"modifier": "private final",
"original_string": "private final LogDataStore logDataStore;",
"type": "LogDataStore",
"var_name": "logDataStore"
},
{
"declarator": "service",
"modifier": "private final",
"original_... | {
"body": "@Override\n public Note removeNote(int row) {\n return runCallableInDedicatedThread(new OperationRemoveNote(logDataStore, row));\n }",
"class_method_signature": "MemoryAsyncLogDataStore.removeNote(int row)",
"constructor": false,
"full_signature": "@Override public Note removeNote(int row)",
"... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_30 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/filter/LevelFilterTest.java",
"identifier": "LevelFilterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAccept() {\n LogData ld = new LogData();\n ld.setLevel(Level.FINEST);\n\n LevelFilter filter = new LevelFilter();\n filter.init(new Properties(), new LogDataTableModel(), mock(Theme.class));\n filter.setPassLevel(Level.ALL.intValue());\n assertTrue(filter.accept(l... | {
"fields": [
{
"declarator": "passLevel = Level.ALL.intValue()",
"modifier": "private",
"original_string": "private int passLevel = Level.ALL.intValue();",
"type": "int",
"var_name": "passLevel"
},
{
"declarator": "NAME = \"Level filter\"",
"modifier": "private s... | {
"body": "@Override\n public boolean accept(LogData logData, int row) {\n if (logData.getLevel() == null) {\n return true;\n }\n switch (filterMode) {\n case LOWER_OR_EQUAL:\n return logData.getLevel().intValue() <= passLevel;\n case EQUAL:\n return logData.getLevel().intValue(... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_199 | {
"fields": [
{
"declarator": "underTest = new QuerySuggestionSource(new ArrayList<>(0))",
"modifier": "private",
"original_string": "private QuerySuggestionSource underTest = new QuerySuggestionSource(new ArrayList<>(0));",
"type": "QuerySuggestionSource",
"var_name": "underTest"
... | {
"body": "@Test(enabled = false)\n public void testGetSuggestions() throws Exception {\n Assert.fail(\"Not implemented\");\n }",
"class_method_signature": "QuerySuggestionSourceTest.testGetSuggestions()",
"constructor": false,
"full_signature": "@Test(enabled = false) public void testGetSuggestions()",
... | {
"fields": [
{
"declarator": "operators = Splitter.on(\" \").splitToList(\"!= == ~= like exists < > <= >=\")",
"modifier": "private final",
"original_string": "private final List<String> operators = Splitter.on(\" \").splitToList(\"!= == ~= like exists < > <= >=\");",
"type": "List<String... | {
"body": "@Override\n public List<SearchSuggestion> getSuggestions(SuggestionQuery q) {\n String s = q.getValue();\n if (s.trim().length() == 0) {\n final List<SearchSuggestion> fields = this.fields.stream().map(f -> new SearchSuggestion(f, f + \" \")).collect(Collectors.toList());\n final List<Sear... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_176 | {
"fields": [
{
"declarator": "formatter = new SoapMessageFormatter()",
"modifier": "private final",
"original_string": "private final SoapMessageFormatter formatter = new SoapMessageFormatter();",
"type": "SoapMessageFormatter",
"var_name": "formatter"
}
],
"file": "OtrosLog... | {
"body": "@Test\n\tpublic void testRemoveMultiRefs() throws Exception {\n\t\t//given\n\t\tString soap = IOUtils.toString(this.getClass().getClassLoader().getResourceAsStream(\"soap/soapWithMultiref.xml\"));\n\t\tString expected = IOUtils.toString(this.getClass().getClassLoader().getResourceAsStream(\"soap/soapWithMu... | {
"fields": [
{
"declarator": "REMOVE_NIL_PATTERN = \"(<\\\\w+)( [^>]*?xsi:nil=\\\"true\\\".*?)(/>)\"",
"modifier": "public static final",
"original_string": "public static final String REMOVE_NIL_PATTERN = \"(<\\\\w+)( [^>]*?xsi:nil=\\\"true\\\".*?)(/>)\";",
"type": "String",
"var_n... | {
"body": "public String removeMultiRefs(String message) {\n HashMap<String, SubText> multiRefDefinition = extractMultiRef(message, PATTERN_MULTIREF_DEFINITION, PATTERN_MULTIREF_DEFINITION_GROUP_ID, 0);\n HashMap<String, SubText> multiRefTagNames = extractMultiRef(message, PATTERN_MULTIREF_DEFINITION, PATTERN_M... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_26 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/filter/RegexFilterTest.java",
"identifier": "RegexFilterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testMessageRejectCaseInsensitive(){\n\t\tassertFalse(createFilter(\"ala\\\\*a\", false).accept(new LogDataBuilder().withMessage(\"Kot ma ale\").build(), 1));\n\t}",
"class_method_signature": "RegexFilterTest.testMessageRejectCaseInsensitive()",
"constructor": false,
"full_signatu... | {
"fields": [
{
"declarator": "NAME = \"Regex filter\"",
"modifier": "private static final",
"original_string": "private static final String NAME = \"Regex filter\";",
"type": "String",
"var_name": "NAME"
},
{
"declarator": "DESCRIPTION = \"Filtering events based on a r... | {
"body": "@Override\n public boolean accept(LogData logData, int row) {\n if (patternOk && condition.length() > 0) {\n return pattern.matcher(logData.getMessage()).find();\n }\n return condition.length() == 0 || !patternOk;\n }",
"class_method_signature": "RegexFilter.accept(LogData logData, int ro... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_160 | {
"fields": [
{
"declarator": "formatted4x = \"tickets {\\n\" +\n \" \\\"tickets\\\": {\\n\" +\n \" \\\"city\\\": \\\"Sacramento\\\",\\n\" +\n \" \\\"date\\\": \\\"2014-10-23\\\"\\n\" +\n \" }\\n\" +\n \"}\"",
"modifier": "priv... | {
"body": "@Test(dataProvider = \"formattingNeeded\")\n public void testFormattingNeeded(String input,boolean expected, String message) throws Exception {\n Assert.assertEquals(underTest.formattingNeeded(input),expected,message);\n }",
"class_method_signature": "JsonMessageFormatterTest.testFormattingN... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(JsonMessageFormatter.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(JsonMessageFormatter.class.getName());",
"type": "Logger",
"var... | {
"body": "@Override\n public boolean formattingNeeded(String message) {\n return jsonFinder.findJsonFragments(message).size() > 0;\n }",
"class_method_signature": "JsonMessageFormatter.formattingNeeded(String message)",
"constructor": false,
"full_signature": "@Override public boolean formattingNeeded(Str... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_71 | {
"fields": [
{
"declarator": "KEY1 = \"testProp1\"",
"modifier": "private static final",
"original_string": "private static final String KEY1 = \"testProp1\";",
"type": "String",
"var_name": "KEY1"
},
{
"declarator": "KEY2 = \"testProp2\"",
"modifier": "private s... | {
"body": "@Test\n public void testFillValues() {\n //given\n Properties p = new Properties();\n p.setProperty(\"a\",\"b\");\n p.setProperty(\"c\",\"d\");\n HashMap<String, String> map = new HashMap<>();\n\n //when\n erdc.fillValues(map, p);\n\n //then\n assertEquals(map.get(PREFIX+\"a\"), \"... | {
"fields": [
{
"declarator": "PREFIX = \"SYSTEM_PROPERTIES:\"",
"modifier": "static final",
"original_string": "static final String PREFIX = \"SYSTEM_PROPERTIES:\";",
"type": "String",
"var_name": "PREFIX"
}
],
"file": "OtrosLogViewer-app/src/main/java/pl/otros/logview/excep... | {
"body": "void fillValues(Map<String, String> map, Properties properties) {\n for (Object keyObject : properties.keySet()) {\n String key = keyObject.toString();\n String property = properties.getProperty(key);\n if (!key.toLowerCase().matches(\".*(user\\\\.|password).*\")) {\n map.put(PREFI... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_137 | {
"fields": [
{
"declarator": "builder = new LogDataBuilder()",
"modifier": "private",
"original_string": "private LogDataBuilder builder = new LogDataBuilder();",
"type": "LogDataBuilder",
"var_name": "builder"
}
],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/... | {
"body": "@Test\n public void testAddCallerDataWithoutData() throws Exception {\n //given\n final StackTraceElement[] stackTrace = new Exception(\"Some exception\").getStackTrace();\n final ILoggingEvent mock = mock(ILoggingEvent.class);\n when(mock.hasCallerData()).thenReturn(false);\n\n //when\n ... | {
"fields": [],
"file": "OtrosLogViewer-app/src/main/java/pl/otros/logview/importer/logback/LogbackUtil.java",
"identifier": "LogbackUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "LogbackUtil.translate(ILoggingEvent ev)",
"constructor": false,
"full_signature": "publi... | {
"body": "public static void addCallerData(ILoggingEvent ev, LogDataBuilder builder) {\n if (ev.hasCallerData()) {\n final StackTraceElement[] callerData = ev.getCallerData();\n if (callerData.length > 0) {\n final StackTraceElement stackTraceElement = callerData[0];\n builder.withClass(st... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_136 | {
"fields": [
{
"declarator": "builder = new LogDataBuilder()",
"modifier": "private",
"original_string": "private LogDataBuilder builder = new LogDataBuilder();",
"type": "LogDataBuilder",
"var_name": "builder"
}
],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/... | {
"body": "@Test\n public void testAddCallerData() throws Exception {\n //given\n final StackTraceElement[] stackTrace = new Throwable().getStackTrace();\n final ILoggingEvent mock = mock(ILoggingEvent.class);\n when(mock.hasCallerData()).thenReturn(true);\n when(mock.getCallerData()).thenReturn(stack... | {
"fields": [],
"file": "OtrosLogViewer-app/src/main/java/pl/otros/logview/importer/logback/LogbackUtil.java",
"identifier": "LogbackUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "LogbackUtil.translate(ILoggingEvent ev)",
"constructor": false,
"full_signature": "publi... | {
"body": "public static void addCallerData(ILoggingEvent ev, LogDataBuilder builder) {\n if (ev.hasCallerData()) {\n final StackTraceElement[] callerData = ev.getCallerData();\n if (callerData.length > 0) {\n final StackTraceElement stackTraceElement = callerData[0];\n builder.withClass(st... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_70 | {
"fields": [
{
"declarator": "KEY1 = \"testProp1\"",
"modifier": "private static final",
"original_string": "private static final String KEY1 = \"testProp1\";",
"type": "String",
"var_name": "KEY1"
},
{
"declarator": "KEY2 = \"testProp2\"",
"modifier": "private s... | {
"body": "@Test\n public void testCollect() {\n //given\n //when\n Map<String, String> collect = erdc.collect(null);\n\n //then\n assertEquals(collect.get(PREFIX+KEY1), \"value1\");\n assertEquals(collect.get(PREFIX+KEY2), \"value2\");\n }",
"class_method_signature": "SystemPropertiesERDCTest.t... | {
"fields": [
{
"declarator": "PREFIX = \"SYSTEM_PROPERTIES:\"",
"modifier": "static final",
"original_string": "static final String PREFIX = \"SYSTEM_PROPERTIES:\";",
"type": "String",
"var_name": "PREFIX"
}
],
"file": "OtrosLogViewer-app/src/main/java/pl/otros/logview/excep... | {
"body": "@Override\n public Map<String, String> collect(ErrorReportCollectingContext context) {\n Map<String, String> r = new HashMap<>();\n Properties properties = System.getProperties();\n fillValues(r, properties);\n return r;\n }",
"class_method_signature": "SystemPropertiesERDC.collect(ErrorRep... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_161 | {
"fields": [
{
"declarator": "formatted4x = \"tickets {\\n\" +\n \" \\\"tickets\\\": {\\n\" +\n \" \\\"city\\\": \\\"Sacramento\\\",\\n\" +\n \" \\\"date\\\": \\\"2014-10-23\\\"\\n\" +\n \" }\\n\" +\n \"}\"",
"modifier": "priv... | {
"body": "@Test(dataProvider = \"formatData\")\n public void testFormat(String input, String expected, String description) throws Exception {\n final String format = underTest.format(input);\n System.out.println(\"formatted:\\n\" + format);\n\n Assert.assertEquals(format, expected, descriptio... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(JsonMessageFormatter.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(JsonMessageFormatter.class.getName());",
"type": "Logger",
"var... | {
"body": "@Override\n public String format(String message) {\n final ArrayList<SubText> jsonFragments = jsonFinder.findJsonFragments(message);\n StringBuilder sb = new StringBuilder();\n int lastEnd = 0;\n for (SubText jsonFragment : jsonFragments) {\n sb.append(message.substring(lastEnd, jsonFragm... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_27 | {
"fields": [
{
"declarator": "filter = new ClassLikeFilter(\"\", \"\") {\n\n @Override\n public Function<LogData, String> extractValueFunction() {\n return logData -> logData.getLoggerName();\n }\n }",
"modifier": "private",
"original_string": "private ClassLikeFilter filter = ne... | {
"body": "@Test\n public void testPreparePackagesNodes() throws Exception {\n //given\n final HashSet<String> clazzes = new HashSet<>(Arrays.asList(\"a.b.C\", \"a.b.D\", \"c.d.A\", \"A\"));\n\n //when\n final TreeSet<String> packages = filter.preparePackagesNodes(clazzes);\n\n //then\n assertEqual... | {
"fields": [
{
"declarator": "tree",
"modifier": "private",
"original_string": "private JTree tree;",
"type": "JTree",
"var_name": "tree"
},
{
"declarator": "rootNode",
"modifier": "private",
"original_string": "private DefaultMutableTreeNode rootNode;",
... | {
"body": "protected TreeSet<String> preparePackagesNodes(Set<String> classesSet) {\n TreeSet<String> packages = new TreeSet<>();\n for (String string : classesSet) {\n Clazz clazz = new Clazz(string);\n String pack = clazz.pack;\n int start = 0;\n while (start < pack.length()) {\n in... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_198 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/gui/suggestion/SearchHistorySerializationTest.java",
"identifier": "SearchHistorySerializationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDeserializer() throws Exception {\n String data = \"[\\n\" +\n \" {\\n\" +\n \" \\\"query\\\": \\\"s+\\\",\\n\" +\n \" \\\"searchMode\\\": \\\"REGEX\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"query\\\": \\\"text\\\",\\n... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(SearchHistorySerialization.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SearchHistorySerialization.class.getName());",
"type": "Logger"... | {
"body": "Deserializer<ArrayList<SearchHistory>, String> deserializer() {\n return deserializer;\n }",
"class_method_signature": "SearchHistorySerialization.deserializer()",
"constructor": false,
"full_signature": " Deserializer<ArrayList<SearchHistory>, String> deserializer()",
"identifier": "deserializ... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_177 | {
"fields": [
{
"declarator": "formatter = new SoapMessageFormatter()",
"modifier": "private final",
"original_string": "private final SoapMessageFormatter formatter = new SoapMessageFormatter();",
"type": "SoapMessageFormatter",
"var_name": "formatter"
}
],
"file": "OtrosLog... | {
"body": "@Test\n public void removeXsiFromNulls() throws Exception {\n //given\n String soap = IOUtils.toString(this.getClass().getClassLoader().getResourceAsStream(\"soap/soapWithNull.xml\"));\n String expected = IOUtils.toString(this.getClass().getClassLoader().getResourceAsStream(\"soap/soapWithNull.fo... | {
"fields": [
{
"declarator": "REMOVE_NIL_PATTERN = \"(<\\\\w+)( [^>]*?xsi:nil=\\\"true\\\".*?)(/>)\"",
"modifier": "public static final",
"original_string": "public static final String REMOVE_NIL_PATTERN = \"(<\\\\w+)( [^>]*?xsi:nil=\\\"true\\\".*?)(/>)\";",
"type": "String",
"var_n... | {
"body": "public String removeXsiFromNulls(String xml) {\n Pattern p = Pattern.compile(REMOVE_NIL_PATTERN);\n Matcher matcher = p.matcher(xml);\n if (matcher.find()) {\n return matcher.replaceAll(REMOVE_NIL_REPLACE_PATTERN);\n }\n return xml;\n }",
"class_method_signature": "SoapMessageFormatt... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_31 | {
"fields": [
{
"declarator": "d = null",
"modifier": "private",
"original_string": "private PluginableElementsContainer<PluginableElement> d = null;",
"type": "PluginableElementsContainer<PluginableElement>",
"var_name": "d"
},
{
"declarator": "s = null",
"modifi... | {
"body": "@Test\n public void testSynchronizePluginableContainerListener() {\n assertEquals(d, s.destination);\n }",
"class_method_signature": "SynchronizePluginableContainerListenerTest.testSynchronizePluginableContainerListener()",
"constructor": false,
"full_signature": "@Test public void testSynchroni... | {
"fields": [
{
"declarator": "destination",
"modifier": "protected",
"original_string": "protected PluginableElementsContainer<T> destination;",
"type": "PluginableElementsContainer<T>",
"var_name": "destination"
}
],
"file": "OtrosLogViewer-app/src/main/java/pl/otros/logvie... | {
"body": "public SynchronizePluginableContainerListener(PluginableElementsContainer<T> destination) {\n this.destination = destination;\n }",
"class_method_signature": "SynchronizePluginableContainerListener.SynchronizePluginableContainerListener(PluginableElementsContainer<T> destination)",
"constructor": t... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_120 | {
"fields": [
{
"declarator": "LOG_EVENT_COUNT = 1000",
"modifier": "public static final",
"original_string": "public static final int LOG_EVENT_COUNT = 1000;",
"type": "int",
"var_name": "LOG_EVENT_COUNT"
},
{
"declarator": "TEST_THREAD_POOL_NAME = \"TestThreadPoolName... | {
"body": "@Test\n public void testGetNote() throws Exception {\n for (int i = 0; i < LOG_EVENT_COUNT; i++) {\n AssertJUnit.assertEquals(\"Note\" + i, store.getNote(i).getNote());\n }\n }",
"class_method_signature": "MemoryAsyncLogDataStoreTest.testGetNote()",
"constructor": false,
"full_signature"... | {
"fields": [
{
"declarator": "logDataStore",
"modifier": "private final",
"original_string": "private final LogDataStore logDataStore;",
"type": "LogDataStore",
"var_name": "logDataStore"
},
{
"declarator": "service",
"modifier": "private final",
"original_... | {
"body": "@Override\n public Note getNote(int row) {\n return runCallableInDedicatedThread(new OperationGetNote(logDataStore, row));\n }",
"class_method_signature": "MemoryAsyncLogDataStore.getNote(int row)",
"constructor": false,
"full_signature": "@Override public Note getNote(int row)",
"identifier":... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_209 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/gui/actions/ShowCallHierarchyActionTest.java",
"identifier": "ShowCallHierarchyActionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testTheSameLogMethod() {\n ShowCallHierarchyAction action = new ShowCallHierarchyAction(null, null, null);\n LogData ld1 = new LogDataBuilder().withId(1).withClass(\"a.b.c\").withMethod(\"a\").build();\n LogData ld2 = new LogDataBuilder().withId(1).withClass(\"a.b.c\").withMet... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(ShowCallHierarchyAction.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ShowCallHierarchyAction.class.getName());",
"type": "Logger",
... | {
"body": "protected boolean theSameLogMethod(LogData ld1, LogData ld2) {\n return StringUtils.equals(ld1.getClazz(), ld2.getClazz()) && StringUtils.equals(ld1.getMethod(), ld2.getMethod());\n }",
"class_method_signature": "ShowCallHierarchyAction.theSameLogMethod(LogData ld1, LogData ld2)",
"constructor": fa... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_89 | {
"fields": [
{
"declarator": "ver2 = new LogDataListPersistanceVer2()",
"modifier": "private",
"original_string": "private LogDataListPersistanceVer2 ver2 = new LogDataListPersistanceVer2();",
"type": "LogDataListPersistanceVer2",
"var_name": "ver2"
}
],
"file": "OtrosLogVie... | {
"body": "@Test\n public void testLogDataWithoutPropertiesColumn() throws IOException {\n InputStream in = this.getClass().getClassLoader().getResourceAsStream(\"persistance/logs_without_properties_column.txt\");\n List<LogData> loadLogsList = ver2.loadLogsList(in);\n\n AssertJUnit.assertEquals(40, loadLog... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(LogDataListPersistanceVer2.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(LogDataListPersistanceVer2.class.getName());",
"type": "Logger"... | {
"body": "public List<LogData> loadLogsList(InputStream in) throws IOException {\n BufferedReader bin = new BufferedReader(new InputStreamReader(in, \"UTF-8\"));\n String line = bin.readLine();\n String[] split = line.split(FIELD_SEPERATOR_TO_SPLIT);\n HashMap<String, Integer> fieldMapping = new HashMap<... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_66 | {
"fields": [
{
"declarator": "runtimeInfoERDC",
"modifier": "private",
"original_string": "private RuntimeInfoERDC runtimeInfoERDC;",
"type": "RuntimeInfoERDC",
"var_name": "runtimeInfoERDC"
}
],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/exceptionshandler/er... | {
"body": "@Test\n public void testFullPattern() {\n AssertJUnit.assertEquals(\"4:02:10\", runtimeInfoERDC.formatTimeDuration(((4 * 60 + 2) * 60 + 10) * 1000l));\n }",
"class_method_signature": "RuntimeInfoERDCTest.testFullPattern()",
"constructor": false,
"full_signature": "@Test public void testF... | {
"fields": [
{
"declarator": "MEMORY_MAX = \"RUNTIME:memory.max\"",
"modifier": "private static final",
"original_string": "private static final String MEMORY_MAX = \"RUNTIME:memory.max\";",
"type": "String",
"var_name": "MEMORY_MAX"
},
{
"declarator": "MEMORY_FREE = \... | {
"body": "protected String formatTimeDuration(final long timeInMs) {\n long timeInS = timeInMs / 1000;\n String upTimeFormatted = String.format(\"%d:%02d:%02d\", timeInS / 3600, (timeInS % 3600) / 60, (timeInS % 60));\n return upTimeFormatted;\n }",
"class_method_signature": "RuntimeInfoERDC.formatTimeDu... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_225 | {
"fields": [],
"file": "OtrosStarter/src/test/java/pl/otros/starter/JavaVersionTest.java",
"identifier": "JavaVersionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"fromString\")\n public void testFromString(String string, JavaVersion version) throws Exception {\n assertEquals(JavaVersion.fromString(string),version);\n }",
"class_method_signature": "JavaVersionTest.testFromString(String string, JavaVersion version)",
"constructor": fals... | {
"fields": [
{
"declarator": "version",
"modifier": "private",
"original_string": "private int version;",
"type": "int",
"var_name": "version"
},
{
"declarator": "major",
"modifier": "private",
"original_string": "private int major;",
"type": "int",
... | {
"body": "public static JavaVersion fromString(String s) {\n final Pattern pattern = Pattern.compile(\"(\\\\d+)\\\\.(\\\\d+)\\\\.(\\\\d+).*\");\n final Matcher matcher = pattern.matcher(s);\n final boolean b = matcher.find();\n if (b) {\n return new JavaVersion(\n Integer.parseInt(matcher.gro... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_213 | {
"fields": [
{
"declarator": "logData",
"modifier": "private",
"original_string": "private LogData logData;",
"type": "LogData",
"var_name": "logData"
},
{
"declarator": "logDataUpperCase",
"modifier": "private",
"original_string": "private LogData logDataU... | {
"body": "@Test\n public void testMatchesIgnoreCase() {\n assertEquals(true, matcher.matches(logDataUpperCase));\n }",
"class_method_signature": "StringContainsSearchMatcherTest.testMatchesIgnoreCase()",
"constructor": false,
"full_signature": "@Test public void testMatchesIgnoreCase()",
"identifier": "... | {
"fields": [
{
"declarator": "searchChar",
"modifier": "private final",
"original_string": "private final String searchChar;",
"type": "String",
"var_name": "searchChar"
}
],
"file": "OtrosLogViewer-app/src/main/java/pl/otros/logview/gui/actions/search/StringContainsSearchMa... | {
"body": "@Override\n public boolean matches(LogData logData) {\n return StringUtils.contains(StringUtils.lowerCase(logData.getMessage()), searchChar);\n }",
"class_method_signature": "StringContainsSearchMatcher.matches(LogData logData)",
"constructor": false,
"full_signature": "@Override public boolean ... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_93 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/api/importer/PossibleLogImportersTest.java",
"identifier": "PossibleLogImportersTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAddMissing() {\n //given\n final PossibleLogImporters possibleLogImporters = new PossibleLogImporters();\n possibleLogImporters.getAvailableImporters().addAll(Arrays.asList(\n new Log4jXmlLogImporter()\n ));\n\n final List<LogImporter> toAdd = Arrays.asList(\n ... | {
"fields": [
{
"declarator": "logImporter = Optional.empty()",
"modifier": "private",
"original_string": "private Optional<LogImporter> logImporter = Optional.empty();",
"type": "Optional<LogImporter>",
"var_name": "logImporter"
},
{
"declarator": "availableImporters =... | {
"body": "public void addMissing(List<LogImporter> toAdd) {\n\n final Map<String, LogImporter> availableMap = availableImporters\n .stream()\n .collect(Collectors.toMap(PluginableElement::getPluginableId, li -> li));\n\n toAdd\n .stream()\n .filter(li -> !availableMap.containsKey(li.getPlug... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_182 | {
"fields": [
{
"declarator": "dataTableModel",
"modifier": "private",
"original_string": "private LogDataTableModel dataTableModel;",
"type": "LogDataTableModel",
"var_name": "dataTableModel"
},
{
"declarator": "filteredTableModel",
"modifier": "private",
"... | {
"body": "@Test\n public void testConvertViewToModel() {\n filteredTableModel.addFilter(new AbstractLogFilter(\"A\", \"B\") {\n\n @Override\n public JComponent getGUI() {\n return null;\n }\n\n @Override\n public boolean accept(LogData logData, int row) {\n return row % 2 =... | {
"fields": [
{
"declarator": "logDataTableModel",
"modifier": "private final",
"original_string": "private final LogDataTableModel logDataTableModel;",
"type": "LogDataTableModel",
"var_name": "logDataTableModel"
},
{
"declarator": "appliedFilters",
"modifier": "... | {
"body": "public int convertViewToModel(int row) {\n return viewToModel[row];\n }",
"class_method_signature": "FilteredTableModel.convertViewToModel(int row)",
"constructor": false,
"full_signature": "public int convertViewToModel(int row)",
"identifier": "convertViewToModel",
"invocations": [],
"mod... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_194 | {
"fields": [
{
"declarator": "TIPS_SIZE = 1000",
"modifier": "private static final",
"original_string": "private static final int TIPS_SIZE = 1000;",
"type": "int",
"var_name": "TIPS_SIZE"
},
{
"declarator": "tipsModel = null",
"modifier": "private",
"origi... | {
"body": "@Test\n public void testGetTipCount() {\n AssertJUnit.assertEquals(TIPS_SIZE, tipsModel.getTipCount());\n }",
"class_method_signature": "RandomTipOfTheDayModelTest.testGetTipCount()",
"constructor": false,
"full_signature": "@Test public void testGetTipCount()",
"identifier": "testGetTipCount"... | {
"fields": [
{
"declarator": "model",
"modifier": "private final",
"original_string": "private final TipOfTheDayModel model;",
"type": "TipOfTheDayModel",
"var_name": "model"
},
{
"declarator": "randomMapping",
"modifier": "private final",
"original_string"... | {
"body": "@Override\n public int getTipCount() {\n return model.getTipCount();\n }",
"class_method_signature": "RandomTipOfTheDayModel.getTipCount()",
"constructor": false,
"full_signature": "@Override public int getTipCount()",
"identifier": "getTipCount",
"invocations": [
"getTipCount"
],
"m... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_85 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/api/store/MemoryLogDataStoreTest.java",
"identifier": "MemoryLogDataStoreTest",
"interfaces": "",
"superclass": "extends LogDataStoreTestBase"
} | {
"body": "@Test\n public void testGetIndexToInsert() {\n // given\n MemoryLogDataStore memoryLogDataStore = (MemoryLogDataStore) logDataStore;\n for (int i = 0; i < 100; i++) {\n logDataStore.add(new LogDataBuilder().withId(i).withDate(new Date(i)).build());\n }\n\n // when\n int indexToInser... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(MemoryLogDataStore.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(MemoryLogDataStore.class.getName());",
"type": "Logger",
"var_nam... | {
"body": "protected int getIndexToInsert(Date date, final int downLimit, final int upLimit, int startAt) {\n int startPoint = startAt;\n int effectiveDownLimit = downLimit;\n Date dateInList = list.get(startPoint).getDate();\n int compareTo = date.compareTo(dateInList);\n int effectiveUpLimit = upLimi... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_205 | {
"fields": [
{
"declarator": "xpaths = new HashSet<>(Arrays.asList(\"ala\", \"aba\", \"all\"))",
"modifier": "private final",
"original_string": "private final HashSet<String> xpaths = new HashSet<>(Arrays.asList(\"ala\", \"aba\", \"all\"));",
"type": "HashSet<String>",
"var_name": ... | {
"body": "@Test(dataProvider = \"suggestionForTypeJson\")\n public void suggestionsForTypeJson(String line, int position, List<BasicSuggestion> expected) {\n //given\n final JsonXpathSuggestionSource underTest = new JsonXpathSuggestionSource();\n underTest.setJsonPaths(xpaths);\n\n //when\n final Lis... | {
"fields": [
{
"declarator": "JSON = \"json\"",
"modifier": "public static final",
"original_string": "public static final String JSON = \"json\";",
"type": "String",
"var_name": "JSON"
},
{
"declarator": "keys",
"modifier": "private final",
"original_strin... | {
"body": "protected List<BasicSuggestion> suggestionsForTypeJson(String line, int position) {\n final String substring1 = line.substring(0, position);\n final String substring = substring1.replaceFirst(\".*?=\", \"\").trim();\n final String toInsert = StringUtils.removeStart(JSON, substring);\n return Co... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_11 | {
"fields": [
{
"declarator": "LOGGER = java.util.logging.Logger.getLogger(AuthStoreUtilsTest.class.getName())",
"modifier": "private static final",
"original_string": "private static final java.util.logging.Logger LOGGER = java.util.logging.Logger.getLogger(AuthStoreUtilsTest.class.getName());"... | {
"body": "@Test\n public void testEncrypt() throws IllegalBlockSizeException, InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, BadPaddingException, UnsupportedEncodingException {\n //given\n \n String password = \"alma\";\n String message = \"text\";\n\n //when\n byte[] encod... | {
"fields": [
{
"declarator": "LOGGER = java.util.logging.Logger.getLogger(AuthStoreUtils.class.getName())",
"modifier": "private static final",
"original_string": "private static final java.util.logging.Logger LOGGER = java.util.logging.Logger.getLogger(AuthStoreUtils.class.getName());",
... | {
"body": "protected byte[] encrypt(char[] bytes, char[] password) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException,\n IllegalBlockSizeException, BadPaddingException, UnsupportedEncodingException {\n byte[] passBytes = charsToBytes(password);\n SecretKeySpec secretKeySpec = new ... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_157 | {
"fields": [
{
"declarator": "underTest = new JsonFinder()",
"modifier": "private final",
"original_string": "private final JsonFinder underTest = new JsonFinder();",
"type": "JsonFinder",
"var_name": "underTest"
}
],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logvie... | {
"body": "@Test(dataProvider = \"testFindJsonFragments\")\n public void testFindJsonFragments(String string, List<SubText> expected) throws Exception {\n //when\n final ArrayList<SubText> jsonFragments = underTest.findJsonFragments(string);\n\n //then\n Assert.assertEquals(jsonFragment... | {
"fields": [],
"file": "OtrosLogViewer-app/src/main/java/pl/otros/logview/gui/message/json/JsonFinder.java",
"identifier": "JsonFinder",
"interfaces": "",
"methods": [
{
"class_method_signature": "JsonFinder.findJsonFragments(String string)",
"constructor": false,
"full_signature": "pub... | {
"body": "public ArrayList<SubText> findJsonFragments(String string) {\n final List<Integer> ints = countParenthesis(string);\n return getSubTexts(ints);\n }",
"class_method_signature": "JsonFinder.findJsonFragments(String string)",
"constructor": false,
"full_signature": "public ArrayList<SubText> find... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_46 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/accept/query/org/apache/log4j/rule/PartialTextMatchRuleTest.java",
"identifier": "PartialTextMatchRuleTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test1() {\n\tStack<Object> stack = new Stack<>();\n\tstack.push(\"Hello\");\n\ttry {\n\t PartialTextMatchRule.getRule(stack);\n\t Assert.fail(\"Should have thrown IllegalArgumentException\");\n\t} catch (IllegalArgumentException ignored) {\n\t}\n }",
"class_method_signatur... | {
"fields": [
{
"declarator": "serialVersionUID = 6963284773637727558L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 6963284773637727558L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "RESOL... | {
"body": "public static Rule getRule(final String field, final String value) {\n return new PartialTextMatchRule(field, value);\n }",
"class_method_signature": "PartialTextMatchRule.getRule(final String field, final String value)",
"constructor": false,
"full_signature": "public static Rule getRule(final S... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_100 | {
"fields": [
{
"declarator": "dataTableModel",
"modifier": "public",
"original_string": "public LogDataTableModel dataTableModel;",
"type": "LogDataTableModel",
"var_name": "dataTableModel"
},
{
"declarator": "logDatas",
"modifier": "public",
"original_stri... | {
"body": "@Test\n public void testGetMarkerColors() {\n AssertJUnit.assertEquals(MarkerColors.Brown, dataTableModel.getMarkerColors(4));\n AssertJUnit.assertEquals(MarkerColors.Orange, dataTableModel.getMarkerColors(6));\n }",
"class_method_signature": "LogDataTableModelTest.testGetMarkerColors()",
"cons... | {
"fields": [
{
"declarator": "EMPTY_STRING = \"\"",
"modifier": "private static final",
"original_string": "private static final String EMPTY_STRING = \"\";",
"type": "String",
"var_name": "EMPTY_STRING"
},
{
"declarator": "LOGGER = LoggerFactory.getLogger(LogDataTable... | {
"body": "@Override\n public MarkerColors getMarkerColors(int row) {\n return logDataStore.getMarkerColors(row);\n }",
"class_method_signature": "LogDataTableModel.getMarkerColors(int row)",
"constructor": false,
"full_signature": "@Override public MarkerColors getMarkerColors(int row)",
"identifier": "... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_7 | {
"fields": [],
"file": "OtrosVfsBrowser/src/test/java/pl/otros/vfs/browser/table/VfsTableModelFileNameRowFilterTest.java",
"identifier": "VfsTableModelFileNameRowFilterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"testCheckIfIncludeDataProvider\")\n public void testCheckIfInclude(String baseName, String patternText, boolean expected) throws Exception {\n //given\n VfsTableModelFileNameRowFilter rowFilter = new VfsTableModelFileNameRowFilter(null);\n\n //when\n boolean result = row... | {
"fields": [
{
"declarator": "LOGGER =\n LoggerFactory.getLogger(VfsTableModelFileNameRowFilter.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER =\n LoggerFactory.getLogger(VfsTableModelFileNameRowFilter.class);",
"type": "L... | {
"body": "boolean checkIfInclude(String baseName, String patternText) {\n Optional<Pattern> pattern = Optional.empty();\n try {\n String patternString = preparePatternString(patternText);\n pattern = Optional.of(Pattern.compile(patternString));\n } catch (PatternSyntaxException pse) {\n LOGGE... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_50 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/accept/query/org/apache/log4j/rule/TimestampEqualsRuleTest.java",
"identifier": "TimestampEqualsRuleTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test5() {\n try {\n TimestampEqualsRule.getRule(\"2008/May/21\");\n Assert.fail(\"IllegalArgumentException expected to be thrown\");\n } catch (IllegalArgumentException ignored) {\n }\n }",
"class_method_signature": "TimestampEqualsRuleTest.test5()",
"constructo... | {
"fields": [
{
"declarator": "SECOND = 1000",
"modifier": "private static final",
"original_string": "private static final long SECOND = 1000;",
"type": "long",
"var_name": "SECOND"
},
{
"declarator": "MINUTE = 60 * SECOND",
"modifier": "private static final",
... | {
"body": "public static Rule getRule(final String value) {\n return new TimestampEqualsRule(value);\n }",
"class_method_signature": "TimestampEqualsRule.getRule(final String value)",
"constructor": false,
"full_signature": "public static Rule getRule(final String value)",
"identifier": "getRule",
"invo... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_116 | {
"fields": [
{
"declarator": "LOG_EVENT_COUNT = 1000",
"modifier": "public static final",
"original_string": "public static final int LOG_EVENT_COUNT = 1000;",
"type": "int",
"var_name": "LOG_EVENT_COUNT"
},
{
"declarator": "TEST_THREAD_POOL_NAME = \"TestThreadPoolName... | {
"body": "@Test\n public void testSetLimit() throws Exception {\n store.setLimit(100);\n AssertJUnit.assertEquals(100, store.getCount());\n }",
"class_method_signature": "MemoryAsyncLogDataStoreTest.testSetLimit()",
"constructor": false,
"full_signature": "@Test public void testSetLimit()",
"identifi... | {
"fields": [
{
"declarator": "logDataStore",
"modifier": "private final",
"original_string": "private final LogDataStore logDataStore;",
"type": "LogDataStore",
"var_name": "logDataStore"
},
{
"declarator": "service",
"modifier": "private final",
"original_... | {
"body": "@Override\n public void setLimit(int limit) {\n service.submit(new OperationSetLimit(logDataStore, limit));\n }",
"class_method_signature": "MemoryAsyncLogDataStore.setLimit(int limit)",
"constructor": false,
"full_signature": "@Override public void setLimit(int limit)",
"identifier": "setLimi... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_141 | {
"fields": [
{
"declarator": "builder = new LogDataBuilder()",
"modifier": "private",
"original_string": "private LogDataBuilder builder = new LogDataBuilder();",
"type": "LogDataBuilder",
"var_name": "builder"
}
],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/... | {
"body": "@Test(dataProvider = \"levels\")\n public void testConvertLevel(ch.qos.logback.classic.Level logback, Level level)\n throws Exception {\n assertEquals(LogbackUtil.convertLevel(logback), level, \"Level \" + logback + \" should be translated to \" + level);\n }",
"class_method_signature": "LogbackU... | {
"fields": [],
"file": "OtrosLogViewer-app/src/main/java/pl/otros/logview/importer/logback/LogbackUtil.java",
"identifier": "LogbackUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "LogbackUtil.translate(ILoggingEvent ev)",
"constructor": false,
"full_signature": "publi... | {
"body": "public static Level convertLevel(ch.qos.logback.classic.Level level) {\n\n if (ch.qos.logback.classic.Level.DEBUG_INT == level.toInt()) {\n return Level.FINE;\n } else if (ch.qos.logback.classic.Level.TRACE_INT == level.toInt()) {\n return Level.FINEST;\n } else if (ch.qos.logback.classi... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_222 | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(LoadingRunnableTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(LoadingRunnableTest.class);",
"type": "Logger",
"var_name": "LOGGER"
}... | {
"body": "@Test(invocationCount = 5)\n public void testLoadingWithFilterSetDuringLoadWithLogParser() throws IOException {\n saveLines(Range.closed(0, 1000), julSimpleLogLines, outputStream);\n\n underTest = createLoadingRunnable(getJulLogParser());\n\n executorService.submit(underTest);\n\n await().unti... | {
"fields": [
{
"declarator": "LOGGER = org.slf4j.LoggerFactory.getLogger(LoadingRunnable.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = org.slf4j.LoggerFactory.getLogger(LoadingRunnable.class);",
"type": "Logger",
"var_name": "L... | {
"body": "public synchronized void setFilter(Optional<AcceptCondition> acceptCondition) {\n filteringLogDataCollector.setAcceptCondition(acceptCondition);\n }",
"class_method_signature": "LoadingRunnable.setFilter(Optional<AcceptCondition> acceptCondition)",
"constructor": false,
"full_signature": "public ... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_61 | {
"fields": [
{
"declarator": "logData",
"modifier": "private",
"original_string": "private LogData logData;",
"type": "LogData",
"var_name": "logData"
}
],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/accept/PropertyAcceptConditionTest.java",
"identifier": "P... | {
"body": "@Test\n public void testAccept() throws Exception {\n AssertJUnit.assertTrue(new PropertyAcceptCondition(\"key\",\"value\").accept(logData));\n }",
"class_method_signature": "PropertyAcceptConditionTest.testAccept()",
"constructor": false,
"full_signature": "@Test public void testAccept(... | {
"fields": [
{
"declarator": "propertyKey",
"modifier": "private final",
"original_string": "private final String propertyKey;",
"type": "String",
"var_name": "propertyKey"
},
{
"declarator": "propertyValue",
"modifier": "private final",
"original_string": ... | {
"body": "@Override\n public boolean accept(LogData ld) {\n return ld.getProperties().containsKey(propertyKey) && StringUtils.equals(propertyValue, ld.getProperties().get(propertyKey));\n }",
"class_method_signature": "PropertyAcceptCondition.accept(LogData ld)",
"constructor": false,
"full_signature": "@... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_127 | {
"fields": [
{
"declarator": "LOG_EVENT_COUNT = 1000",
"modifier": "public static final",
"original_string": "public static final int LOG_EVENT_COUNT = 1000;",
"type": "int",
"var_name": "LOG_EVENT_COUNT"
},
{
"declarator": "TEST_THREAD_POOL_NAME = \"TestThreadPoolName... | {
"body": "@Test\n public void testMarkRows() throws Exception {\n //given\n //when\n store.markRows(MarkerColors.Black, 10);\n store.markRows(MarkerColors.Brown, 12);\n //then\n AssertJUnit.assertEquals(MarkerColors.Black, store.getMarkerColors(10));\n AssertJUnit.assertEquals(MarkerColors.Brow... | {
"fields": [
{
"declarator": "logDataStore",
"modifier": "private final",
"original_string": "private final LogDataStore logDataStore;",
"type": "LogDataStore",
"var_name": "logDataStore"
},
{
"declarator": "service",
"modifier": "private final",
"original_... | {
"body": "@Override\n public void markRows(MarkerColors markerColors, int... rows) {\n runCallableInDedicatedThread(new OperationMarkRows(logDataStore, markerColors, rows));\n }",
"class_method_signature": "MemoryAsyncLogDataStore.markRows(MarkerColors markerColors, int... rows)",
"constructor": false,
"f... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_36 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/accept/HigherIdAcceptConditionTest.java",
"identifier": "HigherIdAcceptConditionTest",
"interfaces": "",
"superclass": "extends \nSelectionAwareAcceptConditionTestBase"
} | {
"body": "@Test\n public void testAccept() {\n HigherIdAcceptCondition acceptCondition = new HigherIdAcceptCondition(table, dataTableModel);\n table.getSelectionModel().addListSelectionListener(acceptCondition);\n table.getSelectionModel().setSelectionInterval(3, 3);\n LogData[] logData = dataTableModel... | {
"fields": [
{
"declarator": "id",
"modifier": "protected",
"original_string": "protected int id;",
"type": "int",
"var_name": "id"
}
],
"file": "OtrosLogViewer-app/src/main/java/pl/otros/logview/accept/HigherIdAcceptCondition.java",
"identifier": "HigherIdAcceptCondition"... | {
"body": "@Override\n public boolean accept(LogData data) {\n return data.getId() > id;\n }",
"class_method_signature": "HigherIdAcceptCondition.accept(LogData data)",
"constructor": false,
"full_signature": "@Override public boolean accept(LogData data)",
"identifier": "accept",
"invocations": [
... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_170 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/gui/message/StackTraceColorizerTest.java",
"identifier": "StackTraceColorizerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testColorize() throws IOException, BadLocationException {\n //given\n String string = \"something\\n\" +\n \"java.io.FileNotFoundException: fred.txt //comment\\n\" +\n \"\\tat java.io.FileInputStream.<init>(FileInputStream.java) //code comment \\n\" +\n \"\\tat jav... | {
"fields": [
{
"declarator": "NAME = \"Java stack trace\"",
"modifier": "private static final",
"original_string": "private static final String NAME = \"Java stack trace\";",
"type": "String",
"var_name": "NAME"
},
{
"declarator": "exceptionLine = Pattern.compile(\"(\\... | {
"body": "@Override\n public Collection<MessageFragmentStyle> colorize(String message) throws BadLocationException {\n initStyles();\n Collection<MessageFragmentStyle> list = new ArrayList<>();\n SortedSet<SubText> foundStackTraces = stackTraceFinder.findStackTraces(message);\n for (SubText subText : fo... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_20 | {
"fields": [
{
"declarator": "SECOND = 1000",
"modifier": "private static final",
"original_string": "private static final int SECOND = 1000;",
"type": "int",
"var_name": "SECOND"
},
{
"declarator": "MINUTE = 60 * SECOND",
"modifier": "private static final",
... | {
"body": "@Test(dataProvider = \"data\")\n public void testFormatDelta(int deltaInMs, String expected) {\n final String delta = DateUtil.formatDelta(deltaInMs);\n assertEquals(delta, expected);\n }",
"class_method_signature": "DateUtilTest.testFormatDelta(int deltaInMs, String expected)",
"constructor": ... | {
"fields": [
{
"declarator": "SECOND = 1000",
"modifier": "private static final",
"original_string": "private static final int SECOND = 1000;",
"type": "int",
"var_name": "SECOND"
},
{
"declarator": "MINUTE = 60 * SECOND",
"modifier": "private static final",
... | {
"body": "public static String formatDelta(long deltaInMillis) {\n StringBuilder sb = new StringBuilder();\n if (deltaInMillis < 0) {\n sb.append(\"-\");\n }\n final long abs = Math.abs(deltaInMillis);\n final long millis = abs % SECOND;\n final long seconds = (abs % MINUTE) / SECOND;\n fin... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_189 | {
"fields": [
{
"declarator": "underTest",
"modifier": "private",
"original_string": "private ClassWrapperRenderer underTest;",
"type": "ClassWrapperRenderer",
"var_name": "underTest"
}
],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/gui/renderers/ClassWrapperRe... | {
"body": "@Test\n public void testAbbreviatePackageUsingMappings(){\n //given\n SortedMap<String, String> map = underTest.toMap(\"com.company={D}\\ncom={E}\\ncom.company.package={C}\");\n\n //when\n final String actual = underTest.abbreviatePackageUsingMappings(\"com.company.package.Class\", map);\n\n ... | {
"fields": [
{
"declarator": "stringLengthComparator = (o1, o2) -> {\n int result = o2.length() - o1.length();\n if (result == 0) {\n result = o1.compareTo(o2);\n }\n return result;\n }",
"modifier": "private final",
"original_string": "private final Comparator<String> stringL... | {
"body": "protected String abbreviatePackageUsingMappings(String clazz, SortedMap<String, String> abbreviations) {\n for (String s : abbreviations.keySet()) {\n if (StringUtils.startsWith(clazz,s)) {\n return StringUtils.replaceOnce(clazz, s, abbreviations.get(s));\n }\n }\n return clazz;\n... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_166 | {
"fields": [
{
"declarator": "p = new Properties()",
"modifier": "private",
"original_string": "private Properties p = new Properties();",
"type": "Properties",
"var_name": "p"
},
{
"declarator": "colorizer",
"modifier": "private",
"original_string": "priva... | {
"body": "@Test\n public void testColorize() throws BadLocationException {\n String message = \"a55(a)a\";\n Collection<MessageFragmentStyle> colorize = colorizer.colorize(message);\n assertEquals(2, colorize.size());\n ArrayList<MessageFragmentStyle> list = new ArrayList<>(colorize);\n MessageFragme... | {
"fields": [
{
"declarator": "PROP_TYPE = \"type\"",
"modifier": "public static final",
"original_string": "public static final String PROP_TYPE = \"type\";",
"type": "String",
"var_name": "PROP_TYPE"
},
{
"declarator": "PROP_VERSION = \"version\"",
"modifier": "... | {
"body": "@Override\n public Collection<MessageFragmentStyle> colorize(String message) {\n Collection<MessageFragmentStyle> list = new ArrayList<>();\n StyleContext styleContext = new StyleContext();\n for (int i = 0; i <= groupCount; i++) {\n if (StyleProperties.isStyleForGroupDeclared(i, configurati... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_98 | {
"fields": [
{
"declarator": "dataTableModel",
"modifier": "public",
"original_string": "public LogDataTableModel dataTableModel;",
"type": "LogDataTableModel",
"var_name": "dataTableModel"
},
{
"declarator": "logDatas",
"modifier": "public",
"original_stri... | {
"body": "@Test\n public void testGetLogDataInt() {\n for (int i = 0; i < logDatas.length; i++) {\n LogData logData = dataTableModel.getLogData(i);\n AssertJUnit.assertEquals(logDatas[i], logData);\n }\n }",
"class_method_signature": "LogDataTableModelTest.testGetLogDataInt()",
"constructor": f... | {
"fields": [
{
"declarator": "EMPTY_STRING = \"\"",
"modifier": "private static final",
"original_string": "private static final String EMPTY_STRING = \"\";",
"type": "String",
"var_name": "EMPTY_STRING"
},
{
"declarator": "LOGGER = LoggerFactory.getLogger(LogDataTable... | {
"body": "public LogData getLogData(int row) {\n if (row < 0 || row >= logDataStore.getCount()) {\n return EMPTY_LOG_DATA;\n }\n return logDataStore.getLogData(row);\n }",
"class_method_signature": "LogDataTableModel.getLogData(int row)",
"constructor": false,
"full_signature": "public LogData g... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_218 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/gui/actions/search/FilteredTableNextRowProviderTest.java",
"identifier": "FilteredTableNextRowProviderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testFilteredTable() {\n JTable jTable = new JTable(10, 1);\n TableRowSorter rowSorter = new TableRowSorter(jTable.getModel());\n jTable.setRowSorter(rowSorter);\n RowFilter<TableModel, Integer> rowFilter = new RowFilter<TableModel, Integer>() {\n\n public boolean inclu... | {
"fields": [
{
"declarator": "table",
"modifier": "private final",
"original_string": "private final JTable table;",
"type": "JTable",
"var_name": "table"
},
{
"declarator": "increase",
"modifier": "private final",
"original_string": "private final int incr... | {
"body": "@Override\n public int getNextRow() {\n currentRow += increase;\n\n if (rowsChecked++ >= table.getRowCount()) {\n return -1;\n }\n if (currentRow >= table.getRowCount()) {\n currentRow = 0;\n } else if (currentRow < 0) {\n currentRow = table.getRowCount() - 1;\n }\n int... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_77 | {
"fields": [
{
"declarator": "PORT = 45501",
"modifier": "private static final",
"original_string": "private static final int PORT = 45501;",
"type": "int",
"var_name": "PORT"
},
{
"declarator": "HTTP_GZIPPED = \"http://127.0.0.1:\" + PORT + \"/log.txt.gz\"",
"mo... | {
"body": "@Test\n public void testAverageGzippedFile() throws IOException {\n try (LoadingInfo logFileContent = new LoadingInfo(asFileObject(\"jul_log.txt.gz\"))) {\n assertTrue(logFileContent.isGzipped());\n assertEquals(15_300, asString(logFileContent).length());\n }\n }",
"class_method_signatu... | {
"fields": [
{
"declarator": "friendlyUrl",
"modifier": "private final",
"original_string": "private final String friendlyUrl;",
"type": "String",
"var_name": "friendlyUrl"
},
{
"declarator": "fileObject",
"modifier": "private final",
"original_string": "pr... | {
"body": "public boolean isGzipped() {\n return gzipped;\n }",
"class_method_signature": "LoadingInfo.isGzipped()",
"constructor": false,
"full_signature": "public boolean isGzipped()",
"identifier": "isGzipped",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "boolean",
... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_131 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/loader/LogImportersLoaderTest.java",
"identifier": "LogImportersLoaderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testLoadPropertyFileBased() throws InitializationException, URISyntaxException {\n LogImportersLoader importersLoader = new LogImportersLoader();\n Collection<LogImporter> loadPropertyFileBased = importersLoader.loadPropertyPatternFileFromDir(getFile((\"plugins/logimporters/\")))... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(LogImportersLoader.class.getName())",
"modifier": "public static final",
"original_string": "public static final Logger LOGGER = LoggerFactory.getLogger(LogImportersLoader.class.getName());",
"type": "Logger",
"var_name"... | {
"body": "public Collection<LogImporter> loadPropertyPatternFileFromDir(File dir)\n throws InitializationException {\n ArrayList<LogImporter> logImporters = new ArrayList<>();\n File[] listFiles = dir.listFiles(pathname -> (pathname.isFile() && pathname.getName().endsWith(\"pattern\")));\n if (listFiles ... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_146 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/parser/json/JsonExtractorTest.java",
"identifier": "JsonExtractorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMapToLogData() {\n //given\n final JsonExtractor extractor = new JsonExtractor();\n extractor.init(new Properties());\n DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss,SSS\");\n df.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n System.out.println(df.form... | {
"fields": [
{
"declarator": "VALUES_SEPARATOR = \".\"",
"modifier": "private static final",
"original_string": "private static final String VALUES_SEPARATOR = \".\";",
"type": "String",
"var_name": "VALUES_SEPARATOR"
},
{
"declarator": "LEVEL = \"level\"",
"modi... | {
"body": "protected Optional<LogData> mapToLogData(Map<String, String> map, DateFormat dateParser) {\n LogDataBuilder builder = new LogDataBuilder();\n\n //TODO parsing level based on custom mapping\n builder.withLevel(i18nLevelParser.parse(map.get(propertyLevel).trim()));\n final Optional<String> dateSt... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_111 | {
"fields": [
{
"declarator": "LOG_EVENT_COUNT = 1000",
"modifier": "public static final",
"original_string": "public static final int LOG_EVENT_COUNT = 1000;",
"type": "int",
"var_name": "LOG_EVENT_COUNT"
},
{
"declarator": "TEST_THREAD_POOL_NAME = \"TestThreadPoolName... | {
"body": "@Test(enabled = false)\n public void testFilter() throws Exception {\n Assert.fail(\"not implemented\");\n }",
"class_method_signature": "MemoryAsyncLogDataStoreTest.testFilter()",
"constructor": false,
"full_signature": "@Test(enabled = false) public void testFilter()",
"identifier": "testFil... | {
"fields": [
{
"declarator": "logDataStore",
"modifier": "private final",
"original_string": "private final LogDataStore logDataStore;",
"type": "LogDataStore",
"var_name": "logDataStore"
},
{
"declarator": "service",
"modifier": "private final",
"original_... | {
"body": "@Override\n public ListenableFuture<FilterResult> filter(LogDataFilter filter) {\n //TODO\n return null;\n }",
"class_method_signature": "MemoryAsyncLogDataStore.filter(LogDataFilter filter)",
"constructor": false,
"full_signature": "@Override public ListenableFuture<FilterResult> filter(LogD... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_57 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/accept/query/org/apache/log4j/rule/LevelInequalityRuleTest.java",
"identifier": "LevelInequalityRuleTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test2() {\n Rule rule = LevelInequalityRule.getRule(\"~\", \"iNfO\");\n AssertJUnit.assertNull(rule);\n }",
"class_method_signature": "LevelInequalityRuleTest.test2()",
"constructor": false,
"full_signature": "@Test public void test2()",
"identifier": "test2",
"invocat... | {
"fields": [
{
"declarator": "levelList",
"modifier": "private static",
"original_string": "private static List<String> levelList;",
"type": "List<String>",
"var_name": "levelList"
}
],
"file": "OtrosLogViewer-app/src/main/java/pl/otros/logview/accept/query/org/apache/log4j/... | {
"body": "public static Rule getRule(final String inequalitySymbol, final String value) {\n\n Level thisLevel;\n\n // if valid util.logging levels are used against events\n // with log4j levels, the\n // DEBUG level is used and an illegalargumentexception won't be generated\n\n // an illegalargumentex... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_0 | {
"fields": [
{
"declarator": "validData = {\n new Object[]{\"FILE://c:\", \"FILE\", null, null, null, null, \"c:\"},\n new Object[]{\"FILE://c:/\", \"FILE\", null, null, null, null, \"c:/\"},\n new Object[]{\"FILE://c:/a\", \"FILE\", null, null, null, null, \"c:/a\"},\n new Object[]{\"F... | {
"body": "@Test(dataProvider = \"validData\")\n public void testIsValid(String url,\n String protocol,\n String user,\n String password,\n String hostname,\n String port,\n ... | {
"fields": [
{
"declarator": "local_uri",
"modifier": "private",
"original_string": "private String local_uri, local_protocol, local_user, local_pass;",
"type": "String",
"var_name": "local_uri"
},
{
"declarator": "local_hostname",
"modifier": "private",
"o... | {
"body": "public boolean isValid() {\n return valid;\n }",
"class_method_signature": "VFSURIValidator.isValid()",
"constructor": false,
"full_signature": "public boolean isValid()",
"identifier": "isValid",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "boolean",
"sign... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_107 | {
"fields": [
{
"declarator": "baseLoader = new BaseLoader()",
"modifier": "private final",
"original_string": "private final BaseLoader baseLoader = new BaseLoader();",
"type": "BaseLoader",
"var_name": "baseLoader"
}
],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/log... | {
"body": "@Test(enabled = false)\n public void testLoadFromDir() throws URISyntaxException {\n Collection<LogFilter> load = baseLoader.loadFromDir(getFile(\"plugins/filters/\"), LogFilter.class);\n AssertJUnit.assertEquals(1, load.size());\n }",
"class_method_signature": "BaseLoaderTest.testLoadFromDir()",... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(BaseLoader.class.getName())",
"modifier": "public static final",
"original_string": "public static final Logger LOGGER = LoggerFactory.getLogger(BaseLoader.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
}... | {
"body": "public <T> Collection<T> loadFromDir(File file, Class<T> type) {\n ArrayList<T> list = new ArrayList<>();\n try {\n List<Class<T>> implementationClasses = getInterfaceImplementations(type, file);\n\n for (Class<?> class1 : implementationClasses) {\n try {\n T classInstance =... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_41 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/accept/query/org/apache/log4j/rule/NotRuleTest.java",
"identifier": "NotRuleTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test public void test2() {\n Stack<Object> stack = new Stack<>();\n stack.push(\"Hello\");\n try {\n NotRule.getRule(stack);\n Assert.fail(\"Should have thrown IllegalArgumentException\");\n } catch (IllegalArgumentException ignored) {\n }\n }",
... | {
"fields": [
{
"declarator": "serialVersionUID = -6827159473117969306L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -6827159473117969306L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "rul... | {
"body": "public static Rule getRule(final Rule rule) {\n return new NotRule(rule);\n }",
"class_method_signature": "NotRule.getRule(final Rule rule)",
"constructor": false,
"full_signature": "public static Rule getRule(final Rule rule)",
"identifier": "getRule",
"invocations": [],
"modifiers": "publ... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_150 | {
"fields": [
{
"declarator": "persistService",
"modifier": "private",
"original_string": "private PersistService persistService;",
"type": "PersistService",
"var_name": "persistService"
},
{
"declarator": "suggestionSource",
"modifier": "private",
"original... | {
"body": "@Test\n public void testGetSuggestions() throws Exception {\n //given\n when(persistService.load(eq(\"key\"), eq(\"\"), any(Deserializer.class))).thenReturn(\"1111\\n1112\\n3232\");\n\n //when\n final List<Integer> suggestions = suggestionSource.getSuggestions(new SuggestionQuery(\"11\", 0));\... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(PersistentSuggestionSource.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(PersistentSuggestionSource.class);",
"type": "Logger",
"var_name": ... | {
"body": "@Override\n public List<T> getSuggestions(SuggestionQuery query) {\n return loadValues().stream()\n .filter(s -> filterFunction.apply(s, query))\n .collect(toList());\n }",
"class_method_signature": "PersistentSuggestionSource.getSuggestions(SuggestionQuery query)",
"constructor": fa... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_16 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/util/LoggerConfigUtilTest.java",
"identifier": "LoggerConfigUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testExtractLayoutPatternsLog4jProperties() {\n //Given\n String content = \"log4j.appender.file.MaxBackupIndex=10\\n\" +\n \"log4j.appender.file.layout=org.apache.log4j.PatternLayout\\n\" +\n \"log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(LoggerConfigUtil.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(LoggerConfigUtil.class.getName());",
"type": "Logger",
"var_name": ... | {
"body": "@NotNull\n public static Set<String> extractLayoutPatterns(String content) {\n final LayoutEncoderConverter logbackLayoutEncoderConverter = new LogbackLayoutEncoderConverter();\n\n Set<String> result = new HashSet<>();\n final Matcher logbackMatcher = Pattern.compile(\"<pattern>\\\\s*(.*?)\\\\s*<... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_82 | {
"fields": [
{
"declarator": "container",
"modifier": "public",
"original_string": "public PluginableElementsContainer<PluginableClass> container;",
"type": "PluginableElementsContainer<PluginableClass>",
"var_name": "container"
}
],
"file": "OtrosLogViewer-app/src/test/java... | {
"body": "@Test\n public void testGetElements() {\n PluginableClass p = new PluginableClass();\n container.addElement(p);\n Collection<PluginableClass> elements = container.getElements();\n AssertJUnit.assertEquals(1, elements.size());\n\n }",
"class_method_signature": "PluginableElementsContainerTes... | {
"fields": [
{
"declarator": "listeners",
"modifier": "private final",
"original_string": "private final HashSet<PluginableElementEventListener<T>> listeners;",
"type": "HashSet<PluginableElementEventListener<T>>",
"var_name": "listeners"
},
{
"declarator": "elements",... | {
"body": "public Collection<T> getElements() {\n return new ArrayList<>(elements.values());\n }",
"class_method_signature": "PluginableElementsContainer.getElements()",
"constructor": false,
"full_signature": "public Collection<T> getElements()",
"identifier": "getElements",
"invocations": [
"value... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_202 | {
"fields": [
{
"declarator": "underTest = new QuerySuggestionSource(new ArrayList<>(0))",
"modifier": "private",
"original_string": "private QuerySuggestionSource underTest = new QuerySuggestionSource(new ArrayList<>(0));",
"type": "QuerySuggestionSource",
"var_name": "underTest"
... | {
"body": "@Test(dataProvider = \"balance\", enabled = false)\n public void testCountParenthesisBalance(String s, int expected) {\n Assert.assertEquals(underTest.countParenthesisBalance(s), expected);\n }",
"class_method_signature": "QuerySuggestionSourceTest.testCountParenthesisBalance(String s, int expected)... | {
"fields": [
{
"declarator": "operators = Splitter.on(\" \").splitToList(\"!= == ~= like exists < > <= >=\")",
"modifier": "private final",
"original_string": "private final List<String> operators = Splitter.on(\" \").splitToList(\"!= == ~= like exists < > <= >=\");",
"type": "List<String... | {
"body": "protected int countParenthesisBalance(String rest) {\n boolean inSingleQuote = false;\n boolean inDoubleQuote = false;\n final char[] chars = rest.toCharArray();\n int balance = 0;\n for (char c : chars) {\n if (c == '\"' && !inSingleQuote) {\n inDoubleQuote = !inDoubleQuote;\n ... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_193 | {
"fields": [
{
"declarator": "underTest",
"modifier": "private",
"original_string": "private ClassWrapperRenderer underTest;",
"type": "ClassWrapperRenderer",
"var_name": "underTest"
}
],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/gui/renderers/ClassWrapperRe... | {
"body": "@Test(dataProvider= \"abbreviations\")\n public void testAbbreviatePackagesToSingleLetter(String clazz,int width, String expected) {\n //given\n final FontMetrics fontMetrics = Mockito.mock(FontMetrics.class);\n Mockito.when(fontMetrics.stringWidth(Matchers.anyString())).thenAnswer(invocation -> ... | {
"fields": [
{
"declarator": "stringLengthComparator = (o1, o2) -> {\n int result = o2.length() - o1.length();\n if (result == 0) {\n result = o1.compareTo(o2);\n }\n return result;\n }",
"modifier": "private final",
"original_string": "private final Comparator<String> stringL... | {
"body": "public String abbreviatePackagesToSingleLetter(String abbreviatePackage, int availableWidth, FontMetrics fm) {\n String result = abbreviatePackage;\n if (fm.stringWidth(result) > availableWidth) {\n final java.util.List<String> split = Splitter.on('.').splitToList(result);\n int index = 0;\... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_185 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/gui/session/SessionUtilTest.java",
"identifier": "SessionUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGroupFilesByServerEmpty() throws Exception {\n\n //given\n final ArrayList<FileToOpen> filesToOpen = new ArrayList<>();\n Session session = new Session(\"A\", filesToOpen);\n\n //when\n final Map<String, List<FileToOpen>> actual = SessionUtil.groupFilesByServer(sessi... | {
"fields": [],
"file": "OtrosLogViewer-app/src/main/java/pl/otros/logview/gui/session/SessionUtil.java",
"identifier": "SessionUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "SessionUtil.groupFilesByServer(Session session)",
"constructor": false,
"full_signature": "st... | {
"body": "static Map<String, List<FileToOpen>> groupFilesByServer(Session session) {\n return session.getFilesToOpen()\n .stream()\n .collect(Collectors.groupingBy(FileToOpen::host));\n }",
"class_method_signature": "SessionUtil.groupFilesByServer(Session session)",
"constructor": false,
"ful... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_214 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/gui/actions/search/FilteredTableNextRowProviderTest.java",
"identifier": "FilteredTableNextRowProviderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetNextRowDown() {\n JTable jTable = new JTable(10, 1);\n NextRowProvider nextRowProvider = NextRowProviderFactory.getNextFilteredTableRow(jTable);\n for (int i = 0; i < 10; i++) {\n assertEquals(i, nextRowProvider.getNextRow());\n }\n assertEquals(-1, nextRowPr... | {
"fields": [
{
"declarator": "table",
"modifier": "private final",
"original_string": "private final JTable table;",
"type": "JTable",
"var_name": "table"
},
{
"declarator": "increase",
"modifier": "private final",
"original_string": "private final int incr... | {
"body": "@Override\n public int getNextRow() {\n currentRow += increase;\n\n if (rowsChecked++ >= table.getRowCount()) {\n return -1;\n }\n if (currentRow >= table.getRowCount()) {\n currentRow = 0;\n } else if (currentRow < 0) {\n currentRow = table.getRowCount() - 1;\n }\n int... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_94 | {
"fields": [
{
"declarator": "dataTableModel",
"modifier": "public",
"original_string": "public LogDataTableModel dataTableModel;",
"type": "LogDataTableModel",
"var_name": "dataTableModel"
},
{
"declarator": "logDatas",
"modifier": "public",
"original_stri... | {
"body": "@Test\n public void testInitalized() {\n AssertJUnit.assertEquals(logDatas.length, dataTableModel.getRowCount());\n }",
"class_method_signature": "LogDataTableModelTest.testInitalized()",
"constructor": false,
"full_signature": "@Test public void testInitalized()",
"identifier": "testInitalize... | {
"fields": [
{
"declarator": "EMPTY_STRING = \"\"",
"modifier": "private static final",
"original_string": "private static final String EMPTY_STRING = \"\";",
"type": "String",
"var_name": "EMPTY_STRING"
},
{
"declarator": "LOGGER = LoggerFactory.getLogger(LogDataTable... | {
"body": "public int getRowCount() {\n return logDataStore.getCount();\n }",
"class_method_signature": "LogDataTableModel.getRowCount()",
"constructor": false,
"full_signature": "public int getRowCount()",
"identifier": "getRowCount",
"invocations": [
"getCount"
],
"modifiers": "public",
"par... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_215 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/gui/actions/search/FilteredTableNextRowProviderTest.java",
"identifier": "FilteredTableNextRowProviderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetNextRowFromMiddleDown() {\n JTable jTable = new JTable(10, 1);\n jTable.getSelectionModel().setSelectionInterval(4, 4);\n NextRowProvider nextRowProvider = NextRowProviderFactory.getNextFilteredTableRow(jTable);\n for (int i = 5; i < 10; i++) {\n assertEquals(i,... | {
"fields": [
{
"declarator": "table",
"modifier": "private final",
"original_string": "private final JTable table;",
"type": "JTable",
"var_name": "table"
},
{
"declarator": "increase",
"modifier": "private final",
"original_string": "private final int incr... | {
"body": "@Override\n public int getNextRow() {\n currentRow += increase;\n\n if (rowsChecked++ >= table.getRowCount()) {\n return -1;\n }\n if (currentRow >= table.getRowCount()) {\n currentRow = 0;\n } else if (currentRow < 0) {\n currentRow = table.getRowCount() - 1;\n }\n int... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_95 | {
"fields": [
{
"declarator": "dataTableModel",
"modifier": "public",
"original_string": "public LogDataTableModel dataTableModel;",
"type": "LogDataTableModel",
"var_name": "dataTableModel"
},
{
"declarator": "logDatas",
"modifier": "public",
"original_stri... | {
"body": "@Test\n public void testGetRowCount() {\n AssertJUnit.assertEquals(logDatas.length, dataTableModel.getRowCount());\n }",
"class_method_signature": "LogDataTableModelTest.testGetRowCount()",
"constructor": false,
"full_signature": "@Test public void testGetRowCount()",
"identifier": "testGetRow... | {
"fields": [
{
"declarator": "EMPTY_STRING = \"\"",
"modifier": "private static final",
"original_string": "private static final String EMPTY_STRING = \"\";",
"type": "String",
"var_name": "EMPTY_STRING"
},
{
"declarator": "LOGGER = LoggerFactory.getLogger(LogDataTable... | {
"body": "public int getRowCount() {\n return logDataStore.getCount();\n }",
"class_method_signature": "LogDataTableModel.getRowCount()",
"constructor": false,
"full_signature": "public int getRowCount()",
"identifier": "getRowCount",
"invocations": [
"getCount"
],
"modifiers": "public",
"par... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_184 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/gui/session/SessionUtilTest.java",
"identifier": "SessionUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGroupFilesByServer() throws Exception {\n //given\n final ArrayList<FileToOpen> filesToOpen = new ArrayList<>();\n filesToOpen.add(new FileToOpen(\"sftp://server1.pl/asd/s\", OpenMode.FROM_END, Level.FINEST, Optional.empty()));\n filesToOpen.add(new FileToOpen(\"sftp://... | {
"fields": [],
"file": "OtrosLogViewer-app/src/main/java/pl/otros/logview/gui/session/SessionUtil.java",
"identifier": "SessionUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "SessionUtil.groupFilesByServer(Session session)",
"constructor": false,
"full_signature": "st... | {
"body": "static Map<String, List<FileToOpen>> groupFilesByServer(Session session) {\n return session.getFilesToOpen()\n .stream()\n .collect(Collectors.groupingBy(FileToOpen::host));\n }",
"class_method_signature": "SessionUtil.groupFilesByServer(Session session)",
"constructor": false,
"ful... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_192 | {
"fields": [
{
"declarator": "underTest",
"modifier": "private",
"original_string": "private ClassWrapperRenderer underTest;",
"type": "ClassWrapperRenderer",
"var_name": "underTest"
}
],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/gui/renderers/ClassWrapperRe... | {
"body": "@Test\n public void testIsNullSafe() throws Exception {\n underTest.getTableCellRendererComponent(Mockito.mock(JTable.class), null, false, false, 0, 0);\n }",
"class_method_signature": "ClassWrapperRendererTest.testIsNullSafe()",
"constructor": false,
"full_signature": "@Test public void testIsN... | {
"fields": [
{
"declarator": "stringLengthComparator = (o1, o2) -> {\n int result = o2.length() - o1.length();\n if (result == 0) {\n result = o1.compareTo(o2);\n }\n return result;\n }",
"modifier": "private final",
"original_string": "private final Comparator<String> stringL... | {
"body": "@Override\n public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {\n String abbreviatePackage = \"\";\n if (value != null) {\n final ClassWrapper classWrapper = (ClassWrapper) value;\n final String className =... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_83 | {
"fields": [
{
"declarator": "container",
"modifier": "public",
"original_string": "public PluginableElementsContainer<PluginableClass> container;",
"type": "PluginableElementsContainer<PluginableClass>",
"var_name": "container"
}
],
"file": "OtrosLogViewer-app/src/test/java... | {
"body": "@Test\n public void testAddElement() {\n PluginableListener listener = new PluginableListener();\n container.addListener(listener);\n\n PluginableClass p1 = new PluginableClass();\n container.addElement(p1);\n AssertJUnit.assertTrue(listener.added);\n\n container.addElement(p1);\n Ass... | {
"fields": [
{
"declarator": "listeners",
"modifier": "private final",
"original_string": "private final HashSet<PluginableElementEventListener<T>> listeners;",
"type": "HashSet<PluginableElementEventListener<T>>",
"var_name": "listeners"
},
{
"declarator": "elements",... | {
"body": "public void addElement(T element) {\n boolean allreadyHave = false;\n synchronized (elements) {\n allreadyHave = elements.containsKey(element.getPluginableId());\n elements.put(element.getPluginableId(), element);\n }\n synchronized (listeners) {\n if (allreadyHave) {\n no... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_203 | {
"fields": [
{
"declarator": "underTest = new QuerySuggestionSource(new ArrayList<>(0))",
"modifier": "private",
"original_string": "private QuerySuggestionSource underTest = new QuerySuggestionSource(new ArrayList<>(0));",
"type": "QuerySuggestionSource",
"var_name": "underTest"
... | {
"body": "@Test(dataProvider = \"lastValue\", enabled = false)\n public void testLastValue(String s, String expected) {\n Assert.assertEquals(underTest.getLastValue(s), expected);\n }",
"class_method_signature": "QuerySuggestionSourceTest.testLastValue(String s, String expected)",
"constructor": false,
"f... | {
"fields": [
{
"declarator": "operators = Splitter.on(\" \").splitToList(\"!= == ~= like exists < > <= >=\")",
"modifier": "private final",
"original_string": "private final List<String> operators = Splitter.on(\" \").splitToList(\"!= == ~= like exists < > <= >=\");",
"type": "List<String... | {
"body": "public String getLastValue(String s) {\n if (s.matches(\"[^\\\"']\\\\S*\")) {\n return s.replaceFirst(\"([^\\\"']\\\\S*).*\", \"$1\");\n }\n final String[] splitWithSingleQuotes = s.split(\",(?=([^\\']*\\\"[^\\']*\\')*[^\\']*$)\", -1);\n if (splitWithSingleQuotes.length > 1) {\n retur... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_17 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/util/LoggerConfigUtilTest.java",
"identifier": "LoggerConfigUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testExtractLayoutPatternsLogbackXml() {\n //Given\n String content = \"<configuration>\\n\" +\n \"\\n\" +\n \" <triggeringPolicy class=\\\"ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy\\\">\\n\" +\n \" <maxFileSize>35 MB</maxFileSize>\\n\" +... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(LoggerConfigUtil.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(LoggerConfigUtil.class.getName());",
"type": "Logger",
"var_name": ... | {
"body": "@NotNull\n public static Set<String> extractLayoutPatterns(String content) {\n final LayoutEncoderConverter logbackLayoutEncoderConverter = new LogbackLayoutEncoderConverter();\n\n Set<String> result = new HashSet<>();\n final Matcher logbackMatcher = Pattern.compile(\"<pattern>\\\\s*(.*?)\\\\s*<... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_151 | {
"fields": [
{
"declarator": "persistService",
"modifier": "private",
"original_string": "private PersistService persistService;",
"type": "PersistService",
"var_name": "persistService"
},
{
"declarator": "suggestionSource",
"modifier": "private",
"original... | {
"body": "@Test\n public void testAdd() throws Exception {\n //given\n when(persistService.load(eq(\"key\"), eq(\"\"), any(Deserializer.class))).thenReturn(\"1111\\n1112\\n3232\");\n\n //when\n suggestionSource.add(1134, 5454);\n final List<Integer> suggestions = suggestionSource.getSuggestions(new S... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(PersistentSuggestionSource.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(PersistentSuggestionSource.class);",
"type": "Logger",
"var_name": ... | {
"body": "@SafeVarargs\n public final void add(T... values) {\n final List<T> loadedValues = loadValues();\n final List<T> toAdd = Arrays.asList(values);\n loadedValues.removeAll(toAdd);\n List<T> result = new ArrayList<T>(toAdd);\n result.addAll(loadedValues);\n LinkedHashSet<T> r = new LinkedHas... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_40 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/accept/query/org/apache/log4j/rule/NotRuleTest.java",
"identifier": "NotRuleTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test public void test1() {\n Stack<Object> stack = new Stack<>();\n try {\n NotRule.getRule(stack);\n Assert.fail(\"Should have thrown IllegalArgumentException\");\n } catch (IllegalArgumentException ignored) {\n }\n }",
"class_method_signature": "Not... | {
"fields": [
{
"declarator": "serialVersionUID = -6827159473117969306L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -6827159473117969306L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "rul... | {
"body": "public static Rule getRule(final Rule rule) {\n return new NotRule(rule);\n }",
"class_method_signature": "NotRule.getRule(final Rule rule)",
"constructor": false,
"full_signature": "public static Rule getRule(final Rule rule)",
"identifier": "getRule",
"invocations": [],
"modifiers": "publ... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_1 | {
"fields": [],
"file": "OtrosVfsBrowser/src/test/java/pl/otros/vfs/browser/table/FileSizeTest.java",
"identifier": "FileSizeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test (dataProvider = \"testFileSizeDataProvider\")\n public void testFileSize(String constructorArgs, long bytes) {\n Assert.assertEquals(new FileSize(constructorArgs).getBytes(), bytes);\n }",
"class_method_signature": "FileSizeTest.testFileSize(String constructorArgs, long bytes)",
"constructor... | {
"fields": [
{
"declarator": "K = 1024",
"modifier": "private static final",
"original_string": "private static final long K = 1024;",
"type": "long",
"var_name": "K"
},
{
"declarator": "M = K * K",
"modifier": "private static final",
"original_string": "pr... | {
"body": "public FileSize(String string) {\n Pattern p = Pattern.compile(\"([\\\\d,.]+)\\\\s?([kKmMgGtT]{1})[Bb]{1}\");\n Matcher matcher = p.matcher(string);\n if (matcher.matches()) {\n double count = Double.parseDouble(matcher.group(1).replace(',','.'));\n long multiplier = 1;\n if (String... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_106 | {
"fields": [
{
"declarator": "baseLoader = new BaseLoader()",
"modifier": "private final",
"original_string": "private final BaseLoader baseLoader = new BaseLoader();",
"type": "BaseLoader",
"var_name": "baseLoader"
}
],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/log... | {
"body": "@Test(enabled = false)\n public void testLoad() throws URISyntaxException {\n File dir = getFile(\"plugins/filters/\");\n Collection<LogFilter> load = baseLoader.load(dir, LogFilter.class);\n AssertJUnit.assertEquals(2, load.size());\n }",
"class_method_signature": "BaseLoaderTest.testLoad()",... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(BaseLoader.class.getName())",
"modifier": "public static final",
"original_string": "public static final Logger LOGGER = LoggerFactory.getLogger(BaseLoader.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
}... | {
"body": "public <T> Collection<T> load(File dir, Class<T> type) {\n Set<T> logImporters = new HashSet<>();\n if (!dir.exists()) {\n // dir not exist!\n return new ArrayList<>();\n }\n File[] files = dir.listFiles(pathname -> {\n return pathname.getName().endsWith(\".jar\") || pathname.get... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_56 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/accept/query/org/apache/log4j/rule/LevelInequalityRuleTest.java",
"identifier": "LevelInequalityRuleTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test1() {\n try {\n LevelInequalityRule.getRule(\">\", \"emergency\");\n Assert.fail(\"Expected IllegalArgumentException\");\n } catch (IllegalArgumentException ignored) {\n }\n }",
"class_method_signature": "LevelInequalityRuleTest.test1()",
"constructor": fals... | {
"fields": [
{
"declarator": "levelList",
"modifier": "private static",
"original_string": "private static List<String> levelList;",
"type": "List<String>",
"var_name": "levelList"
}
],
"file": "OtrosLogViewer-app/src/main/java/pl/otros/logview/accept/query/org/apache/log4j/... | {
"body": "public static Rule getRule(final String inequalitySymbol, final String value) {\n\n Level thisLevel;\n\n // if valid util.logging levels are used against events\n // with log4j levels, the\n // DEBUG level is used and an illegalargumentexception won't be generated\n\n // an illegalargumentex... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_110 | {
"fields": [
{
"declarator": "LOG_EVENT_COUNT = 1000",
"modifier": "public static final",
"original_string": "public static final int LOG_EVENT_COUNT = 1000;",
"type": "int",
"var_name": "LOG_EVENT_COUNT"
},
{
"declarator": "TEST_THREAD_POOL_NAME = \"TestThreadPoolName... | {
"body": "@Test(enabled = false)\n public void testRemove() throws Exception {\n //given\n\n //when\n store.remove(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 20, 21, 22, 23).get();\n\n //then\n // Assert.assertEquals(logDataRow1, store.getLogData(0));\n AssertJUnit.assertEquals(10, store.getLogData(0).getId... | {
"fields": [
{
"declarator": "logDataStore",
"modifier": "private final",
"original_string": "private final LogDataStore logDataStore;",
"type": "LogDataStore",
"var_name": "logDataStore"
},
{
"declarator": "service",
"modifier": "private final",
"original_... | {
"body": "@Override\n public ListenableFuture remove(final int... ids) {\n ListenableFuture<?> submit = service.submit(new OperationRemove(logDataStore, ids));\n return submit;\n }",
"class_method_signature": "MemoryAsyncLogDataStore.remove(final int... ids)",
"constructor": false,
"full_signature": "@... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_147 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/parser/json/JsonLogParserTest.java",
"identifier": "JsonLogParserTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"testParse\")\n public void testParse(String fileName, String desc, Properties properties) throws Exception {\n //Given\n final JsonLogParser jsonParser = new JsonLogParser();\n jsonParser.init(properties);\n final ParsingContext parsingContext = new ParsingContext();\n ... | {
"fields": [
{
"declarator": "parserDescription",
"modifier": "private final",
"original_string": "private final ParserDescription parserDescription;",
"type": "ParserDescription",
"var_name": "parserDescription"
},
{
"declarator": "jsonExtractor",
"modifier": "p... | {
"body": "@Override\n public LogData parse(String line, ParsingContext parsingContext) {\n\n final StringBuilder unmatchedLog = parsingContext.getUnmatchedLog();\n if (unmatchedLog.length() == 0 && !line.startsWith(\"{\")) {\n return null;\n }\n\n unmatchedLog.append(line).append(\"\\n\");\n fin... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_130 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/loader/IconsLoaderTest.java",
"identifier": "IconsLoaderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testLoadIcons() throws IllegalArgumentException, IllegalAccessException {\n\t\tIconsLoader.loadIcons();\n\t\tField[] fields = Icons.class.getFields();\n\t\tfor (Field field : fields) {\n\t\t\tif (field.getAnnotation(Path.class) != null) {\n\t\t\t\tassertNotNull(\"Icon \" + field.getNam... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(IconsLoader.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(IconsLoader.class.getName());",
"type": "Logger",
"var_name": "LOGGER"
... | {
"body": "public static void loadIcons() {\n Field[] fields = Icons.class.getFields();\n for (Field field : fields) {\n Path annotation = field.getAnnotation(Path.class);\n InputStream stream = IconsLoader.class.getResourceAsStream(annotation.path());\n if (stream != null) {\n try {\n ... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_99 | {
"fields": [
{
"declarator": "dataTableModel",
"modifier": "public",
"original_string": "public LogDataTableModel dataTableModel;",
"type": "LogDataTableModel",
"var_name": "dataTableModel"
},
{
"declarator": "logDatas",
"modifier": "public",
"original_stri... | {
"body": "@Test\n public void testGetLogData() {\n LogData[] logData2 = dataTableModel.getLogData();\n for (int i = 0; i < logDatas.length; i++) {\n AssertJUnit.assertEquals(logDatas[i], logData2[i]);\n }\n }",
"class_method_signature": "LogDataTableModelTest.testGetLogData()",
"constructor": fal... | {
"fields": [
{
"declarator": "EMPTY_STRING = \"\"",
"modifier": "private static final",
"original_string": "private static final String EMPTY_STRING = \"\";",
"type": "String",
"var_name": "EMPTY_STRING"
},
{
"declarator": "LOGGER = LoggerFactory.getLogger(LogDataTable... | {
"body": "public LogData getLogData(int row) {\n if (row < 0 || row >= logDataStore.getCount()) {\n return EMPTY_LOG_DATA;\n }\n return logDataStore.getLogData(row);\n }",
"class_method_signature": "LogDataTableModel.getLogData(int row)",
"constructor": false,
"full_signature": "public LogData g... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_219 | {
"fields": [
{
"declarator": "ld1",
"modifier": "private",
"original_string": "private LogData ld1;",
"type": "LogData",
"var_name": "ld1"
},
{
"declarator": "ld2",
"modifier": "private",
"original_string": "private LogData ld2;",
"type": "LogData",
... | {
"body": "@Test\n public void testMatches() {\n RegexMatcher matcher = new RegexMatcher(\".*ma[\\\\s\\\\w]+,.*\\\\d\");\n assertTrue(matcher.matches(ld1));\n assertFalse(matcher.matches(ld2));\n }",
"class_method_signature": "RegexMatcherTest.testMatches()",
"constructor": false,
"full_signature": "... | {
"fields": [
{
"declarator": "DOT_ALL_SUFFIX = \".*\"",
"modifier": "private static final",
"original_string": "private static final String DOT_ALL_SUFFIX = \".*\";",
"type": "String",
"var_name": "DOT_ALL_SUFFIX"
},
{
"declarator": "pattern",
"modifier": "privat... | {
"body": "@Override\n public boolean matches(LogData logData) {\n return pattern.matcher(logData.getMessage()).find();\n }",
"class_method_signature": "RegexMatcher.matches(LogData logData)",
"constructor": false,
"full_signature": "@Override public boolean matches(LogData logData)",
"identifier": "matc... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_76 | {
"fields": [
{
"declarator": "PORT = 45501",
"modifier": "private static final",
"original_string": "private static final int PORT = 45501;",
"type": "int",
"var_name": "PORT"
},
{
"declarator": "HTTP_GZIPPED = \"http://127.0.0.1:\" + PORT + \"/log.txt.gz\"",
"mo... | {
"body": "@Test\n public void testAverageFile() throws IOException {\n try (LoadingInfo logFileContent = new LoadingInfo(asFileObject(\"jul_log.txt\"))) {\n assertFalse(logFileContent.isGzipped());\n assertEquals(15_300, asString(logFileContent).length());\n }\n }",
"class_method_signature": "Loa... | {
"fields": [
{
"declarator": "friendlyUrl",
"modifier": "private final",
"original_string": "private final String friendlyUrl;",
"type": "String",
"var_name": "friendlyUrl"
},
{
"declarator": "fileObject",
"modifier": "private final",
"original_string": "pr... | {
"body": "public boolean isGzipped() {\n return gzipped;\n }",
"class_method_signature": "LoadingInfo.isGzipped()",
"constructor": false,
"full_signature": "public boolean isGzipped()",
"identifier": "isGzipped",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "boolean",
... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_188 | {
"fields": [
{
"declarator": "singleFilesToOpen = Collections.singletonList(new FileToOpen(\"file:///tmp/a.txt\", OpenMode.FROM_END, Level.FINEST, Optional.of(\"logImporter\")))",
"modifier": "private",
"original_string": "private List<FileToOpen> singleFilesToOpen = Collections.singletonList(n... | {
"body": "@Test(dataProvider = \"serialize\")\n public void testSerialize(String name, List<Session> sessionList, String jsonFileName) throws Exception {\n String json = IOUtils.toString(this.getClass().getResourceAsStream(jsonFileName), \"UTF-8\");\n final String serialize = new SessionSerializer().serialize... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(SessionSerializer.class.getName())",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SessionSerializer.class.getName());",
"type": "Logger",
"var_name"... | {
"body": "@Override\n public String serialize(List<Session> sessions) {\n Collection<Session> withoutDuplicates = sessions.stream().collect(Collectors.toMap(Session::getName, Function.identity())).values();\n List<JSONObject> objects = withoutDuplicates.stream().map(s -> {\n final HashMap<String, Object>... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_167 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/gui/message/stacktracecode/StackTraceFormatterTest.java",
"identifier": "StackTraceFormatterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testFormat() throws Exception {\n //given\n final JumpToCodeService mock = Mockito.mock(JumpToCodeService.class);\n Mockito.when(mock.getContentOptional(Mockito.any(LocationInfo.class))).thenAnswer(invocation -> {\n LocationInfo li = (LocationInfo) inv... | {
"fields": [
{
"declarator": "STACK_TRACE_REGEX = \"(\\\\s*at\\\\s+([\\\\w\\\\d\\\\.]*)\\\\.([\\\\w\\\\d\\\\$]+)\\\\.([\\\\d\\\\w<>\\\\$]+)\\\\(([\\\\d\\\\w\\\\.\\\\u0020:]+)\\\\))\"",
"modifier": "private static final",
"original_string": "private static final String STACK_TRACE_REGEX = \"(\\\... | {
"body": "@Override\n public String format(String message) {\n StringBuilder sb = new StringBuilder(message.length());\n final Iterable<String> split = Splitter.on(\"\\n\").split(message);\n for (String line : split) {\n sb.append(line.replaceFirst(\"\\\\s+at\", \" at\"));\n if (STACK_TRACE_PATT... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_21 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/filter/PropertyFilterTest.java",
"identifier": "PropertyFilterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"testAcceptDataProvider\")\n public void testAccept(LogData logData, String text, Case caseSensitive, boolean expected) {\n final PropertyFilter propertyFilter = new PropertyFilter();\n propertyFilter.setIgnoreCase(caseSensitive.equals(Case.CaseIgnore));\n propertyFilter.set... | {
"fields": [
{
"declarator": "NAME = \"Property filter\"",
"modifier": "private static final",
"original_string": "private static final String NAME = \"Property filter\";",
"type": "String",
"var_name": "NAME"
},
{
"declarator": "DESCRIPTION = \"Filtering based on prop... | {
"body": "@Override\n public boolean accept(LogData logData, int row) {\n if (mode.equals(Mode.AllProperties) && StringUtils.isBlank(condition)) {\n return true;\n }\n final Map<String, String> properties = logData.getProperties();\n\n if (mode.equals(Mode.AllProperties)) {\n Collection<String... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_171 | {
"fields": [
{
"declarator": "colorizer = new SoapMessageColorizer(new ThemeConfig(new BaseConfiguration()))",
"modifier": "private final",
"original_string": "private final SoapMessageColorizer colorizer = new SoapMessageColorizer(new ThemeConfig(new BaseConfiguration()));",
"type": "Soa... | {
"body": "@Test\n\tpublic void testColorize() throws Exception {\n\t\tString message = loadResources(\"soap/soap.1.request.xml\");\n\t\tCollection<MessageFragmentStyle> colorize = colorizer.colorize(message);\n\t\tHashMap<Integer, MessageFragmentStyle> map = new HashMap<>(colorize.size());\n\t\tfor (MessageFragmentS... | {
"fields": [
{
"declarator": "NAME = \"Soap message\"",
"modifier": "private static final",
"original_string": "private static final String NAME = \"Soap message\";",
"type": "String",
"var_name": "NAME"
},
{
"declarator": "soapFinder = new SoapFinder()",
"modifi... | {
"body": "@Override\n public Collection<MessageFragmentStyle> colorize(String message) {\n initStyles();\n List<MessageFragmentStyle> list = new ArrayList<>();\n\n SortedSet<SubText> findSoaps = soapFinder.findSoaps(message);\n for (SubText subText : findSoaps) {\n int fragmentStart = subText.getSt... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.