auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void registerReceivers() { this.registrar = new BroadcastRegistrar(); this.registrar .addAction(ConnectionService.ACTION_FAN_CONNECTED, new IBroadcastActionHandler() { @Override public void onReceiveAction(Context context, Intent intent) { String bluetoothID = intent.getStringExtra(ConnectionService.EXTRA_FAN_NAME); String macAddress = intent.getStringExtra(ConnectionService.EXTRA_FAN_ADDRESS); userList.addUser(bluetoothID, macAddress); Log.i(TAG, "User List: " + userList.toString()); notifyUserListUpdate(); } }) .addAction(ConnectionService.ACTION_FAN_DISCONNECTED, new IBroadcastActionHandler() { @Override public void onReceiveAction(Context context, Intent intent) { String macAddress = intent.getStringExtra(ConnectionService.EXTRA_FAN_ADDRESS); userList.removeUser(macAddress); notifyUserListUpdate(); } }) .addAction(MessagingService.ACTION_NEW_CONNECTED_USERS, new IBroadcastActionHandler() { @Override public void onReceiveAction(Context context, Intent intent) { <START> Log.i(TAG, "New Connected Users Message Recieved"); <END> userList = intent.getParcelableExtra(MessagingService.EXTRA_USER_LIST); Log.i(TAG,"New User List:" + userList.toString()); new BroadcastIntent(UserList.ACTION_USER_LIST_UPDATE).send(CustomApp.this); } }) .register(this); }</code><technical_language>dont want log forever. Lets remove it</technical_language>

Target:
private void registerReceivers() { this.registrar = new BroadcastRegistrar(); this.registrar .addAction(ConnectionService.ACTION_FAN_CONNECTED, new IBroadcastActionHandler() { @Override public void onReceiveAction(Context context, Intent intent) { String bluetoothID = intent.getStringExtra(ConnectionService.EXTRA_FAN_NAME); String macAddress = intent.getStringExtra(ConnectionService.EXTRA_FAN_ADDRESS); userList.addUser(bluetoothID, macAddress); notifyUserListUpdate(); } }) .addAction(ConnectionService.ACTION_FAN_DISCONNECTED, new IBroadcastActionHandler() { @Override public void onReceiveAction(Context context, Intent intent) { String macAddress = intent.getStringExtra(ConnectionService.EXTRA_FAN_ADDRESS); userList.removeUser(macAddress); notifyUserListUpdate(); } }) .addAction(MessagingService.ACTION_NEW_CONNECTED_USERS_MESSAGE, new IBroadcastActionHandler() { @Override public void onReceiveAction(Context context, Intent intent) { userList = intent.getParcelableExtra(MessagingService.EXTRA_USER_LIST); new BroadcastIntent(UserList.ACTION_USER_LIST_UPDATE).send(CustomApp.this); } }) .register(this); }
Source:
<code>public boolean save(Intent intent) { synchronized(STATIC_LOCK) { File file = getFile(); if (file.exists()) { ProvisionLogger.loge("Cannot save to the intent store because it already contains" + " an intent"); return false; } AtomicFile atomicFile = null; FileOutputStream stream = null; boolean success = false; try { atomicFile = new AtomicFile(file); stream = atomicFile.startWrite(); XmlSerializer serializer = new FastXmlSerializer(); serializer.setOutput(stream, StandardCharsets.UTF_8.name()); serializer.startDocument(null, true); serializer.startTag(null, TAG_INTENT_STORE); writeIntent(intent, serializer); serializer.endTag(null, TAG_INTENT_STORE); serializer.endDocument(); success = true; return true; } catch (IOException | XmlPullParserException e) { ProvisionLogger.loge("Caught exception while trying to save an intent to the" + " intentStore", e); file.delete(); return false; } finally { if (success) { <START> atomicFile.finishWrite(stream); <END> } else { atomicFile.failWrite(stream); } } } }</code><technical_language>move this above, e.g. replace line 97 it? move failWrite catch block remove need for success variable</technical_language>

Target:
public boolean save(Intent intent) { synchronized(STATIC_LOCK) { File file = getFile(); if (file.exists()) { ProvisionLogger.loge("Cannot save to the intent store because it already contains" + " an intent"); return false; } AtomicFile atomicFile = null; FileOutputStream stream = null; try { atomicFile = new AtomicFile(file); stream = atomicFile.startWrite(); XmlSerializer serializer = new FastXmlSerializer(); serializer.setOutput(stream, StandardCharsets.UTF_8.name()); serializer.startDocument(null, true); serializer.startTag(null, TAG_INTENT_STORE); writeIntent(intent, serializer); serializer.endTag(null, TAG_INTENT_STORE); serializer.endDocument(); atomicFile.finishWrite(stream); return true; } catch (IOException | XmlPullParserException e) { ProvisionLogger.loge("Caught exception while trying to save an intent to the" + " intentStore", e); file.delete(); atomicFile.failWrite(stream); return false; } } }
Source:
<code>public BlobStore getById(Function<String, InputStream> configGetter, String storeId) { logger.debug("Looking blob store with id {}", storeId); try { HierarchicalConfiguration config = getConfiguration(configGetter); if (config != null) { return findStore(config, store -> StringUtils.equals(storeId, store.getString(CONFIG_KEY_ID))); } } catch (ConfigurationException e) { <START> logger.error("Error reading blob store configuration", e); <END> } return null; }</code><technical_language>swallowing exception? this caller know</technical_language>

Target:
public BlobStore getById(Function<String, InputStream> configGetter, String storeId) throws ConfigurationException, IOException { logger.debug("Looking blob store with id {}", storeId); HierarchicalConfiguration config = getConfiguration(configGetter); if (config != null) { return findStore(config, store -> StringUtils.equals(storeId, store.getString(CONFIG_KEY_ID))); } return null; }
Source:
<code>public List<String> list(String bucket, String prefix) throws IOException { if (prefix.length() > 0 && !prefix.endsWith("/")) prefix += "/"; final ListParser lp = new ListParser(bucket, prefix); do { lp.list(); } while (lp.truncated); Collections.sort(lp.entries); return <START> lp.entries.stream().map(anEntity -> <END> anEntity.name).collect(Collectors.toList()); }</code><technical_language>shorten this map(e -> e.name)</technical_language>

