auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public boolean accept(@NotNull HighlightInfo highlightInfo, @Nullable PsiFile file) { if (null != file) { String description = StringUtil.notNullize(highlightInfo.getDescription()); if (HighlightSeverity.WARNING.equals(highlightInfo.getSeverity())) { if (REDUNDANT_DEFAULT_PARAMETER_VALUE_ASSIGNMENT.equals(description)) { return !EqualsAndHashCodeCallSuperHandler.isEqualsAndHashCodeCallSuperDefault(highlightInfo, file); } else if (CodeInsightColors.NOT_USED_ELEMENT_ATTRIBUTES.equals(highlightInfo.type.getAttributesKey())) { if (VARIABLE_INITIALIZER_IS_REDUNDANT.matcher(description).matches()) { <START> return !BuilderHandler.isDefaultBuilderValue(highlightInfo, file); <END> } } } else if (HighlightSeverity.ERROR.equals(highlightInfo.getSeverity())) { if (uninitializedField(description) && LazyGetterHandler.isLazyGetterHandled(highlightInfo, file)) { return false; } return !OnXAnnotationHandler.isOnXParameterAnnotation(highlightInfo, file) && !OnXAnnotationHandler.isOnXParameterValue(highlightInfo, file) && !LOMBOK_ANYANNOTATIONREQUIRED.matcher(description).matches(); } } return true; }</code><technical_language>try write inspection test, I this warning is coming DefUseInspection. Example: src/test/java/de/plushnikov/intellij/plugin/inspection/DataFlowInspectionTest.java</technical_language>

Target:
public boolean accept(@NotNull HighlightInfo highlightInfo, @Nullable PsiFile file) { if (null == file) { return true; } PsiElement highlightedElement = file.findElementAt(highlightInfo.getStartOffset()); if (null == highlightedElement) { return true; } String description = StringUtil.notNullize(highlightInfo.getDescription()); if (HighlightSeverity.ERROR.equals(highlightInfo.getSeverity())) { if (uninitializedField(description) && LazyGetterHandler.isLazyGetterHandled(highlightedElement)) { return false; } return !OnXAnnotationHandler.isOnXParameterAnnotation(highlightInfo, file) && !OnXAnnotationHandler.isOnXParameterValue(highlightInfo, file) && !LOMBOK_ANYANNOTATIONREQUIRED.matcher(description).matches(); } Map<TextAttributesKey, List<LombokHighlightFilter>> severityMap = FILTERS .getOrDefault(highlightInfo.getSeverity(), Collections.emptyMap()); return severityMap.getOrDefault(highlightInfo.type.getAttributesKey(), Collections.emptyList()).stream() .filter(filter -> filter.descriptionCheck(description)) .allMatch(filter -> filter.accept(highlightedElement)); }
Source:
<code><START> public void testResynchronize() throws InterruptedException { <END> AgentMessageProcessor processor = (AgentMessageProcessor) this.agent.getMessagingClient().getMessageProcessor(); processor.processMessage( new MsgCmdResynchronize()); Assert.assertEquals( 0, this.client.messagesForTheDm.size()); Assert.assertEquals( 0, this.client.messagesForAgents.size()); TestApplicationTemplate app = new TestApplicationTemplate(); processor.scopedInstance = app.getTomcatVm(); processor.scopedInstance.setStatus( InstanceStatus.DEPLOYED_STARTED ); processor.processMessage( new MsgCmdResynchronize()); Assert.assertEquals( 0, this.client.messagesForTheDm.size()); Assert.assertEquals( 0, this.client.messagesForAgents.size()); app.getTomcat().setStatus( InstanceStatus.DEPLOYED_STARTED ); processor.processMessage( new MsgCmdResynchronize()); Assert.assertEquals( 0, this.client.messagesForTheDm.size()); Assert.assertEquals( 0, this.client.messagesForAgents.size()); app.getWar().setStatus( InstanceStatus.DEPLOYED_STARTED ); processor.processMessage( new MsgCmdResynchronize()); Assert.assertEquals( 0, this.client.messagesForTheDm.size()); Assert.assertEquals( 1, this.client.messagesForAgents.size()); }</code><technical_language>No, this method throw interrupted exceptions</technical_language>

Target:
public void testResynchronize() { AgentMessageProcessor processor = (AgentMessageProcessor) this.agent.getMessagingClient().getMessageProcessor(); processor.processMessage( new MsgCmdResynchronize()); Assert.assertEquals( 0, this.client.messagesForTheDm.size()); Assert.assertEquals( 0, this.client.messagesForAgents.size()); TestApplicationTemplate app = new TestApplicationTemplate(); processor.scopedInstance = app.getTomcatVm(); processor.scopedInstance.setStatus( InstanceStatus.DEPLOYED_STARTED ); processor.processMessage( new MsgCmdResynchronize()); Assert.assertEquals( 0, this.client.messagesForTheDm.size()); Assert.assertEquals( 0, this.client.messagesForAgents.size()); app.getTomcat().setStatus( InstanceStatus.DEPLOYED_STARTED ); processor.processMessage( new MsgCmdResynchronize()); Assert.assertEquals( 0, this.client.messagesForTheDm.size()); Assert.assertEquals( 0, this.client.messagesForAgents.size()); app.getWar().setStatus( InstanceStatus.DEPLOYED_STARTED ); processor.processMessage( new MsgCmdResynchronize()); Assert.assertEquals( 0, this.client.messagesForTheDm.size()); Assert.assertEquals( 1, this.client.messagesForAgents.size()); }
Source:
<code>public CompletableFuture<Object> invokeAsync() throws Throwable { long flagBitSet = EnumUtil.bitSetOf(Flag.SKIP_REMOTE_LOOKUP); GetCacheEntryCommand command = commandsFactory.buildGetCacheEntryCommand(key, EnumUtil.mergeBitSets(flagBitSet, getFlagsBitSet())); command.setTopologyId(topologyId); InvocationContext invocationContext = icf.createRemoteInvocationContextForCommand(command, getOrigin()); CompletableFuture<Object> future = invoker.invokeAsync(invocationContext, command); return future.thenApply(rv -> { if (rv instanceof MVCCEntry) { if (trace) log.trace("Handling an internal cache entry..."); MVCCEntry mvccEntry = (MVCCEntry) rv; return entryFactory.createValue(mvccEntry); } else if (rv instanceof InternalCacheEntry) { InternalCacheEntry internalCacheEntry = (InternalCacheEntry) rv; return internalCacheEntry.toInternalCacheValue(); } else { <START> return rv; <END> } }); }</code><technical_language>a non-null rv a MVCCEntry InternalCacheEntry? If not, I code clearer</technical_language>

