auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public GitHubPRCause check(GitHubPRTrigger gitHubPRTrigger, @Nonnull GHPullRequest remotePR, @CheckForNull GitHubPRPullRequest localPR, TaskListener listener) throws IOException { if (isNull(number)) { listener.error(DISPLAY_NAME + ": number is null -> Bad configured event, skipping other checks."); return new GitHubPRCause(remotePR, "Bad configured " + DISPLAY_NAME + " event.", true); } if (isNull(remotePR)) { listener.error(DISPLAY_NAME + ": number is null -> Bad configured event, skipping other checks."); return new GitHubPRCause(remotePR, "Bad configured " + DISPLAY_NAME + " event.", true); } if (remotePR.getNumber() == getNumber()) { if (match) { return new GitHubPRCause(remotePR, "Number is matching " + remotePR.getNumber(), isSkip()); } } else if (!match) { <START> return new GitHubPRCause(remotePR, "Number is not matching " + remotePR.getNumber(), isSkip()); <END> } return null; }</code><technical_language>space collapse number</technical_language>

Target:
public GitHubPRCause check(GitHubPRTrigger gitHubPRTrigger, @Nonnull GHPullRequest remotePR, @CheckForNull GitHubPRPullRequest localPR, TaskListener listener) throws IOException { if (isNull(number)) { listener.error(DISPLAY_NAME + ": number is null -> Bad configured event, skipping other checks."); return new GitHubPRCause(remotePR, "Bad configured " + DISPLAY_NAME + " event.", true); } if (isNull(remotePR)) { listener.error(DISPLAY_NAME + ": number is null -> Bad configured event, skipping other checks."); return new GitHubPRCause(remotePR, "Bad configured " + DISPLAY_NAME + " event.", true); } if (remotePR.getNumber() == getNumber()) { if (match) { return new GitHubPRCause(remotePR, "PR Number is matching #" + remotePR.getNumber(), isSkip()); } } else if (!match) { return new GitHubPRCause(remotePR, "PR Number is not matching #" + remotePR.getNumber(), isSkip()); } return null; }
Source:
<code><START> private static void executeDeleteQuery(Connection conn, String query, int tenantId) <END> throws Exception { PreparedStatement prepStmt = null; try { prepStmt = conn.prepareStatement(query); prepStmt.setInt(1, tenantId); prepStmt.executeUpdate(); } catch (SQLException e) { String errMsg = "Error executing query " + query + " for tenant: " + tenantId; log.error(errMsg, e); throw new Exception(errMsg, e); } finally { if (prepStmt != null) { prepStmt.close(); } } }</code><technical_language>throw a specific exception here? WDYT</technical_language>

Target:
private void executeDeleteQuery(Connection conn, String query, int tenantId) throws SQLException { try (PreparedStatement prepStmt = conn.prepareStatement(query)) { prepStmt.setInt(1, tenantId); prepStmt.executeUpdate(); } catch (SQLException e) { String errMsg = "Error executing query " + query + " for tenant: " + tenantId; log.error(errMsg, e); throw e; } }
Source:
<code>public void testSpecialCharactersInId() { <START> StubSecureCredentialsStore store = new StubSecureCredentialsStore("<LINK_0> 1"); <END> assertEquals("<LINK_0> 1", store.getId()); assertEquals("http:\\2f\\2fci.mylyn.org\\2ftest 1", store.getSecurePreferences().name()); store = new StubSecureCredentialsStore("<LINK_1>\u00E7\u00F1\u00FC"); assertEquals("<LINK_1>\u00E7\u00F1\u00FC", store.getId()); assertEquals("http%3A%2F%2Fci.mylyn.org%2F%C3%A7%C3%B1%C3%BC", store.getSecurePreferences().name()); store = new StubSecureCredentialsStore("\uABCD \u1F00"); assertEquals("\uABCD \u1F00", store.getId()); assertEquals("%EA%AF%8D++%E1%BC%80", store.getSecurePreferences().name()); }</code><technical_language>a version of createStubSecureCredentialsStore takes a String argument in rest of tests</technical_language>

Target:
public void testSpecialCharactersInId() { StubSecureCredentialsStore store = createStubSecureCredentialsStore("<LINK_0> 1"); assertEquals("<LINK_0> 1", store.getId()); assertEquals("http:\\2f\\2fci.mylyn.org\\2ftest 1", store.getSecurePreferences().name()); store = createStubSecureCredentialsStore("<LINK_1>\u00E7\u00F1\u00FC"); assertEquals("<LINK_1>\u00E7\u00F1\u00FC", store.getId()); assertEquals("http%3A%2F%2Fci.mylyn.org%2F%C3%A7%C3%B1%C3%BC", store.getSecurePreferences().name()); store = createStubSecureCredentialsStore("\uABCD \u1F00"); assertEquals("\uABCD \u1F00", store.getId()); assertEquals("%EA%AF%8D++%E1%BC%80", store.getSecurePreferences().name()); }
Source:
<code>public void loadTree(final File treeFile) throws FileNotFoundException { String fileString = null; try (Scanner sc = new Scanner(treeFile).useDelimiter("\\Z")) { fileString = sc.next(); } catch (FileNotFoundException e) { throw e; } <START> PhylogeneticTreeParser np = new PhylogeneticTreeParser(fileString); <END> tree = np.getRoot(); notifyChanged(); }</code><technical_language>This is DI, a factory static</technical_language>

Target:
public void loadTree(final File treeFile) throws FileNotFoundException { String fileString = null; try (Scanner sc = new Scanner(treeFile).useDelimiter("\\Z")) { fileString = sc.next(); } catch (FileNotFoundException e) { throw e; } tree = PhylogeneticTreeParser.parse(fileString); notifyChanged(); }
Source:
<code>public <P> RecipientListRouterSpec recipient(String channelName, GenericSelector<P> selector) { MessageSelector messageSelector; if (selector instanceof MessageSelector) { messageSelector = (MessageSelector) selector; } else { <START> messageSelector = new MethodInvokingSelector(new LambdaMessageProcessor(selector, null)); <END> } this.target.addRecipient(channelName, messageSelector); return _this(); }</code><technical_language>Is this strictly correct? check a Lambda first? implement GenericSelector<P> is a MessageSelector</technical_language>