Target:
public List<String> list(String bucket, String prefix) throws IOException { if (prefix.length() > 0 && !prefix.endsWith("/")) prefix += "/"; final ListParser lp = new ListParser(bucket, prefix); do { lp.list(); } while (lp.truncated); Comparator<KeyInfo> comparator = (k1, k2) -> Long.compare(k1.getLastModifiedSecs(), k2.getLastModifiedSecs()); return lp.entries.stream().sorted(comparator.reversed()) .map(e -> e.getName()).collect(Collectors.toList()); }
Source:
<code>public long getWaitTimeoutOnBackpressureMillis() { <START> return getLong(WAIT_TIMEOUT_ON_BACKPRESSURE, 500); <END> }</code><technical_language>I this default -1, util benchmarks show 500 is in general good for of applications</technical_language>

Target:
public long getWaitTimeoutOnBackpressureMillis() { return getLong(WAIT_TIMEOUT_ON_BACKPRESSURE, -1); }
Source:
<code>public void setUseTrackingSessionState (boolean shouldUseTrackingSessionState) { getButtonUseTrackingSessionState().setEnabled(shouldUseTrackingSessionState); <START> delegate.setUseGlobalState(shouldUseTrackingSessionState); <END> if (!shouldUseTrackingSessionState) { getButtonUseTrackingSessionState().setSelected(false); } }</code><technical_language>Needs a null check for delegate. - This done if statement (otherwise set button selected). - talk in IRC, yeah, need add item listener button enable/disable global state in sender (previously close/open dialogue active it...)</technical_language>

Target:
private void setUseTrackingSessionState(boolean shouldUseTrackingSessionState) { if (delegate != null) { delegate.setUseGlobalState(shouldUseTrackingSessionState); } }
Source:
<code><START> expectThat(TuAggregatePart entity) { <END> return super.expectThat(entity); }</code><technical_language>I fits previous line</technical_language>

Target:
public EventApplierExpected<TuComments> expectThat(TuAggregatePart entity) { return super.expectThat(entity); }
Source:
<code>public SystemOffsetProfile(ProfileCallback callback, ProfileContext context) { this.callback = callback; this.context = context; Object paramValue = this.context.getConfiguration().get(OFFSET_PARAM); logger.debug("Parameter '{}' has value '{}' ", OFFSET_PARAM, paramValue); if (paramValue instanceof String) { try { offset = new QuantityType<>((String) paramValue); } catch (IllegalArgumentException e) { logger.error("Cannot convert value '{}' of parameter '{}' into a valid offset of type QyantityType.", paramValue, OFFSET_PARAM); } } else { <START> logger.error("Parameter '{}' is not of type String", OFFSET_PARAM); <END> } }</code><technical_language>surprising offset _has_ a _String_? Especially in context of plain numeric types this is counter-intuitive</technical_language>

Target:
public SystemOffsetProfile(ProfileCallback callback, ProfileContext context) { this.callback = callback; this.context = context; Object paramValue = this.context.getConfiguration().get(OFFSET_PARAM); logger.debug("Configuring profile with parameter '{}'", OFFSET_PARAM, paramValue); if (paramValue instanceof String) { try { offset = new QuantityType<>((String) paramValue); } catch (IllegalArgumentException e) { logger.error("Cannot convert value '{}' of parameter '{}' into a valid offset of type QuantityType.", paramValue, OFFSET_PARAM); } } else if (paramValue instanceof BigDecimal) { BigDecimal bd = (BigDecimal) paramValue; offset = new QuantityType<>(bd.toString()); } else { logger.error("Parameter '{}' is not of type String or BigDecimal", OFFSET_PARAM); } }
Source:
<code>public void run() { <START> LOG.info("Check server of machine at {}", serverRef, machineName, System.currentTimeMillis()); <END> if (isTimedOut()) { reportFuture.completeExceptionally(new InfrastructureException( "Server " + serverRef + " in machine " + machineName + " not available.")); } else if (isAvailable()) { LOG.info("Server of machine started", serverRef, machineName); reportFuture.complete(serverRef); } else { timer.schedule(new ServerCheckingTask(), period); } }</code><technical_language>this is kind of information spam master logs, change log level _debug_? More consider removing log frameworks add time automatically</technical_language>

Target:
public void run() { if (isTimedOut()) { reportFuture.completeExceptionally(new InfrastructureException( String.format("Server '%s' in machine '%s' not available.", serverRef, machineName))); } else if (isAvailable()) { reportFuture.complete(serverRef); } else { timer.schedule(new ServerCheckingTask(), period); } }
Source:
<code>public void cloneWithSparseCheckout(String directory, String remoteUrl, String branch) throws GitException, UnauthorizedException { init(newDto(InitRequest.class).withInitCommit(false).withBare(false)); remoteAdd(newDto(RemoteAddRequest.class).withName("origin").withUrl(remoteUrl)); getConfig().add("core.sparsecheckout", "true"); final File sparseCheckout = new File(getWorkingDir(), ".git" + File.separator + "info" + File.separator + "sparse-checkout"); <START> try (BufferedWriter writer = Files.newBufferedWriter(sparseCheckout.toPath(), Charset.forName("UTF-8"))) { <END> writer.write(directory.startsWith("/") ? directory : "/" + directory); } catch (IOException e) { throw new GitException(e); } try { fetch(newDto(FetchRequest.class).withRemote("origin")); } catch (GitException e) { throw new GitException( String.format("Unable to fetch remote branch %s. Make sure it exists and can be accessed.", branch), e); } try { checkout(newDto(CheckoutRequest.class).withName(branch)); } catch (GitException e) { throw new GitException( String.format("Unable to checkout branch %s. Make sure it exists and can be accessed.", branch), e); } }</code><technical_language>String msg = "hello"; java.nio.file.Files.write(Paths.get("./duke.txt"), msg.getBytes());</technical_language>

Target:
public void cloneWithSparseCheckout(String directory, String remoteUrl, String branch) throws GitException, UnauthorizedException { init(newDto(InitRequest.class).withInitCommit(false).withBare(false)); remoteAdd(newDto(RemoteAddRequest.class).withName("origin").withUrl(remoteUrl)); getConfig().add("core.sparsecheckout", "true"); try { Files.write(Paths.get(getWorkingDir() + "/.git/info/sparse-checkout"), (directory.startsWith("/") ? directory : "/" + directory).getBytes()); } catch (IOException exception) { throw new GitException(exception.getMessage(), exception); } try { fetch(newDto(FetchRequest.class).withRemote("origin")); } catch (GitException exception) { throw new GitException( String.format("Unable to fetch remote branch %s. Make sure it exists and can be accessed.", branch), exception); } try { checkout(newDto(CheckoutRequest.class).withName(branch)); } catch (GitException exception) { throw new GitException( String.format("Unable to checkout branch %s. Make sure it exists and can be accessed.", branch), exception); } }
Source:
<code>public void authenticateWithoutProvider() throws SecurityException, SecurityProviderNotFoundException { expected.expect(SecurityProviderNotFoundException.class); manager.authenticate(authentication); verify(provider).authenticate(authentication); <START> verifyZeroInteractions(provider); <END> }</code><technical_language>this contradictory line right above</technical_language>