Target:
public CompletableFuture<Object> invokeAsync() throws Throwable { long flagBitSet = EnumUtil.bitSetOf(Flag.SKIP_REMOTE_LOOKUP); GetCacheEntryCommand command = commandsFactory.buildGetCacheEntryCommand(key, EnumUtil.mergeBitSets(flagBitSet, getFlagsBitSet())); command.setTopologyId(topologyId); InvocationContext invocationContext = icf.createRemoteInvocationContextForCommand(command, getOrigin()); CompletableFuture<Object> future = invoker.invokeAsync(invocationContext, command); return future.thenApply(rv -> { if (trace) log.tracef("Return value for key=%s is %s", key, rv); if (rv instanceof MVCCEntry) { MVCCEntry mvccEntry = (MVCCEntry) rv; return entryFactory.createValue(mvccEntry); } else if (rv instanceof InternalCacheEntry) { InternalCacheEntry internalCacheEntry = (InternalCacheEntry) rv; return internalCacheEntry.toInternalCacheValue(); } else { return rv; } }); }
Source:
<code>public void testInsertTaskWithStartAndDueUpdateStatus() { RowSnapshot<TaskLists> taskList = new VirtualRowSnapshot<>(new LocalTaskListsTable(mAuthority)); RowSnapshot<Tasks> task = new VirtualRowSnapshot<>(new TaskListScoped(taskList, new TasksTable(mAuthority))); DateTime start = DateTime.now(); DateTime due = start.addDuration(new Duration(1, 1, 0)); assertThat(new Seq<>( new Put<>(taskList, new EmptyRowData<>()), new Put<>(task, new TimeData(start, due)), new Put<>(task, new StatusData(Tasks.STATUS_COMPLETED)) ), resultsIn(mClient, new Assert<>(task, new TimeData(start, due)), new AssertRelated<>( new InstanceTable(mAuthority), Instances.TASK_ID, task, <START> new InstanceData( <END> start.shiftTimeZone(TimeZone.getDefault()), due.shiftTimeZone(TimeZone.getDefault()), absent(), Instances.INSTANCE_STATUS_CLOSED)) )); }</code><technical_language>TZ check</technical_language>

Target:
public void testInsertTaskWithStartAndDueUpdateStatus() { RowSnapshot<TaskLists> taskList = new VirtualRowSnapshot<>(new LocalTaskListsTable(mAuthority)); RowSnapshot<Tasks> task = new VirtualRowSnapshot<>(new TaskListScoped(taskList, new TasksTable(mAuthority))); DateTime start = DateTime.now(); DateTime due = start.addDuration(new Duration(1, 1, 0)); assertThat(new Seq<>( new Put<>(taskList, new EmptyRowData<>()), new Put<>(task, new TimeData(start, due)), new Put<>(task, new StatusData(Tasks.STATUS_COMPLETED)) ), resultsIn(mClient, new Assert<>(task, new TimeData(start, due)), new AssertRelated<>( new InstanceTable(mAuthority), Instances.TASK_ID, task, new Composite<Instances>( new InstanceTestData( start.shiftTimeZone(TimeZone.getDefault()), due.shiftTimeZone(TimeZone.getDefault()), absent(), -1), new CharSequenceRowData<>(Tasks.TZ, "UTC")) ))); }
Source:
<code>public boolean isDelayed() { <START> return delayed; <END> }</code><technical_language>This is weird... MessageState atomic State internal delay state? if message DELAYED_SENDING state isDelayed return false</technical_language>

Target:
public boolean isDelayed() { return timeoutHasPassed || state.get() == DELAYED_SENDING || state.get() == DELAYED_PROCESSING; }
Source:
<code>private String readIntegrationVersionPropertyString(MavenProject mavenProject) { if (mavenProject.getProperties() != null) { <START> if (mavenProject.getProperties().getProperty(_integrationVersionPropertyKey) != null) { <END> return mavenProject.getProperties().getProperty(_integrationVersionPropertyKey); } else { for (Dependency dependency : mavenProject.getDependencyManagement().getDependencies()) { if ("org.jboss.integration.fuse".equals(dependency.getGroupId())) { return dependency.getVersion(); } } } } return null; }</code><technical_language>mavenProject.getProperties() extracted a variable</technical_language>