Target:
public <P> RecipientListRouterSpec recipient(String channelName, GenericSelector<P> selector) { MessageSelector messageSelector; if (selector instanceof MessageSelector) { messageSelector = (MessageSelector) selector; } else { messageSelector = isLambda(selector) ? new MethodInvokingSelector(new LambdaMessageProcessor(selector, null)) : new MethodInvokingSelector(selector); } this.target.addRecipient(channelName, messageSelector); return _this(); }
Source:
<code>public List<HeadersRequest> split(int maxCount) { if (this.hash != null) return Collections.<HeadersRequest>singletonList(this); List<HeadersRequest> ret = new ArrayList<>(); while(count > 0) { int reqSize = Math.min(maxCount, count); ret.add(new HeadersRequestImpl(start, reqSize, reverse)); <START> count -= reqSize; <END> if (reverse) start -= reqSize; else start += reqSize; } return ret; }</code><technical_language>This class is kinda immutable, please local var for count</technical_language>

Target:
public List<HeadersRequest> split(int maxCount) { if (this.hash != null) return Collections.<HeadersRequest>singletonList(this); List<HeadersRequest> ret = new ArrayList<>(); int remaining = count; while(remaining > 0) { int reqSize = Math.min(maxCount, remaining); ret.add(new HeadersRequestImpl(start, reqSize, reverse)); remaining -= reqSize; start = reverse ? start - reqSize : start + reqSize; } return ret; }
Source:
<code>public TmfSimpleTableViewer(TableViewer table) { super(table.getControl().getParent()); fTableViewer = table; final Table tableControl = fTableViewer.getTable(); tableControl.setHeaderVisible(true); tableControl.setLinesVisible(true); fDirection = SWT.DOWN; fTableViewer.setUseHashlookup(true); fTableViewer.getControl().addMouseListener(new MouseColumnListener()); fTablePopupMenuManager = new MenuManager(); fTablePopupMenuManager.setRemoveAllWhenShown(true); fTablePopupMenuManager.addMenuListener(new IMenuListener() { @Override public void menuAboutToShow(final @Nullable IMenuManager manager) { TableViewer viewer = getTableViewer(); ISelection selection = viewer.getSelection(); if (selection instanceof IStructuredSelection) { IStructuredSelection sel = (IStructuredSelection) selection; if (manager != null) { appendToTablePopupMenu(manager, sel); } } } }); Menu tablePopup = fTablePopupMenuManager.createContextMenu(getTableViewer().getTable()); getTableViewer().getTable().setMenu(tablePopup); tableControl.addDisposeListener(new DisposeListener() { @Override public void widgetDisposed(DisposeEvent e) { <START> internalDispose(); <END> } }); }</code><technical_language>lambda</technical_language>

Target:
public TmfSimpleTableViewer(TableViewer table) { super(table.getControl().getParent()); fTableViewer = table; final Table tableControl = fTableViewer.getTable(); tableControl.setHeaderVisible(true); tableControl.setLinesVisible(true); fDirection = SWT.DOWN; fTableViewer.setUseHashlookup(true); fTableViewer.getControl().addMouseListener(new MouseColumnListener()); fTablePopupMenuManager = new MenuManager(); fTablePopupMenuManager.setRemoveAllWhenShown(true); fTablePopupMenuManager.addMenuListener(new IMenuListener() { @Override public void menuAboutToShow(final @Nullable IMenuManager manager) { TableViewer viewer = getTableViewer(); ISelection selection = viewer.getSelection(); if (selection instanceof IStructuredSelection) { IStructuredSelection sel = (IStructuredSelection) selection; if (manager != null) { appendToTablePopupMenu(manager, sel); } } } }); Menu tablePopup = fTablePopupMenuManager.createContextMenu(getTableViewer().getTable()); getTableViewer().getTable().setMenu(tablePopup); tableControl.addDisposeListener((e) -> { internalDispose(); }); }
Source:
<code>protected TreePath getTreePathFromItem(BreadcrumbItem item) { List<Object> elements = new ArrayList<>(fBreadcrumbItems.size()); for (BreadcrumbItem <START> fBreadcrumbItem : <END> fBreadcrumbItems) { elements.add( fBreadcrumbItem.getData() ); if (fBreadcrumbItem.equals(item)) { return new TreePath(elements.toArray()); } } return null; }</code><technical_language>rename currItem</technical_language>

Target:
protected TreePath getTreePathFromItem(BreadcrumbItem item) { List<Object> elements = new ArrayList<>(fBreadcrumbItems.size()); for (BreadcrumbItem currItem : fBreadcrumbItems) { elements.add( currItem.getData() ); if (currItem.equals(item)) { return new TreePath(elements.toArray()); } } return null; }
Source:
<code>protected Image createBlankImage() { <START> final int width = (getWidth() == 0) ? 75 : getWidth(); <END> final int height = (getHeight() == 0) ? 75 : getHeight(); BufferedImage blankImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); Graphics2D graphics = blankImage.createGraphics(); graphics.setComposite(AlphaComposite.Clear); graphics.fillRect(0, 0, width, height); return blankImage; }</code><technical_language>pull 75 a constant something</technical_language>