Target:
public void authenticateWithoutProvider() throws SecurityException, SecurityProviderNotFoundException { expected.expect(SecurityProviderNotFoundException.class); try { manager.authenticate(authentication); } finally { verifyZeroInteractions(provider); } }
Source:
<code>public void testNegationAllExceptJavaInSrcAndExceptChildDirInSrc() throws IOException { writeIgnoreFile(".gitignore", " "); writeTrashFile("src/keep.java", ""); <START> writeTrashFile("src/nothere.o", ""); <END> writeTrashFile("src/a/nothere.java", ""); writeTrashFile("src/a/nothere.o", ""); beginWalk(); assertEntry(F, ignored, ".gitignore"); assertEntry(F, ignored, "nothere.o"); assertEntry(D, false, "src"); assertEntry(F, ignored, "src/.gitignore"); assertEntry(D, tracked, "src/a"); assertEntry(F, tracked, "src/a/nothere.java"); assertEntry(F, tracked, "src/a/nothere.o"); assertEntry(F, tracked, "src/keep.java"); }</code><technical_language>This included in assertEntry below</technical_language>

Target:
public void testNegationAllExceptJavaInSrcAndExceptChildDirInSrc() throws IOException { writeIgnoreFile(".gitignore", " "); writeTrashFile("src/keep.java", ""); writeTrashFile("src/nothere.o", ""); writeTrashFile("src/a/keep.java", ""); writeTrashFile("src/a/keep.o", ""); beginWalk(); assertEntry(F, ignored, ".gitignore"); assertEntry(F, ignored, "nothere.o"); assertEntry(D, tracked, "src"); assertEntry(F, ignored, "src/.gitignore"); assertEntry(D, tracked, "src/a"); assertEntry(F, tracked, "src/a/keep.java"); assertEntry(F, tracked, "src/a/keep.o"); assertEntry(F, tracked, "src/keep.java"); assertEntry(F, ignored, "src/nothere.o"); endWalk(); }
Source:
<code>public Command getRefactorCommand(final IRefactorRequest request) { CompoundCommand compoundCommand = new CompoundCommand(); Iterator<IRefactorParticipant> refactorParticipants = participantsRegistry.getRefactorParticipants(); Command scopeCommand = null; if (null == request.getScope()) { scopeCommand = RefactorScopeProvider.getInstance(editingDomain).getScopeCommand(request); if (null != scopeCommand && scopeCommand.canExecute()) { compoundCommand.append(scopeCommand); } else { request.setScope(RefactorPreferencesUtils.getScopePreference()); } } IRefactorParticipant participant = null; while <START> (((null != scopeCommand && scopeCommand.canExecute()) || <END> null != request.getScope()) && refactorParticipants.hasNext()) { participant = refactorParticipants.next(); Command refactorCommand = participant.getRefactorCommand(request); if (refactorCommand != null && refactorCommand.canExecute()) { compoundCommand.append(refactorCommand); } } return compoundCommand; }</code><technical_language>identity executability of 'scopeCommand' variable change iterate participants? odd and, probably, wrong</technical_language>

Target:
public Command getRefactorCommand(final IRefactorRequest request) { CompoundCommand compoundCommand = new CompoundCommand(); List<IRefactorParticipant> refactorParticipants = participantsRegistry.getRefactorParticipants(); launchRefactoring(request, refactorParticipants); if (null != request.getScope()) { for (IRefactorParticipant participant : refactorParticipants) { Command refactorCommand = participant.getRefactorCommand(); if (refactorCommand != null) { compoundCommand.append(refactorCommand); } } } return compoundCommand; }
Source:
<code>private void sendMessage(CarbonMessage carbonMessage, Message jmsMessage) throws ClientConnectorException { int deliveryMode = DeliveryMode.PERSISTENT; if (getHeader(carbonMessage, JMSConstants.JMS_DELIVERY_MODE). equalsIgnoreCase(JMSConstants.NON_PERSISTENT_DELIVERY_MODE)) { deliveryMode = DeliveryMode.NON_PERSISTENT; } int priority = JMSConstants.DEFAULT_PRIORITY; String value = carbonMessage.getHeader(JMSConstants.JMS_PRIORITY); <START> if (value != null) { <END> priority = Integer.parseInt(value); } long ttl = 0; value = carbonMessage.getHeader(JMSConstants.JMS_EXPIRATION); if (value != null) { ttl = Long.parseLong(value); } try { messageProducer.send(jmsMessage, deliveryMode, priority, ttl); } catch (JMSException e) { throw new ClientConnectorException("Error occurred while sending the message to JMS provider. " + e.getMessage(), e); } }</code><technical_language>flip null check</technical_language>