Target:
private String readIntegrationVersionPropertyString(MavenProject mavenProject) { if (mavenProject != null && mavenProject.getProperties() != null) { Properties properties = mavenProject.getProperties(); if (properties.getProperty(_integrationVersionPropertyKey) != null) { return properties.getProperty(_integrationVersionPropertyKey); } else if (mavenProject.getDependencyManagement() != null) { for (Dependency dependency : mavenProject.getDependencyManagement().getDependencies()) { if (M2EUtils.INTEGRATION_GROUP_ID.equals(dependency.getGroupId())) { return dependency.getVersion(); } } } } return null; }
Source:
<code>private void showBookmarkSnackbar() { if (!isAdded()) { return; } Snackbar.make(getView(), R.string.reader_bookmark_snack_title, AccessibilityUtils.getSnackbarDuration(getActivity())).setAction(R.string.reader_bookmark_snack_btn, new View.OnClickListener() { @Override public void onClick(View view) { <START> if (getActivity() instanceof WPMainActivity) { <END> if (ReaderTagTable.getBookmarkTags().isEmpty()) { return; } mRecyclerView.setCurrentFilter(ReaderTagTable.getBookmarkTags().get(0)); mRecyclerView.showToolbar(); } else { Intent intent = new Intent(view.getContext(), WPMainActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.putExtra(WPMainActivity.ARG_OPENED_FROM_BOOKMARK_SNACKBAR, true); startActivity(intent); } } }) .show(); }</code><technical_language>consider ignoring current state in navigation initiator handle cases in onCreate onNewIntent in WPMainActivity. WDYT</technical_language>

Target:
private void showBookmarkSnackbar() { if (!isAdded()) { return; } Snackbar.make(getView(), R.string.reader_bookmark_snack_title, AccessibilityUtils.getSnackbarDuration(getActivity())).setAction(R.string.reader_bookmark_snack_btn, new View.OnClickListener() { @Override public void onClick(View view) { ActivityLauncher.viewSavedPostsListInReader(getActivity()); if (getActivity() instanceof WPMainActivity) { getActivity().overridePendingTransition(0, 0); } } }) .show(); }
Source:
<code>public static < T extends NativeType< T > > ImgFactory< T > getArrayOrCellImgFactory( final Dimensions targetSize, final int targetCellSize, final T type ) { <START> if ( Intervals.numElements( targetSize ) <= MAX_ARRAY_SIZE ) <END> return new ArrayImgFactory<>( type ); final int cellSize; if ( Math.pow( targetCellSize, targetSize.numDimensions() ) <= MAX_ARRAY_SIZE ) cellSize = targetCellSize; else cellSize = ( int ) Math.pow( MAX_ARRAY_SIZE / type.getEntitiesPerPixel().getRatio(), 1.0 / targetSize.numDimensions() ); return new CellImgFactory<>( type, cellSize ); }</code><technical_language>adjusting cellSize below, MAX_ARRAY_SIZE (or Integer.MAX_VALUE) is divided type.getEntitiesPerPixel().getRatio(). sense consider type.getEntitiesPerPixel().getRatio() in checks for number of required array elements for ArrayImg cell size? I.e. 1. java if ( Intervals.numElements( targetSize ) * type.getEntitiesPerPixel().getRatio() <= MAX_ARRAY_SIZE ) 2. java if ( Math.pow( targetCellSize, targetSize.numDimensions() ) * type.getEntitiesPerPixel().getRatio() <= MAX_ARRAY_SIZE ) This is necessarily responsibility of this PR fixed while it</technical_language>

Target:
public static < T extends NativeType< T > > ImgFactory< T > getArrayOrCellImgFactory( final Dimensions targetSize, final int targetCellSize, final T type ) { Fraction entitiesPerPixel = type.getEntitiesPerPixel(); final long numElements = Intervals.numElements( targetSize ); final long numEntities = entitiesPerPixel.mulCeil( numElements ); if ( numElements <= Integer.MAX_VALUE && numEntities <= MAX_ARRAY_SIZE ) return new ArrayImgFactory<>( type ); final int maxCellSize = ( int ) Math.pow( Math.min( MAX_ARRAY_SIZE / entitiesPerPixel.getRatio(), Integer.MAX_VALUE ), 1.0 / targetSize.numDimensions() ); final int cellSize = Math.min( targetCellSize, maxCellSize ); return new CellImgFactory<>( type, cellSize ); }
Source:
<code>public void testGetAllFromDisksIncludingSnapshots() { List<Disk> result = dao.getAllFromDisksIncludingSnapshots(null, false); <START> List<Disk> sameImageIdDisks = result.stream().filter(disk -> disk.getId().equals(FixturesTool.IMAGE_GROUP_ID)).collect( Collectors.toList()); <END> assertEquals("wrong number of returned disks", 4, sameImageIdDisks.size()); }</code><technical_language>check total number of images returned? benefit of this filtering</technical_language>

Target:
public void testGetAllFromDisksIncludingSnapshots() { List<Disk> result = dao.getAllFromDisksIncludingSnapshots(null, false); assertEquals("wrong number of returned disks", 15, result.size()); }
Source:
<code>public DescriptionBuilder withAdditionalAnnotations(Annotation annotation, Annotation... additionalAnnotations) { if (annotation == null) { throw new NullPointerException("Cannot add a null annotation"); } annotations.add(annotation); <START> annotations.addAll(Arrays.asList(additionalAnnotations)); <END> return this; }</code><technical_language>This checks parameter for null. update version takes in a List check entries for nulls update this line call version</technical_language>

Target:
public DescriptionBuilder withAdditionalAnnotations(Annotation annotation, Annotation... additionalAnnotations) { List<Annotation> annotations = new ArrayList<Annotation>(); annotations.add(annotation); annotations.addAll(Arrays.asList(additionalAnnotations)); return withAdditionalAnnotations(annotations); }
Source:
<code>OperationTimer(boolean trackOverallCpuTime, boolean trackOperationCpuTime, boolean trackOverallAllocation, boolean trackOperationAllocation) { this.trackOverallCpuTime = trackOverallCpuTime; this.trackOperationCpuTime = trackOperationCpuTime; checkArgument(trackOverallCpuTime || !trackOperationCpuTime, "tracking operation cpu time without tracking overall cpu time is not supported"); this.trackOverallAllocation = trackOverallAllocation; this.trackOperationAllocation = trackOperationAllocation; <START> checkArgument(trackOverallAllocation || !trackOperationAllocation, "tracking operation allocation without tracking overall allocation is not supported"); checkArgument(!trackOverallAllocation || THREAD_MX_BEAN_EX != null, "tracking allocation is not supported by this JVM"); <END> wallStart = System.nanoTime(); cpuStart = trackOverallCpuTime ? currentThreadCpuTime() : 0; allocationStart = trackOverallAllocation ? currentThreadAllocation() : 0; intervalWallStart = wallStart; intervalCpuStart = cpuStart; intervalAllocationStart = allocationStart; }</code><technical_language>This is simpler understand :) !(trackOverallAllocation && THREAD_MX_BEAN_EX == null) !(trackOperationAllocation && !trackOverallAllocation) - Move check</technical_language>

Target:
OperationTimer(boolean trackOverallCpuTime, boolean trackOperationCpuTime, boolean trackOverallAllocation, boolean trackOperationAllocation) { this.trackOverallCpuTime = trackOverallCpuTime; this.trackOperationCpuTime = trackOperationCpuTime; checkArgument(trackOverallCpuTime || !trackOperationCpuTime, "tracking operation cpu time without tracking overall cpu time is not supported"); this.trackOverallAllocation = trackOverallAllocation; this.trackOperationAllocation = trackOperationAllocation; checkArgument(trackOverallAllocation || !trackOperationAllocation, "tracking operation allocation without tracking overall allocation is not supported"); wallStart = System.nanoTime(); cpuStart = trackOverallCpuTime ? currentThreadCpuTime() : 0; allocationStart = trackOverallAllocation ? currentThreadAllocation() : 0; intervalWallStart = wallStart; intervalCpuStart = cpuStart; intervalAllocationStart = allocationStart; }
Source:
<code>private String getExpectedMessagePostfix(final String messageKey) { final String msg = getCheckMessage(IndentationCheck.class, messageKey, FAKE_PROPERTY_ZERO, indent + indentOffset, expectedWarning); final int indexOfMsgPostfix = msg.indexOf(FAKE_PROPERTY_ZERO) + FAKE_PROPERTY_ZERO.length(); <START> return msg.substring(indexOfMsgPostfix); <END> }</code><technical_language>single return point please</technical_language>