Target:
protected Image createBlankImage() { final int width = (getWidth() == 0) ? DEFAULT_IMAGE_SCALE : getWidth(); final int height = (getHeight() == 0) ? DEFAULT_IMAGE_SCALE : getHeight(); BufferedImage blankImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); Graphics2D graphics = blankImage.createGraphics(); graphics.setComposite(AlphaComposite.Clear); graphics.fillRect(0, 0, width, height); return blankImage; }
Source:
<code>public Server(String clusterName, String mainDirectory, String languages, String transportAddresses, boolean isTest) { try { if (SystemUtils.IS_OS_WINDOWS) { setupDirectories(new URL("file:/ } else { setupDirectories(new URL("file://" + mainDirectory)); } } catch (Exception e) { <START> log.error("Can't create directories: ", e); <END> } this.clusterName = clusterName; this.languages = languages.split(","); this.transportAddresses = transportAddresses; this.isTest = isTest; }</code><technical_language>I this is code ... throw exception instead of silently accepting problem</technical_language>

Target:
public Server(String clusterName, String mainDirectory, String languages, String transportAddresses, boolean isTest) throws Exception { try { if (SystemUtils.IS_OS_WINDOWS) { setupDirectories(new URL("file:/ } else { setupDirectories(new URL("file://" + mainDirectory)); } } catch (Exception e) { log.error("Can't create directories: ", e); throw e; } this.clusterName = clusterName; this.languages = languages.split(","); this.transportAddresses = transportAddresses; this.isTest = isTest; }
Source:
<code><START> public static ObjectMapper getMapper() <END> { return MAPPER; }</code><technical_language>is this required public</technical_language>

Target:
static ObjectMapper getMapper() { return MAPPER; }
Source:
<code>public boolean hasDefaultValue() { <START> return getDefaultValue() != null; <END> }</code><technical_language>More efficient: getDB().getRecPtr(record + DEFAULTVAL) != 0</technical_language>

Target:
public boolean hasDefaultValue() { return hasFlag(FLAG_DEFAULT_VALUE, false, FLAGS); }
Source:
<code>public static List<ObaSituation> getAllSituations(final ObaArrivalInfoResponse response, List<String> filter) { List<ObaSituation> allSituations = new ArrayList<>(); allSituations.addAll(response.getSituations()); HashSet<String> allIds = new HashSet<>(); for (ObaSituation s : allSituations) { allIds.add(s.getId()); } HashSet<String> filterIds = new HashSet<>(); <START> if (filter != null) { <END> for (String routeId : filter) { filterIds.add(routeId); } } ObaArrivalInfo[] info = response.getArrivalInfo(); for (ObaArrivalInfo i : info) { if (filterIds.isEmpty() || filterIds.contains(i.getRouteId())) { for (String situationId : i.getSituationIds()) { if (!allIds.contains(situationId)) { allIds.add(situationId); allSituations.add(response.getSituation(situationId)); } } } } return allSituations; }</code><technical_language>I this if (filter != null && !filter.isEmpty()) { in case passes in empty filter list accident</technical_language>

Target:
public static List<ObaSituation> getAllSituations(final ObaArrivalInfoResponse response, List<String> filter) { List<ObaSituation> allSituations = new ArrayList<>(); allSituations.addAll(response.getSituations()); HashSet<String> allIds = new HashSet<>(); for (ObaSituation s : allSituations) { allIds.add(s.getId()); } HashSet<String> filterIds = new HashSet<>(); if (filter != null && !filter.isEmpty()) { for (String routeId : filter) { filterIds.add(routeId); } } ObaArrivalInfo[] info = response.getArrivalInfo(); for (ObaArrivalInfo i : info) { if (filterIds.isEmpty() || filterIds.contains(i.getRouteId())) { for (String situationId : i.getSituationIds()) { if (!allIds.contains(situationId)) { allIds.add(situationId); allSituations.add(response.getSituation(situationId)); } } } } return allSituations; }
Source:
<code>public List<? extends TargetBuilder<?, ?>> createBuilders() { <START> return Arrays.asList(new ErlangPrepareDependenciesBuilder(), new ErlangBuilder(), new RebarBuilder()); <END> }</code><technical_language>changed Collections usages ContainerUtil usages, left Arrays usages untouched. Why</technical_language>

Target:
public List<? extends TargetBuilder<?, ?>> createBuilders() { return ContainerUtil.newArrayList(new ErlangModuleBuildOrderBuilder(), new ErlangBuilder(), new RebarBuilder()); }
Source:
<code>public static boolean isContainerLifecycleObserverMethod(ObserverMethod<?> method) { return CONTAINER_LIFECYCLE_EVENT_TYPES.contains(Reflections.getRawType(method.getObservedType())) <START> || (Object.class.equals(method.getObservedType()) && method.getObservedQualifiers().size() == 1 <END> && method.getObservedQualifiers().contains(Any.Literal.INSTANCE) && method instanceof ContainerLifecycleEventObserverMethod); }</code><technical_language>void observe(@Observes Object event, Foo foo) observed qualifiers recognized a container lifecycle event - correct. org.jboss.weld.tests.extensions.validation.WildcardObserverTest accidentally passes (the deployment fails "_org.jboss.weld.exceptions.IllegalArgumentException: WELD-001456: Argument resolvedBean null_")</technical_language>

Target:
public static boolean isContainerLifecycleObserverMethod(ObserverMethod<?> method) { if (CONTAINER_LIFECYCLE_EVENT_TYPES.contains(Reflections.getRawType(method.getObservedType()))) { return true; } if (Object.class.equals(method.getObservedType()) && method instanceof ContainerLifecycleEventObserverMethod) { if (method.getObservedQualifiers().isEmpty()) { return true; } if (method.getObservedQualifiers().size() == 1 && method.getObservedQualifiers().contains(Any.Literal.INSTANCE)) { return true; } } return false; }
Source:
<code>public Promise<List<SearchResult>> search(QueryExpression expression) { final String url = encodeAllowEscapes(getBaseUrl() + SEARCH + (isNullOrEmpty(expression.getPath()) ? Path.ROOT : path(expression.getPath()))); StringBuilder queryParameters = new StringBuilder(); if (expression.getName() != null && !expression.getName().isEmpty()) { queryParameters.append("&name=").append(expression.getName()); } if (expression.getText() != null && !expression.getText().isEmpty()) { queryParameters.append("&text=").append(expression.getText()); } if (expression.getMaxItems() != 0) { queryParameters.append("&maxItems=").append(expression.getMaxItems()); } if (expression.getSkipCount() != 0) { queryParameters.append("&skipCount=").append(expression.getSkipCount()); } return reqFactory.createGetRequest(url + queryParameters.toString().replaceFirst("&", "?")) .header(ACCEPT, MimeType.APPLICATION_JSON) .loader(loaderFactory.newLoader("Searching...")) .send(unmarshaller.newListUnmarshaller(SearchResultDto.class)).then( <START> (Function<List<SearchResultDto>, List<SearchResult>>)arg -> { <END> if (arg.isEmpty()) { return Collections.emptyList(); } return arg.stream().map(SearchResult::new).collect(Collectors.toList()); }); }</code><technical_language>I prefer variable named arg. is confused</technical_language>

Target:
public Promise<List<SearchResult>> search(QueryExpression expression) { final String url = encodeAllowEscapes(getBaseUrl() + SEARCH + (isNullOrEmpty(expression.getPath()) ? Path.ROOT : path(expression.getPath()))); StringBuilder queryParameters = new StringBuilder(); if (expression.getName() != null && !expression.getName().isEmpty()) { queryParameters.append("&name=").append(expression.getName()); } if (expression.getText() != null && !expression.getText().isEmpty()) { queryParameters.append("&text=").append(expression.getText()); } if (expression.getMaxItems() != 0) { queryParameters.append("&maxItems=").append(expression.getMaxItems()); } if (expression.getSkipCount() != 0) { queryParameters.append("&skipCount=").append(expression.getSkipCount()); } return reqFactory.createGetRequest(url + queryParameters.toString().replaceFirst("&", "?")) .header(ACCEPT, MimeType.APPLICATION_JSON) .loader(loaderFactory.newLoader("Searching...")) .send(unmarshaller.newListUnmarshaller(SearchResultDto.class)).then( (Function<List<SearchResultDto>, List<SearchResult>>)searchResultDtos -> { if (searchResultDtos.isEmpty()) { return Collections.emptyList(); } return searchResultDtos.stream().map(SearchResult::new).collect(Collectors.toList()); }); }
Source:
<code>public void initMigrationPolicies(boolean isEdit) { List<MigrationPolicy> policies = AsyncDataProvider.getInstance().getMigrationPolicies(); getMigrationPolicies().setItems(policies); for (MigrationPolicy policy : policies) { boolean editFoundPrevSelected = isEdit && Objects.equals(policy.getId(), getEntity().getMigrationPolicyId()); <START> boolean newFoundNonEmpty = !isEdit && !Objects.equals(policy.getId(), NoMigrationPolicy.ID); <END> if (editFoundPrevSelected || newFoundNonEmpty) { getMigrationPolicies().setSelectedItem(policy); break; } } }</code><technical_language>I hard in terms of exact boolean algebra this code :-) mention this code is slightly efficient previous 2 for loops version if (isEdit) check executed once, in this case is O(n) times. I performance readability achieved code this. Guid migrationPoliciId = isEdit ? getEntity().getMigrationPolicyId() : NoMigrationPolicy.ID; getMigrationPolicies().setSelectedItem(findMigrationPolicyById()); ... MigrationPolicy findMigrationPolicyById(Guid id) { // find policy id null }</technical_language>

Target:
public void initMigrationPolicies(boolean isEdit) { List<MigrationPolicy> policies = AsyncDataProvider.getInstance().getMigrationPolicies(); getMigrationPolicies().setItems(policies); MigrationPolicy migrationPolicy = isEdit ? findMigrationPolicyById(getEntity().getMigrationPolicyId(), policies) : findFirstNonEmptyMigrationPolicy(policies); getMigrationPolicies().setSelectedItem(migrationPolicy != null ? migrationPolicy : findMigrationPolicyById(NoMigrationPolicy.ID, policies)); }
Source:
<code>public void testDeleteAll() throws Throwable { <START> this.testMarkAll(); <END> Assert.assertTrue(this.solo.waitForView(R.id.delete_menu)); View deleteMenu = this.activity.findViewById(R.id.delete_menu); Assert.assertNotNull(deleteMenu); TouchUtils.clickView(this, deleteMenu); BBCTTestUtil.waitForToast(this.solo, BBCTTestUtil.DELETE_MESSAGE); ListView listView = (ListView) this.solo.getCurrentActivity().findViewById(android.R.id.list); Assert.assertNotNull(listView); Assert.assertEquals(1, listView.getAdapter().getCount()); this.solo.waitForView(android.R.id.empty); }</code><technical_language>create a function mark cards in testMarkAll, testDeleteAll testUnmarkAll</technical_language>

Target:
public void testDeleteAll() throws Throwable { this.markAll(); deleteCards(); ListView listView = (ListView) this.solo.getCurrentActivity().findViewById(android.R.id.list); Assert.assertNotNull(listView); Assert.assertEquals(1, listView.getAdapter().getCount()); this.solo.waitForView(android.R.id.empty); }
Source:
<code>public void visitNode(Tree tree) { if (!hasSemantic()) { return; } MethodTree methodTree = (MethodTree) tree; BlockTree blockTree = methodTree.block(); if (blockTree == null) { return; } <START> if (!CHECK_CLIENT_TRUSTED_MATCHER.matches(methodTree) && !CHECK_SERVER_TRUSTED_MATCHER.matches(methodTree)) { <END> return; } if (!ThrowExceptionVisitor.throwsException(blockTree)) { reportIssue(methodTree.simpleName(), "Change this method so it throws exceptions."); } }</code><technical_language>easier read negations return. if (CHECK_CLIENT_TRUSTED_MATCHER.matches(methodTree) || CHECK_SERVER_TRUSTED_MATCHER.matches(methodTree)) { if (!ThrowExceptionVisitor.throwsException(blockTree)) { //... } }</technical_language>

Target:
public void visitNode(Tree tree) { if (!hasSemantic()) { return; } MethodTree methodTree = (MethodTree) tree; BlockTree blockTree = methodTree.block(); if (blockTree == null) { return; } if ((CHECK_CLIENT_TRUSTED_MATCHER.matches(methodTree) || CHECK_SERVER_TRUSTED_MATCHER.matches(methodTree)) && !ThrowExceptionVisitor.throwsException(blockTree)) { reportIssue(methodTree.simpleName(), "Change this method so it throws exceptions."); } }
Source:
<code>public JsonToken nextToken() throws IOException { if (depth == 0) { throw new IllegalStateException("The JSON branch is closed"); } <START> JsonToken next = super.nextToken(); <END> maintainDepth(next); return next; }</code><technical_language>simpler call maintainDepth() method takes arguments? combine maintainDepth() methods a method takes arguments line 490 statement</technical_language>

Target:
public JsonToken nextToken() throws IOException { if (depth == 0) { throw new IllegalStateException("The JSON branch is closed"); } maintainDepth(); return super.getCurrentToken(); }
Source:
<code>public DataTransactionResult remove(DataHolder dataHolder) { if (supports(dataHolder)) { final DataTransactionBuilder builder = DataTransactionBuilder.builder(); final Optional<AuthorData> data = from(dataHolder); <START> if (data.isPresent()) { <END> try { if (((ItemStack) dataHolder).getTagCompound() != null) { ((ItemStack) dataHolder).getTagCompound().setString(NbtDataUtil.ITEM_BOOK_AUTHOR, NbtDataUtil.INVALID_TITLE); } return builder.replace(data.get().getValues()).result(Type.SUCCESS).build(); } catch (Exception e) { Sponge.getLogger().error("There was an issue removing the author of an itemstack!", e); return builder.result(Type.ERROR).build(); } } else { return builder.result(Type.SUCCESS).build(); } } return DataTransactionBuilder.failNoData(); }</code><technical_language>wait what? changing if if data is present</technical_language>

Target:
public DataTransactionResult remove(DataHolder dataHolder) { return DataTransactionBuilder.failNoData(); }
Source:
<code>public int getMaxResults() { boolean hasOutParameters = false; for ( ParameterRegistration parameterRegistration : parameterRegistrations ) { if ( parameterRegistration.getMode().equals( ParameterMode.OUT ) ) { hasOutParameters = true; <START> <END> } } int result = 0; if ( hasOutParameters ) { } return result; }</code><technical_language>empty lines</technical_language>

Target:
public int getMaxResults() { int result = 0; for ( ParameterRegistration parameterRegistration : parameterRegistrations ) { switch ( parameterRegistration.getMode() ) { case REF_CURSOR: result = 1; break; case OUT: case INOUT: throw new UnsupportedOperationException( "Out parameters not supported!" ); default: break; } } return result; }
Source:
<code>private void runIterationTest(int numThreads, Executor persistenceExecutor1) { int numEntries = insertData(); final ConcurrentMap<Object, Object> entries = new ConcurrentHashMap<>(); final ConcurrentHashSet<Thread> threads = new ConcurrentHashSet<>(); final AtomicBoolean sameKeyMultipleTimes = new AtomicBoolean(); final CyclicBarrier barrier = new CyclicBarrier(numThreads); final AtomicBoolean brokenBarrier = new AtomicBoolean(false); store.process(null, new AdvancedCacheLoader.CacheLoaderTask() { @Override public void processEntry(MarshalledEntry marshalledEntry, AdvancedCacheLoader.TaskContext taskContext) throws InterruptedException { Object existing = entries.put(marshalledEntry.getKey(), marshalledEntry.getValue()); if (threads.add(Thread.currentThread())) { try { <START> barrier.await(); <END> } catch (BrokenBarrierException e) { brokenBarrier.set(true); } } if (existing != null) { log.warnf("Already a value present for key %s: %s", marshalledEntry.getKey(), existing); sameKeyMultipleTimes.set(true); } } }, persistenceExecutor1, true, true); assertFalse(sameKeyMultipleTimes.get()); assertFalse(brokenBarrier.get()); for (int i = 0; i < numEntries; i++) { assertEquals(entries.get(i), i, "For key" + i); } if (multipleThreads) { assertEquals(threads.size(), numThreads); } }</code><technical_language>I recommend adding a timeout this well, in case. In timeout exception set barrier broken</technical_language>

Target:
private void runIterationTest(int numThreads, Executor persistenceExecutor1) { int numEntries = insertData(); final ConcurrentMap<Object, Object> entries = new ConcurrentHashMap<>(); final ConcurrentHashSet<Thread> threads = new ConcurrentHashSet<>(); final AtomicBoolean sameKeyMultipleTimes = new AtomicBoolean(); final CyclicBarrier barrier = new CyclicBarrier(numThreads); final AtomicBoolean brokenBarrier = new AtomicBoolean(false); store.process(null, new AdvancedCacheLoader.CacheLoaderTask() { @Override public void processEntry(MarshalledEntry marshalledEntry, AdvancedCacheLoader.TaskContext taskContext) throws InterruptedException { Object existing = entries.put(marshalledEntry.getKey(), marshalledEntry.getValue()); if (threads.add(Thread.currentThread())) { try { barrier.await(1, TimeUnit.MINUTES); } catch (BrokenBarrierException | TimeoutException e) { log.warn("Exception occurred while waiting for barrier", e); brokenBarrier.set(true); } } if (existing != null) { log.warnf("Already a value present for key %s: %s", marshalledEntry.getKey(), existing); sameKeyMultipleTimes.set(true); } } }, persistenceExecutor1, true, true); assertFalse(sameKeyMultipleTimes.get()); assertFalse(brokenBarrier.get()); for (int i = 0; i < numEntries; i++) { assertEquals(entries.get(i), i, "For key" + i); } assertEquals(threads.size(), numThreads); }
Source:
<code>public final void createNonCoreComponents(ISarosSession session, MutablePicoContainer container) { container.addComponent(ServerEditorManager.class); container.addComponent(FileActivityExecutor.class); container.addComponent(FolderActivityExecutor.class); container.addComponent(TextEditActivityExecutor.class); <START> container.addComponent(NegotiationHandler.class); <END> }</code><technical_language>attach this class I highly suggest implement Startable move this handler application scope</technical_language>

Target:
public final void createNonCoreComponents(ISarosSession session, MutablePicoContainer container) { container.addComponent(ServerEditorManager.class); container.addComponent(FileActivityExecutor.class); container.addComponent(FolderActivityExecutor.class); container.addComponent(TextEditActivityExecutor.class); }
Source:
<code>public static Command lookForCommandInSubContainer(GraphicalEditPart targetEditPart, List<EObject> semanticObjects, Point newLocation) { <START> List <END> children = targetEditPart.getChildren(); DropObjectsRequest dropObjectsRequest = new DropObjectsRequest(); for (Object object : children) { if (object instanceof GraphicalEditPart) { GraphicalEditPart graphicalEditPart = (GraphicalEditPart) object; dropObjectsRequest.setLocation(newLocation); dropObjectsRequest.setObjects(semanticObjects); Command command = graphicalEditPart.getCommand(dropObjectsRequest); if (command != null) { return command; } } } return null; }</code><technical_language>please add <?> avoid warning</technical_language>

Target:
public static Command lookForCommandInSubContainer(GraphicalEditPart targetEditPart, List<EObject> semanticObjects, Point newLocation) { List<?> children = targetEditPart.getChildren(); DropObjectsRequest dropObjectsRequest = new DropObjectsRequest(); for (Object object : children) { if (object instanceof GraphicalEditPart) { GraphicalEditPart graphicalEditPart = (GraphicalEditPart) object; dropObjectsRequest.setLocation(newLocation); dropObjectsRequest.setObjects(semanticObjects); Command command = graphicalEditPart.getCommand(dropObjectsRequest); if (command != null) { return command; } } } return null; }
Source:
<code>public static OrcReader createOrcReader(OrcDataSource dataSource, ReaderAttributes attributes) throws IOException { <START> return new OrcReader(dataSource, ORC, attributes.getMaxMergeDistance(), attributes.getMaxReadSize(), attributes.getTinyStripeThreshold(), new DataSize(1, PETABYTE)); <END> }</code><technical_language>16MB instead of 1PB. reduce batch size of reads stay limit GC overhead low</technical_language>

Target:
public static OrcReader createOrcReader(OrcDataSource dataSource, ReaderAttributes attributes) throws IOException { return new OrcReader(dataSource, ORC, attributes.getMaxMergeDistance(), attributes.getMaxReadSize(), attributes.getTinyStripeThreshold(), new DataSize(16, MEGABYTE)); }
Source:
<code>protected void init(final ImmutableMap<String, Object> execEnvVars) throws DbException { buffer = new TupleBatchBuffer(getSchema()); try { source.setStartRange(startByteRange); source.setEndRange(endByteRange); parser = new CSVParser(new BufferedReader(new InputStreamReader(source.getInputStream())), CSVFormat.newFormat( delimiter).withQuote(quote).withEscape(escape)); iterator = parser.iterator(); for (int i = 0; i < numberOfSkippedLines; i++) { iterator.next(); } } catch (IOException e) { throw new DbException(e); } <START> lineNumber = 0; <END> }</code><technical_language>lineNumber is initialized 0 in constructor</technical_language>

Target:
protected void init(final ImmutableMap<String, Object> execEnvVars) throws DbException { buffer = new TupleBatchBuffer(getSchema()); try { adjustedStartByteRange = partitionStartByteRange; if (partitionStartByteRange != 0) { adjustedStartByteRange -= 1; } partitionInputStream = source.getInputStream(adjustedStartByteRange, partitionEndByteRange); if (maxByteRange == 0) { flagAsIncomplete = true; } if (partitionStartByteRange != 0) { int firstChar = partitionInputStream.read(); int byteOffset = 1; if (firstChar != '\n' && firstChar != '\r') { boolean newLineFound = false; while (!newLineFound) { int currentChar = partitionInputStream.read(); byteOffset++; if (currentChar == '\n' || currentChar == '\r' || currentChar == -1) { newLineFound = true; if (currentChar == -1) { flagAsIncomplete = true; } else if (currentChar == '\r') { currentChar = partitionInputStream.read(); if (currentChar != '\n') { partitionInputStream = source.getInputStream( adjustedStartByteRange + byteOffset, partitionEndByteRange); } } } } } else if (firstChar == '\r') { int currentChar = partitionInputStream.read(); if (currentChar != '\n') { partitionInputStream = source.getInputStream(adjustedStartByteRange + byteOffset, partitionEndByteRange); } } } if (!flagAsIncomplete) { parser = new CSVParser( new BufferedReader(new InputStreamReader(partitionInputStream)), CSVFormat.newFormat(delimiter).withQuote(quote).withEscape(escape)); iterator = parser.iterator(); for (int i = 0; i < numberOfSkippedLines; i++) { iterator.next(); } } } catch (IOException e) { throw new DbException(e); } }
Source:
<code>public void testGetIncompleteTriggerInstancesReturnsEmpty() { final List<TriggerInstance> all = new ArrayList<>(); for (int i = 0; i < 5; i++) { all.add(this.createTriggerInstance(this.flowTrigger, this .flow_id, this.flow_version, this.submitUser, this.project, System.currentTimeMillis())); if (i <= 2) { finalizeTriggerInstanceWithCancelled(all.get(i)); } else { finalizeTriggerInstanceWithSuccess(all.get(i), 1000); } } final List<TriggerInstance> shuffled = new ArrayList<>(all); <START> shuffled.forEach(triggerInst -> this.triggerInstLoader.uploadTriggerInstance(triggerInst)); <END> final List<TriggerInstance> actual = new ArrayList<>(this.triggerInstLoader .getIncompleteTriggerInstances()); all.sort(Comparator.comparing(TriggerInstance::getId)); actual.sort(Comparator.comparing(TriggerInstance::getId)); assertThat(actual).isEmpty(); }</code><technical_language>Missing part of shuffling..</technical_language>

Target:
public void testGetIncompleteTriggerInstancesReturnsEmpty() { final List<TriggerInstance> all = new ArrayList<>(); for (int i = 0; i < 5; i++) { all.add(this.createTriggerInstance(this.flowTrigger, this .flow_id, this.flow_version, this.submitUser, this.project, System.currentTimeMillis())); if (i <= 2) { finalizeTriggerInstanceWithCancelled(all.get(i)); } else { finalizeTriggerInstanceWithSuccess(all.get(i), 1000); } } this.shuffleAndUpload(all); final List<TriggerInstance> actual = new ArrayList<>(this.triggerInstLoader .getIncompleteTriggerInstances()); all.sort(Comparator.comparing(TriggerInstance::getId)); actual.sort(Comparator.comparing(TriggerInstance::getId)); assertThat(actual).isEmpty(); }
Source:
<code>public void setupDrawer() { leftDrawer = (DrawerLayout) findViewById(R.id.main_drawer); rightDrawer = (DrawerLayout) findViewById(R.id.nick_drawer); if (leftDrawer!=null) { leftDrawer.setStatusBarBackgroundColor(getResources().getColor(R.color.primary_dark)); extensibleDrawerToggle = new ExtensibleDrawerToggle(leftDrawer, new ActionBarDrawerToggle( MainActivity.this, leftDrawer, actionbar.getWrappedToolbar(), R.string.hint_drawer_open, R.string.hint_drawer_close ) { public void onDrawerClosed(View drawerView) { updateBufferRead(); <START> updateBufferRead(); <END> ((BufferFragment) manager.bufferFragment).finishActionMode(); setTitleAndMenu(); } public void onDrawerOpened(View drawerView) { manager.closeDrawer(Side.RIGHT); setTitleAndMenu(); } public void onDrawerSlide(View drawerView, float slideOffset) { if (manager.isDrawerVisible(Side.RIGHT)) manager.closeDrawer(Side.RIGHT); super.onDrawerSlide(drawerView,0); } }); leftDrawer.setDrawerListener((extensibleDrawerToggle.getDrawerListener())); } else if (Build.VERSION.SDK_INT>=Build.VERSION_CODES.LOLLIPOP) { getWindow().setStatusBarColor(getResources().getColor(R.color.primary_dark)); } }</code><technical_language>Duplicate code</technical_language>

Target:
public void setupDrawer() { leftDrawer = (DrawerLayout) findViewById(R.id.main_drawer); rightDrawer = (DrawerLayout) findViewById(R.id.nick_drawer); if (leftDrawer!=null) { leftDrawer.setStatusBarBackgroundColor(getResources().getColor(R.color.primary_dark)); if (extensibleDrawerToggle==null) { extensibleDrawerToggle = new ExtensibleDrawerToggle(leftDrawer, new ActionBarDrawerToggle( MainActivity.this, leftDrawer, actionbar.getWrappedToolbar(), R.string.hint_drawer_open, R.string.hint_drawer_close ) { @Override public void onDrawerClosed(View drawerView) { updateBufferRead(); ((BufferFragment) manager.bufferFragment).finishActionMode(); setTitleAndMenu(); } @Override public void onDrawerOpened(View drawerView) { manager.closeDrawer(Side.RIGHT); setTitleAndMenu(); manager.hideKeyboard(); } @Override public void onDrawerSlide(View drawerView, float slideOffset) { super.onDrawerSlide(drawerView, 0); } }); leftDrawer.setDrawerListener((extensibleDrawerToggle.getDrawerListener())); } } }
Source:
<code>public LfsRepositoryReadOnly(String name) { <START> super("repository " + name + " is read-only"); END> }</code><technical_language>good, message externalized e.g. MessageFormat in order enable translation other languages</technical_language>

Target:
public LfsRepositoryReadOnly(String name) { super(MessageFormat.format(LfsText.get().repositoryReadOnly, name)); }
Source:
<code>public AnnotatedTypeWrapper(AnnotatedType<X> annotatedType) { this.delegate = annotatedType; <START> replaceDeprecatedAnnotatedMethods(); <END> if (delegate.isAnnotationPresent(ActivateThreadScope.class)) { replaceDeprecatedAnnotations(); } }</code><technical_language>A more clear approach is return initialized reference set a final field, i.e.: this.annotatedMethods = wrapAnnotatedMethods(delegate.getMethods()); sets immutable</technical_language>

Target:
public AnnotatedTypeWrapper(AnnotatedType<X> annotatedType) { this.delegate = annotatedType; this.annotatedMethods = replaceDeprecatedAnnotatedMethods(delegate.getMethods()); this.annotations = replaceDeprecatedAnnotations(delegate.getAnnotations()); }
Source:
<code><START> public Boolean setEndOffsets(final String id, final Map<Integer, Long> endOffsets) <END> { return setEndOffsets(id, endOffsets, false); }</code><technical_language>This need nullable</technical_language>

Target:
public boolean setEndOffsets(final String id, final Map<Integer, Long> endOffsets) { return setEndOffsets(id, endOffsets, false); }
Source:
<code>public JobId submitFromCatalog(String catalogRestURL, String bucketName, String workflowName, Map<String, String> variables) <START> throws NotConnectedException, PermissionException, SubmissionClosedException, JobCreationException { <END> JobIdData jobIdData = null; CloseableHttpClient httpclient = HttpClients.createDefault(); HttpPost httpPost = new HttpPost(catalogRestURL + "/buckets/" + bucketName + "/resources/" + workflowName + "/raw"); httpPost.addHeader("sessionid", sid); try (CloseableHttpResponse response = httpclient.execute(httpPost)) { jobIdData = restApiClient().submitXml(sid, response.getEntity().getContent(), variables); } catch (Exception e) { throwNCEOrPEOrSCEOrJCE(e); } return jobId(jobIdData); }</code><technical_language>![MINOR](<LINK_2> 'Severity: MINOR') Remove redundant '!unknownSymbol!' thrown exception declaration(s). [![rule](<LINK_1>](<LINK_0></technical_language>

Target:
public JobId submitFromCatalog(String catalogRestURL, String bucketName, String workflowName, Map<String, String> variables) throws NotConnectedException, PermissionException, SubmissionClosedException, JobCreationException { JobIdData jobIdData = null; HttpPost httpPost = new HttpPost(catalogRestURL + "/buckets/" + bucketName + "/resources/" + workflowName + "/raw"); httpPost.addHeader("sessionid", sid); try (CloseableHttpClient httpclient = HttpClients.createDefault(); CloseableHttpResponse response = httpclient.execute(httpPost)) { jobIdData = restApiClient().submitXml(sid, response.getEntity().getContent(), variables); } catch (Exception e) { throwNCEOrPEOrSCEOrJCE(e); } return jobId(jobIdData); }
Source:
<code>protected void migrateData(ReviewDb db, UpdateUI ui) throws OrmException, SQLException { final List<AccountGroup> allGroups = db.accountGroups().all().toList(); for(final AccountGroup group : allGroups) { <START> group.setVisibleToAll(false); <END> } db.accountGroups().update(allGroups); }</code><technical_language>This necessary. gwtorm add new column initialize false default</technical_language>

Target:
protected void migrateData(ReviewDb db, UpdateUI ui) throws OrmException, SQLException { db.approvalCategoryValues().insert( Collections.singleton(new ApprovalCategoryValue( new ApprovalCategoryValue.Id(ApprovalCategory.READ, (short) 3), "Upload merges permission"))); Statement stmt = ((JdbcSchema) db).getConnection().createStatement(); try { stmt.execute("UPDATE ref_rights SET max_value = 3" + " WHERE category_id = '" + ApprovalCategory.READ.get() + "' AND max_value = 2"); } finally { stmt.close(); } }
Source:
<code><START> public void setIsLastPage(boolean b) { <END> }</code><technical_language>Is this needed anymore</technical_language>

Target:
public void setIsLastPage(boolean b) { hasMoreImages = !b; }
Source:
<code>public void close() throws IOException { try { writer.close(); } catch (InterruptedException e) { throw new IOException(e); } <START> codecFactory.release(); <END> }</code><technical_language>this in a finally block release in case exception occurs</technical_language>

Target:
public void close() throws IOException { try { writer.close(); } catch (InterruptedException e) { throw new IOException(e); } finally { codecFactory.release(); } }
Source:
<code>public void edit(ConfirmationModel object) { driver.edit(object); object.getLatch().getPropertyChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { if ("IsAvailable".equals(((PropertyChangedEventArgs) args).PropertyName)) { EntityModel entity = (EntityModel) sender; if (entity.getIsAvailable()) { latch.setVisible(true); } } } }); <START> force.setLabel(object.getForceLabel()); <END> force.asCheckBox().setValue((Boolean) object.getForce().getEntity()); object.getPropertyChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { if ("ForceLabel".equals(((PropertyChangedEventArgs) args).PropertyName)) { ConfirmationModel entity = (ConfirmationModel) sender; force.setLabel(entity.getForceLabel()); } } }); setNote(object.getNote()); object.getPropertyChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { if ("Note".equals(((PropertyChangedEventArgs) args).PropertyName)) { ConfirmationModel entity = (ConfirmationModel) sender; setNote(entity.getNote()); } } }); }</code><technical_language>This called if (object.getForceLabel() != null), I causing default force labels GUI disappear</technical_language>

Target:
public void edit(ConfirmationModel object) { driver.edit(object); object.getLatch().getPropertyChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { if ("IsAvailable".equals(((PropertyChangedEventArgs) args).PropertyName)) { EntityModel entity = (EntityModel) sender; if (entity.getIsAvailable()) { latch.setVisible(true); } } } }); if (object.getForceLabel() != null) { force.setLabel(object.getForceLabel()); } force.asCheckBox().setValue((Boolean) object.getForce().getEntity()); object.getPropertyChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { if ("ForceLabel".equals(((PropertyChangedEventArgs) args).PropertyName)) { ConfirmationModel entity = (ConfirmationModel) sender; force.setLabel(entity.getForceLabel()); } } }); setNote(object.getNote()); object.getPropertyChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { if ("Note".equals(((PropertyChangedEventArgs) args).PropertyName)) { ConfirmationModel entity = (ConfirmationModel) sender; setNote(entity.getNote()); } } }); }
Source:
<code>public void handleDaysSpentInputChange( ChangeEvent event ) { try { Long value = daysSpentInput.getValue().isEmpty() ? null : Long.parseLong( daysSpentInput.getValue() ); presenter.onDaysSpentChange( value ); } catch ( NumberFormatException e ) { <START> <END> } }</code><technical_language>this leave View in inconsistent state Presenter? show error in View wrong? default a valid update View</technical_language>

Target:
public void handleDaysSpentInputChange( ChangeEvent event ) { boolean isNumeric = daysSpentInput.getValue().matches( "\\d+" ); if (isNumeric) { presenter.onDaysSpentChange( Long.parseLong( daysSpentInput.getValue() ) ); } else { presenter.onDaysSpentChange( 0l ); daysSpentInput.setValue( "0" ); } }
Source:
<code><START> private final Object createValue() <END> { switch (typeSignature) { case "boolean": return random.nextBoolean(); case "tinyint": return Long.valueOf(random.nextLong()).byteValue(); case "smallint": return (short) random.nextInt(); case "integer": return random.nextInt(); case "bigint": return random.nextLong(); case "decimal(10,5)": return new SqlDecimal(BigInteger.valueOf(random.nextLong() % 10_000_000_000L), SHORT_DECIMAL_TYPE.getPrecision(), SHORT_DECIMAL_TYPE.getScale()); case "decimal(30,10)": return new SqlDecimal(BigInteger.valueOf(random.nextLong() % 10_000_000_000L), LONG_DECIMAL_TYPE.getPrecision(), LONG_DECIMAL_TYPE.getScale()); case "timestamp": return new SqlTimestamp((random.nextLong()), UTC_KEY); case "real": return random.nextFloat(); case "double": return random.nextDouble(); case "varchar_dictionary": return Strings.repeat("0", MAX_STRING); case "varchar_direct": return randomAsciiString(random); } throw new UnsupportedOperationException("Unsupported type: " + typeSignature); }</code><technical_language>same, remove final</technical_language>

Target:
private Object createValue() { switch (typeSignature) { case "boolean": return random.nextBoolean(); case "tinyint": return Long.valueOf(random.nextLong()).byteValue(); case "smallint": return (short) random.nextInt(); case "integer": return random.nextInt(); case "bigint": return random.nextLong(); case "decimal(10,5)": return new SqlDecimal(BigInteger.valueOf(random.nextLong() % 10_000_000_000L), SHORT_DECIMAL_TYPE.getPrecision(), SHORT_DECIMAL_TYPE.getScale()); case "decimal(30,10)": return new SqlDecimal(BigInteger.valueOf(random.nextLong() % 10_000_000_000L), LONG_DECIMAL_TYPE.getPrecision(), LONG_DECIMAL_TYPE.getScale()); case "timestamp": return new SqlTimestamp((random.nextLong()), UTC_KEY); case "real": return random.nextFloat(); case "double": return random.nextDouble(); case "varchar_dictionary": return Strings.repeat("0", MAX_STRING); case "varchar_direct": return randomAsciiString(random); } throw new UnsupportedOperationException("Unsupported type: " + typeSignature); }
Source:
<code>private MacPool.ReUsableMac getReUseableMacInstance() { <START> if (this.currentCredentialKey != this.credential.getKey()) { <END> synchronized (this.credential) { if (this.currentCredentialKey != this.credential.getKey()) { byte[] masterKeyBytes = this.credential.getKey().getBytes(StandardCharsets.UTF_8); byte[] masterKeyDecodedBytes = Utils.Base64Decoder.decode(masterKeyBytes); SecretKey signingKey = new SecretKeySpec(masterKeyDecodedBytes, "HMACSHA256"); try { Mac macInstance = Mac.getInstance("HMACSHA256"); macInstance.init(signingKey); this.currentCredentialKey = this.credential.getKey(); this.macPool = new MacPool(macInstance); } catch (NoSuchAlgorithmException | InvalidKeyException e) { throw new IllegalStateException(e); } } } } return macPool.take(); }</code><technical_language>@kirankumarkolli - need update this file proper spotbug issue is failing : <LINK_0></technical_language>

Target:
private MacPool.ReUsableMac getReUseableMacInstance() { reInitializeIfPossible(); return macPool.take(); }
Source:
<code>public void getInstanceAsync_nullConfigShouldThrow() { thrown.expect(IllegalArgumentException.class); DynamicRealm.getInstanceAsync(null, new DynamicRealm.Callback() { @Override public void onSuccess(DynamicRealm realm) { <START> } <END> }); }</code><technical_language>fail(); in onSuccess()</technical_language>

Target:
public void getInstanceAsync_nullConfigShouldThrow() { thrown.expect(IllegalArgumentException.class); DynamicRealm.getInstanceAsync(null, new DynamicRealm.Callback() { @Override public void onSuccess(DynamicRealm realm) { fail(); } }); }