Target:
private void sendMessage(CarbonMessage carbonMessage, Message jmsMessage) throws ClientConnectorException { int deliveryMode = DeliveryMode.PERSISTENT; if (getHeader(carbonMessage, JMSConstants.JMS_DELIVERY_MODE). equalsIgnoreCase(JMSConstants.NON_PERSISTENT_DELIVERY_MODE)) { deliveryMode = DeliveryMode.NON_PERSISTENT; } int priority = JMSConstants.DEFAULT_PRIORITY; String value = carbonMessage.getHeader(JMSConstants.JMS_PRIORITY); if (value != null) { priority = Integer.parseInt(value); } long timeToLive = 0; value = carbonMessage.getHeader(JMSConstants.JMS_EXPIRATION); if (value != null) { timeToLive = Long.parseLong(value); } try { messageProducer.send(jmsMessage, deliveryMode, priority, timeToLive); } catch (JMSException e) { throw new ClientConnectorException("Send Failed with priority " + priority + " , delivery mode " + deliveryMode + " [ " + e.getMessage() + " ]", e); } }
Source:
<code>public void memoizationTest() { final List<Integer> res = new ArrayList<>(); final PackageStats toplevel = Metrics.getTopLevelPackageStats(); ASTCompilationUnit acu = parseAndVisitForClass15(MetricsVisitorTestData.class); acu.jjtAccept(new JavaParserVisitorReducedAdapter() { @Override public Object visit(ASTMethodOrConstructorDeclaration node, Object data) { res.add((int) toplevel.compute(opMetricKey, node, true, Version.STANDARD)); return super.visit(node, data); } @Override public Object visit(ASTAnyTypeDeclaration node, Object data) { res.add((int) toplevel.compute(classMetricKey, node, true, Version.STANDARD)); return super.visit(node, data); } }, null); <START> System.out.println(); <END> final List<Integer> cmp = new ArrayList<>(); acu.jjtAccept(new JavaParserVisitorReducedAdapter() { @Override public Object visit(ASTMethodOrConstructorDeclaration node, Object data) { cmp.add((int) toplevel.compute(opMetricKey, node, false, Version.STANDARD)); return super.visit(node, data); } @Override public Object visit(ASTAnyTypeDeclaration node, Object data) { cmp.add((int) toplevel.compute(classMetricKey, node, false, Version.STANDARD)); return super.visit(node, data); } }, null); assertEquals(res, cmp); }</code><technical_language>Is visitation dumping console output this is needed</technical_language>

Target:
public void memoizationTest() { ASTCompilationUnit acu = parseAndVisitForClass15(MetricsVisitorTestData.class); List<Integer> expected = visitWith(acu, true); List<Integer> real = visitWith(acu, false); assertEquals(expected, real); }
Source:
<code>public Response createFromYaml( String data, @ApiParam(value = "Provide extended validation messages") @DefaultValue("false") @QueryParam("verbose") boolean verbose) throws ServerException, ConflictException, NotFoundException, ValidationException, BadRequestException { WorkspaceImpl workspace; try { Devfile devfile = devfileManager.parse(data, verbose); workspace = devfileManager.createWorkspace(devfile, null); } catch (DevfileFormatException | DevfileRecipeFormatException e) { throw new BadRequestException(e.getMessage()); } catch (JsonProcessingException e) { <START> throw new ServerException(e.getMessage()); <END> } return Response.status(201) .entity(asDto(workspace).withLinks(linksGenerator.genLinks(workspace, getServiceContext()))) .build(); }</code><technical_language>I sense put original exception</technical_language>

Target:
public Response createFromYaml( String data, @ApiParam(value = "Provide extended validation messages") @DefaultValue("false") @QueryParam("verbose") boolean verbose) throws ServerException, ConflictException, NotFoundException, ValidationException, BadRequestException { WorkspaceImpl workspace; try { Devfile devfile = devfileManager.parse(data, verbose); workspace = devfileManager.createWorkspace(devfile, null); } catch (DevfileException e) { throw new BadRequestException(e.getMessage()); } catch (JsonProcessingException e) { throw new ServerException(e.getMessage(), e); } return Response.status(201) .entity(asDto(workspace).withLinks(linksGenerator.genLinks(workspace, getServiceContext()))) .build(); }
Source:
<code>public void addConfig(Config config) { <START> addToMetricsMessage(GROUP_NAME_FOR_DIAGNOSTICS_MANAGER, CONFIG, config); <END> }</code><technical_language>config is a non-primitive object, cast Map<String, String> serializing adding map; similar containerModels added above</technical_language>

Target:
public void addConfig(Config config) { addToMetricsMessage(GROUP_NAME_FOR_DIAGNOSTICS_MANAGER, CONFIG_METRIC_NAME, (Map<String, String>) config); }
Source:
<code>public void testPropsToMap() { Properties props = new Properties(); props.put(1, 2); assertThrows(ConfigException.class, () -> Utils.propsToMap(props)); props.remove(1); props.put("key", 22); <START> assertEquals(Utils.propsToMap(props).get("key"), 22); <END> }</code><technical_language>assert a string valued parameter too</technical_language>

Target:
public void testPropsToMap() { assertThrows(ConfigException.class, () -> { Properties props = new Properties(); props.put(1, 2); Utils.propsToMap(props); }); assertValue(false); assertValue(1); assertValue("string"); assertValue(1.1); assertValue(Collections.emptySet()); assertValue(Collections.emptyList()); assertValue(Collections.emptyMap()); }
Source:
<code>private void fetchMediaList(boolean loadMore) { if (!NetworkUtils.isNetworkAvailable(getActivity())) { updateEmptyView(EmptyViewMessageType.NETWORK_ERROR); setRefreshing(false); return; } if (!TextUtils.isEmpty(mSearchTerm)) { setRefreshing(false); return; } if (!mIsRefreshing) { mIsRefreshing = true; updateEmptyView(EmptyViewMessageType.LOADING); setRefreshing(true); String mimeType; <START> switch (mFilter) { <END> case FILTER_AUDIO: mimeType = MediaUtils.MIME_TYPE_AUDIO; case FILTER_DOCUMENTS: mimeType = MediaUtils.MIME_TYPE_APPLICATION; case FILTER_IMAGES: mimeType = MediaUtils.MIME_TYPE_IMAGE; case FILTER_VIDEOS: mimeType = MediaUtils.MIME_TYPE_VIDEO; default: mimeType = null; } FetchMediaListPayload payload = new FetchMediaListPayload(mSite, loadMore, mimeType); mDispatcher.dispatch(MediaActionBuilder.newFetchMediaListAction(payload)); } }</code><technical_language>I noticed network requests including mime type - reason is cases in this switch missing breaks</technical_language>

Target:
private void fetchMediaList(boolean loadMore) { if (!NetworkUtils.isNetworkAvailable(getActivity())) { updateEmptyView(EmptyViewMessageType.NETWORK_ERROR); setRefreshing(false); return; } if (!TextUtils.isEmpty(mSearchTerm)) { setRefreshing(false); return; } if (!mIsRefreshing) { setRefreshing(true); updateEmptyView(EmptyViewMessageType.LOADING); FetchMediaListPayload payload = new FetchMediaListPayload(mSite, NUM_MEDIA_PER_FETCH, loadMore, mFilter.toMimeType()); mDispatcher.dispatch(MediaActionBuilder.newFetchMediaListAction(payload)); } }
Source:
<code>private static boolean shouldValidate(String namespaceUri) { Integer index = NAMESPACE_URI_ORDERING.get(namespaceUri); <START> return index != null && index >= VALIDATE_SINCE_NAMESPACE_URI_INDEX; <END> }</code><technical_language>add a log.debug (or trace) here, a message "Should validate schema? (true|false)"</technical_language>