Target:
private String getExpectedMessagePostfix(final String messageKey) { final String msg = getCheckMessage(IndentationCheck.class, messageKey, FAKE_ARGUMENT_ZERO, indent + indentOffset, expectedWarning); final int indexOfMsgPostfix = msg.indexOf(FAKE_ARGUMENT_ZERO) + FAKE_ARGUMENT_ZERO.length(); return msg.substring(indexOfMsgPostfix); }
Source:
<code>public void close() throws IOException { markedAsDestroyed = true; if (connector != null) { <START> executor.submit(new Runnable() { <END> public void run() { if (connector != null) { try { connector.close(); } catch (IOException e) { logger.error("Error occurred during close connection {}", this, e); } } } }); } }</code><technical_language>delegate closing executor</technical_language>

Target:
public void close() { if (connector != null) { try { connector.close(); } catch (IOException e) { logger.error("Error occurred during close connection {}", this, e); } } }
Source:
<code>public static void onBarcodeResult(BarcodeScanListener barcodeScanListener, int requestCode, int resultCode, Intent intent) { if (BuildConfig.DEBUG && !(requestCode == BARCODE_FETCH)) { throw new AssertionError("requestCode should be BARCODE_FETCH!"); } if (resultCode == Activity.RESULT_OK) { <START> String result = intent.getStringExtra(SCAN_RESULT).trim(); <END> barcodeScanListener.onBarcodeFetch(result, intent); } }</code><technical_language>QQ: Do non-null this step</technical_language>

Target:
public static void onBarcodeResult(BarcodeScanListener barcodeScanListener, int requestCode, int resultCode, Intent intent) { if (BuildConfig.DEBUG && !(requestCode == BARCODE_FETCH)) { throw new AssertionError("requestCode should be BARCODE_FETCH!"); } if (resultCode == Activity.RESULT_OK) { String result = intent.getStringExtra(SCAN_RESULT); if (result != null){ result = result.trim(); } barcodeScanListener.onBarcodeFetch(result, intent); } }
Source:
<code>public QuotaProgressBar() { <START> super(); <END> tooltip = new WidgetTooltip(this); }</code><technical_language>super is implied</technical_language>

Target:
public QuotaProgressBar() { tooltip = new WidgetTooltip(this); }
Source:
<code><START> private String replaceDiskSourceFile(String xmlDesc, String isoPath, String vmName) throws IOException, SAXException, ParserConfigurationException, TransformerException { InputStream in = IOUtils.toInputStream(xmlDesc); DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = docFactory.newDocumentBuilder(); Document doc = docBuilder.parse(in); Node domainNode = doc.getFirstChild(); NodeList domainChildNodes = domainNode.getChildNodes(); for (int i = 0; i < domainChildNodes.getLength(); i++) { Node domainChildNode = domainChildNodes.item(i); if ("devices".equals(domainChildNode.getNodeName())) { NodeList devicesChildNodes = domainChildNode.getChildNodes(); for (int x = 0; x < devicesChildNodes.getLength(); x++) { Node deviceChildNode = devicesChildNodes.item(x); if ("disk".equals(deviceChildNode.getNodeName())) { Node diskNode = deviceChildNode; String sourceText = getSourceText(diskNode); NodeList diskChildNodes = diskNode.getChildNodes(); for (int z = 0; z < diskChildNodes.getLength(); z++) { Node diskChildNode = diskChildNodes.item(z); if ("source".equals(diskChildNode.getNodeName())) { Node sourceNode = diskChildNode; NamedNodeMap sourceNodeAttributes = sourceNode.getAttributes(); Node sourceNodeAttribute = sourceNodeAttributes.getNamedItem("file"); if ( sourceNodeAttribute.getNodeValue().contains(vmName)) { diskNode.removeChild(diskChildNode); Element newChildSourceNode = doc.createElement("source"); newChildSourceNode.setAttribute("file", isoPath); diskNode.appendChild(newChildSourceNode); } } } } } } } return getXml(doc); } <END></code><technical_language>for - if - for - if - for - if - if, this dissected simplified</technical_language>

Target:
private String replaceDiskSourceFile(String xmlDesc, String isoPath, String vmName) throws IOException, SAXException, ParserConfigurationException, TransformerException { InputStream in = IOUtils.toInputStream(xmlDesc); DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = docFactory.newDocumentBuilder(); Document doc = docBuilder.parse(in); Node domainNode = doc.getFirstChild(); NodeList domainChildNodes = domainNode.getChildNodes(); for (int i = 0; i < domainChildNodes.getLength(); i++) { Node domainChildNode = domainChildNodes.item(i); if ("devices".equals(domainChildNode.getNodeName())) { NodeList devicesChildNodes = domainChildNode.getChildNodes(); if (findDiskNode(doc, devicesChildNodes, vmName, isoPath)) { break; } } } return getXml(doc); }
Source:
<code>public static Object invokeInstanceMethod(Object instance, Method method, Object[] args) { Class[] paramTypes = method.getParameterTypes(); if (paramTypes.length != args.length) { handleException("Provided argument count does not match method the " + "parameter count of method '" + method.getName() + "'. Argument count = " + args.length + ", method parameter count = " + paramTypes.length); } Object[] processedArgs = new Object[paramTypes.length]; for (int i = 0; i < paramTypes.length; ++i) { if (args[i] == null || paramTypes[i].isAssignableFrom(args[i].getClass())) { processedArgs[i] = args[i]; } else if (SimpleTypeMapper.isSimpleType(paramTypes[i])) { try { processedArgs[i] = SimpleTypeMapper.getSimpleTypeObject(paramTypes[i], AXIOMUtil.stringToOM("<a>" + args[i] + "</a>")); } catch (XMLStreamException e) { handleException("XMLStreamException ", e); } } else { handleException("Incompatible argument found in " + i + "th argument " + "for '" + method.getName() + "' method."); } } try { return method.invoke(instance, processedArgs); <START> } catch (IllegalAccessException e) { <END> handleException("Error while invoking '" + method.getName() + "' method " + "via reflection.", e); } catch (InvocationTargetException e) { handleException("Error while invoking '" + method.getName() + "' method " + "via reflection.", e); } return null; }</code><technical_language>java 1.7 include in catch eg: IllegalAccessException | InvocationTargetException. catch Exception end</technical_language>