Target:
private static boolean shouldValidate(String namespaceUri) { Integer index = NAMESPACE_URI_ORDERING.get(namespaceUri); boolean result = index != null && index >= VALIDATE_SINCE_NAMESPACE_URI_INDEX; if (log.isDebugEnabled()) { log.debug("Should validate with XML schema for namspace URI '"+ namespaceUri +"'? "+ result); } return result; }
Source:
<code>public void widgetCreated(XWidget xWidget, FormToolkit toolkit, Artifact art, SwtXWidgetRenderer dynamicXWidgetLayout, XModifiedListener modListener, boolean isEditable) throws OseeCoreException { super.widgetCreated(xWidget, toolkit, art, dynamicXWidgetLayout, modListener, isEditable); if (xWidget.getLabel().equals("WAS Branch")) { branchWidget = (XBranchSelectWidget) xWidget; branchWidget.setEditable(false); } else if (xWidget.getLabel().equals("Publish As Diff")) { final XCheckBox checkBox = (XCheckBox) xWidget; checkBox.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { super.widgetSelected(e); <START> branchWidget.setEditable(checkBox.isChecked()); <END> if (!checkBox.isChecked()) { branchWidget.setSelection(null); } } }); } else if (xWidget.getLabel().equals("Master Template")) { final XCombo masterCombo = (XCombo) xWidget; masterCombo.addModifyListener(new ModifyListener() { @Override public void modifyText(ModifyEvent e) { if (masterCombo.get().contains("srsMaster")) { slaveWidget.setEnabled(true); } else { slaveWidget.setEnabled(false); slaveWidget.set(""); } } }); } else if (xWidget.getLabel().equals("Slave Template")) { slaveWidget = (XCombo) xWidget; slaveWidget.setEnabled(false); } }</code><technical_language>this checked for null? is "Publish Diff" created "WAS Branch?"</technical_language>

Target:
public void widgetCreated(XWidget xWidget, FormToolkit toolkit, Artifact art, SwtXWidgetRenderer dynamicXWidgetLayout, XModifiedListener modListener, boolean isEditable) throws OseeCoreException { super.widgetCreated(xWidget, toolkit, art, dynamicXWidgetLayout, modListener, isEditable); if (xWidget.getLabel().equals(WAS_BRANCH)) { branchWidget = (XBranchSelectWidget) xWidget; branchWidget.setEditable(false); } else if (xWidget.getLabel().equals(PUBLISH_AS_DIFF)) { final XCheckBox checkBox = (XCheckBox) xWidget; checkBox.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { super.widgetSelected(e); branchWidget.setEditable(checkBox.isChecked()); if (!checkBox.isChecked()) { branchWidget.setSelection(null); } } }); } else if (xWidget.getLabel().equals(MASTER_TEMPLATE)) { final XCombo masterCombo = (XCombo) xWidget; masterCombo.addModifyListener(new ModifyListener() { @Override public void modifyText(ModifyEvent e) { if (masterCombo.get().contains("srsMaster")) { slaveWidget.setEnabled(true); } else { slaveWidget.setEnabled(false); slaveWidget.set(""); } } }); } else if (xWidget.getLabel().equals(SLAVE_TEMPLATE)) { slaveWidget = (XCombo) xWidget; slaveWidget.setEnabled(false); } }
Source:
<code>public String printPendingRanges() { StringBuilder sb = new StringBuilder(); for (Map.Entry<Range<Token>, List<Replica>> entry : this) { Range<Token> range = entry.getKey(); for (Replica replica : entry.getValue()) { <START> sb.append(replica).append(':').append(range); <END> sb.append(System.getProperty("line.separator")); } } return sb.toString(); }</code><technical_language>kind of compatibility issues creating changing output? (And kind I create InetAddressAndPort?) issue in a trace log statement TokenMetadata.toString()</technical_language>

Target:
public String printPendingRanges() { StringBuilder sb = new StringBuilder(); for (Map.Entry<Range<Token>, ReplicaList> entry : this) { Range<Token> range = entry.getKey(); for (Replica replica : entry.getValue()) { sb.append(replica).append(':').append(range); sb.append(System.getProperty("line.separator")); } } return sb.toString(); }
Source:
<code>protected void execute() { <START> logger.debug("execute() method is called!"); <END> try { openPort(); for (DavisBindingProvider provider : providers) { Collection<DavisCommand> commands = DavisValueType.getReadCommandsByKeys(provider.getConfiguredKeys()); for (DavisCommand command : commands) { if (wakeup()) { sendCommand(command); } else { logger.warn("Wakeup failed, trying reset sequence!"); resetAfterError(); } } } closePort(); } catch (InitializationException e) { logger.error(e.getMessage()); } logger.debug("execute() method is finished!"); }</code><technical_language>please remove this generic log statement decrease level trace</technical_language>

Target:
protected void execute() { logger.trace("execute() method is called!"); try { openPort(); for (DavisBindingProvider provider : providers) { Collection<DavisCommand> commands = DavisValueType.getReadCommandsByKeys(provider.getConfiguredKeys()); for (DavisCommand command : commands) { if (wakeup()) { sendCommand(command); } else { logger.warn("Wakeup failed, trying reset sequence!"); resetAfterError(); } } } closePort(); } catch (InitializationException e) { logger.error(e.getMessage()); } logger.trace("execute() method is finished!"); }
Source:
<code><START> public void updateParticipantEmailCannotBeChanged() { <END> STUDY.setEmailVerificationEnabled(true); mockHealthCodeAndAccountRetrieval("persisted@email.com", null); when(account.getEmailVerified()).thenReturn(Boolean.TRUE); StudyParticipant participant = new StudyParticipant.Builder().copyOf(PARTICIPANT) .withEmail("updated@email.com").withEmailVerified(Boolean.FALSE).build(); participantService.updateParticipant(STUDY, ImmutableSet.of(), participant); verify(accountDao).updateAccount(accountCaptor.capture()); Account account = accountCaptor.getValue(); verify(account, never()).setEmail(anyString()); verify(account, never()).setEmailVerified(Boolean.FALSE); verify(accountWorkflowService, never()).sendEmailVerificationToken(eq(STUDY), eq(ID), anyString()); }</code><technical_language>Do a test case for update participant change email and/or phone</technical_language>

Target:
public void updateParticipantEmailCannotBeChanged() { STUDY.setEmailVerificationEnabled(true); mockHealthCodeAndAccountRetrieval("persisted@email.com", null); when(account.getEmailVerified()).thenReturn(Boolean.TRUE); StudyParticipant participant = new StudyParticipant.Builder().copyOf(PARTICIPANT) .withEmail("updated@email.com").withEmailVerified(Boolean.FALSE).build(); participantService.updateParticipant(STUDY, ImmutableSet.of(), participant); verify(accountDao).updateAccount(accountCaptor.capture()); Account account = accountCaptor.getValue(); verify(account, never()).setEmail(anyString()); verify(account, never()).setEmailVerified(anyBoolean()); verify(accountWorkflowService, never()).sendEmailVerificationToken(eq(STUDY), eq(ID), anyString()); }
Source:
<code>private Ordering<Row> dimensionOrdering(final String dimension, final StringComparator comparator) { return Ordering.from( Comparator.comparing( <START> (Row row) -> row.getDimension(dimension).isEmpty() <END> ? null : row.getDimension(dimension).get(0), Comparator.nullsFirst(comparator) )); }</code><technical_language>call row.getDimension(dimension) twice. Please extract a small class, inline. unreadable</technical_language>

Target:
private Ordering<Row> dimensionOrdering(final String dimension, final StringComparator comparator) { return Ordering.from( Comparator.comparing((Row row) -> getDimensionValue(row, dimension), Comparator.nullsFirst(comparator)) ); }
Source:
<code>public KillBillHttpClient(final String kbServerUrl, final String username, final String password, final String apiKey, final String apiSecret, final String proxyHost, final Integer proxyPort, final Integer connectTimeOut, final Integer readTimeOut, final Integer requestTimeout) { this.kbServerUrl = kbServerUrl; this.username = username; this.password = password; this.apiKey = apiKey; this.apiSecret = apiSecret; this.httpTimeOut = MoreObjects.firstNonNull(requestTimeout, DEFAULT_HTTP_TIMEOUT_SEC * 1000); final AsyncHttpClientConfig.Builder cfg = new AsyncHttpClientConfig.Builder(); cfg.setConnectTimeout(MoreObjects.firstNonNull(connectTimeOut, DEFAULT_HTTP_TIMEOUT_SEC * 1000)); cfg.setReadTimeout(MoreObjects.firstNonNull(readTimeOut, DEFAULT_HTTP_TIMEOUT_SEC * 1000)); <START> cfg.setRequestTimeout(this.httpTimeOut); <END> cfg.setUserAgent(USER_AGENT); if (proxyHost != null && proxyPort != null) { final ProxyServer proxyServer = new ProxyServer(proxyHost, proxyPort); cfg.setProxyServer(proxyServer); } this.httpClient = new AsyncHttpClient(cfg.build()); mapper = new ObjectMapper(); mapper.registerModule(new JodaModule()); }</code><technical_language>need repeat this (same below)</technical_language>

Target:
public KillBillHttpClient(final String kbServerUrl, final String username, final String password, final String apiKey, final String apiSecret, final String proxyHost, final Integer proxyPort, final Integer connectTimeOut, final Integer readTimeOut, final Integer requestTimeout) { this.kbServerUrl = kbServerUrl; this.username = username; this.password = password; this.apiKey = apiKey; this.apiSecret = apiSecret; final AsyncHttpClientConfig.Builder cfg = new AsyncHttpClientConfig.Builder(); if (requestTimeout != null) { cfg.setRequestTimeout(requestTimeout); int timeoutSec = (int) TimeUnit.MILLISECONDS.toSeconds(requestTimeout); if (TimeUnit.SECONDS.toMillis(timeoutSec) != requestTimeout) { timeoutSec+=1; } requestTimeoutSec = timeoutSec; } else { cfg.setRequestTimeout(DEFAULT_HTTP_TIMEOUT_SEC*1000); requestTimeoutSec = DEFAULT_HTTP_TIMEOUT_SEC; } cfg.setConnectTimeout(MoreObjects.firstNonNull(connectTimeOut, DEFAULT_HTTP_TIMEOUT_SEC * 1000)); cfg.setReadTimeout(MoreObjects.firstNonNull(readTimeOut, DEFAULT_HTTP_TIMEOUT_SEC * 1000)); cfg.setUserAgent(USER_AGENT); if (proxyHost != null && proxyPort != null) { final ProxyServer proxyServer = new ProxyServer(proxyHost, proxyPort); cfg.setProxyServer(proxyServer); } this.httpClient = new AsyncHttpClient(cfg.build()); mapper = new ObjectMapper(); mapper.registerModule(new JodaModule()); }
Source:
<code>public static HashSet<String> getRoles() { if (!isEnabled) { return EMPTY_HASHSET; } Subject subject = org.apache.shiro.SecurityUtils.getSubject(); HashSet<String> roles = new HashSet<>(); Map allRoles = null; if (subject.isAuthenticated()) { Collection realmsList = SecurityUtils.getRealmsList(); for (Iterator<Realm> iterator = realmsList.iterator(); iterator.hasNext(); ) { Realm realm = iterator.next(); String name = realm.getClass().getName(); if (name.equals("org.apache.shiro.realm.text.IniRealm")) { allRoles = ((IniRealm) realm).getIni().get("roles"); break; } else if (name.equals("org.apache.zeppelin.realm.LdapRealm")) { try { AuthorizationInfo auth = ((LdapRealm) realm).queryForAuthorizationInfo( new SimplePrincipalCollection(subject.getPrincipal(), realm.getName()), ((LdapRealm) realm).getContextFactory() ); if (auth != null) { roles = new HashSet<>(auth.getRoles()); break; } } catch (Throwable t) { if (log.isDebugEnabled()) { String msg = "Realm [" + realm + "] threw an exception during a multi-realm authorization attempt:"; <START> log.debug(msg, t); <END> } } } else if (name.equals("org.apache.zeppelin.realm.ActiveDirectoryGroupRealm")) { allRoles = ((ActiveDirectoryGroupRealm) realm).getListRoles(); break; } } if (allRoles != null) { Iterator it = allRoles.entrySet().iterator(); while (it.hasNext()) { Map.Entry pair = (Map.Entry) it.next(); if (subject.hasRole((String) pair.getKey())) { roles.add((String) pair.getKey()); } } } } return roles; }</code><technical_language>Is OK for swallow error log.debug ? log.warn</technical_language>