Target:
public static Object invokeInstanceMethod(Object instance, Method method, Object[] args) { Class[] paramTypes = method.getParameterTypes(); if (paramTypes.length != args.length) { handleException("Provided argument count does not match method the " + "parameter count of method '" + method.getName() + "'. Argument count = " + args.length + ", method parameter count = " + paramTypes.length); } Object[] processedArgs = new Object[paramTypes.length]; for (int i = 0; i < paramTypes.length; ++i) { if (args[i] == null || paramTypes[i].isAssignableFrom(args[i].getClass())) { processedArgs[i] = args[i]; } else if (SimpleTypeMapper.isSimpleType(paramTypes[i])) { try { processedArgs[i] = SimpleTypeMapper.getSimpleTypeObject(paramTypes[i], AXIOMUtil.stringToOM("<a>" + args[i] + "</a>")); } catch (XMLStreamException e) { handleException("XMLStreamException ", e); } } else { handleException("Incompatible argument found in " + i + "th argument " + "for '" + method.getName() + "' method."); } } try { return method.invoke(instance, processedArgs); } catch (IllegalAccessException |InvocationTargetException e ) { handleException("Error while invoking '" + method.getName() + "' method " + "via reflection.", e); } return null; }
Source:
<code>public boolean hasNext() { <START> if (currentEpisodes != null && episodes.hasNext()) { END> currentEpisodes = episodes.next().iterator(); if (currentEpisodes.hasNext()) { return true; } else { return false; } } else if (currentEpisodes.hasNext()) { return true; } else if (episodes.hasNext()) { currentEpisodes = episodes.next().iterator(); if (currentEpisodes.hasNext()) { return true; } else { return false; } } else { return false; } }</code><technical_language>making this consistent work pages this method more readable well</technical_language>

Target:
public boolean hasNext() { return episodesIterator.hasNext(); }
Source:
<code>public void log(IStatus status) { if (status.getSeverity() < minStatus) return; if (writer != null) { writer.start(STATUS_ELEMENT); switch (status.getSeverity()) { case IStatus.OK : writer.attribute(STATUS_SEVERITY_ATTRIBUTE, "OK"); break; case IStatus.INFO : writer.attribute(STATUS_SEVERITY_ATTRIBUTE, "INFO"); break; case IStatus.WARNING : writer.attribute(STATUS_SEVERITY_ATTRIBUTE, "WARNING"); break; case IStatus.ERROR : writer.attribute(STATUS_SEVERITY_ATTRIBUTE, "ERROR"); break; case IStatus.CANCEL : writer.attribute(STATUS_SEVERITY_ATTRIBUTE, "CANCEL"); break; default : writer.attribute(STATUS_SEVERITY_ATTRIBUTE, status.getSeverity()); } writer.attribute(STATUS_MESSAGE_ATTRIBUTE, status.getMessage()); } else System.out.println(status); IStatus[] nestedStatus = status.getChildren(); if (nestedStatus != null) for (IStatus <START> nestedStatu : <END> nestedStatus) { log(nestedStatu); } if (writer != null) writer.end(); }</code><technical_language>name needed</technical_language>

Target:
public void log(IStatus status) { if (status.getSeverity() < minStatus) return; if (writer != null) { writer.start(STATUS_ELEMENT); switch (status.getSeverity()) { case IStatus.OK : writer.attribute(STATUS_SEVERITY_ATTRIBUTE, "OK"); break; case IStatus.INFO : writer.attribute(STATUS_SEVERITY_ATTRIBUTE, "INFO"); break; case IStatus.WARNING : writer.attribute(STATUS_SEVERITY_ATTRIBUTE, "WARNING"); break; case IStatus.ERROR : writer.attribute(STATUS_SEVERITY_ATTRIBUTE, "ERROR"); break; case IStatus.CANCEL : writer.attribute(STATUS_SEVERITY_ATTRIBUTE, "CANCEL"); break; default : writer.attribute(STATUS_SEVERITY_ATTRIBUTE, status.getSeverity()); } writer.attribute(STATUS_MESSAGE_ATTRIBUTE, status.getMessage()); } else System.out.println(status); IStatus[] nestedStatus = status.getChildren(); if (nestedStatus != null) for (IStatus s : nestedStatus) { log(s); } if (writer != null) writer.end(); }
Source:
<code>private void verifyServiceDeclaration() { final PackageManager packageManager = mContext.getPackageManager(); final Intent intent = new Intent(mContext, BeaconService.class); List<ResolveInfo> resolveInfo = packageManager.queryIntentServices(intent, PackageManager.MATCH_DEFAULT_ONLY); <START> if (resolveInfo != null && resolveInfo.size() == 0) { <END> throw new ServiceNotDeclaredException(); } }</code><technical_language>Thoughts resolveInfo.isEmpty() instead of resolveInfo.size() == 0? isEmpty feels a bit more expressive of intent</technical_language>

Target:
private void verifyServiceDeclaration() { final PackageManager packageManager = mContext.getPackageManager(); final Intent intent = new Intent(mContext, BeaconService.class); List<ResolveInfo> resolveInfo = packageManager.queryIntentServices(intent, PackageManager.MATCH_DEFAULT_ONLY); if (resolveInfo != null && resolveInfo.isEmpty()) { throw new ServiceNotDeclaredException(); } }
Source:
<code>private void updateMap(WfsLayerInfo wfsLayerInfo) { mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_HIDDEN); mLoadingView.setVisibility(View.VISIBLE); mMapView.getMap().getOperationalLayers().clear(); WfsFeatureTable featureTable = new WfsFeatureTable(wfsLayerInfo); featureTable.setAxisOrder(mAxisCheckbox.isChecked() ? OgcAxisOrder.SWAP : OgcAxisOrder.NO_SWAP); featureTable.setFeatureRequestMode(ServiceFeatureTable.FeatureRequestMode.MANUAL_CACHE); ListenableFuture<FeatureQueryResult> featureQueryResultFuture = featureTable .populateFromServiceAsync(new QueryParameters(), false, null); <START> new Thread(() -> { <END> try { featureQueryResultFuture.get(); FeatureLayer featureLayer = new FeatureLayer(featureTable); featureLayer.setRenderer(getRandomRendererForTable(featureTable)); runOnUiThread(() -> { mMapView.getMap().getOperationalLayers().add(featureLayer); mMapView.setViewpointGeometryAsync(featureLayer.getFullExtent(), 50); }); } catch (InterruptedException | ExecutionException e) { runOnUiThread( () -> logErrorToUser( getString(R.string.error_feature_table_populate_from_service_failure, e.getMessage()))); } finally { runOnUiThread(() -> mLoadingView.setVisibility(View.GONE)); } }).start(); }</code><technical_language>Ahh sorry. I understand mentioning yesterday. ListenableFuture<FeatureQueryResult> a doneLoadingListener to: - Display a loading UI - Get feature layer extent loaded</technical_language>

Target:
private void updateMap(WfsLayerInfo wfsLayerInfo) { mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_HIDDEN); mLoadingView.setVisibility(View.VISIBLE); mMapView.getMap().getOperationalLayers().clear(); WfsFeatureTable featureTable = new WfsFeatureTable(wfsLayerInfo); featureTable.setAxisOrder(mAxisCheckbox.isChecked() ? OgcAxisOrder.SWAP : OgcAxisOrder.NO_SWAP); featureTable.setFeatureRequestMode(ServiceFeatureTable.FeatureRequestMode.MANUAL_CACHE); FeatureLayer featureLayer = new FeatureLayer(featureTable); featureLayer.setRenderer(getRandomRendererForTable(featureTable)); mMapView.getMap().getOperationalLayers().add(featureLayer); ListenableFuture<FeatureQueryResult> featureQueryResultFuture = featureTable .populateFromServiceAsync(new QueryParameters(), false, null); featureQueryResultFuture.addDoneListener(() -> { mMapView.setViewpointGeometryAsync(featureLayer.getFullExtent(), 50); mLoadingView.setVisibility(View.GONE); }); }
Source:
<code>void restartSessionIfNeeded() { <START> long resetTime = sessionTime != null ? System.currentTimeMillis() - sessionTime : HALF_MIN_IN_MILLIS; <END> if (resetTime < HALF_MIN_IN_MILLIS) return; OneSignal.Log(OneSignal.LOG_LEVEL.DEBUG, "Session restarted"); cleanSession(); onSessionStarted(); if (sessionListener != null) sessionListener.onSessionRestarted(); }</code><technical_language>This is duplicated code, check this in OneSignal.doSessionInit this is called</technical_language>

Target:
void restartSessionIfNeeded() { if (OneSignal.getAppEntryState().isNotificationClick()) return; JSONArray lastNotifications = getLastNotificationsReceivedIds(); if (lastNotifications.length() > 0) setSession(Session.INDIRECT, null, lastNotifications); else setSession(Session.UNATTRIBUTED, null, null); }
Source:
<code>public void initForViewByQuestion(InstructorAttributes instructor, String selectedSection, String showStats, String groupByTeam) { viewType = ViewType.QUESTION; this.instructor = instructor; this.selectedSection = selectedSection; this.showStats = showStats; this.groupByTeam = groupByTeam; Map<FeedbackQuestionAttributes, List<FeedbackResponseAttributes>> questionToResponseMap = bundle.getQuestionResponseMap(); questionPanels = new ArrayList<InstructorFeedbackResultsQuestionTable>(); for (Map.Entry<FeedbackQuestionAttributes, List<FeedbackResponseAttributes>> entry : questionToResponseMap.entrySet()) { FeedbackQuestionAttributes question = entry.getKey(); List<FeedbackResponseAttributes> responses = entry.getValue(); <START> questionPanels.add(buildQuestionTableAndResponseRows(question, responses, "")); <END> } }</code><technical_language>signature for buildQuestionTableAndResponseRows(question, responses, "") call eliminate "" in parameter place in method body? called in place (here) defaulting null true for participantIdentifier isShowingResponseRows. for buildQuestionTableWithoutResponseRows()</technical_language>

Target:
public void initForViewByQuestion(InstructorAttributes instructor, String selectedSection, String showStats, String groupByTeam) { Assumption.assertNotNull(bundle); this.viewType = ViewType.QUESTION; this.sortType = ViewType.QUESTION.toString(); this.instructor = instructor; this.selectedSection = selectedSection; this.showStats = showStats; this.groupByTeam = groupByTeam; Map<FeedbackQuestionAttributes, List<FeedbackResponseAttributes>> questionToResponseMap = bundle.getQuestionResponseMap(); questionPanels = new ArrayList<InstructorFeedbackResultsQuestionTable>(); for (Map.Entry<FeedbackQuestionAttributes, List<FeedbackResponseAttributes>> entry : questionToResponseMap.entrySet()) { FeedbackQuestionAttributes question = entry.getKey(); List<FeedbackResponseAttributes> responses = entry.getValue(); questionPanels.add(buildQuestionTableAndResponseRows(question, responses, "")); } }
Source:
<code>public List<String> getExamples() { return Lists.newArrayList( <START> "# Create a schema for Kite's Format class:", <END> "org.kitesdk.data.Format", "# Create a schema for a class in a jar:", "com.example.MyRecord --jar my-application.jar", "# Save the schema for Kite's Format class to format.avsc:", "org.kitesdk.data.Format -o format.avsc" ); }</code><technical_language>This struck odd - want create a schema for Kite's Format class? a simple class in CLI package example</technical_language>

Target:
public List<String> getExamples() { return Lists.newArrayList( "# Create a schema for an example User class:", "org.kitesdk.cli.example.User", "# Create a schema for a class in a jar:", "com.example.MyRecord --jar my-application.jar", "# Save the schema for the example User class to user.avsc:", "org.kitesdk.cli.example.User -o user.avsc" ); }
Source:
<code>protected void updateUIForOrientation() { final int orientation = getResources().getConfiguration().orientation; try { if (orientation == Configuration.ORIENTATION_LANDSCAPE && youTubePlayer != null) { youTubePlayer.setFullscreen(true); } else if (youTubePlayer != null) { youTubePlayer.setFullscreen(false); } updateUI(orientation); } <START> catch (IllegalStateException e) { <END> return; } }</code><technical_language>is try catch block necessary here</technical_language>