Target:
public static HashSet<String> getRoles() { if (!isEnabled) { return EMPTY_HASHSET; } Subject subject = org.apache.shiro.SecurityUtils.getSubject(); HashSet<String> roles = new HashSet<>(); Map allRoles = null; if (subject.isAuthenticated()) { Collection realmsList = SecurityUtils.getRealmsList(); for (Iterator<Realm> iterator = realmsList.iterator(); iterator.hasNext(); ) { Realm realm = iterator.next(); String name = realm.getClass().getName(); if (name.equals("org.apache.shiro.realm.text.IniRealm")) { allRoles = ((IniRealm) realm).getIni().get("roles"); break; } else if (name.equals("org.apache.zeppelin.realm.LdapRealm")) { try { AuthorizationInfo auth = ((LdapRealm) realm).queryForAuthorizationInfo( new SimplePrincipalCollection(subject.getPrincipal(), realm.getName()), ((LdapRealm) realm).getContextFactory() ); if (auth != null) { roles = new HashSet<>(auth.getRoles()); break; } } catch (Throwable t) { String msg = "Realm [" + realm + "] threw an exception during a multi-realm authorization attempt:"; log.warn(msg, t); } } else if (name.equals("org.apache.zeppelin.realm.ActiveDirectoryGroupRealm")) { allRoles = ((ActiveDirectoryGroupRealm) realm).getListRoles(); break; } } if (allRoles != null) { Iterator it = allRoles.entrySet().iterator(); while (it.hasNext()) { Map.Entry pair = (Map.Entry) it.next(); if (subject.hasRole((String) pair.getKey())) { roles.add((String) pair.getKey()); } } } } return roles; }
Source:
<code>public boolean hasAllEvents(String[] names) { <START> for (int i = 0; i < names.length; i++) { <END> if (!hasEvent(names[i])) { return false; } } return true; }</code><technical_language>for-each for arrays too, for (String name : names) { !hasEvent(name)</technical_language>

Target:
public boolean hasAllEvents(String[] names) { for (String name : names) { if (!hasEvent(name)) { return false; } } return true; }
Source:
<code>static void normalizeReadCountsByTargetFactors(final ReadCountCollection readCounts, final double[] targetFactors) { final RealMatrix counts = readCounts.counts(); final int targetCount = counts.getRowDimension(); final int columnCount = counts.getColumnDimension(); <START> for (int i = 0; i < targetCount; i++) { <END> final double factorInverse = 1.0 / targetFactors[i]; for (int j = 0; j < columnCount; j++) { counts.setEntry(i, j, counts.getEntry(i, j) * factorInverse); } } }</code><technical_language>a Visitor</technical_language>

Target:
static void normalizeReadCountsByTargetFactors(final ReadCountCollection readCounts, final double[] targetFactors) { final RealMatrix counts = readCounts.counts(); if (targetFactors.length != counts.getRowDimension()) { throw new GATKException("Number of target factors does not correspond to the number of rows."); } counts.walkInOptimizedOrder(new DefaultRealMatrixChangingVisitor() { @Override public double visit(final int row, final int column, final double value) { return value / targetFactors[row]; } }); }
Source:
<code>public void save(final boolean saveInSession, final U profile, final boolean multiProfile) { <START> profile.addAttribute(SESSION_CLIENT_ID, context.getRequestParameter(REQUEST_CLIENT_ID)); <END> super.save(saveInSession, profile, multiProfile); }</code><technical_language>I more sense authentication attributes instead of user attributes</technical_language>

Target:
public void save(final boolean saveInSession, final U profile, final boolean multiProfile) { profile.addAuthenticationAttribute(SESSION_CLIENT_ID, context.getRequestParameter(REQUEST_CLIENT_ID)); super.save(saveInSession, profile, multiProfile); }
Source:
<code>public void buildInfo(Model model) { ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); try ( InputStream buildInfoStream = classLoader.getResourceAsStream("/buildInfo.properties"); InputStream runtimeEnvironmentStream = classLoader.getResourceAsStream("/runtimeEnvironment.properties"); ) { if (runtimeEnvironmentStream != null) { try { Properties runtimeEnvironmentProperties = new Properties(); runtimeEnvironmentProperties.load(runtimeEnvironmentStream); runtimeEnvironmentProperties.setProperty("java.version", System.getProperty("java.version")); model.addAttribute("runtimeEnvironment", runtimeEnvironmentProperties); } catch (IOException e) { <START> logger.error(e.getMessage(), e); <END> } } if (buildInfoStream != null) { try { Properties buildInfoProperties = new Properties(); buildInfoProperties.load(buildInfoStream); model.addAttribute("buildInfo", buildInfoProperties); } catch (IOException e) { logger.error(e.getMessage(), e); } } } catch (IOException e) { logger.error(e.getMessage(), e); } }</code><technical_language>More specific error message, e.g. error loading runtime environment props + e.getMessage()</technical_language>

Target:
public void buildInfo(Model model) { ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); try ( InputStream buildInfoStream = classLoader.getResourceAsStream("/buildInfo.properties"); InputStream runtimeEnvironmentStream = classLoader.getResourceAsStream("/runtimeEnvironment.properties"); ) { if (runtimeEnvironmentStream != null) { try { Properties runtimeEnvironmentProperties = new Properties(); runtimeEnvironmentProperties.load(runtimeEnvironmentStream); runtimeEnvironmentProperties.setProperty("java.version", System.getProperty("java.version")); model.addAttribute("runtimeEnvironment", runtimeEnvironmentProperties); } catch (IOException e) { logger.error("failed to read 'runtimeEnvironment.properties' resource", e); } } if (buildInfoStream != null) { try { Properties buildInfoProperties = new Properties(); buildInfoProperties.load(buildInfoStream); model.addAttribute("buildInfo", buildInfoProperties); } catch (IOException e) { logger.error("failed to read 'buildInfo.properties' resource", e); } } } catch (IOException e) { logger.error(e.getMessage(), e); } }
Source:
<code>public void validateSources() { if (Files.notExists(sourcesFile)) { <START> logger.warn("sources.json not found: {}", sourcesFile); <END> throw new PackageManagerException("sources.json is missing"); } if (!validateSchema(sourcesFile)) { throw new PackageManagerException("There were errors reading sources.json"); } }</code><technical_language>If there, put default prompting</technical_language>