Target:
protected void updateUIForOrientation() { final int orientation = getResources().getConfiguration().orientation; if (orientation == Configuration.ORIENTATION_LANDSCAPE && allowFullScreen) { LinearLayout playerContainer = getView().findViewById(R.id.player_container); if (playerContainer != null) { DisplayMetrics displayMetrics = getResources().getDisplayMetrics(); float screenHeight = displayMetrics.heightPixels; playerContainer.setLayoutParams(new LinearLayout.LayoutParams( LinearLayout.LayoutParams.MATCH_PARENT, (int) screenHeight)); playerContainer.requestLayout(); } if (youTubePlayer != null) { youTubePlayer.setFullscreen(true); } } else { LinearLayout playerContainer = getView().findViewById(R.id.player_container); if (playerContainer != null) { DisplayMetrics displayMetrics = getResources().getDisplayMetrics(); float screenWidth = displayMetrics.widthPixels; float ideaHeight = screenWidth * 9 / 16; playerContainer.setLayoutParams(new LinearLayout.LayoutParams( LinearLayout.LayoutParams.MATCH_PARENT, (int) ideaHeight)); playerContainer.requestLayout(); } if (youTubePlayer != null) { youTubePlayer.setFullscreen(false); } } updateUI(orientation); }
Source:
<code>public void testHttpsClientDisableCNCheckFalse() { String url = "https://url"; AssertionType assertion = new AssertionType(); assertion.setTransactionTimeout(-1); CONNECTClient<TestServicePortType> endpoint = null; try { PropertyAccessor.getInstance().setProperty(NhincConstants.GATEWAY_PROPERTY_FILE, NhincConstants.DISABLE_CN_CHECK, "false"); boolean disableCNCheck = PropertyAccessor.getInstance() .getPropertyBoolean(NhincConstants.GATEWAY_PROPERTY_FILE, NhincConstants.DISABLE_CN_CHECK); endpoint = createClient(url, assertion); Client client = ClientProxy.getClient(endpoint.getPort()); HTTPConduit conduit = (HTTPConduit) client.getConduit(); TLSClientParameters tlsPara = conduit.getTlsClientParameters(); Assert.assertFalse("disableCNCheck==false", tlsPara.isDisableCNCheck()); } catch (PropertyAccessException ex) { <START> System.out.println("Unable to set in memory property for disable-CN-Check."); <END> } }</code><technical_language>here, Fail test</technical_language>

Target:
public void testHttpsClientDisableCNCheckFalse() { String url = "https://url"; AssertionType assertion = new AssertionType(); assertion.setTransactionTimeout(-1); CONNECTClient<TestServicePortType> endpoint = null; try { PropertyAccessor.getInstance().setProperty(NhincConstants.GATEWAY_PROPERTY_FILE, NhincConstants.DISABLE_CN_CHECK, "false"); boolean disableCNCheck = PropertyAccessor.getInstance() .getPropertyBoolean(NhincConstants.GATEWAY_PROPERTY_FILE, NhincConstants.DISABLE_CN_CHECK); endpoint = createClient(url, assertion); Client client = ClientProxy.getClient(endpoint.getPort()); HTTPConduit conduit = (HTTPConduit) client.getConduit(); TLSClientParameters tlsPara = conduit.getTlsClientParameters(); Assert.assertFalse("disableCNCheck==false", tlsPara.isDisableCNCheck()); } catch (PropertyAccessException ex) { Assert.fail("Unable to set in memory property for disable-CN-Check."); } }
Source:
<code>public static String convert(char... chars) { if (chars.length == 0) { throw new IllegalArgumentException("empty character array"); } StringBuilder builder = new StringBuilder(chars.length * 2 - 1); <START> builder.append(chars[0]); <END> for (int i = 1; i < chars.length; i++) { builder.append(' ').append(chars[i]); } return builder.toString(); }</code><technical_language>I asking if String.join() StringJoiner here. pass a delimiter need loop code cleaner. do think</technical_language>

Target:
public static String convert(char... chars) { if (chars.length == 0) { throw new IllegalArgumentException("empty character array"); } StringBuilder builder = new StringBuilder(chars.length * 2 - 1); builder.append(chars[0]); for (int i = 1; i < chars.length; i++) { if (Character.isWhitespace(chars[i])) { throw new IllegalArgumentException("whitespace character present: " + ((int)chars[i])); } builder.append(' ').append(chars[i]); } return builder.toString(); }
Source:
<code><START> private static Certificate[] getCertificatesFromString(String pemFileString) throws IOException, <END> CertificateException { Matcher matcher = CERT_PATTERN.matcher(pemFileString); CertificateFactory certFactory = CertificateFactory.getInstance("X.509"); List<Certificate> certList = new ArrayList<>(); while (matcher.find()) { Certificate certificate; try (InputStream stream = new ByteArrayInputStream(matcher.group(0).getBytes(Charsets.UTF_8))) { certificate = certFactory.generateCertificate(stream); } certList.add(certificate); } return certList.toArray(new Certificate[certList.size()]); }</code><technical_language>prefer return List<> turn in KeyStore.PrivateKeyEntry constructor</technical_language>

Target:
private static List<Certificate> getCertificatesFromString(String pemFileString) throws IOException, CertificateException { Matcher matcher = CERT_PATTERN.matcher(pemFileString); CertificateFactory certFactory = CertificateFactory.getInstance("X.509"); List<Certificate> certList = new ArrayList<>(); while (matcher.find()) { Certificate certificate; try (InputStream stream = new ByteArrayInputStream(matcher.group().getBytes(StandardCharsets.UTF_8))) { certificate = certFactory.generateCertificate(stream); } certList.add(certificate); } return certList; }
Source:
<code>public void stop() { if (executor != null) { try { cleanup.shutdownNow(); List<Runnable> pending = executor.shutdownNow(); if (executor.awaitTermination(15, TimeUnit.MINUTES)) { if (pending != null && !pending.isEmpty()) { log.info(String.format("Finishing %d disk cache updates", pending.size())); for (Runnable update : pending) { update.run(); } } } else { log.info("Timeout waiting for disk cache to close"); } } catch (InterruptedException e) { log.warn("Interrupted waiting for disk cache to shutdown"); } } for (H2CacheImpl<?, ?> cache : caches) { <START> cache.stop(); <END> } }</code><technical_language>In ps1 I OK ignore this stop call unloading plugins. I I wrong. stop() write dirty entries database if written yet. helps avoid confusion next process reads database. caches disconnected plugin instances a reload plugin inconsistent data persistent cache. cache data in database shown new plugin instance, while new cache data is stuck in plugin instance's in memory buffer out database "later", if all. Confusing for a plugin author debug. leak entire in-memory cache in caches. in memory cache is held H2CacheImpl, is pinned in caches list. needs removed caches list plugin unload allow VM garbage collection in-memory cache data free memory for reuse</technical_language>

Target:
public void stop() { if (executor != null) { try { cleanup.shutdownNow(); List<Runnable> pending = executor.shutdownNow(); if (executor.awaitTermination(15, TimeUnit.MINUTES)) { if (pending != null && !pending.isEmpty()) { log.info(String.format("Finishing %d disk cache updates", pending.size())); for (Runnable update : pending) { update.run(); } } } else { log.info("Timeout waiting for disk cache to close"); } } catch (InterruptedException e) { log.warn("Interrupted waiting for disk cache to shutdown"); } } synchronized (caches) { for (H2CacheImpl<?, ?> cache : caches) { cache.stop(); } } }
Source:
<code>public void testObservableDirectory_dontChangeAnything_ObservableOnlyNotifiedOnce() throws InterruptedException { final File temporaryDirectory = Files.createTempDir(); try (DirectoryWatcherFiles directoryWatcherFiles = new DirectoryWatcherFiles(mockExecutorService, temporaryDirectory, CHECK_INTERVAL)) { <START> Consumer<List<File>> mockConsumer = mock(Consumer.class); <END> directoryWatcherFiles.setOnChange(mockConsumer); Thread.sleep(2 * CHECK_INTERVAL); temporaryDirectory.delete(); verify(mockConsumer, times(1)).accept(any(List.class)); } }</code><technical_language>Please final</technical_language>

Target:
public void testObservableDirectory_dontChangeAnything_ObservableOnlyNotifiedOnce() throws InterruptedException { final File temporaryDirectory = Files.createTempDir(); try (DirectoryWatcherFiles directoryWatcherFiles = new DirectoryWatcherFiles(mockExecutorService, temporaryDirectory, CHECK_INTERVAL)) { final Consumer<List<File>> mockConsumer = mock(Consumer.class); directoryWatcherFiles.setOnChange(mockConsumer); Thread.sleep(2 * CHECK_INTERVAL); temporaryDirectory.delete(); verify(mockConsumer, times(1)).accept(any(List.class)); } }
Source:
<code>public static IProject[] getProjectsContaining(Repository repository, Collection<String> fileList) throws CoreException { Set<IProject> result = new HashSet<IProject>(); Set<String> handledPaths = new TreeSet<String>(); IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); for (String member : fileList) { File file = new File(repository.getWorkTree(), member); if (!file.exists()) continue; if (file.isFile()) file = file.getParentFile(); <START> String absPath = file.getAbsolutePath(); <END> if (handledPaths.contains(absPath)) continue; IContainer[] containers = root.findContainersForLocationURI(file .toURI()); for (IContainer container : containers) if (container instanceof IProject) result.add((IProject) container); handledPaths.add(absPath); } return result.toArray(new IProject[result.size()]); }</code><technical_language>path absolute already</technical_language>

Target:
public static IProject[] getProjectsContaining(Repository repository, Collection<String> fileList) throws CoreException { Set<IProject> result = new HashSet<IProject>(); Set<String> handledPaths = new TreeSet<String>(); IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); for (String member : fileList) { File file = new File(repository.getWorkTree(), member); if (!file.exists() || file.isFile()) file = file.getParentFile(); String absPath = file.getAbsolutePath(); if (handledPaths.contains(absPath)) continue; IContainer[] containers = root.findContainersForLocationURI(file .toURI()); for (IContainer container : containers) if (container instanceof IProject) result.add((IProject) container); handledPaths.add(absPath); } return result.toArray(new IProject[result.size()]); }
Source:
<code>public void migrateVM(List<Guid> initialHosts, Guid vmToMigrate) { MigrateVmParameters parameters = new MigrateVmParameters(false, vmToMigrate); parameters.setInitialHosts(new ArrayList<Guid>(initialHosts)); <START> Backend.getInstance().runInternalAction(VdcActionType.MigrateVm, <END> parameters, ExecutionHandler.createInternalJobContext()); }</code><technical_language>this is injected, @Inject private BackendInternal backend; instead of static access</technical_language>

Target:
public void migrateVM(List<Guid> initialHosts, Guid vmToMigrate) { MigrateVmParameters parameters = new MigrateVmParameters(false, vmToMigrate); parameters.setInitialHosts(new ArrayList<Guid>(initialHosts)); backendInternal.runInternalAction(VdcActionType.MigrateVm, parameters, ExecutionHandler.createInternalJobContext()); }
Source:
<code>protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { <START> final org.kie.workbench.common.stunner.core.graph.Graph graph = getGraph(context); <END> final Collection<RuleViolation> cardinalityRuleViolations = doEvaluate(context, RuleContextBuilder.GraphContexts.cardinality(graph, getCandidate(), CardinalityContext.Operation.ADD)); return new GraphCommandResultBuilder(cardinalityRuleViolations).build(); }</code><technical_language>Do need FQCN</technical_language>

Target:
protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { final Graph graph = getGraph(context); final Collection<RuleViolation> cardinalityRuleViolations = doEvaluate(context, RuleContextBuilder.GraphContexts.cardinality(graph, getCandidate(), CardinalityContext.Operation.ADD)); return new GraphCommandResultBuilder(cardinalityRuleViolations).build(); }
Source:
<code>public void tearDown() throws Exception { <START> TestUtils.deleteProjects(brickClass.getSimpleName()); <END> }</code><technical_language>Please delete right project</technical_language>

Target:
public void tearDown() throws Exception { Intents.release(); resetFormulaFields(); baseActivityTestRule.finishActivity(); TestUtils.deleteProjects(VisualPlacementBrickTest.class.getSimpleName()); }
Source:
<code>public String getImagePath(DefinitionImageType definitionImageType) { switch (definitionImageType) { case PALETTE_ICON_32X32: return NAME + "_icon32.png"; case SVG_ICON: <START> return null; <END> } return null; }</code><technical_language>is generic default icon</technical_language>

Target:
public String getImagePath(DefinitionImageType definitionImageType) { switch (definitionImageType) { case PALETTE_ICON_32X32: return NAME + "_icon32.png"; default: return null; } }