Target:
public boolean validateSources() { if (Files.notExists(sourcesFile)) { logger.warn("sources.json not found: {}", sourcesFile); copyDefaultSources(); return true; } logger.trace("Validating '{}'", sourcesFile); try ( InputStream schemaIn = getClass().getResourceAsStream(SOURCES_SCHEMA); InputStream sourcesJson = Files.newInputStream(sourcesFile); InputStream sourcesJsonForGson = Files.newInputStream(sourcesFile) ) { InputStreamReader reader = new InputStreamReader(sourcesJsonForGson); Gson gson = new GsonBuilder() .registerTypeAdapter(DatabaseRepository.class, new DatabaseRepositoryDeserializer()) .create(); gson.fromJson(reader, DatabaseRepository[].class); JSONObject rawSchema = new JSONObject(new JSONTokener(schemaIn)); Schema schema = SchemaLoader.load(rawSchema); JSONArray toValidate = new JSONArray(new JSONTokener(sourcesJson)); schema.validate(toValidate); return true; } catch (ValidationException e) { logger.error("sources.json has invalid value at: {}", e.getPointerToViolation()); } catch (JSONException | JsonSyntaxException e) { logger.error("sources.json has syntax error: {}", e.getMessage()); } catch (IOException e) { logger.error("Failed to validate sources.json: {}", e.getMessage()); } return false; }
Source:
<code>public int hashCode() { <START> return Objects.hash(position, base, referenceBase, code); <END> }</code><technical_language>a previous attempt fix this: <LINK_0></technical_language>

Target:
public int hashCode() { if (code == NO_CODE) { return Objects.hash(position); } return Objects.hash(position, base, referenceBase); }
Source:
<code><START> private static TreeNode convertListToTreeNode(SampleList sampleList, boolean isFolderOnly) { <END> TreeNode treeNode = new TreeNode(); treeNode.setKey(sampleList.getId().toString()); treeNode.setTitle(sampleList.getListName()); treeNode.setIsFolder(sampleList.isFolder() ? true : false); treeNode.setIsLazy(false); if (treeNode.getIsFolder()) { treeNode.setIcon(AppConstants.FOLDER_ICON_PNG.getString()); } else { treeNode.setIcon(AppConstants.BASIC_DETAILS_PNG.getString()); } if (isFolderOnly && !treeNode.getIsFolder()) { return null; } return treeNode; }</code><technical_language>duplicated convertSampleListToTreeNode</technical_language>

Target:
private static TreeNode convertListToTreeNode(SampleList sampleList, boolean isFolderOnly) { TreeNode treeNode = new TreeNode(); treeNode.setKey(sampleList.getId().toString()); treeNode.setTitle(sampleList.getListName()); treeNode.setIsFolder(sampleList.isFolder()); treeNode.setIsLazy(false); if (treeNode.getIsFolder()) { treeNode.setIcon(AppConstants.FOLDER_ICON_PNG.getString()); } else { treeNode.setIcon(AppConstants.BASIC_DETAILS_PNG.getString()); } if (isFolderOnly && !treeNode.getIsFolder()) { return null; } return treeNode; }
Source:
<code>public static IClasspathContainer readMavenClasspath(IJavaProject javaProject) { IFile file = javaProject.getProject().getFile(".codenvy/classpath.maven"); IClasspathEntry[] entries; if (file.exists()) { try { char[] chars = Util.getResourceContentsAsCharArray(file); String content = new String(chars); if (!content.isEmpty()) { <START> String[] split = content.split(":"); <END> List<IClasspathEntry> classpathEntry = new ArrayList<>(); for (String path : split) { String srcPath = path.substring(0, path.lastIndexOf('.')) + "-sources.jar"; classpathEntry.add(JavaCore.newLibraryEntry(new org.eclipse.core.runtime.Path(path), new org.eclipse.core.runtime.Path(srcPath), null)); } entries = classpathEntry.toArray(new IClasspathEntry[classpathEntry.size()]); } else { entries = EMPTY; } } catch (JavaModelException e) { LOG.error("Can't read maven classpath.", e); entries = EMPTY; } } else { entries = EMPTY; } return new MavenClasspathContainer(entries); }</code><technical_language>i name 'split' for array is insufficiently informative</technical_language>

Target:
public static IClasspathContainer readMavenClasspath(IJavaProject javaProject) { IFile file = javaProject.getProject().getFile(".codenvy/classpath.maven"); IClasspathEntry[] entries; if (file.exists()) { try { char[] chars = Util.getResourceContentsAsCharArray(file); String content = new String(chars); if (!content.isEmpty()) { String[] pathToJars = content.split(":"); List<IClasspathEntry> classpathEntry = new ArrayList<>(); for (String path : pathToJars) { String srcPath = path.substring(0, path.lastIndexOf('.')) + "-sources.jar"; classpathEntry.add(JavaCore.newLibraryEntry(new org.eclipse.core.runtime.Path(path), new org.eclipse.core.runtime.Path(srcPath), null)); } entries = classpathEntry.toArray(new IClasspathEntry[classpathEntry.size()]); } else { entries = EMPTY; } } catch (JavaModelException e) { LOG.error("Can't read maven classpath.", e); entries = EMPTY; } } else { entries = EMPTY; } return new MavenClasspathContainer(entries); }
Source:
<code>private String[] getConfigLoadString() { List<String> v = new ArrayList<String>(); <START> for (PluginInfoWrapper pi : pluginWrappers) { <END> v.add(pi.getFilename()); } synchronized (pluginWrappers) { if (!started) { return toStart; } v.addAll(pluginsFailedLoad.keySet()); } return v.toArray(new String[v.size()]); }</code><technical_language>move this if(!started) check? I understand moved out of synchronized block, if started, do want bother filling in v? some effect timing of wether started is true not</technical_language>

Target:
private String[] getConfigLoadString() { synchronized (loadedPlugins) { if (!started) { return toStart; } } List<String> v = new ArrayList<String>(); for (PluginInfoWrapper pi : loadedPlugins.getLoadedPlugins()) { v.add(pi.getFilename()); } v.addAll(loadedPlugins.getFailedPluginNames()); return v.toArray(new String[v.size()]); }
Source:
<code>protected Annotation createAndValidateTag(String inputFile) throws IOException, JsonParseException, <START> IllegalAccessException, IllegalArgumentException, InvocationTargetException { <END> return createAndValidateTag(inputFile, true); }</code><technical_language>is this method needed</technical_language>

Target:
protected Annotation createAndValidateTag(String inputFile) throws IOException, JsonParseException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { return createTag(inputFile, true); }